#REDIRECT [[C mathematical functions#tgmath.h]]
{{lowercase|title=tgmath.h}}
{{C_Standard_library}}
'''tgmath.h''' is a [[Standard C]] header that defines many type-generic [[macro]]s that can be used for a variety of mathematical operations. This header also includes <code>[[math.h]]</code> and <code>[[complex.h]]</code>. For all of the [[Function (computer science)|functions]] in the <code>math.h</code> and <code>complex.h</code> headers that do not have an f ([[Floating point|float]]) or l ([[Long double|long double]]) suffix, and whose corresponding type is [[Double|double]] (with the exception of <code>modf()</code>), there is a corresponding macro.<ref>http://www.opengroup.org/onlinepubs/009695399/basedefs/tgmath.h.html</ref>
== Functions from <code>math.h</code>==
{|class="wikitable"
|-
! Name !! Description
|-
|<code>acos</code> || [[arccosine|inverse cosine]]
|-
|<code>asin</code> || [[arcsine|inverse sine]]
|-
|<code>atan</code> || [[arctangent|one-parameter inverse tangent]]
|-
|<code>atan2</code> || [[atan2|two-parameter inverse tangent]]
|-
|<code>ceil</code> || [[ceil (programming)|ceiling]], the smallest [[integer]] not less than parameter
|-
|<code>cos</code> || [[cosine]]
|-
|<code>cosh</code> || [[hyperbolic cosine]]
|-
|<code>exp</code> || [[exponential function]]
|-
|<code>fabs</code> || [[absolute value]] (of a [[floating-point number]])
|-
|<code>floor</code> || [[floor (programming)|floor]], the largest integer not greater than parameter
|-
|<code>fmod</code> || [[floating-point]] [[remainder]]
|-
|<code>frexp</code> || break [[floating-point]] number down into [[significand|mantissa]] and [[exponent]]
|-
|<code>ldexp</code> || scale [[floating-point]] number by [[exponent]] (see [[ldexp|article]])
|-
|<code>log</code> || [[natural logarithm]]
|-
|<code>log10</code> || [[common logarithm|base-10 logarithm]]
|-
|<code>modf(''x'',''p'')</code> || returns [[fractional part]] of ''x'' and stores [[floor and ceiling functions|integral part]] where [[pointer (computing)|pointer]] ''p'' points to
|-
|<code>pow(''x'',''y'')</code> || raise ''x'' to the [[exponentiation|power]] of ''y'', ''x<sup>y</sup>''
|-
|<code>sin</code> || [[sine]]
|-
|<code>sinh</code> || [[hyperbolic sine]]
|-
|<code>sqrt</code> || [[square root]]
|-
|<code>tan</code> || [[tangent (trigonometric function)|tangent]]
|-
|<code>tanh</code> || [[hyperbolic tangent]]
|}
== Functions from complex.h ==
{|class="wikitable"
|-
! Name !! Description
|-
|<code>cacos</code> || [[arccosine|inverse cosine]]
|-
|<code>casin</code> || [[arcsine|inverse sine]]
|-
|<code>catan</code> || [[arctangent|one-parameter inverse tangent]]
|-
|<code>catan2</code> || [[atan2|two-parameter inverse tangent]]
|-
|<code>cceil</code> || [[ceil (programming)|ceiling]], the smallest [[integer]] not less than parameter
|-
|<code>ccos</code> || [[cosine]]
|-
|<code>ccosh</code> || [[hyperbolic cosine]]
|-
|<code>cexp</code> || [[exponential function]]
|-
|<code>cfabs</code> || [[absolute value]] (of a [[floating-point number]])
|-
|<code>cfloor</code> || [[floor (programming)|floor]], the largest integer not greater than parameter
|-
|<code>cfmod</code> || [[fmod|floating-point remainder]]
|-
|<code>cfrexp</code> || break floating-point number down into [[significand|mantissa]] and [[exponent]]
|-
|<code>cldexp</code> || scale [[floating-point]] number by [[exponent]] (see [[ldexp|article]])
|-
|<code>clog</code> || [[natural logarithm]]
|-
|<code>clog10</code> || [[common logarithm|base-10 logarithm]]
|-
|<code>cmodf(''x'',''p'')</code> || returns fractional part of ''x'' and stores integral part where [[pointer (computing)|pointer]] ''p'' points to
|-
|<code>cpow(''x'',''y'')</code> || raise ''x'' to the power of ''y'', ''x<sup>y</sup>''
|-
|<code>csin</code> || [[sine]]
|-
|<code>csinh</code> || [[hyperbolic sine]]
|-
|<code>csqrt</code> || [[square root]]
|-
|<code>ctan</code> || [[tangent (trigonometric function)|tangent]]
|-
|<code>ctanh</code> || [[hyperbolic tangent]]
|}
==References==
<references/>
{{DEFAULTSORT:TgmatH.H}}
[[Category:C standard library headers]]
== See also ==
* [[math.h]]
* [[complex.h]]
* [[Trigonometric Functions]]
* [[Hyperbolic trigonometric functions]]
|