Skip to content
Search

Cmath

lastmod 2020-08-25created 2015-09-0110 edits

Functions

ceil()
Rounds up everything after the decimal point.
roundf()
Rounds the fractional part to the nearest integer
floor()
Discards everything after the decimal point
modf()
Gets the integer part and the fractional part.

logarithm

log
https://github.com/lattera/glibc/blob/master/sysdeps/ieee754/dbl-64/e_log.c
Computes the logarithm.
log10
https://github.com/lattera/glibc/blob/master/sysdeps/ieee754/dbl-64/e_log10.c
Computes the base-10 logarithm. (Common logarithm)

abs

Functions that compute the absolute value. abs() and labs() return the absolute value of an integer, and fabs() returns the absolute value of a real number.

function

parameter

abs

int

labs

long

llabs

long long

fabsf

float

fabs

double

fabsl

long double

atan2

In a variety of computer languages, the two-argument function atan2 is a variation of the arctangent function.

  • Compute arc tangent with two parameters.
  • Returns the principal value of the arc tangent of y/x, expressed in radians.
  • To compute the value, the function uses the sign of both arguments to determine the quadrant.

See also

Favorite site

author Zer0 sitemap