abs

Full name
abs
Library
Built-in
Syntax

abs(n)

Description

The abs function returns the absolute value of a number. The argument can be an integer or a real number. If it is a complex number, its modulus is returned.

Parameters
  • n: number whose absolute value (if it is an integer or real number) or module (if it is a complex number) we want to extract
Examples

The following examples calculate the absolute value of integers and real numbers:

Abs function. Example of use

 

If the argument is a complex number, its modulus is returned:

Abs function. Example of use

 

Submitted by admin on Sat, 01/19/2019 - 22:53