Article View: comp.bugs.sys5
Article #6193B2 floating point libraries
From: Ray Brownrigg
Date: Wed, 14 Oct 1987 23:03
Date: Wed, 14 Oct 1987 23:03
19 lines
1424 bytes
1424 bytes
I have uncovered a strange bug in the floating point routines for the
Fortran XLA+ and C-FP+ compilers for an AT&T 3B2 (with MAU), relating
to non-integral powers of 0.5 (and perhaps other numbers as well). For
example the expression 0.5**Y returns the value 0.5**(Y-1) when Y is
2.5, 4.5, 6.5, 8.5, ... Further, using C-FP+, the statement
printf("%10.8f\n", pow(0.5, 2.5))
results in a zero being output.
I have reported the bugs (to Olivetti), but would be interested if anybody
else has seen the same problem.
Otherwise, beware. One workaround it to use exp(0.5*log(y)), but this is
not easy in a package as large as the S statistical package.
--
Ray Brownrigg UUCP: {utai!calgary,uunet}!vuwcomp!dsiramd!ray
Applied Maths Div, DSIR ACSnet: ray@dsiramd.nz[@munnari]
PO Box 1335 System: OLIVETTI/AT&T 3B2/400B+, System V R3.0
Wellington, New Zealand "UNX -rules -OK"
Technical Details
Message-ID:
<178@dsiramd.nz>Path:
arc1-ca.pugleaf.net!utzoo!mnetor!uunet!munnari!comp.vuw.ac.nz!dsiramd!rayShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!munnari!comp.vuw.ac.nz!dsiramd!ray From: ray@dsiramd.nz (Ray Brownrigg) Newsgroups: comp.bugs.sys5,comp.sys.att Subject: 3B2 floating point libraries Message-ID: <178@dsiramd.nz> Date: Wed, 14-Oct-87 19:03:53 EDT Article-I.D.: dsiramd.178 Posted: Wed Oct 14 19:03:53 1987 Date-Received: Sat, 17-Oct-87 02:09:54 EDT Reply-To: ray@dsiramd.UUCP (Ray Brownrigg) Organization: DSIR Applied Mathematics Division, Wellington, NZ Lines: 19