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 | $value | Value 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 | $value | Value to normalize |
- Returns:
- string Normalized string without BCMath problems
Definition at line 153 of file Math.php.
static Mod |
( |
$ |
op1, |
|
|
$ |
op2 |
|
) |
| [static] |
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 | $value | Value 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] |
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:
- E:/E/GEAMP/www/openbiz/openbiz/others/Zend/Locale/Math.php