User Tools

Site Tools


syntax:functions:abs

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
syntax:functions:abs [2016/06/20 11:43] dmitrysyntax:functions:abs [2021/07/27 22:50] craigt
Line 1: Line 1:
-===== Abs(number) =====+====== Abs(number) =====
 +Category:  Number function
  
-Absolute value - describes the distance of a number on the number line from 0 without considering which direction from zero the number lies. The absolute value of a number is never negative.+\\  
 +=====Description===== 
 +This function returns the __absolute value__ of //number// which is the distance of a number on the number linefrom 0without considering which direction the number lies
  
-^  Example  ^  Result +The absolute value of a number is never negative.
-| abs(5 - 20)  |  15 | +
-| abs(0 - 5)     5 |+
  
-Notekeep in mind that EasyMorph doesn't support unary minus in expressions see Example 2 above.+\\  
 +=====Arguments===== 
 +^Argument^Type^Description^ 
 +|number|Number|The value from which the absolute value is determined.| 
 +\\  
 +**Return value type:**  Number 
 + 
 +\\  
 +=====Remarks===== 
 +Unlike some other functions which implicitly convert date values to date serial values before evaluating, passing a date value into this function will result in an error ("#The argument must be a number."). 
 + 
 +\\  
 +=====Examples===== 
 + 
 +  abs(10) = 10 
 +  abs(-5) = 5 
 +  abs(40.5) = 40.5 
 +  abs(0) = 0 
 +  abs(10*100) = 1000  //Passing in a calculation is supported. 
 +  abs({MyNum}*[MyVal]) = 15  //{MyNum}=5, [MyVal]=3; parameters are supported. 
 +  abs(#2021-10-21) = #The argument must be a number.
syntax/functions/abs.txt · Last modified: 2021/08/11 15:13 by craigt

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki