CoCoA:Abs

From ApCoCoAWiki

Abs

absolute value of a number

Description

This function returns the absolute value of N.

Example

  Abs(-3);
3
-------------------------------
  Abs(-2/3);
2/3
-------------------------------

Syntax

Abs(N:INT):INT
Abs(N:RAT):RAT
   <type>integer</type>
   <type>rat</type>