fabs()


Return the absolute value of an argument

Syntax

 fabs(argument)

Parameters

Parameter

Definition

argument

floating point value whose absolute value is to be determined

Description

The fabs() function returns the absolute value of argument ; that is,

  • argument if argument ≥ 0
  • argument if argument < 0

Example

The following fabs() function prints the absolute value of -12.3456:

 print(fabs(-12.3456));

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*