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.
-
nlcpy.
Inf
¶ IEEE 754 floating point representation of positive infinity.
Use
inf
becauseInf
,Infinity
,PINF
andinfty
are aliases for inf. For more details, seeinf
.参考
-
nlcpy.
Infinity
¶ IEEE 754 floating point representation of positive infinity.
Use
inf
becauseInf
,Infinity
,PINF
andinfty
are aliases for inf. For more details, seeinf
.参考
-
nlcpy.
PINF
¶ IEEE 754 floating point representation of positive infinity.
Use
inf
becauseInf
,Infinity
,PINF
andinfty
are aliases for inf. For more details, seeinf
.参考
-
nlcpy.
infty
¶ IEEE 754 floating point representation of positive infinity.
Use
inf
becauseInf
,Infinity
,PINF
andinfty
are aliases for inf. For more details, seeinf
.参考
-
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.
-
nlcpy.
NAN
¶ IEEE 754 floating point representation of Not a Number (NaN).
NaN
andNAN
are equivalent definitions ofnan
. Please usenan
instead ofNAN
.参考
-
nlcpy.
NaN
¶ IEEE 754 floating point representation of Not a Number (NaN).
NaN
andNAN
are equivalent definitions ofnan
. Please usenan
instead ofNaN
.参考
-
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...
-
nlcpy.
euler_gamma
¶ γ = 0.5772156649015328606065120900824024310421...
-
nlcpy.
pi
¶ pi = 3.1415926535897932384626433...