[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: % operator (Re: boolean operators)
- From: Doug Currie <doug.currie@...>
- Date: Wed, 27 Sep 2006 10:47:43 -0400
Wednesday, September 27, 2006, 8:10:35 AM, askok@dnainternet.net wrote:
> In practise, 123.45 % 0.1 = 0.05 (or... so it SHOULD be :)
>> print( 123.45 % 0.1 )
> 0.049999999999996
> Now, when can we get the BCD number implementation? :P
> )
You've got it...
> require "ldecNumber"
> print (decNumber.version)
Lua Decimal Number Module version 14 for Lua 5.1 with decNumber 3.36
> print ( (decNumber.tonumber "123.45") % "0.1")
0.05
http://luaforge.net/projects/ldecnumber/
e
--
Doug Currie
Londonderry, NH