---
name: "math.h"
section: "3avr"
platform: "linux"
package: "avr-libc"
version: "1:2.2.1-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/math.h"
---

# math.h(3avr)

## NAME

math.h

## SYNOPSIS

### Macros

\#define **M\_E**   2.7182818284590452354\
 \#define **M\_LOG2E**   1.4426950408889634074\
 \#define **M\_LOG10E**   0.43429448190325182765\
 \#define **M\_LN2**   0.69314718055994530942\
 \#define **M\_LN10**   2.30258509299404568402\
 \#define **M\_PI**   3.14159265358979323846\
 \#define **M\_PI\_2**   1.57079632679489661923\
 \#define **M\_PI\_4**   0.78539816339744830962\
 \#define **M\_1\_PI**   0.31830988618379067154\
 \#define **M\_2\_PI**   0.63661977236758134308\
 \#define **M\_2\_SQRTPI**   1.12837916709551257390\
 \#define **M\_SQRT2**   1.41421356237309504880\
 \#define **M\_SQRT1\_2**   0.70710678118654752440\
 \#define **NAN**   \_\_builtin\_nan('')\
 \#define **nanf**(\_\_tagp)   \_\_builtin\_nanf(\_\_tag)\
 \#define **nan**(\_\_tag)   \_\_builtin\_nan(\_\_tag)\
 \#define **nanl**(\_\_tag)   \_\_builtin\_nanl(\_\_tag)\
 \#define **INFINITY**   \_\_builtin\_inf()\
 \#define **HUGE\_VALF**   \_\_builtin\_huge\_valf()\
 \#define **HUGE\_VAL**   \_\_builtin\_huge\_val()\
 \#define **HUGE\_VALL**   \_\_builtin\_huge\_vall()\

### Functions

float **cosf** (float x)\
 double **cos** (double x)\
 long double **cosl** (long double x)\
 float **sinf** (float x)\
 double **sin** (double x)\
 long double **sinl** (long double x)\
 float **tanf** (float x)\
 double **tan** (double x)\
 long double **tanl** (long double x)\
 static float **fabsf** (float \_\_x)\
 static double **fabs** (double \_\_x)\
 static long double **fabsl** (long double \_\_x)\
 float **fmodf** (float x, float y)\
 double **fmod** (double x, double y)\
 long double **fmodl** (long double x, long double y)\
 float **modff** (float x, float \*iptr)\
 double **modf** (double x, double \*iptr)\
 long double **modfl** (long double x, long double \*iptr)\
 float **sqrtf** (float x)\
 double **sqrt** (double x)\
 long double **sqrtl** (long double x)\
 float **cbrtf** (float x)\
 double **cbrt** (double x)\
 long double **cbrtl** (long double x)\
 float **hypotf** (float x, float y)\
 double **hypot** (double x, double y)\
 long double **hypotl** (long double x, long double y)\
 float **floorf** (float x)\
 double **floor** (double x)\
 long double **floorl** (long double x)\
 float **ceilf** (float x)\
 double **ceil** (double x)\
 long double **ceill** (long double x)\
 float **frexpf** (float x, int \*pexp)\
 double **frexp** (double x, int \*pexp)\
 long double **frexpl** (long double x, int \*pexp)\
 float **ldexpf** (float x, int iexp)\
 double **ldexp** (double x, int iexp)\
 long double **ldexpl** (long double x, int iexp)\
 float **expf** (float x)\
 double **exp** (double x)\
 long double **expl** (long double x)\
 float **coshf** (float x)\
 double **cosh** (double x)\
 long double **coshl** (long double x)\
 float **sinhf** (float x)\
 double **sinh** (double x)\
 long double **sinhl** (long double x)\
 float **tanhf** (float x)\
 double **tanh** (double x)\
 long double **tanhl** (long double x)\
 float **acosf** (float x)\
 double **acos** (double x)\
 long double **acosl** (long double x)\
 float **asinf** (float x)\
 double **asin** (double x)\
 long double **asinl** (long double x)\
 float **atanf** (float x)\
 double **atan** (double x)\
 long double **atanl** (long double x)\
 float **atan2f** (float y, float x)\
 double **atan2** (double y, double x)\
 long double **atan2l** (long double y, long double x)\
 float **logf** (float x)\
 double **log** (double x)\
 long double **logl** (long double x)\
 float **log10f** (float x)\
 double **log10** (double x)\
 long double **log10l** (long double x)\
 float **powf** (float x, float y)\
 double **pow** (double x, double y)\
 long double **powl** (long double x, long double y)\
 int **isnanf** (float x)\
 int **isnan** (double x)\
 int **isnanl** (long double x)\
 int **isinff** (float x)\
 int **isinf** (double x)\
 int **isinfl** (long double x)\
 static int **isfinitef** (float \_\_x)\
 static int **isfinite** (double \_\_x)\
 static int **isfinitel** (long double \_\_x)\
 static float **copysignf** (float \_\_x, float \_\_y)\
 static double **copysign** (double \_\_x, double \_\_y)\
 static long double **copysignl** (long double \_\_x, long double \_\_y)\
 int **signbitf** (float x)\
 int **signbit** (double x)\
 int **signbitl** (long double x)\
 float **fdimf** (float x, float y)\
 double **fdim** (double x, double y)\
 long double **fdiml** (long double x, long double y)\
 float **fmaf** (float x, float y, float z)\
 double **fma** (double x, double y, double z)\
 long double **fmal** (long double x, long double y, long double z)\
 float **fmaxf** (float x, float y)\
 double **fmax** (double x, double y)\
 long double **fmaxl** (long double x, long double y)\
 float **fminf** (float x, float y)\
 double **fmin** (double x, double y)\
 long double **fminl** (long double x, long double y)\
 float **truncf** (float x)\
 double **trunc** (double x)\
 long double **truncl** (long double x)\
 float **roundf** (float x)\
 double **round** (double x)\
 long double **roundl** (long double x)\
 long **lroundf** (float x)\
 long **lround** (double x)\
 long **lroundl** (long double x)\
 long **lrintf** (float x)\
 long **lrint** (double x)\
 long **lrintl** (long double x)\

**Non-Standard Math Functions**\

float **squaref** (float x)\
 double **square** (double x)\
 long double **squarel** (long double x)\

## Author

Generated automatically by Doxygen for AVR-LibC from the source code.
