You are currently not logged in! Enter your authentication credentials below to log in. You need to have cookies enabled to log in.
This shows you the differences between two versions of the page.
functions:llfabs [2015-01-31 09:30 SLT] sei style |
functions:llfabs [2015-02-04 13:07 SLT] (current) sei remove extra bracket |
||
---|---|---|---|
Line 17: | Line 17: | ||
Returns a $lty[float] that is the absolute value of $prm[fval], that is, the value with any negative sign removed. | Returns a $lty[float] that is the absolute value of $prm[fval], that is, the value with any negative sign removed. | ||
- | More rigorously, the result will be the same as $prm[fval] if $prm[fval] is positive or zero, and $prm[-fval]] if it is negative. | + | More rigorously, the result will be the same as $prm[fval] if $prm[fval] is positive or zero, and $prm[-fval] if it is negative. |
===== Notes ===== | ===== Notes ===== | ||
Line 23: | Line 23: | ||
* To determine the absolute value of an $lty[integer], use $lfn[llAbs]. | * To determine the absolute value of an $lty[integer], use $lfn[llAbs]. | ||
* "Minus zero" (-0.0) is a special case of a $ty[float] that can rarely appear in some situations. The absolute value of Minus zero is returned by this function unchanged (as -0.0). This should not be a concern anyway, as minus zero is mostly transparent to all calculations (e.g. minus zero is considered equal to zero, and doesn't err when taking its square root). | * "Minus zero" (-0.0) is a special case of a $ty[float] that can rarely appear in some situations. The absolute value of Minus zero is returned by this function unchanged (as -0.0). This should not be a concern anyway, as minus zero is mostly transparent to all calculations (e.g. minus zero is considered equal to zero, and doesn't err when taking its square root). | ||
- | * The absolute value of **NaN** is **NaN**. The absolute value of **Infinity** and **-Infinity** is **Infinity**. | + | * The absolute value of $nan is $nan. The absolute value of $pinf and $minf is $pinf. |
===== Short examples ===== | ===== Short examples ===== |