File r37/lisp/csl/html/r37_0070.html artifact 375006fc4a part of check-in 808e24217a



<A NAME=ABS>

<TITLE>ABS</TITLE></A>
<b><a href=r37_idx.html>INDEX</a></b><p><p>



<B>ABS</B> _ _ _  _ _ _  _ _ _  _ _ _ <B>operator</B><P>
<P>
 
 <P>
<P>
The <em>abs</em> operator returns the absolute value of its argument. 
<P>
<P>
 <P> <H3> 
syntax: </H3>
<em>abs</em>(&lt;expression&gt;) 
<P>
<P>
<P>
&lt;expression&gt; can be any REDUCE scalar expression. 
<P>
<P>
 <P> <H3> 
examples: </H3>
<P><PRE><TT>
abs(-a); 

  ABS(A) 


abs(-5); 

  5 


a := -10; 

  A := -10 


abs(a); 

  10 


abs(-a); 

  10

</TT></PRE><P>If the argument has had no numeric value assigned to it, such as a
n 
identifier or polynomial, <em>abs</em> returns an expression involving 
<em>abs</em> of its argument, doing as much simplification of the argument 
as it can, such as dropping any preceding minus sign. 
<P>
<P>
<P>


REDUCE Historical
REDUCE Sourceforge Project | Historical SVN Repository | GitHub Mirror | SourceHut Mirror | NotABug Mirror | Chisel Mirror | Chisel RSS ]