datatable.math¶
Trigonometric functions¶
Compute \(\sin x\) (the trigonometric sine of |
|
Compute \(\cos x\) (the trigonometric cosine of |
|
Compute \(\tan x\) (the trigonometric tangent of |
|
Compute \(\sin^{-1} x\) (the inverse sine of |
|
Compute \(\cos^{-1} x\) (the inverse cosine of |
|
Compute \(\tan^{-1} x\) (the inverse tangent of |
|
Compute \(\tan^{-1} (x/y)\). |
|
Compute \(\sqrt{x^2 + y^2}\). |
|
Convert an angle measured in degrees into radians. |
|
Convert an angle measured in radians into degrees. |
Hyperbolic functions¶
Compute \(\sinh x\) (the hyperbolic sine of |
|
Compute \(\cosh x\) (the hyperbolic cosine of |
|
Compute \(\tanh x\) (the hyperbolic tangent of |
|
Compute \(\sinh^{-1} x\) (the inverse hyperbolic sine of |
|
Compute \(\cosh^{-1} x\) (the inverse hyperbolic cosine of |
|
Compute \(\tanh^{-1} x\) (the inverse hyperbolic tangent of |
Exponential/logarithmic functions¶
Compute \(e^x\) (the exponent of |
|
Compute \(2^x\). |
|
Compute \(e^x - 1\). |
|
Compute \(\ln x\) (the natural logarithm of |
|
Compute \(\log_{10} x\) (the decimal logarithm of |
|
Compute \(\ln(1 + x)\). |
|
Compute \(\log_{2} x\) (the binary logarithm of |
|
Compute \(\ln(e^x + e^y)\). |
|
Compute \(\log_2(2^x + 2^y)\). |
|
Compute \(\sqrt[3]{x}\) (the cubic root of |
|
Compute \(x^a\). |
|
Compute \(\sqrt{x}\) (the square root of |
|
Compute \(x^2\) (the square of |
Special mathemetical functions¶
Floating-point functions¶
Absolute value of |
|
The smallest integer not less than |
|
Number with the magnitude of |
|
The absolute value of |
|
The largest integer not greater than |
|
Remainder of a floating-point division |
|
Check whether |
|
Check if |
|
Check if |
|
Check if |
|
Compute \(x\cdot 2^y\). |
|
Round |
|
The sign of |
|
The sign of |
|
The value of |
Mathematical constants¶
Comparison table¶
The set of functions provided by the dt.math
module is very
similar to the standard Python’s math
module, or
numpy math functions. Below is the comparison table showing which functions
are available:
math |
numpy |
datatable |
---|---|---|
Trigonometric/hyperbolic functions |
||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Exponential/logarithmic/power functions |
||
|
|
|
|
||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||
|
||
|
||
|
|
|
|
|
|
|
||
Special mathematical functions |
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
Floating-point functions |
||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||
|
||
|
|
|
|
||
|
||
|
||
|
|
|
Miscellaneous |
||
|
||
|
||
|
||
|
||
|
|
|
|
||
|
||
Mathematical constants |
||
|
|
|
|
|
|
|
|
|
|
|
|
|