Imul()

From TinyMUX
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Description

FUNCTION: imul(number1[, numberN]...)

Returns the result of multiplying its integer arguments together. Similar to mul() except that the multiplication is done with fast 64-bit integer math (on both 32-bit and 64-bit platforms).

Related Topics: add(), fdiv(), iadd(), idiv(), isub(), mod(), mul(), round(), sub(), trunc().

Examples

> say imul(3,5)
You say "15"
> say imul(3,5,-2)
You say "-30"

Server Differences

TinyMUX is the only server to support this function. However, mul() is a somewhat slower equilvalent for numbers up to 56-bits.