Method |
Description |
|
__toString ( ) : string |
|
|
abs ( ) : Decimal |
Returns the absolute value (always a positive number) |
|
add ( Decimal $b, integer $scale = null ) : Decimal |
Adds two Decimal objects |
|
additiveInverse ( ) : Decimal |
Returns the element's additive inverse. |
|
arccos ( integer $scale = null ) : Decimal |
Calculates the arccosine of this with the highest possible accuracy |
|
arccot ( integer $scale = null ) : Decimal |
Calculates the arccotangente of this with the highest possible accuracy |
|
arccsc ( integer $scale = null ) : Decimal |
Calculates the arccosecant of this with the highest possible accuracy |
|
arcsec ( integer $scale = null ) : Decimal |
Calculates the arcsecant of this with the highest possible accuracy |
|
arcsin ( integer $scale = null ) : Decimal |
Calculates the arcsine of this with the highest possible accuracy |
|
arctan ( integer $scale = null ) : Decimal |
Calculates the arctangente of this with the highest possible accuracy |
|
asFloat ( ) : float |
Return value as a float |
|
asInteger ( ) : float |
Return value as a integer |
|
ceil ( integer $scale ) : Decimal |
"Ceils" the Decimal to have at most $scale digits after the point |
|
comp ( Decimal $b, integer $scale = null ) : integer |
$this > $b : returns 1 , $this < $b : returns -1 , $this == $b : returns 0 |
|
cos ( integer $scale = null ) : Decimal |
Calculates the cosine of this method with the highest possible accuracy
Note that accuracy is limited by the accuracy of predefined PI; |
|
cosec ( integer $scale = null ) : Decimal |
Calculates the cosecant of this with the highest possible accuracy
Note that accuracy is limited by the accuracy of predefined PI; |
|
cotan ( integer $scale = null ) : Decimal |
Calculates the cotangent of this method with the highest possible accuracy
Note that accuracy is limited by the accuracy of predefined PI; |
|
create ( mixed $value, integer $scale = null, boolean $removeZeros = false ) : Decimal |
Decimal "constructor". |
|
div ( Decimal $b, integer $scale = null ) : Decimal |
Divides the object by $b . |
|
equals ( Decimal $b, integer $scale = null ) : boolean |
Equality comparison between this object and $b |
|
exp ( integer $scale = null ) : Decimal |
Returns exp($this), said in other words: e^$this . |
|
floor ( integer $scale ) : Decimal |
"Floors" the Decimal to have at most $scale digits after the point |
|
fromDecimal ( Decimal $decValue, integer $scale = null ) : Decimal |
Constructs a new Decimal object based on a previous one,
but changing it's $scale property. |
|
fromFloat ( float $fltValue, integer $scale = null, boolean $removeZeros = false ) : Decimal |
|
|
fromInteger ( integer $intValue ) : Decimal |
|
|
fromString ( string $strValue, integer $scale = null, boolean $removeZeros = false ) : Decimal |
|
|
getNegativeInfinite ( ) : Decimal |
Returns a "Negative Infinite" object |
|
getPositiveInfinite ( ) : Decimal |
Returns a "Positive Infinite" object |
|
hasSameSign ( Decimal $b ) : boolean |
Indicates if the passed parameter has the same sign as the method's bound object. |
|
innerValue ( ) : number |
Return the inner representation of the class
use with caution |
|
isInfinite ( ) : boolean |
|
|
isInteger ( ) : boolean |
|
|
isNegative ( ) : boolean |
|
|
isPositive ( ) : boolean |
|
|
isZero ( integer $scale = null ) : boolean |
|
|
log10 ( integer $scale = null ) : Decimal |
Returns the object's logarithm in base 10 |
|
mod ( Decimal $d, integer $scale = null ) |
Calculate modulo with a decimal |
|
mul ( Decimal $b, integer $scale = null ) : Decimal |
Multiplies two BigNumber objects |
|
pow ( Decimal $b, integer $scale = null ) : Decimal |
Powers this value to $b |
|
round ( integer $scale ) : Decimal |
"Rounds" the Decimal to have at most $scale digits after the point |
|
sec ( integer $scale = null ) : Decimal |
Calculates the secant of this with the highest possible accuracy
Note that accuracy is limited by the accuracy of predefined PI; |
|
sin ( integer $scale = null ) : Decimal |
Calculates the sine of this method with the highest possible accuracy
Note that accuracy is limited by the accuracy of predefined PI; |
|
sqrt ( integer $scale = null ) : Decimal |
Returns the square root of this object |
|
sub ( Decimal $b, integer $scale = null ) : Decimal |
Subtracts two BigNumber objects |
|
tan ( integer $scale = null ) : Decimal |
Calculates the tangent of this method with the highest possible accuracy
Note that accuracy is limited by the accuracy of predefined PI; |
|