Lua function
bc.digits
Summary
Digits after the decimal place
Prototype
old = bc.digits (n)
Description
Do subsequent calculations to n digits after the decimal point.
eg.
bc.digits (20)
a = bc.number (5.5) + 1
print (a) --> 6.50000000000000000000
Returns the old number of digits, so you could save them, change them, and then restore them.
See Also ...
Topics
Lua base functions
Lua bc (big number) functions
Lua bit manipulation functions
Lua coroutine functions
Lua debug functions
Lua io functions
Lua math functions
Lua os functions
Lua package functions
Lua PCRE regular expression functions
Lua script extensions
Lua string functions
Lua table functions
Lua utilities
Scripting
Lua functions
bc.add (Addition)
bc.compare (Comparison)
bc.div (Division)
bc.isneg (Tests if negative)
bc.iszero (Tests if zero)
bc.mod (Modulus)
bc.mul (Multiplication)
bc.number (Create a big number)
bc.pow (Power)
bc.sqrt (Square root)
bc.sub (Subtraction)
bc.tostring (Converts to a string)
bc.version (Version)
(Help topic: lua=bc.digits)
Documentation contents page
|