Utility class for proxying math function to bcmath functions, if present, otherwise to PHP builtin math operators, with limited detection of overflow conditions.
Sampling of PHP environments and platforms suggests that at least 80% to 90% support bcmath. Thus, this file should be as light as possible.
category | Zend |
---|---|
package | Zend_Locale |
copyright | Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) |
license | New BSD License |
Add(string $op1, string $op2, integer $scale = null
) : string
string
string
integer
string
Comp(string $op1, string $op2, integer $scale = null
) : string
string
string
integer
string
Div(string $op1, string $op2, integer $scale = null
) : string
string
string
integer
string
Mod(string $op1, string $op2) : string
string
string
string
Mul(string $op1, string $op2, integer $scale = null
) : string
string
string
integer
string
Pow(string $op1, string $op2, integer $scale = null
) : string
string
string
integer
string
Sqrt(string $op1, integer $scale = null
) : string
string
integer
string
Sub(string $op1, string $op2, integer $scale = null
) : string
string
string
integer
string
exponent(integer $value, integer $scale = null
) : string
integer
Value to erase the exponent
integer
(Optional) Scale to use
string
floatalize(string $value)
string
isBcmathDisabled()
localize(integer $value) : string
integer
Value to normalize
string
Normalized string without BCMath problemsnormalize(integer $value) : string
integer
Value to normalize
string
Normalized string without BCMath problemsround($op1, $precision = 0
)
$_bcmathDisabled
false
$add
array('Zend_Locale_Math', 'Add')
$comp
array('Zend_Locale_Math', 'Comp')
$div
array('Zend_Locale_Math', 'Div')
$mod
array('Zend_Locale_Math', 'Mod')
$mul
array('Zend_Locale_Math', 'Mul')
$pow
array('Zend_Locale_Math', 'Pow')
$scale
'bcscale'
$sqrt
array('Zend_Locale_Math', 'Sqrt')
$sub
array('Zend_Locale_Math', 'Sub')