Re: Are f.p. manipulation functions only used in initialization?



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/
.



Relevant Pages

  • Are f.p. manipulation functions only used in initialization?
    ... I was writing some code with gfortran and found that spacing only ... worked in initialization expressions. ... RRSPACING, SCALE, SET_EXPONENT, and, SPACING were broken like this, ...
    (comp.lang.fortran)
  • Re: Help! Nested IF
    ... Your problem is that the spacing between the various expressions isn't ... > Only the first two conditions CPI Rent and %GRP without 5yrs work the ...
    (microsoft.public.word.docmanagement)
  • Re: Line spacing in text box
    ... You can increase line spacing in text boxes in recent versions of Access - I ... *think* Access 2002 was the first version to have this feature, ... look for a Line Spacing property on the Format tab of the Properties window. ... expressions. ...
    (microsoft.public.access.forms)
  • Re: Line spacing in text box
    ... > You can increase line spacing in text boxes in recent versions of Access - ... and look for a Line Spacing property on the Format tab of the ... > or expressions. ...
    (microsoft.public.access.forms)
  • Re: How to compute whether a platform rounds during addition
    ... > MINEXPONENT, NEAREST, PRECISION, RADIX, RANGE, RRSPACING, ... > SCALE, SET EXPONENT, SPACING, and TINY, ...
    (comp.lang.fortran)