Difference between revisions of "Math functions"
DKontotasiou (talk | contribs) |
DKontotasiou (talk | contribs) |
||
Line 6: | Line 6: | ||
These functions can be accessed from the '''Math '''library from the '''Definition '''menu. | These functions can be accessed from the '''Math '''library from the '''Definition '''menu. | ||
− | '''Abs(x)''': Returns the absolute value of | + | '''Abs(x)''': Returns the absolute value of <code>x</code>. When <code>x</code> in complex, returns the magnitude, see [[Complex number functions]]. |
+ | :<code>Abs(180) → 180</code> | ||
+ | :<code>Abs(-210) → 210</code> | ||
− | + | '''Ceil(x)''': Returns the smallest integer that is greater than or equal to <code>x</code>. | |
− | + | :<code>Ceil(3.1) → 4</code> | |
− | + | :<code>Ceil(5) → 5</code> | |
− | + | :<code>Ceil(-2.9999) → -2</code> | |
− | '''Ceil(x)''': Returns the smallest integer that is greater than or equal to | + | :<code>Ceil(-7) → -7</code> |
− | |||
− | : | ||
− | |||
− | : | ||
− | |||
− | : | ||
− | |||
− | : | ||
'''Ceil(x,digits)''': Returns the smallest number with the indicated of digits to the right of the decimal that is greater than or equal to x. | '''Ceil(x,digits)''': Returns the smallest number with the indicated of digits to the right of the decimal that is greater than or equal to x. | ||
+ | :<code>Ceil(Pi,4) → 3.1416</code> | ||
+ | :<code>Ceil(-12345,-2) → -12300</code> | ||
− | + | '''Floor(x)''': Returns the largest integer that is smaller than or equal to <code>x</code>. | |
− | + | :<code>Floor(2.999) → 2</code> | |
− | + | :<code>Floor(3) → 3</code> | |
− | + | :<code>Floor(-2.01) → -3</code> | |
− | '''Floor(x)''': Returns the largest integer that is smaller than or equal to | + | :<code>Floor(-5) → -5</code> |
− | |||
− | : | ||
− | |||
− | : | ||
− | |||
− | : | ||
− | |||
− | : | ||
==See Also== | ==See Also== |
Revision as of 13:39, 7 September 2015
Analytica User Guide > Using Expressions > Math functions
These functions can be accessed from the Math library from the Definition menu.
Abs(x): Returns the absolute value of x
. When x
in complex, returns the magnitude, see Complex number functions.
Abs(180) → 180
Abs(-210) → 210
Ceil(x): Returns the smallest integer that is greater than or equal to x
.
Ceil(3.1) → 4
Ceil(5) → 5
Ceil(-2.9999) → -2
Ceil(-7) → -7
Ceil(x,digits): Returns the smallest number with the indicated of digits to the right of the decimal that is greater than or equal to x.
Ceil(Pi,4) → 3.1416
Ceil(-12345,-2) → -12300
Floor(x): Returns the largest integer that is smaller than or equal to x
.
Floor(2.999) → 2
Floor(3) → 3
Floor(-2.01) → -3
Floor(-5) → -5
See Also
Function calls and parameters <- | Math functions | -> Numbers and text |
Comments
Enable comment auto-refresher