Book HomeJava and XSLTSearch this book

8.143. Math::BigInt

Allows use of arbitrary length integers, in which the following apply to all methods, except as noted:

new

$i = Math::BigInt->new(string)

Creates a new object, $i.

babs

$i->babs

Returns absolute value of $i.

badd

$i->badd(bint)

Returns sum of bint and $i.

bcmp

$i->bcmp(bint)

Compares $i to bint. The bcmp method returns -1, 0, or 1 depending on whether $f is less than, equal to, or greater than the number string given as an argument. If the number string is undefined or null, undef is returned.

bdiv

$i->bdiv(bint)

Returns $i divided by bint. In list context, returns a two-element array containing the quotient of the division and the remainder; in scalar context, returns only the quotient.

bgcd

$i->bgcd(bint)

Returns greatest common divisor of $i and bint.

bmod

$i->bmod(bint)

Returns $i modulus bint.

bmul

$i->bmul(bint)

Returns $i multiplied by bint.

bneg

$i->bneg

Returns negative of $i.

bnorm

$i->bnorm

Returns normalization of $i.

bsub

$i->bsub(bint)

Returns $i minus bint.



Library Navigation Links

Copyright © 2002 O'Reilly & Associates. All rights reserved.