I don't know how to coding a 4-byte integer value to a 4-byte real.
in C Language ...
I want to do something like this:
float value = *((float*)&intValue))
I would like to complete the code following....
real function castingInt32_to_real( intValue )
implicit none
integer,intent(in) :: intValue
!
! if intValue == 1065353216(0x3f800000) Its means 1.0 on Intel.
!I want to do following....
castingInt32_to_real <-- 1.0
end function
Given a BOZ entity, you can convert that to real with the
realintrinsic subprogram. Consider,which gives with gfortran
As an addendum, you can also use the
transferintrinsic subprogram.The above essentially does a bit-wise transfer.