Interface AdapterInterface

Summary

Fully Qualified Name: Zend\Math\BigInteger\Adapter\AdapterInterface

Description

Methods

Name Description Defined By
abs() Get absolute value of a big integer AdapterInterface
add() Add two big integers AdapterInterface
baseConvert() Convert a number between arbitrary bases AdapterInterface
binToInt() Convert binary number into big integer AdapterInterface
comp() Compare two big integers Returns < 0 if leftOperand is less than rightOperand; > 0 if leftOperand is greater than rightOperand, and 0 if they are equal. AdapterInterface
div() Divide two big integers (this method returns only int part of result) AdapterInterface
init() Create adapter-specific representation of a big integer AdapterInterface
intToBin() Convert big integer into it's binary number representation AdapterInterface
mod() Get modulus of a big integer AdapterInterface
mul() Multiply two big integers AdapterInterface
pow() Raise a big integers to another AdapterInterface
powmod() Raise a big integer to another, reduced by a specified modulus AdapterInterface
sqrt() Get the square root of a big integer AdapterInterface
sub() Subtract two big integers AdapterInterface

Method Details

abs()

Get absolute value of a big integer

Parameter Name Type Description
$operand string

Returns: string

add()

Add two big integers

Parameter Name Type Description
$leftOperand string
$rightOperand string

Returns: string

baseConvert()

Convert a number between arbitrary bases

Parameter Name Type Description
$operand string
$fromBase int
$toBase int

Returns: string

binToInt()

Convert binary number into big integer

Parameter Name Type Description
$bytes string
$twoc bool

Returns: string

comp()

Compare two big integers Returns < 0 if leftOperand is less than rightOperand; > 0 if leftOperand is greater than rightOperand, and 0 if they are equal.

Parameter Name Type Description
$leftOperand string
$rightOperand string

Returns: int

div()

Divide two big integers (this method returns only int part of result)

Parameter Name Type Description
$leftOperand string
$rightOperand string

Returns: string

init()

Create adapter-specific representation of a big integer

Parameter Name Type Description
$operand string
$base int|null

Returns: mixed

intToBin()

Convert big integer into it's binary number representation

Parameter Name Type Description
$int string
$twoc bool

Returns: string

mod()

Get modulus of a big integer

Parameter Name Type Description
$leftOperand string
$modulus string

Returns: string

mul()

Multiply two big integers

Parameter Name Type Description
$leftOperand string
$rightOperand string

Returns: string

pow()

Raise a big integers to another

Parameter Name Type Description
$operand string
$exp string

Returns: string

powmod()

Raise a big integer to another, reduced by a specified modulus

Parameter Name Type Description
$leftOperand string
$rightOperand string
$modulus string

Returns: string

sqrt()

Get the square root of a big integer

Parameter Name Type Description
$operand string

Returns: string

sub()

Subtract two big integers

Parameter Name Type Description
$leftOperand string
$rightOperand string

Returns: string

Top