[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Some small requests for the next release
- From: David Jones <drj@...>
- Date: Tue, 1 Mar 2005 12:54:40 +0000
On Feb 28, 2005, at 17:09, Mark Hamburg wrote:
on 2/28/05 8:32 AM, David Jones at firstname.lastname@example.org wrote:
Show me some code that might use math.nan. if x == math.nan ? I
x = 0
for index = 1, 100 do
x = x + ( t[ index ] or math.nan )
Any missing indices will result in a sum of NaN.
That seems reasonable; I'm convinced that on machines that support NaN
there might be good uses for math.nan (and the case for math.isnan and
math.isinf is even clearer).
So, supposing that one adds math.nan, what value should math.nan have
on machines not supporting NaN? 0, nil, false?