Size of numbers in g95

55 views
Skip to first unread message

hoolio3...@yahoo.com

unread,
Aug 19, 2015, 5:18:25 PM8/19/15
to gg95
I'm using g95 in windows 7.
When I multiply 35.0 * 0.30E+39 I get +Inf. Is there some limit around E+40?

J.

ziggy76

unread,
Aug 20, 2015, 11:24:39 AM8/20/15
to gg95
Yes, with single precision reals you are limited  to around 1.0e38, with double precision you can go up to 1.0e308 with g95 and extended precision, you can use 1.0e4931
You can use double precision variable like this :
REAL (KIND=8) :: x, y

Best regards.

jfh

unread,
Aug 23, 2015, 7:33:49 PM8/23/15
to gg95

To find the precise limit of default real run this 2-line program:

print *,huge(1e0)
end program

In my x86_64 system that printed 3.4028235E+38
To find out the corresponding limit for double precision replace 1e0 by 1d0 in the program.

Reply all
Reply to author
Forward
0 new messages