Mathematical Constants¶
Mathematical constants¶
Mathematical constants
All values derived internally by the boring_math.special_functions.constants module itself.
infinity
e
pi
- boring_math.special_functions.constants.infinity: complex = (inf+infj)¶
Single complex infinity
Used as a sentinel value to represent of a single complex infinity.
Note
Complex infinity is a mathematical concept. Python does not natively support
inf + infjfor this.Tip
Use the
cmath.isinffunction to test for infinite values.Note
Real valued functions will use +inf and -inf when a distinct two-sided infinity exists. Positive inf will be used when distinct one-sided infinite limits exist.
- boring_math.special_functions.constants.e: float = 2.718281828459045¶
Base of the natural logarithms.
Also the limit of
(1 + 1/n)ⁿasn → ∞
- boring_math.special_functions.constants.pi: float = 3.141592653589793¶
Ratio circle’s circumference to diameter.
π can also be defined as the smallest positive real value
xwheree²ˣⁱ = 1orsin(x/2) = 1.Note
This value for π is based on a continued fraction expansion due to Bill Gosper.
π = 4/(1 + 1²/(3 + 2²/(5 + 3²/(7 + 4²/(9 + 5²/(11 + ...))))))