ray@dsiramd.nz (Ray Brownrigg) (10/15/87)
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"