Math Constants
Mathematical constants like Pi, e and i are built-in in SpeQ.
SpeQ has the following groups of built-in mathematical constants:
The values for the constants are taken from the Wikipedia, the free online encyclopedia.
See Mathematical constants on Wikipedia for more information.
General
| Name |
Symbol |
Value |
Description |
| Apery | ζ(3) | 1.202056903 | |
| Backhouse | | 1.456074949 | |
| Cahen | | 0.62946502 | |
| e | e | 2.718281828 | The base of the natural logarithm function. Napier's constant, or Euler's number. |
| GoldenRatio | φ | 1.618033989 | Two quantities a and b are said to be in the golden ratio if a+b is to a as a is to b, mathematically stated as: (a+b)/a = a/b = φ |
| i | i | Sqrt(-1) | The imaginary unit. You can read more about i on the page Complex Numbers. |
| LaplaceLimit | | 0.662743419 | |
| Pi | π | 3.141592654 | The ratio of a circle's circumference to its diameter. |
| Pythagoras | Sqrt(2) | 1.414213562 | The square root of 2. Geometrically, Sqrt(2) is the length of a diagonal across a square with sides of one unit of length. |
| Sierpinski | K | 2.58498176 | |
| Theodorus | Sqrt(3) | 1.732050808 | The square root of 3. Geometrically, Sqrt(3) is the length of a diagonal across a cube with sides of one unit of length. |
Number theory
Number theory is the branch of pure mathematics concerned with the properties of numbers in general,
and integers in particular.
| Name |
Symbol |
Value |
| AlladiGrinstead | | 0.261497213 |
| BruijnNewMan | Λ | > -2.7e-9 |
| BrunsPrimeQuadruplets | B4 | 0.87058838 |
| BrunsTwinPrime | B2 | 1.902160582 |
| EmbreeTrefethen | β* | 0.70258 |
| ErdosBorwein | EB | 1.606695152 |
| EulerMascheroni | γ | 0.577215665 |
| GolombDickman | λ, μ | 0.624329988 |
| HafnerSarnakMcCurley | D(1) | 0.353236372 |
| Khinchin | | 2.685452001 |
| KhinchinLevy | | 1.18656911 |
| LandauRamanujan | K | 0.764223654 |
| Legendre | B'L | 1 |
| MeisselMertens | M1 | 0.261497213 |
| Mills | θ | 1.306377884 |
| Niven | | 1.70521114 |
| Porter | | 1.467078079 |
| RamanujanSoldner | K | 1.451369235 |
| TwinPrime | C2 | 0.660161816 |
| Viswanath | K | 1.13198824 |
Chaos theory
Chaos theory describes the behavior of certain nonlinear dynamical systems that act chaotic, but with certain deterministic properties.
| Name |
Symbol |
Value |
| FeigenbaumAlpha | α | 2.502907875 |
| FeigenbaumDelta | δ | 4.669201609 |
Combinatorics
Combinatorics is the branch of mathematics studying the enumeration, combination, and permutation of sets of elements and the mathematical relations that characterize their properties.
| Name |
Symbol |
Value |
| Catalan | K | 0.915965594 |
| GaussKuzminWirsing | λ | 0.303663003 |
| GolombDickman | λ, μ | 0.624329988 |
| Lengyel | Λ | 1.098685805 |
| Lieb | | 1.539600718 |
Analysis
Analysis is a branch of mathematics that studies continuous functions.
Topics are limits, convergence, continuity, integration, differentiability.
| Name |
Symbol |
Value |
| Bernstein | β | 0.280169499 |
| e | e | 2.718281828 |
| FransenRobinson | F | 2.807770242 |
| i | i | Sqrt(-1) |
| Landau | L | 0.5 |
| Pi | π | 3.141592654 |
Special values
There are a few special values: Inf and NaN.
The constant Inf is returned if an overflow occures by evaluating an expression,
for example 10^400.
The second special value, NaN, means Not-a-Number and is the result of an operation on invalid input operands.
For example 0/0 and Inf-Inf will return NaN as answer.
| Name |
Value |
| Inf |
Infinite |
| NaN |
Not-a-Number |
Examples
'Examples of using Math constants
'Calculate the circumference and area
'for a circle with diameter 8.
diameter = 8; 'Define the diameter
radius = 0.5*diameter; 'Calculate the radius
Circumference = Pi * 2 * radius
Circumference = 25.132741229
'Calculate the area
Area = Pi * radius^2
Area = 50.265482457
'Don't forget to set angle mode
'to radians to get the right answer.
Sin(.25 * Pi)
Ans = 0.7071067812
3 * e ^ (5-3)
Ans = 22.1671682968
3 * Exp(5-3)
Ans = 22.1671682968
'a golden ratio example:
a = 5;
b = a / GoldenRatio;
a / b
Ans = 1.618033989
(a + b) / a
Ans = 1.618033989
GoldenRatio
Ans = 1.618033989
'The variable Inf is only used as result of an expression
'that gives an overflow of computer memory as result,
'for example:
50 ^ 1000
Ans = Inf
See Also
Constants,
Physical constants,
Wikipedia
|