Operations on Inf/NaN

Paul C. Anagnostopoulos paul at windfall.com
Thu Sep 16 17:04:21 UTC 2010


Folks,

Regarding this ticket: http://trac.parrot.org/parrot/ticket/370

The problem is not with rounding Inf or NaN. Instead, the problem concerns converting Inf/NaN to an integer. The C reference states:

"The behavior of the conversion [from floating-point to integer] is undefined if the floating-point value cannot be represented even approximately in the new type ..."

I recommend we follow the C standard and leave the conversion undefined. I don't think we want to get into the business of specifying how to convert Inf or NaN to an integer.

Thoughts?

~~ Paul

----------------------------------------------------------------
Windfall               Paul C. Anagnostopoulos 
      ----------------------------------------------------------
   Software             978 371-2316 
                             www.windfall.com
----------------------------------------------------------------
Metaphorical invocations ... often suffer from the
weakness of giving such satisfaction to the human
mind that they tend to be mistaken for incisive and
illuminating observations. ---Torkel Franzen 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.parrot.org/pipermail/parrot-dev/attachments/20100916/010ce2cb/attachment.html>


More information about the parrot-dev mailing list