[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Float numbers equality.
- From: Jay Carlson <nop@...>
- Date: Sat, 10 Aug 2013 16:16:24 -0400
On Aug 10, 2013, at 3:08 PM, Tim Hill wrote:
> for i=1,78 do s="." if (i*0.1)*10~=i then s="X" end io.write(s) end print()
> Given that this subject comes up every couple of months, and that there are some subtleties to it, that this warrants a new function in the math library to do it the right way?
The criteria for inclusion in the standard Lua library aren't clear to me. The module system is there since it's a minimal thing everybody needs to coordinate on. Is that true of this?
Much of the library seems to be important functionality for everyday use which cannot be implemented outside C, at least efficiently. That's definitely not true of equals_within_epsilon, so that suggests the place it would go is Microlight. Maybe.
Some people, including me, wish that more of _PiL_ were in the manual. But I'm not volunteering to write the gloss.