public class BcmathModule extends AbstractQuercusModule
Modifier and Type | Field and Description |
---|---|
static IniDefinition |
INI_BCMATH_SCALE |
PHP_INI_ALL, PHP_INI_PERDIR, PHP_INI_SYSTEM, PHP_INI_USER
Constructor and Description |
---|
BcmathModule() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
bcadd(Env env,
Value value1,
Value value2,
int scale)
Add two arbitrary precision numbers.
|
static int |
bccomp(Env env,
Value value1,
Value value2,
int scale)
Compare two arbitrary precision numbers, return -1 if value 1 < value2,
0 if value1 == value2, 1 if value1 > value2.
|
static java.lang.String |
bcdiv(Env env,
Value value1,
Value value2,
int scale)
Divide one arbitrary precision number (value1) by another (value2).
|
static java.lang.String |
bcmod(Env env,
Value value,
Value modulus)
Return the modulus of an aribtrary precison number.
|
static java.lang.String |
bcmul(Env env,
Value value1,
Value value2,
int scale)
Multiply two arbitrary precision numbers.
|
static java.lang.String |
bcpow(Env env,
Value base,
Value exp,
int scale)
Raise one arbitrary precision number (base) to the power of another (exp).
|
static java.lang.String |
bcpowmod(Env env,
java.math.BigDecimal base,
java.math.BigDecimal exp,
java.math.BigDecimal modulus,
int scale)
Raise one arbitrary precision number (base) to the power of another (exp),
and then return the modulus.
|
static boolean |
bcscale(Env env,
int scale)
Set the default scale to use for subsequent calls to bcmath functions.
|
static java.lang.String |
bcsqrt(Env env,
Value operand,
int scale)
Return the square root of an arbitrary precision number.
|
static java.lang.String |
bcsub(Env env,
Value value1,
Value value2,
int scale)
Subtract arbitrary precision number (value2) from another (value1).
|
IniDefinitions |
getIniDefinitions()
Returns the default php.ini values.
|
java.lang.String[] |
getLoadedExtensions()
Returns the extensions loaded by the module.
|
addConstant, addConstant, addConstant, getConstMap
public static final IniDefinition INI_BCMATH_SCALE
public java.lang.String[] getLoadedExtensions()
AbstractQuercusModule
getLoadedExtensions
in interface QuercusModule
getLoadedExtensions
in class AbstractQuercusModule
public IniDefinitions getIniDefinitions()
getIniDefinitions
in interface QuercusModule
getIniDefinitions
in class AbstractQuercusModule
public static java.lang.String bcadd(Env env, Value value1, Value value2, int scale)
bcscale(com.caucho.quercus.env.Env, int)
or the value of the ini variable "bcmath.scale".public static int bccomp(Env env, Value value1, Value value2, int scale)
bcscale(com.caucho.quercus.env.Env, int)
or the value of the ini variable "bcmath.scale".public static java.lang.String bcdiv(Env env, Value value1, Value value2, int scale)
bcscale(com.caucho.quercus.env.Env, int)
or the value of the ini variable "bcmath.scale".public static java.lang.String bcmod(Env env, Value value, Value modulus)
public static java.lang.String bcmul(Env env, Value value1, Value value2, int scale)
bcscale(com.caucho.quercus.env.Env, int)
or the value of the ini variable "bcmath.scale".public static java.lang.String bcpow(Env env, Value base, Value exp, int scale)
bcscale(com.caucho.quercus.env.Env, int)
or the value of the ini variable "bcmath.scale".public static java.lang.String bcpowmod(Env env, java.math.BigDecimal base, java.math.BigDecimal exp, java.math.BigDecimal modulus, int scale)
bcscale(com.caucho.quercus.env.Env, int)
or the value of the ini variable "bcmath.scale".public static boolean bcscale(Env env, int scale)
public static java.lang.String bcsqrt(Env env, Value operand, int scale)
bcscale(com.caucho.quercus.env.Env, int)
or the value of the ini variable "bcmath.scale".public static java.lang.String bcsub(Env env, Value value1, Value value2, int scale)
bcscale(com.caucho.quercus.env.Env, int)
or the value of the ini variable "bcmath.scale".