new BigFloat()
Classes
Members
h :number
The handle to the underlying C object.
Type:
- number
Methods
abs() → {BigFloat}
Returns:
- Type
- BigFloat
acos(precopt) → {BigFloat}
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
prec |
number |
<optional> |
0
|
Returns:
- Type
- BigFloat
add(b, precopt) → {BigFloat}
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
b |
BigFloat | number | string | bigint | |||
prec |
number |
<optional> |
0
|
Returns:
- Type
- BigFloat
and(b, precopt) → {BigFloat}
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
b |
BigFloat | number | string | bigint | |||
prec |
number |
<optional> |
0
|
Returns:
- Type
- BigFloat
asin(precopt) → {BigFloat}
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
prec |
number |
<optional> |
0
|
Returns:
- Type
- BigFloat
atan(precopt) → {BigFloat}
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
prec |
number |
<optional> |
0
|
Returns:
- Type
- BigFloat
atan2(b, precopt) → {BigFloat}
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
b |
BigFloat | number | string | bigint | |||
prec |
number |
<optional> |
0
|
Returns:
- Type
- BigFloat
calc(method, a, b, prec, flagsopt, rnd_modeopt) → {BigFloat}
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
method |
string | |||
a |
BigFloat | number | string | bigint | null |
null
|
||
b |
BigFloat | number | string | bigint | null |
null
|
||
prec |
number | |||
flags |
number |
<optional> |
if set, or with globalflag |
|
rnd_mode |
number |
<optional> |
if set, overwrite round mode in globalflag |
Returns:
this
- Type
- BigFloat
calc2(method, a, b, prec, rnd_modeopt, q) → {BigFloat}
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
method |
string | |||
a |
BigFloat | number | string | bigint | null |
null
|
||
b |
BigFloat | number | string | bigint | null |
null
|
||
prec |
number | |||
rnd_mode |
number |
<optional> |
0
|
|
q |
BigFloat | null |
null
|
Returns:
this
- Type
- BigFloat
callFunc(ofunc, numps, …args) → {BigFloat}
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
ofunc |
function | ||
numps |
number | ||
args |
any |
<repeatable> |
Returns:
- Type
- BigFloat
ceil() → {BigFloat}
Returns:
- Type
- BigFloat
checkoprand(…args)
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
args |
any |
<repeatable> |
The arguments to check. |
checkstatus(s) → {number}
Parameters:
| Name | Type | Description |
|---|---|---|
s |
number | The status to check. |
Returns:
The status.
- Type
- number
clone() → {BigFloat}
Returns:
- Type
- BigFloat
cmp(b) → {number}
Parameters:
| Name | Type | Description |
|---|---|---|
b |
BigFloat | number | string | bigint |
Returns:
0 if equal, >0 if this > b, <0 if this < b.
- Type
- number
copy(a) → {void}
Parameters:
| Name | Type | Description |
|---|---|---|
a |
BigFloat | The BigFloat to copy from. |
Returns:
- Type
- void
cos(precopt) → {BigFloat}
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
prec |
number |
<optional> |
0
|
Returns:
- Type
- BigFloat
cosh(precopt) → {BigFloat}
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
prec |
number |
<optional> |
0
|
Returns:
- Type
- BigFloat
dispose(recoverableopt)
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
recoverable |
boolean |
<optional> |
true
|
Whether the BigFloat can be recovered later. |
div(b, precopt) → {BigFloat}
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
b |
BigFloat | number | string | bigint | |||
prec |
number |
<optional> |
0
|
Returns:
- Type
- BigFloat
equals(b) → {boolean}
Parameters:
| Name | Type | Description |
|---|---|---|
b |
BigFloat | number | string | bigint |
Returns:
- Type
- boolean
exp(precopt) → {BigFloat}
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
prec |
number |
<optional> |
0
|
Returns:
- Type
- BigFloat
f64() → {number}
Returns:
- Type
- number
floor() → {BigFloat}
Returns:
- Type
- BigFloat
fpround(prec, rnd_mode) → {BigFloat}
Parameters:
| Name | Type | Description |
|---|---|---|
prec |
number | |
rnd_mode |
number |
Returns:
- Type
- BigFloat
fromNumber(a) → {void}
Parameters:
| Name | Type | Description |
|---|---|---|
a |
number |
Returns:
- Type
- void
geth() → {number}
- Description:
Gets the handle to the underlying C object, creating it if necessary.
- Source:
Returns:
- Type
- number
isAlmostZero() → {boolean}
Returns:
- Type
- boolean
isExactZero() → {boolean}
Returns:
- Type
- boolean
isFinit() → {boolean}
Returns:
- Type
- boolean
isInExact() → {boolean}
Returns:
- Type
- boolean
isNaN() → {boolean}
Returns:
- Type
- boolean
isZero() → {boolean}
Returns:
- Type
- boolean
log(precopt) → {BigFloat}
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
prec |
number |
<optional> |
0
|
Returns:
- Type
- BigFloat
mod(b, precopt) → {BigFloat}
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
b |
BigFloat | number | string | bigint | |||
prec |
number |
<optional> |
0
|
Returns:
- Type
- BigFloat
mul(b, precopt) → {BigFloat}
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
b |
BigFloat | number | string | bigint | |||
prec |
number |
<optional> |
0
|
Returns:
- Type
- BigFloat
neg() → {BigFloat}
Returns:
- Type
- BigFloat
operatorEqual(b) → {boolean}
Parameters:
| Name | Type | Description |
|---|---|---|
b |
BigFloat | number | string | bigint |
Returns:
- Type
- boolean
operatorGreater(b) → {boolean}
Parameters:
| Name | Type | Description |
|---|---|---|
b |
BigFloat | number | string | bigint |
Returns:
- Type
- boolean
operatorGreaterEqual(b) → {boolean}
Parameters:
| Name | Type | Description |
|---|---|---|
b |
BigFloat | number | string | bigint |
Returns:
- Type
- boolean
operatorLess(b) → {boolean}
Parameters:
| Name | Type | Description |
|---|---|---|
b |
BigFloat | number | string | bigint |
Returns:
- Type
- boolean
operatorLessEqual(b) → {boolean}
Parameters:
| Name | Type | Description |
|---|---|---|
b |
BigFloat | number | string | bigint |
Returns:
- Type
- boolean
operatorNotEqual(b) → {boolean}
Parameters:
| Name | Type | Description |
|---|---|---|
b |
BigFloat | number | string | bigint |
Returns:
- Type
- boolean
or(b, precopt) → {BigFloat}
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
b |
BigFloat | number | string | bigint | |||
prec |
number |
<optional> |
0
|
Returns:
- Type
- BigFloat
pow(b, precopt) → {BigFloat}
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
b |
BigFloat | number | string | bigint | |||
prec |
number |
<optional> |
0
|
Returns:
- Type
- BigFloat
rem(b, precopt) → {BigFloat}
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
b |
BigFloat | number | string | bigint | |||
prec |
number |
<optional> |
0
|
Returns:
- Type
- BigFloat
round() → {BigFloat}
Returns:
- Type
- BigFloat
setEPSILON(precopt) → {BigFloat}
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
prec |
number |
<optional> |
0
|
Returns:
this
- Type
- BigFloat
setLOG2(precopt) → {BigFloat}
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
prec |
number |
<optional> |
0
|
Returns:
this
- Type
- BigFloat
setMAX_VALUE(precopt) → {BigFloat}
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
prec |
number |
<optional> |
0
|
Returns:
this
- Type
- BigFloat
setMIN_VALUE(precopt) → {BigFloat}
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
prec |
number |
<optional> |
0
|
Returns:
this
- Type
- BigFloat
setPI(precopt) → {BigFloat}
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
prec |
number |
<optional> |
0
|
Returns:
this
- Type
- BigFloat
setabs() → {BigFloat}
Returns:
this
- Type
- BigFloat
setacos(a, precopt) → {BigFloat}
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
a |
BigFloat | number | string | bigint | |||
prec |
number |
<optional> |
0
|
Returns:
this
- Type
- BigFloat
setadd(a, b, precopt) → {BigFloat}
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
a |
BigFloat | number | string | bigint | |||
b |
BigFloat | number | string | bigint | |||
prec |
number |
<optional> |
0
|
Returns:
this
- Type
- BigFloat
setand(a, b, precopt) → {BigFloat}
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
a |
BigFloat | number | string | bigint | |||
b |
BigFloat | number | string | bigint | |||
prec |
number |
<optional> |
0
|
Returns:
this
- Type
- BigFloat
setasin(a, precopt) → {BigFloat}
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
a |
BigFloat | number | string | bigint | |||
prec |
number |
<optional> |
0
|
Returns:
this
- Type
- BigFloat
setatan(a, precopt) → {BigFloat}
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
a |
BigFloat | number | string | bigint | |||
prec |
number |
<optional> |
0
|
Returns:
this
- Type
- BigFloat
setatan2(a, b, precopt) → {BigFloat}
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
a |
BigFloat | number | string | bigint | |||
b |
BigFloat | number | string | bigint | |||
prec |
number |
<optional> |
0
|
Returns:
this
- Type
- BigFloat
setceil() → {BigFloat}
Returns:
this
- Type
- BigFloat
setcos(a, precopt) → {BigFloat}
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
a |
BigFloat | number | string | bigint | |||
prec |
number |
<optional> |
0
|
Returns:
this
- Type
- BigFloat
setdiv(a, b, precopt) → {BigFloat}
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
a |
BigFloat | number | string | bigint | |||
b |
BigFloat | number | string | bigint | |||
prec |
number |
<optional> |
0
|
Returns:
this
- Type
- BigFloat
setexp(a, precopt) → {BigFloat}
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
a |
BigFloat | number | string | bigint | |||
prec |
number |
<optional> |
0
|
Returns:
this
- Type
- BigFloat
setfloor() → {BigFloat}
Returns:
this
- Type
- BigFloat
setfpround(precopt, rnd_modeopt) → {BigFloat}
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
prec |
number |
<optional> |
0
|
|
rnd_mode |
number |
<optional> |
Flags.BF_RNDN
|
Returns:
this
- Type
- BigFloat
setlog(a, precopt) → {BigFloat}
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
a |
BigFloat | number | string | bigint | |||
prec |
number |
<optional> |
0
|
Returns:
this
- Type
- BigFloat
setmod(a, b, precopt) → {BigFloat}
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
a |
BigFloat | number | string | bigint | |||
b |
BigFloat | number | string | bigint | |||
prec |
number |
<optional> |
0
|
Returns:
this
- Type
- BigFloat
setmul(a, b, precopt) → {BigFloat}
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
a |
BigFloat | number | string | bigint | |||
b |
BigFloat | number | string | bigint | |||
prec |
number |
<optional> |
0
|
Returns:
this
- Type
- BigFloat
setneg() → {BigFloat}
Returns:
this
- Type
- BigFloat
setor(a, b, precopt) → {BigFloat}
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
a |
BigFloat | number | string | bigint | |||
b |
BigFloat | number | string | bigint | |||
prec |
number |
<optional> |
0
|
Returns:
this
- Type
- BigFloat
setpow(a, b, precopt) → {BigFloat}
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
a |
BigFloat | number | string | bigint | |||
b |
BigFloat | number | string | bigint | |||
prec |
number |
<optional> |
0
|
Returns:
this
- Type
- BigFloat
setrem(a, b, precopt) → {BigFloat}
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
a |
BigFloat | number | string | bigint | |||
b |
BigFloat | number | string | bigint | |||
prec |
number |
<optional> |
0
|
Returns:
this
- Type
- BigFloat
setround() → {BigFloat}
Returns:
this
- Type
- BigFloat
setsign(a, precopt) → {BigFloat}
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
a |
BigFloat | number | string | bigint | |||
prec |
number |
<optional> |
0
|
Returns:
this
- Type
- BigFloat
setsin(a, precopt) → {BigFloat}
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
a |
BigFloat | number | string | bigint | |||
prec |
number |
<optional> |
0
|
Returns:
this
- Type
- BigFloat
setsqrt(a, precopt) → {BigFloat}
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
a |
BigFloat | number | string | bigint | |||
prec |
number |
<optional> |
0
|
Returns:
this
- Type
- BigFloat
setsub(a, b, precopt) → {BigFloat}
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
a |
BigFloat | number | string | bigint | |||
b |
BigFloat | number | string | bigint | |||
prec |
number |
<optional> |
0
|
Returns:
this
- Type
- BigFloat
settan(a, precopt) → {BigFloat}
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
a |
BigFloat | number | string | bigint | |||
prec |
number |
<optional> |
0
|
Returns:
this
- Type
- BigFloat
settrunc() → {BigFloat}
Returns:
this
- Type
- BigFloat
setxor(a, b, precopt) → {BigFloat}
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
a |
BigFloat | number | string | bigint | |||
b |
BigFloat | number | string | bigint | |||
prec |
number |
<optional> |
0
|
Returns:
this
- Type
- BigFloat
sign(precopt) → {BigFloat}
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
prec |
number |
<optional> |
0
|
Returns:
- Type
- BigFloat
sin(precopt) → {BigFloat}
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
prec |
number |
<optional> |
0
|
Returns:
- Type
- BigFloat
sinh(precopt) → {BigFloat}
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
prec |
number |
<optional> |
0
|
Returns:
- Type
- BigFloat
sqrt(precopt) → {BigFloat}
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
prec |
number |
<optional> |
0
|
Returns:
- Type
- BigFloat
sub(b, precopt) → {BigFloat}
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
b |
BigFloat | number | string | bigint | |||
prec |
number |
<optional> |
0
|
Returns:
- Type
- BigFloat
tan(precopt) → {BigFloat}
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
prec |
number |
<optional> |
0
|
Returns:
- Type
- BigFloat
tanh(precopt) → {BigFloat}
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
prec |
number |
<optional> |
0
|
Returns:
- Type
- BigFloat
toBigInt() → {bigint}
Returns:
- Type
- bigint
toComplex() → {complex}
Returns:
- Type
- complex
toFixed(radixopt, precopt, rnd_modeopt) → {string}
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
radix |
number |
<optional> |
10
|
|
prec |
number |
<optional> |
-1
|
precision digits in radix |
rnd_mode |
number |
<optional> |
Flags.BF_RNDNA
|
Returns:
- Type
- string
toNumber() → {number}
Returns:
- Type
- number
toString(radixopt, precopt, prettyopt) → {string}
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
radix |
number |
<optional> |
10
|
|
prec |
number |
<optional> |
-1
|
precision digits in radix |
pretty |
boolean |
<optional> |
false
|
pretty print |
Returns:
- Type
- string
toUint8Array() → {Uint8Array}
Returns:
- Type
- Uint8Array
trunc() → {BigFloat}
Returns:
- Type
- BigFloat
visit(addToArrayopt)
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
addToArray |
boolean |
<optional> |
true
|
Whether to add the BigFloat to the garbage collector's array. |
wraptypeh(…ar)
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
ar |
BigFloat | string | number | bigint | object |
<repeatable> |
The arguments to wrap. |
Returns:
xor(b, precopt) → {BigFloat}
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
b |
BigFloat | number | string | bigint | |||
prec |
number |
<optional> |
0
|
Returns:
- Type
- BigFloat
(static) fromString(str, radixopt, precopt) → {BigFloat}
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
str |
string | |||
radix |
number |
<optional> |
10
|
|
prec |
number |
<optional> |
0
|
Returns:
- Type
- BigFloat