| Extensions for embedded processors | ||||
| Dynamic memory extensions | ||||
| Floating-point extensions part 1: Binary floating-point | ||||
| Floating-point extensions part 4: Supplementary functions |
Floating-point extensions for C - Part 4: Supplementary functions, ISO/IEC TS 18661-4:2015, defines the following new components for the C standard library, as recommended by ISO/IEC/IEEE 60559:2011 (the current revision of IEEE-754).
Supplemenatary mathematical functions listed below are merged into C2x standard.
Predefined feature test macros | ||
__STDC_IEC_60559_FUNCS__ | integer constant of typelong and value201506L (macro constant) | |
Supplementary mathematical functions | ||
Defined in header <math.h> | ||
| compute2x -1 (function)[edit] | ||
(FP Ext 4 TS) | compute10x (function)[edit] | |
| compute10x -1 (function)[edit] | ||
(FP Ext 4 TS) | compute ln(1+x) (same aslog1p) (function)[edit] | |
| computelog2(1+x) (function)[edit] | ||
| computelog10(1+x) (function)[edit] | ||
(FP Ext 4 TS) | compute the inverse square rootx-1/2 (function)[edit] | |
| compute compound interest,(1+x)n (function)[edit] | ||
(FP Ext 4 TS) | compute the nth root of x,x1/n (function)[edit] | |
(FP Ext 4 TS) | compute x raised to the nth power, where n is integer (function)[edit] | |
(FP Ext 4 TS) | compute x raised to the y power,xy (function)[edit] | |
| compute arccos(x)/π (measuring the angle in half-revolutions) (function)[edit] | ||
| compute arcsin(x)/π (measuring the angle in half-revolutions) (function)[edit] | ||
| compute arctan(x)/π (measuring the angle in half-revolutions) (function)[edit] | ||
| compute arctan(y/x)/π (measuring the angle in half-revolutions) (function)[edit] | ||
(FP Ext 4 TS) | compute cos(πx) (measuring the angle in half-revolutions) (function)[edit] | |
(FP Ext 4 TS) | compute sin(πx) (measuring the angle in half-revolutions) (function)[edit] | |
(FP Ext 4 TS) | compute tan(πx) (measuring the angle in half-revolutions) (function)[edit] | |
Reduction functions | ||
Defined in header <math.h> | ||
| compute the sum of n members of an array (function)[edit] | ||
| compute the sum of the absolute values of n members of an array (function)[edit] | ||
| compute the sum of squares of n members of an array (function)[edit] | ||
| compute the dot product between n members of two arrays (function)[edit] | ||
| compute the product of n members of an array as a scaled value and a scale factor (function)[edit] | ||
| compute the dot product of n members of two arrays as a scaled value and a scale factor (function)[edit] | ||
| compute the product of the differences between corresponding n members of two arrays as a scaled value and a scale factor (function)[edit] | ||
Correctly-rounded version of functions | ||
Defined in header <math.h> | ||
crexp(optional) (FP Ext 4 TS) | correctly-rounded version ofexp (function) | |
crexpm1(optional) (FP Ext 4 TS) | correctly-rounded version ofexpm1 (function) | |
crexp2(optional) (FP Ext 4 TS) | correctly-rounded version ofexp2 (function) | |
crexp2m1(optional) (FP Ext 4 TS) | correctly-rounded version ofexp2m1 (function) | |
crexp10(optional) (FP Ext 4 TS) | correctly-rounded version ofexp10 (function) | |
crexp10m1(optional) (FP Ext 4 TS) | correctly-rounded version ofexp10m1 (function) | |
crlog(optional) (FP Ext 4 TS) | correctly-rounded version oflog (function) | |
crlog2(optional) (FP Ext 4 TS) | correctly-rounded version oflog2 (function) | |
crlog10(optional) (FP Ext 4 TS) | correctly-rounded version oflog10 (function) | |
crlog1p(optional) (FP Ext 4 TS) | correctly-rounded version oflog1p (function) | |
crlogp1(optional) (FP Ext 4 TS) | correctly-rounded version oflogp1 (function) | |
crlog2p1(optional) (FP Ext 4 TS) | correctly-rounded version oflog2p1 (function) | |
crlog10p1(optional) (FP Ext 4 TS) | correctly-rounded version oflog10p1 (function) | |
crrsqrt(optional) (FP Ext 4 TS) | correctly-rounded version ofrsqrt (function) | |
crcompoundn(optional) (FP Ext 4 TS) | correctly-rounded version ofcompoundn (function) | |
crrootn(optional) (FP Ext 4 TS) | correctly-rounded version ofrootn (function) | |
crpown(optional) (FP Ext 4 TS) | correctly-rounded version ofpown (function) | |
crpow(optional) (FP Ext 4 TS) | correctly-rounded version ofpow (function) | |
crpowr(optional) (FP Ext 4 TS) | correctly-rounded version ofpowr (function) | |
crsin(optional) (FP Ext 4 TS) | correctly-rounded version ofsin (function) | |
crcos(optional) (FP Ext 4 TS) | correctly-rounded version ofcos (function) | |
crtan(optional) (FP Ext 4 TS) | correctly-rounded version oftan (function) | |
crsinpi(optional) (FP Ext 4 TS) | correctly-rounded version ofsinpi (function) | |
crcospi(optional) (FP Ext 4 TS) | correctly-rounded version ofcospi (function) | |
crtanpi(optional) (FP Ext 4 TS) | correctly-rounded version oftanpi (function) | |
crasinpi(optional) (FP Ext 4 TS) | correctly-rounded version ofasinpi (function) | |
cracospi(optional) (FP Ext 4 TS) | correctly-rounded version ofacospi (function) | |
cracospi(optional) (FP Ext 4 TS) | correctly-rounded version ofacospi (function) | |
cratanpi(optional) (FP Ext 4 TS) | correctly-rounded version ofatanpi (function) | |
cratan2pi(optional) (FP Ext 4 TS) | correctly-rounded version ofatan2pi (function) | |
crasin(optional) (FP Ext 4 TS) | correctly-rounded version ofasin (function) | |
cracos(optional) (FP Ext 4 TS) | correctly-rounded version ofacos (function) | |
cratan(optional) (FP Ext 4 TS) | correctly-rounded version ofatan (function) | |
cratan2(optional) (FP Ext 4 TS) | correctly-rounded version ofatan2 (function) | |
crsinh(optional) (FP Ext 4 TS) | correctly-rounded version ofsinh (function) | |
crcosh(optional) (FP Ext 4 TS) | correctly-rounded version ofcosh (function) | |
crtanh(optional) (FP Ext 4 TS) | correctly-rounded version oftanh (function) | |
crasinh(optional) (FP Ext 4 TS) | correctly-rounded version ofasinh (function) | |
cracosh(optional) (FP Ext 4 TS) | correctly-rounded version ofacosh (function) | |
cratanh(optional) (FP Ext 4 TS) | correctly-rounded version ofatanh (function) | |
crhypot(optional) (FP Ext 4 TS) | correctly-rounded version ofhypot (function) | |
Complex version of functions | ||
Defined in header <complex.h> | ||
cexp2m1(optional) (FP Ext 4 TS) | complex number version ofexp2m1 (function) | |
cexp10(optional) (FP Ext 4 TS) | complex number version ofexp10 (function) | |
cexp10m1(optional) (FP Ext 4 TS) | complex number version ofexp10m1 (function) | |
clogp1(optional) (FP Ext 4 TS) | complex number version oflogp1 (function) | |
clog2p1(optional) (FP Ext 4 TS) | complex number version oflog2p1 (function) | |
clog10p1(optional) (FP Ext 4 TS) | complex number version oflog10p1 (function) | |
crsqrt(optional) (FP Ext 4 TS) | complex number version ofrsqrt (function) | |
ccompoundn(optional) (FP Ext 4 TS) | complex number version ofcompoundn (function) | |
crootn(optional) (FP Ext 4 TS) | complex number version ofrootn (function) | |
cpown(optional) (FP Ext 4 TS) | complex number version ofpown (function) | |
cpowr(optional) (FP Ext 4 TS) | complex number version ofpowr (function) | |
cacospi(optional) (FP Ext 4 TS) | complex number version ofacospi (function) | |
casinpi(optional) (FP Ext 4 TS) | complex number version ofasinpi (function) | |
catanpi(optional) (FP Ext 4 TS) | complex number version ofatanpi (function) | |
ccospi(optional) (FP Ext 4 TS) | complex number version ofcospi (function) | |
csinpi(optional) (FP Ext 4 TS) | complex number version ofsinpi (function) | |
ctanpi(optional) (FP Ext 4 TS) | complex number version oftanpi (function) | |
All functions added to the C library by this extension are only declared if a macro__STDC_WANT_IEC_60559_FUNCS_EXT__ is defined before math.h is included.
The decimal floating-point variants of every function are only defined if__STDC_WANT_IEC_60559_DFP_EXT__ is also defined before math.h is included.
The extended precision variants of every function are only defined if__STDC_WANT_IEC_60559_TYPES_EXT__ is defined before math.h is included.
The correctly-rounded versions of all functions (with thecr- prefix) are optional.