Imul()

From TinyMUX
Revision as of 05:33, 11 January 2008 by Brazil (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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.