Render a real in fixed point notation with an exact number of decimals. Fixed point rendering, never an exponent.
The result carries exactly decimals digits after the decimal point,
correctly rounded round half to even from the exact binary value. A
leading 0 is always written for magnitudes below one, and decimals
equal to zero produces no trailing decimal point. decimals is clamped
to the range [0, PIC_FORMAT_MAX_DECIMALS].
Fixed point rendering of a real(sp) value.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=sp), | intent(in) | :: | value | |||
| integer(kind=default_int), | intent(in) | :: | decimals |
Fixed point rendering of a real(dp) value.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(in) | :: | value | |||
| integer(kind=default_int), | intent(in) | :: | decimals |