API Documentation

Crypt/Math/BigInteger/Gmp.php

Includes Classes 
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Crypt
subpackage
Math
version
$Id: Gmp.php 20096 2010-01-06 02:05:09Z bkarwin $
Classes
Zend_Crypt_Math_BigInteger_Gmp

Description

Zend Framework

LICENSE

This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.

Zend_Crypt_Math_BigInteger_Gmp

Implements
Zend_Crypt_Math_BigInteger_Interface
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Crypt
Methods
init
add
subtract
compare
divide
modulus
multiply
pow
powmod
sqrt
binaryToInteger
integerToBinary
hexToDecimal

Description

Support for arbitrary precision mathematics in PHP.

Zend_Crypt_Math_BigInteger_Bcmath is a wrapper across the PHP BCMath extension.

Methods

add

add( string $left_operand, string $right_operand ) : string

Adds two arbitrary precision numbers

Arguments
$left_operand
string
$right_operand
string
Output
string
Details
visibility
public
final
false
static
false

binaryToInteger

binaryToInteger(  $operand ) :
Arguments
$operand
Details
visibility
public
final
false
static
false

compare

compare( string $left_operand, string $right_operand ) : int

Compare two big integers and returns result as an integer where 0 means both are identical, 1 that left_operand is larger, or -1 that right_operand is larger.

Arguments
$left_operand
string
$right_operand
string
Output
int
Details
visibility
public
final
false
static
false

divide

divide( string $left_operand, string $right_operand ) : string|null

Divide two big integers and return result or NULL if the denominator is zero.

Arguments
$left_operand
string
$right_operand
string
Output
string|null
Details
visibility
public
final
false
static
false

hexToDecimal

hexToDecimal(  $operand ) :
Arguments
$operand
Details
visibility
public
final
false
static
false

init

init( string $operand, int $base = 10 ) : string

Initialise a big integer into an extension specific type.

Arguments
$operand
string
$base
int
Output
string
Details
visibility
public
final
false
static
false

integerToBinary

integerToBinary(  $operand ) :
Arguments
$operand
Details
visibility
public
final
false
static
false

modulus

modulus( string $left_operand,  $modulus ) : string

Arguments
$left_operand
string
$modulus
Output
string
Details
visibility
public
final
false
static
false

multiply

multiply( string $left_operand, string $right_operand ) : string

Arguments
$left_operand
string
$right_operand
string
Output
string
Details
visibility
public
final
false
static
false

pow

pow( string $left_operand, string $right_operand ) : string

Arguments
$left_operand
string
$right_operand
string
Output
string
Details
visibility
public
final
false
static
false

powmod

powmod( string $left_operand, string $right_operand,  $modulus ) : string

Arguments
$left_operand
string
$right_operand
string
$modulus
Output
string
Details
visibility
public
final
false
static
false

sqrt

sqrt(  $operand ) : string

Arguments
$operand
Output
string
Details
visibility
public
final
false
static
false

subtract

subtract( string $left_operand, string $right_operand ) : string

Arguments
$left_operand
string
$right_operand
string
Output
string
Details
visibility
public
final
false
static
false
Documentation was generated by DocBlox.