Y
Yipkei Kwok
Hi,
In Fortran, it is possible to assign the value of each bit of a REAL*8
variable using a hexadecimal number with the "equivalence" statement.
For example,
program test_acos
implicit none
real*8 :: x
integer*8 :: i
equivalence (i,x)
i = z'3FE827B9682F47EB'
x = acos(x)
write(*,1400) x
1400 format(Z16)
end program test_acos
How can I do the same thing in C? i.e. How can I assign the exact
value of a "double" value (64-bit) using HEX in C?
Thank you!
In Fortran, it is possible to assign the value of each bit of a REAL*8
variable using a hexadecimal number with the "equivalence" statement.
For example,
program test_acos
implicit none
real*8 :: x
integer*8 :: i
equivalence (i,x)
i = z'3FE827B9682F47EB'
x = acos(x)
write(*,1400) x
1400 format(Z16)
end program test_acos
How can I do the same thing in C? i.e. How can I assign the exact
value of a "double" value (64-bit) using HEX in C?
Thank you!