Scientific rendering of a real(sp) value. See to_string_fixed_sp
for why the widening to real(dp) is lossless.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=sp), | intent(in) | :: | value | |||
| integer(kind=default_int), | intent(in) | :: | sig_digits |
pure function to_string_sci_sp(value, sig_digits) result(string) !! Scientific rendering of a `real(sp)` value. See `to_string_fixed_sp` !! for why the widening to `real(dp)` is lossless. real(sp), intent(in) :: value integer(default_int), intent(in) :: sig_digits character(len=:), allocatable :: string string = to_string_sci_dp(real(value, dp), sig_digits) end function to_string_sci_sp