amath  1.8.5
Simple command line calculator
fabs.c File Reference

Absolute value function. More...

#include "prim.h"
Include dependency graph for fabs.c:

Go to the source code of this file.

Functions

double fabs (double x)
 Returns the absolute value of x. More...
 

Detailed Description

Absolute value function.

Definition in file fabs.c.

Function Documentation

◆ fabs()

double fabs ( double  x)

Returns the absolute value of x.

Definition at line 51 of file fabs.c.

Referenced by __kernel_tan(), RealNumber::Absolute(), asin(), asinh(), atan(), atan2(), cchsh(), cosh(), csqrt(), DecimalSystem::GetText(), PositionalNumeralSystem::GetText(), pow(), rempio2(), sinh(), and tanh().

52 {
53  uint32_t hx;
54  GET_HIGH_WORD(hx, x);
55  SET_HIGH_WORD(x, hx & 0x7fffffff);
56  return x;
57 }
#define GET_HIGH_WORD(i, d)
Get the more significant 32 bit int from a double.
Definition: prim.h:167
#define SET_HIGH_WORD(d, v)
Set the more significant 32 bits of a double from an int.
Definition: prim.h:198
Here is the caller graph for this function: