bstr_R8P Function

private elemental function bstr_R8P(n) result(bstr)

Arguments

Type IntentOptional AttributesName
real(kind=R8P), intent(in) :: n

Real to be converted.

Return Value character(len=64)

Returned bit-string containing input number.

Description

Convert real to string of bits.

Called By

proc~~bstr_r8p~~CalledByGraph proc~bstr_r8p bstr_R8P interface~bstr bstr interface~bstr->proc~bstr_r8p
Help

Source Code

  elemental function bstr_R8P(n) result(bstr)
  !---------------------------------------------------------------------------------------------------------------------------------
  !< Convert real to string of bits.
  !<
  !< @note It is assumed that R8P is represented by means of 64 bits, but this is not ensured in all architectures.
  !---------------------------------------------------------------------------------------------------------------------------------
  real(R8P), intent(in) :: n    !< Real to be converted.
  character(64)         :: bstr !< Returned bit-string containing input number.
  !---------------------------------------------------------------------------------------------------------------------------------

  !---------------------------------------------------------------------------------------------------------------------------------
  write(bstr, '(B64.64)') n
  return
  !---------------------------------------------------------------------------------------------------------------------------------
  endfunction bstr_R8P