Tgmath.h: Difference between revisions

Content deleted Content added
Type-generic macro
Line 4:
'''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>
 
== Type-generic macro ==
A type generic macro is something which allows calling a function whose type is determined by the type of argument in the macro. This means, for example, x is declared as an [[int(computer science|int]] data type but [[tangent|tan]] has been called this way:<br />
tan((float)x)<br />
then this expression will have a type [[floating point|float]].
== Functions from <code>math.h</code>==
{|class="wikitable"