Handling of invalid arguments Marc Feeley (29 Jun 2006 13:15 UTC)
Re: Handling of invalid arguments Bradley Lucier (29 Jun 2006 14:55 UTC)
Re: Handling of invalid arguments Marc Feeley (29 Jun 2006 15:19 UTC)

Re: Handling of invalid arguments Bradley Lucier 29 Jun 2006 14:55 UTC

On Jun 29, 2006, at 9:15 AM, Marc Feeley wrote:

> I have noticed that the specification of flexpt, flsqrt, flatan and
> many other procedures may return a meaningless result for certain
> ranges of arguments.

I think "that's not a bug, that's a feature," to coin a phrase.  I
believe the intention is to let

(flsqrt -1.0)

return whatever the hardware sqrt function returns (a NaN in IEEE 754
arithmetic) rather than

 > (sqrt -1.0)
+1.i

which is what Gambit returns.  I believe the intent is to somehow map
the <math.h> C functions to Scheme functions; any author of the SRFI
want to comment here?

In other words, this defines a new set of underspecified procedures
that return what expt, sqrt, atan, ... would return if the arguments
are within a certain range (I'm not sure this is spelled out
explicitly), but which can return almost anything else for other
arguments.

Brad