HELP! Need Decent RS6000 Fortran Compiler!

Orville R. Weyrich orville at weyrich.UUCP
Sat May 11 01:56:40 AEST 1991


In article <1991May9.015512.27264 at murdoch.acc.Virginia.EDU> gl8f at astsun.astro.Virginia.EDU (Greg Lindahl) writes:
>In article <JKORPELA.91May8015509 at vipunen.hut.fi> jkorpela at vipunen.hut.fi (Jukka Korpela) writes:
>
>>I'm struggling, among other things, with the problem of detecting the
>>occurrence of floating-point errors. (I've abandoned the hope of ever really
>>trapping them...)
>
>On the RS/6000, it seems that FORTRAN doesn't have anything special,
>but that the fp_enable stuff could be used to get the processor to
>signal on things like divide by zero instead of merrily going on.
>Amazing that the Fortran manual has no mention of this nor an example.
>Hmph.

Of course the FORTRAN *LANGUAGE* does not contain a definition of how FP
errors are to be handled. The language is designed to be compatible with
all sorts of obsolete antique hardware, and the hardware folks would never
agree to make FORTRAN adhere to something like the IEEE floating point standard
(sarcasm here). If they did, the next thing the software folks would try to do
would be to make adherence to ASCII standard (more sarcasm).

The only language that I am aware of that has any sort of floating-point error 
handling built into thae standard is Ada, and even that does not support the 
IEEE floating-point very well.

On the other hand, the FORTRAN standard is permissive, and if a vendor WANTED
to embrace industry standards by providing IEEE floating point support, they
could do so without violating the FORTRAN standard. Who did you say made your
RS/6000?

On a more positive note, I seem to recall that the IBM-370 FORTRAN manuals
were divided into separate books for the language users and for those poor folks
that had to do system level program integration. The (nonstandard) IBM library
routines for controlling the handling of run-time errors were I think documented
in the PROGRAMMER'S REFERENCE, not the LANGUAGE REFERENCE. In any event, the
facility was provided to either ignore FP errors, to invoke an error handler,
or to abort. If you chose to ignore FP errors, you could poll the run-time
system to determine how many times such an error had occurred since the last
time you asked.

One would hope that in the absence of adherence to the international FP
standard, the RS/6000 would at least attempt to maintain compatibility with
IBM-370 FORTRAN. I don't know. My advice would be to get an industry-standard
i486 machine to code on, and use a Borland language that you can buy the
run-time code for so that you can be sure that the FP errors are handled
the way you want them to be. (I don't know about the currernt Borland products,
but the version 3.0 of Pascal did not quite get the error handling right.
Since this is comp.lang.fortran rather than Pascal, e-mail me for details).



--------------------------------------           ******************************
Orville R. Weyrich, Jr., Ph.D.                   Certified Systems Professional
Internet: orville%weyrich at uunet.uu.net             Weyrich Computer Consulting
Voice:    (602) 391-0821                         POB 5782, Scottsdale, AZ 85261
Fax:      (602) 391-0023                              (Yes! I'm available)
--------------------------------------           ******************************



More information about the Comp.unix.aix mailing list