Skip to content

Commit

Permalink
DOC: Documentation update.
Browse files Browse the repository at this point in the history
  • Loading branch information
MilanSkocic committed Jun 12, 2024
1 parent a66e4d2 commit bc0fb99
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 58 deletions.
53 changes: 4 additions & 49 deletions doc/specs/codata_constants.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Codata constants
---

# Introduction
# Description

The modules:

Expand All @@ -13,59 +13,14 @@ The modules:

are automatically generated with a simple parser written in Python.

The latest codata constants were released in 2022 by the [NIST](http://physics.nist.gov/constants)
All values for the codata constants are provided as double precision reals.
The latest codata constants were released in 2022 by the [NIST](http://physics.nist.gov/constants).
All values for the codata constants are provided as double precision reals in a derived type
[[codata__constants_type(module):codata_constant_type(type)]].
The names are quite long and can be aliased with shorter names.

The derived type [[codata__constants_type(module):codata_constant_type(type)]] defines:

* 4 members:

* `name` (string)
* `value` (double precision real)
* `uncertainty` (double precision real)
* `unit` (string)

* 2 type-bound procedures:

* `print` for print the values of the constant members.
* `to_real` for getting the value or the uncertainty to the desired precision.

A module level interface [[codata__constants_type(module):to_real(interface)]] is
available for getting the constant value or uncertainty of a constant.



# `to_real` - Get the constant value or uncertainty.

## Description

Convert a [[codata__constants_type(module):codata_constant_type(type)]] to a real.
**Warning**: Some constants cannot be converted to simple precision reals due to the values of the exponents.

## Syntax

`r = ` [[codata__constants_type:to_real(interface)]] `(c, mold [, uncertainty])`

## Arguments

`c`: argument has `intent(in) ` and shall be of type [[codata__constants_type:codata_constant_type(type)]].

`mold`: argument has `intent(in)` and shall be of `real` type.
**Note**: The type of the `mold` argument defines the type of the result.

`uncertainty` (optional): argument has `intent(in)` and shall be of `logical` type.
It specifies if the uncertainty needs to be returned instead of the value. Default to `.false.`.

## Return value

Returns a scalar of `real` type which is either the value or the uncertainty of a codata constant.






# Example

```fortran
Expand Down
7 changes: 0 additions & 7 deletions doc/specs/codata_version.md

This file was deleted.

2 changes: 0 additions & 2 deletions doc/specs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,4 @@ title: Specifications (specs)
This is an index/directory of the specifications (specs) for each module.

- [constants](codata_constants.html)
- [version](codata_version.html)


0 comments on commit bc0fb99

Please sign in to comment.