lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


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