Static Public Member Functions | Static Public Attributes

Zend_Locale_Math Class Reference

Inheritance diagram for Zend_Locale_Math:
Zend_Locale_Math_PhpMath

Static Public Member Functions

static isBcmathDisabled ()
static round ($op1, $precision=0)
static normalize ($value)
static localize ($value)
static exponent ($value, $scale=null)
static Add ($op1, $op2, $scale=null)
static Sub ($op1, $op2, $scale=null)
static Pow ($op1, $op2, $scale=null)
static Mul ($op1, $op2, $scale=null)
static Div ($op1, $op2, $scale=null)
static Sqrt ($op1, $scale=null)
static Mod ($op1, $op2)
static Comp ($op1, $op2, $scale=null)

Static Public Attributes

static $_bcmathDisabled = false
static $add = array('Zend_Locale_Math', 'Add')
static $sub = array('Zend_Locale_Math', 'Sub')
static $pow = array('Zend_Locale_Math', 'Pow')
static $mul = array('Zend_Locale_Math', 'Mul')
static $div = array('Zend_Locale_Math', 'Div')
static $comp = array('Zend_Locale_Math', 'Comp')
static $sqrt = array('Zend_Locale_Math', 'Sqrt')
static $mod = array('Zend_Locale_Math', 'Mod')
static $scale = 'bcscale'

Detailed Description

Definition at line 35 of file Math.php.


Member Function Documentation

static Add ( op1,
op2,
scale = null 
) [static]

BCAdd - fixes a problem of BCMath and exponential numbers

Parameters:
string$op1
string$op2
integer$scale
Returns:
string

Reimplemented in Zend_Locale_Math_PhpMath.

Definition at line 197 of file Math.php.

static Comp ( op1,
op2,
scale = null 
) [static]

BCComp - fixes a problem of BCMath and exponential numbers

Parameters:
string$op1
string$op2
integer$scale
Returns:
string

Reimplemented in Zend_Locale_Math_PhpMath.

Definition at line 300 of file Math.php.

static Div ( op1,
op2,
scale = null 
) [static]

BCDiv - fixes a problem of BCMath and exponential numbers

Parameters:
string$op1
string$op2
integer$scale
Returns:
string

Reimplemented in Zend_Locale_Math_PhpMath.

Definition at line 258 of file Math.php.

static exponent ( value,
scale = null 
) [static]

Changes exponential numbers to plain string numbers Fixes a problem of BCMath with numbers containing exponents

Parameters:
integer$valueValue to erase the exponent
integer$scale(Optional) Scale to use
Returns:
string

Definition at line 171 of file Math.php.

static localize ( value ) [static]

Localizes an input from standard english notation Fixes a problem of BCMath with setLocale which is PHP related

Parameters:
integer$valueValue to normalize
Returns:
string Normalized string without BCMath problems

Definition at line 153 of file Math.php.

static Mod ( op1,
op2 
) [static]

BCMod - fixes a problem of BCMath and exponential numbers

Parameters:
string$op1
string$op2
Returns:
string

Reimplemented in Zend_Locale_Math_PhpMath.

Definition at line 285 of file Math.php.

static Mul ( op1,
op2,
scale = null 
) [static]

BCMul - fixes a problem of BCMath and exponential numbers

Parameters:
string$op1
string$op2
integer$scale
Returns:
string

Reimplemented in Zend_Locale_Math_PhpMath.

Definition at line 243 of file Math.php.

static normalize ( value ) [static]

Normalizes an input to standard english notation Fixes a problem of BCMath with setLocale which is PHP related

Parameters:
integer$valueValue to normalize
Returns:
string Normalized string without BCMath problems

Definition at line 132 of file Math.php.

static Pow ( op1,
op2,
scale = null 
) [static]

BCPow - fixes a problem of BCMath and exponential numbers

Parameters:
string$op1
string$op2
integer$scale
Returns:
string

Reimplemented in Zend_Locale_Math_PhpMath.

Definition at line 228 of file Math.php.

static round ( op1,
precision = 0 
) [static]

Surprisingly, the results of this implementation of round() prove better than the native PHP round(). For example, try: round(639.795, 2); round(267.835, 2); round(0.302515, 5); round(0.36665, 4); then try: Zend_Locale_Math::round('639.795', 2);

Definition at line 65 of file Math.php.

static Sqrt ( op1,
scale = null 
) [static]

BCSqrt - fixes a problem of BCMath and exponential numbers

Parameters:
string$op1
integer$scale
Returns:
string

Reimplemented in Zend_Locale_Math_PhpMath.

Definition at line 272 of file Math.php.

static Sub ( op1,
op2,
scale = null 
) [static]

BCSub - fixes a problem of BCMath and exponential numbers

Parameters:
string$op1
string$op2
integer$scale
Returns:
string

Reimplemented in Zend_Locale_Math_PhpMath.

Definition at line 213 of file Math.php.


The documentation for this class was generated from the following file: