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



"FX" <coudert@xxxxxxxxxxxxx> wrote in message
news:fv2h8l$2p4t$3@xxxxxxxxxxxxx

Hi James,

Testing with gfortran I found that
RRSPACING, SCALE, SET_EXPONENT, and, SPACING were broken like this,
while EXPONENT, FRACTION, and NEAREST seemed to work

Thanks for your example, I will try to reduce it and understand what's
happening; if it happens to not be a Fortran front-end issue, I'll alert
our great Win64 developers to it.

I further tried all functions that can accept a single REAL
variable as input. I was surprised to see in the docs that BESSEL_J0,
BESSEL_J1, BESSEL_Y0, and BESSEL_Y1, aren't elemental. Is this what
the rule is for the new f08 functions? These Bessel functions failed
to link, requiring _j0l, _j1l, _y0l, and _y1l respectively.

The manual says DFLOAT needs an INTEGER actual argument but in fact
it will takes REAL*4, REAL*8, or REAL*10. LOG_GAMMA was out of
alphabetic order in the manual. Is it true the gfortran's
implementation of NINT doesn't take a KIND optional argument?
Amusing that there is an INT2 and INT8 but no INT1 nor INT4. I
suppose you don't want to add extensions like that if you don't
really have to. Similar with SNGL accepting REAL*8 but not
REAL*10 input.

I didn't see what the default KIND for the result of CEILING was
in the manual.

ERF, ERFC, GAMMA, and LOG_GAMMA returned NaN for REAL*10 inputs in
my test. EXPONENT returned garbage for REAL*10 and FRACTION
return its input for REAL*10. SPACING and RRSPACING were hosed in
my test so that I didn't capture any output.

Test is at http://home.comcast.net/~kmbtib/Fortran_stuff/funr1.ZIP
Oops, I forgot to include a README: you can run the tests by
deleting funr1_gfc.out and funr1_gfc.err and then running
funr1_gfc.bat. If not on Windows, you may have to edit those
*.bat files to make it all go. :)

--
write(*,*) transfer((/17.392111325966148d0,6.5794487871554595D-85, &
6.0134700243160014d-154/),(/'x'/)); end


.



Relevant Pages

  • Re: Are f.p. manipulation functions only used in initialization?
    ... RRSPACING, SCALE, SET_EXPONENT, and, SPACING were broken like this, ... while EXPONENT, FRACTION, and NEAREST seemed to work ...
    (comp.lang.fortran)
  • Re: Are f.p. manipulation functions only used in initialization?
    ... RRSPACING, SCALE, SET_EXPONENT, and, SPACING were broken like this, ... while EXPONENT, FRACTION, and NEAREST seemed to work ...
    (comp.lang.fortran)
  • Re: Im a bit rusty
    ... | floating-point capabilty to my asm printf function to verify results ... | exponent, ... But conversion of the binary mantissa by the remaining fraction of the ...
    (comp.lang.asm.x86)
  • Re: Optimizing exponentiation
    ... > The C library includes frexp() and ldexpto separate the exponent ... See the fraction, exponent, and scale intrinsics in F90 or later. ...
    (comp.lang.fortran)
  • Re: computing t = pow(-11.5, .333)
    ... and the exponent is a fraction. ... In standard C this would be something like t = pow, but with this combination of arguments there is a domain error and the result is a percolating NaN. ...
    (comp.lang.c)