fishwater00
Technical User
In fortran, the highest precision is 15bit, I wanna calculate around 20-bit calculation, how can I do that? Thank you
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
program test
integer,parameter :: ep=selected_real_kind(20) ! at least 20 significant digits
REAL(ep) :: pi
pi=4*ATAN(1._ep)
write(*,*) pi
end program
[lcoul@localhost test]$ ifort t58.f90
[lcoul@localhost test]$ ./a.out
3.14159265358979323846264338327950
For integer, the maximum precision is selected_int_kind(16), is it right?