Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=R16P), | intent(in) | :: | n | Real to be converted. |
Returned bit-string containing input number.
Convert real to string of bits.
elemental function bstr_R16P(n) result(bstr)
!---------------------------------------------------------------------------------------------------------------------------------
!< Convert real to string of bits.
!<
!< @note It is assumed that R16P is represented by means of 128 bits, but this is not ensured in all architectures.
!---------------------------------------------------------------------------------------------------------------------------------
real(R16P), intent(in) :: n !< Real to be converted.
character(128) :: bstr !< Returned bit-string containing input number.
!---------------------------------------------------------------------------------------------------------------------------------
!---------------------------------------------------------------------------------------------------------------------------------
write(bstr, '(B128.128)') n
return
!---------------------------------------------------------------------------------------------------------------------------------
endfunction bstr_R16P