Constants

NLCPy includes several constants:

nlcpy.inf

IEEE 754 floating point representation of positive infinity.

Returns
yfloat

A floating point representation of positive infinity.

注釈

NLCPy uses the IEEE Standard for Binary Floating-Point for Arithmetic (IEEE 754). This means that Not a Number is not equivalent to infinity. Also that positive infinity is not equivalent to negative infinity. But infinity is equivalent to positive infinity.

Inf, Infinity, PINF and infty are aliases for inf.

nlcpy.Inf

IEEE 754 floating point representation of positive infinity.

Use inf because Inf, Infinity, PINF and infty are aliases for inf. For more details, see inf.

参考

inf

nlcpy.Infinity

IEEE 754 floating point representation of positive infinity.

Use inf because Inf, Infinity, PINF and infty are aliases for inf. For more details, see inf.

参考

inf

nlcpy.PINF

IEEE 754 floating point representation of positive infinity.

Use inf because Inf, Infinity, PINF and infty are aliases for inf. For more details, see inf.

参考

inf

nlcpy.infty

IEEE 754 floating point representation of positive infinity.

Use inf because Inf, Infinity, PINF and infty are aliases for inf. For more details, see inf.

参考

inf

nlcpy.NINF

IEEE 754 floating point representation of negative infinity.

Returns
yfloat

A floating point representation of negative infinity.

注釈

NLCPy uses the IEEE Standard for Binary Floating-Point for Arithmetic (IEEE 754). This means that Not a Number is not equivalent to infinity. Also that positive infinity is not equivalent to negative infinity. But infinity is equivalent to positive infinity.

nlcpy.nan

IEEE 754 floating point representation of Not a Number (NaN).

Returns
yfloat

A floating point representation of Not a Number.

参考

isnan isfinite

注釈

NLCPy uses the IEEE Standard for Binary Floating-Point for Arithmetic (IEEE 754). This means that Not a Number is not equivalent to infinity. NaN and NAN are aliases of nan.

nlcpy.NAN

IEEE 754 floating point representation of Not a Number (NaN).

NaN and NAN are equivalent definitions of nan. Please use nan instead of NAN.

参考

nan

nlcpy.NaN

IEEE 754 floating point representation of Not a Number (NaN).

NaN and NAN are equivalent definitions of nan. Please use nan instead of NaN.

参考

nan

nlcpy.NZERO

IEEE 754 floating point representation of negative zero.

Returns
yfloat

A floating point representation of negative zero.

注釈

NLCPy uses the IEEE Standard for Binary Floating-Point for Arithmetic (IEEE 754). Negative zero is considered to be a finite number.

Examples

>>> import nlcpy as vp
>>> vp.NZERO
-0.0
>>> vp.PZERO
0.0
>>> vp.isfinite([vp.NZERO])
array([ True])
>>> vp.isnan([vp.NZERO])
array([False])
>>> vp.isinf([vp.NZERO])
array([False])
nlcpy.PZERO

IEEE 754 floating point representation of positive zero.

Returns
yfloat

A floating point representation of positive zero.

注釈

NLCPy uses the IEEE Standard for Binary Floating-Point for Arithmetic (IEEE 754). Positive zero is considered to be a finite number.

Examples

>>> import nlcpy as vp
>>> vp.PZERO
0.0
>>> vp.NZERO
-0.0
>>> vp.isfinite([vp.PZERO])
array([ True])
>>> vp.isnan([vp.PZERO])
array([False])
>>> vp.isinf([vp.NZERO])
array([False])
nlcpy.e

Euler's constant, base of natural logarithms, Napier's constant.

e = 2.71828182845904523536028747135266249775724709369995...

参考

exp log

nlcpy.euler_gamma

γ = 0.5772156649015328606065120900824024310421...

nlcpy.pi

pi = 3.1415926535897932384626433...