Re: Are f.p. manipulation functions only used in initialization?
- From: kargl@xxxxxxxxxxxxxxxxxxxxxxxxxxxx (Steven G. Kargl)
- Date: Sat, 26 Apr 2008 21:52:30 +0000 (UTC)
In article <6_6dnatLa7meCY7VnZ2dnUVZ_qiinZ2d@xxxxxxxxxxx>,
"James Van Buskirk" <not_valid@xxxxxxxxxxx> writes:
I was writing some code with gfortran and found that spacing only
worked in initialization expressions. Doesn't anyone else use the
floating point manipulation functions in ordinary expressions and
specification expressions? Testing with gfortran I found that
RRSPACING, SCALE, SET_EXPONENT, and, SPACING were broken like this,
while EXPONENT, FRACTION, and NEAREST seemed to work:
(snip)
C:\gfortran\james\archpi>c:\gfortran\win64\bin\x86_64-pc-mingw32-gfortran
spacin
g_bug.f90 -ospacing_bug
C:\gfortran\james\archpi>spacing_bug
ulps1*spacing(x1) = 4.76837158E-07
rrspacing(x1) = 13176795.
scale(x1,ulps1) = 12.566371
set_exponent(x1,ulps1) = 3.1415927
ulps*spacing(x) = 2.0000000
rrspacing(x) = 3.1415927
scale(x,ulps) = 3.1415927
set_exponent(x,ulps) = 0.78539819
size(j1) = 2
size(j2) = 0
size(j3) = 3
size(j4) = 0
mobile:kargl[203] ./z
ulps1*spacing(x1) = 4.7683716E-07
rrspacing(x1) = 1.3176795E+07
scale(x1,ulps1) = 12.56637
set_exponent(x1,ulps1) = 3.141593
ulps*spacing(x) = 4.7683716E-07
rrspacing(x) = 1.3176795E+07
scale(x,ulps) = 12.56637
set_exponent(x,ulps) = 3.141593
size(j1) = 0
size(j2) = 131
size(j3) = 12
size(j4) = 3
Appears to work for me. Perhaps, it's an OS problem.
--
Steve
http://troutmask.apl.washington.edu/~kargl/
.
- Follow-Ups:
- Re: Are f.p. manipulation functions only used in initialization?
- From: James Van Buskirk
- Re: Are f.p. manipulation functions only used in initialization?
- References:
- Are f.p. manipulation functions only used in initialization?
- From: James Van Buskirk
- Are f.p. manipulation functions only used in initialization?
- Prev by Date: Re: right sequence of included module files
- Next by Date: Re: Are f.p. manipulation functions only used in initialization?
- Previous by thread: Are f.p. manipulation functions only used in initialization?
- Next by thread: Re: Are f.p. manipulation functions only used in initialization?
- Index(es):
Relevant Pages
|
|