Summary
Create a big number
Prototype
n = bc.number (n)
Description
Create a new big number based on n, where n can be a string if needed, to represent a large number.
eg.
a = bc.number ("1234.45534535345345434")
b = bc.number (5678)
If you are planning to use decimal places, you should call bc.digits first, otherwise the number may not be stored to the number of decimal places you wanted.
eg.
bc.digits (20)
a = bc.number ("1234.45534535345345434")
See Also ...
Lua functions
bc.add - Addition
bc.compare - Comparison
bc.digits - Digits after the decimal place
bc.div - Division
bc.divmod - Division and remainder
bc.isneg - Tests if negative
bc.iszero - Tests if zero
bc.mod - Modulus
bc.mul - Multiplication
bc.neg - Negation
bc.pow - Power
bc.powmod - Raise to a power modulus another number
bc.sqrt - Square root
bc.sub - Subtraction
bc.tonumber - Converts to a number
bc.tostring - Converts to a string
bc.trunc - Truncate a number
bc.version - Version
Topics
Lua base functions
Lua bc (big number) functions
Lua bit manipulation functions
Lua coroutine functions
Lua debug functions
Lua io functions
Lua LPEG library
Lua math functions
Lua os functions
Lua package functions
Lua PCRE regular expression functions
Lua script extensions
Lua string functions
Lua syntax
Lua table functions
Lua utilities
Scripting
Scripting callbacks - plugins
(Help topic: lua=bc.number)