bit_size_R8P Function

private elemental function bit_size_R8P(i) result(bits)

Arguments

TypeIntentOptionalAttributesName
real(kind=R8P), intent(in) :: i

Return Value integer(kind=I1P)


Called by

proc~~bit_size_r8p~6~~CalledByGraph proc~bit_size_r8p~6 bit_size_R8P interface~bit_size~11 bit_size interface~bit_size~11->proc~bit_size_r8p~6

Contents

Source Code


Source Code

   elemental function bit_size_R8P(i) result(bits)
   !< Compute the number of bits of a real variable.
   !<
   !<```fortran
   !< use penf
   !< print FI1P, bit_size(1._R8P)
   !<```
   !=> 64 <<<
   real(R8P), intent(in) :: i       !< Real variable whose number of bits must be computed.
   integer(I1P)          :: bits    !< Number of bits of r.
   integer(I1P)          :: mold(1) !< "Molding" dummy variable for bits counting.

   bits = size(transfer(i, mold), dim=1, kind=I1P) * 8_I1P
   endfunction bit_size_R8P