Operations on Inf/NaN

Paul C. Anagnostopoulos paul at windfall.com
Thu Sep 16 17:45:15 UTC 2010

At 9/16/2010 01:38 PM, Paul C. Anagnostopoulos wrote:
>At 9/16/2010 01:15 PM, Andrew Whitworth wrote:
>>I personally don't like the idea of ever leaving anything undefined.
>>The C language is at a disadvantage because it was created so many
>>years ago and because it's designed to run on so many different
>>Parrot doesn't really have either of those problems. Parrot is a
>>single standard platform, and we really don't need to be leaving
>>values undefined anywhere. We really have three possible behaviors:
>>1) leave things undefined, which I think is bad
>>2) Force some kind of integer conversion (INF -> INT_MAX, NAN -> 0, etc)
>>3) Throw an exception.
>>I lean towards the third option. If somebody attempts an operation
>>that is so clearly not a normal operation, we should proactively
>>notify them about it, not silently do something strange and
>I agree that if we don't go with (1), we should go with (3).

Then again, do we want Parrot_set_i_n and friends to check every single number for Inf or NaN?

~~ Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.parrot.org/pipermail/parrot-dev/attachments/20100916/d3ec17ef/attachment.html>

More information about the parrot-dev mailing list