to_string_fixed Interface

public interface to_string_fixed

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].

Calls

interface~~to_string_fixed~~CallsGraph interface~to_string_fixed to_string_fixed proc~to_string_fixed_dp to_string_fixed_dp interface~to_string_fixed->proc~to_string_fixed_dp proc~to_string_fixed_sp to_string_fixed_sp interface~to_string_fixed->proc~to_string_fixed_sp proc~assemble_fixed assemble_fixed proc~to_string_fixed_dp->proc~assemble_fixed proc~expand_exact expand_exact proc~to_string_fixed_dp->proc~expand_exact proc~is_negative is_negative proc~to_string_fixed_dp->proc~is_negative proc~round_decimal round_decimal proc~to_string_fixed_dp->proc~round_decimal proc~special_text special_text proc~to_string_fixed_dp->proc~special_text proc~to_string_fixed_sp->proc~to_string_fixed_dp proc~bd_mul_pow bd_mul_pow proc~expand_exact->proc~bd_mul_pow proc~bd_set bd_set proc~expand_exact->proc~bd_set proc~bd_to_digits bd_to_digits proc~expand_exact->proc~bd_to_digits proc~increment_digits increment_digits proc~round_decimal->proc~increment_digits proc~bd_mul_small bd_mul_small proc~bd_mul_pow->proc~bd_mul_small proc~limb_to_digits limb_to_digits proc~bd_to_digits->proc~limb_to_digits

Module Procedures

private pure function to_string_fixed_sp(value, decimals) result(string)

Fixed point rendering of a real(sp) value.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=sp), intent(in) :: value
integer(kind=default_int), intent(in) :: decimals

Return Value character(len=:), allocatable

private pure function to_string_fixed_dp(value, decimals) result(string)

Fixed point rendering of a real(dp) value.

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: value
integer(kind=default_int), intent(in) :: decimals

Return Value character(len=:), allocatable