Re: Some small requests for the next release
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- 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 drj@pobox.com wrote:
Show me some code that might use math.nan. if x == math.nan ? I
don't
think so.
x = 0
for index = 1, 100 do
x = x + ( t[ index ] or math.nan )
end
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?
David Jones