-
Notifications
You must be signed in to change notification settings - Fork 16
/
math.html
47 lines (45 loc) · 10.1 KB
/
math.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>math.h</TITLE>
<STYLE TYPE="TEXT/CSS">
<!--
.IE3-DUMMY { CONT-SIZE: 100%; }
BODY { FONT-FAMILY: Verdana,Arial,Helvetica,Sans-Serif; BACKGROUND-COLOR: #E0E0E0; }
P { FONT-FAMILY: Verdana,Arial,Helvetica,Sans-Serif; }
H1 { FONT-FAMILY: Verdana,Arial,Helvetica,Sans-Serif; }
H2 { FONT-FAMILY: Verdana,Arial,Helvetica,Sans-Serif; }
H3 { FONT-FAMILY: Verdana,Arial,Helvetica,Sans-Serif; }
H4 { FONT-FAMILY: Verdana,Arial,Helvetica,Sans-Serif; }
H5 { FONT-FAMILY: Verdana,Arial,Helvetica,Sans-Serif; }
H6 { FONT-FAMILY: Verdana,Arial,Helvetica,Sans-Serif; }
UL { FONT-FAMILY: Verdana,Arial,Helvetica,Sans-Serif; }
TD { FONT-FAMILY: Verdana,Arial,Helvetica,Sans-Serif; BACKGROUND-COLOR: #FFFFFF; }
.NOBORDER { BACKGROUND-COLOR: #E0E0E0; PADDING: 0pt; }
.NOBORDER TD { FONT-FAMILY: Verdana,Arial,Helvetica,Sans-Serif; BACKGROUND-COLOR: #E0E0E0; PADDING: 0pt; }
.CODE { FONT-FAMILY: Courier New; }
-->
</STYLE>
</HEAD>
<BODY TEXT="#000000" BGCOLOR="#E0E0E0">
<FONT SIZE="5"><B>The <math.h> Header File</B></FONT>
<HR>
<P><B>ANSI-compatible routines for floating point arithmetic</B></P>
<H3><U>Functions</U></H3>
<DL INDENT="20"><DT><B><A HREF="stdlib.html#abs">abs</A></B><DD>Absolute value of a number.<IMG WIDTH="1" HEIGHT="20" ALIGN="TOP"><DT><B><A HREF="timath.html#acos">acos</A></B><DD>Floating point arc cosine.<IMG WIDTH="1" HEIGHT="20" ALIGN="TOP"><DT><B><A HREF="timath.html#acosh">acosh</A></B><DD>Floating point hyperbolic area cosine.<IMG WIDTH="1" HEIGHT="20" ALIGN="TOP"><DT><B><A HREF="timath.html#asin">asin</A></B><DD>Floating point arc sine.<IMG WIDTH="1" HEIGHT="20" ALIGN="TOP"><DT><B><A HREF="timath.html#asinh">asinh</A></B><DD>Floating point hyperbolic area sine.<IMG WIDTH="1" HEIGHT="20" ALIGN="TOP"><DT><B><A HREF="timath.html#atan2">atan2</A></B><DD>Four-quadrant arc tangent of y/x (or argument of the complex number).<IMG WIDTH="1" HEIGHT="20" ALIGN="TOP"><DT><B><A HREF="timath.html#atan">atan</A></B><DD>Floating point arc tangent.<IMG WIDTH="1" HEIGHT="20" ALIGN="TOP"><DT><B><A HREF="timath.html#atanh">atanh</A></B><DD>Floating point hyperbolic area tangent.<IMG WIDTH="1" HEIGHT="20" ALIGN="TOP"><DT><B><A HREF="timath.html#atof">atof</A></B><DD>Converts a string to a floating point.<IMG WIDTH="1" HEIGHT="20" ALIGN="TOP"><DT><B><A HREF="timath.html#cacos">cacos</A></B><DD>Complex arc cosine.<IMG WIDTH="1" HEIGHT="20" ALIGN="TOP"><DT><B><A HREF="timath.html#cacosh">cacosh</A></B><DD>Complex hyperbolic area cosine.<IMG WIDTH="1" HEIGHT="20" ALIGN="TOP"><DT><B><A HREF="timath.html#casin">casin</A></B><DD>Complex arc sine.<IMG WIDTH="1" HEIGHT="20" ALIGN="TOP"><DT><B><A HREF="timath.html#casinh">casinh</A></B><DD>Complex hyperbolic area sine.<IMG WIDTH="1" HEIGHT="20" ALIGN="TOP"><DT><B><A HREF="timath.html#catan">catan</A></B><DD>Complex arc tangent.<IMG WIDTH="1" HEIGHT="20" ALIGN="TOP"><DT><B><A HREF="timath.html#catanh">catanh</A></B><DD>Complex hyperbolic area tangent.<IMG WIDTH="1" HEIGHT="20" ALIGN="TOP"><DT><B><A HREF="timath.html#ccos">ccos</A></B><DD>Complex cosine.<IMG WIDTH="1" HEIGHT="20" ALIGN="TOP"><DT><B><A HREF="timath.html#ccosh">ccosh</A></B><DD>Complex hyperbolic cosine.<IMG WIDTH="1" HEIGHT="20" ALIGN="TOP"><DT><B><A HREF="timath.html#ceil">ceil</A></B><DD>Rounds up the floating point number.<IMG WIDTH="1" HEIGHT="20" ALIGN="TOP"><DT><B><A HREF="timath.html#cexp">cexp</A></B><DD>Complex exponential function.<IMG WIDTH="1" HEIGHT="20" ALIGN="TOP"><DT><B><A HREF="timath.html#cln">cln</A></B><DD>Complex natural logarithm (base <B>e</B>).<IMG WIDTH="1" HEIGHT="20" ALIGN="TOP"><DT><B><A HREF="timath.html#clog10">clog10</A></B><DD>Complex logarithm, base 10.<IMG WIDTH="1" HEIGHT="20" ALIGN="TOP"><DT><B><A HREF="timath.html#cos">cos</A></B><DD>Floating point cosine.<IMG WIDTH="1" HEIGHT="20" ALIGN="TOP"><DT><B><A HREF="timath.html#cosh">cosh</A></B><DD>Floating point hyperbolic cosine.<IMG WIDTH="1" HEIGHT="20" ALIGN="TOP"><DT><B><A HREF="timath.html#csin">csin</A></B><DD>Complex sine.<IMG WIDTH="1" HEIGHT="20" ALIGN="TOP"><DT><B><A HREF="timath.html#csinh">csinh</A></B><DD>Complex hyperbolic sine.<IMG WIDTH="1" HEIGHT="20" ALIGN="TOP"><DT><B><A HREF="timath.html#csqrt">csqrt</A></B><DD>Complex square root.<IMG WIDTH="1" HEIGHT="20" ALIGN="TOP"><DT><B><A HREF="timath.html#ctan">ctan</A></B><DD>Complex tangent.<IMG WIDTH="1" HEIGHT="20" ALIGN="TOP"><DT><B><A HREF="timath.html#ctanh">ctanh</A></B><DD>Complex hyperbolic tangent.<IMG WIDTH="1" HEIGHT="20" ALIGN="TOP"><DT><B><A HREF="timath.html#exp">exp</A></B><DD>Floating point exponential function.<IMG WIDTH="1" HEIGHT="20" ALIGN="TOP"><DT><B><A HREF="timath.html#fabs">fabs</A></B><DD>Absolute value of a floating point number.<IMG WIDTH="1" HEIGHT="20" ALIGN="TOP"><DT><B><A HREF="timath.html#floor">floor</A></B><DD>Rounds down the floating point number.<IMG WIDTH="1" HEIGHT="20" ALIGN="TOP"><DT><B><A HREF="timath.html#fmod">fmod</A></B><DD>Calculates x modulo y, i.e. the remainder of x/y.<IMG WIDTH="1" HEIGHT="20" ALIGN="TOP"><DT><B><A HREF="timath.html#frexp10">frexp10</A></B><DD>Splits floating point number into mantissa and exponent.<IMG WIDTH="1" HEIGHT="20" ALIGN="TOP"><DT><B><A HREF="timath.html#hypot">hypot</A></B><DD>Calculates hypotenuse of right triangle.<IMG WIDTH="1" HEIGHT="20" ALIGN="TOP"><DT><B><A HREF="timath.html#is_inf">is_inf</A></B><DD>Checks whether the argument is an infinite number.<IMG WIDTH="1" HEIGHT="20" ALIGN="TOP"><DT><B><A HREF="timath.html#is_nan">is_nan</A></B><DD>Checks whether the argument is Not_a_Number.<IMG WIDTH="1" HEIGHT="20" ALIGN="TOP"><DT><B><A HREF="timath.html#is_nzero">is_nzero</A></B><DD>Checks whether the argument is negative zero.<IMG WIDTH="1" HEIGHT="20" ALIGN="TOP"><DT><B><A HREF="timath.html#is_pzero">is_pzero</A></B><DD>Checks whether the argument is positive zero.<IMG WIDTH="1" HEIGHT="20" ALIGN="TOP"><DT><B><A HREF="timath.html#is_sinf">is_sinf</A></B><DD>Checks whether the argument is signed infinity.<IMG WIDTH="1" HEIGHT="20" ALIGN="TOP"><DT><B><A HREF="timath.html#is_transfinite">is_transfinite</A></B><DD>Checks whether the argument is a transfinite number.<IMG WIDTH="1" HEIGHT="20" ALIGN="TOP"><DT><B><A HREF="timath.html#is_uinf_or_nan">is_uinf_or_nan</A></B><DD>Checks whether the argument is unsigned infinity or Not_a_Number.<IMG WIDTH="1" HEIGHT="20" ALIGN="TOP"><DT><B><A HREF="timath.html#is_uzero">is_uzero</A></B><DD>Checks whether the argument is unsigned zero.<IMG WIDTH="1" HEIGHT="20" ALIGN="TOP"><DT><B><A HREF="stdlib.html#labs">labs</A></B><DD>Absolute value of a long integer number.<IMG WIDTH="1" HEIGHT="20" ALIGN="TOP"><DT><B><A HREF="timath.html#ldexp10">ldexp10</A></B><DD>Calculates x times 10 raised to exponent.<IMG WIDTH="1" HEIGHT="20" ALIGN="TOP"><DT><B><A HREF="timath.html#log">log</A></B><DD>Floating point natural logarithm (base <B>e</B>).<IMG WIDTH="1" HEIGHT="20" ALIGN="TOP"><DT><B><A HREF="timath.html#log10">log10</A></B><DD>Floating point logarithm, base 10.<IMG WIDTH="1" HEIGHT="20" ALIGN="TOP"><DT><B><A HREF="timath.html#modf">modf</A></B><DD>Splits floating point value into integer and fraction part.<IMG WIDTH="1" HEIGHT="20" ALIGN="TOP"><DT><B><A HREF="timath.html#pow">pow</A></B><DD>Floating point power function.<IMG WIDTH="1" HEIGHT="20" ALIGN="TOP"><DT><B><A HREF="timath.html#sin">sin</A></B><DD>Floating point sine.<IMG WIDTH="1" HEIGHT="20" ALIGN="TOP"><DT><B><A HREF="timath.html#sinh">sinh</A></B><DD>Floating point hyperbolic sine.<IMG WIDTH="1" HEIGHT="20" ALIGN="TOP"><DT><B><A HREF="timath.html#sqrt">sqrt</A></B><DD>Floating point square root.<IMG WIDTH="1" HEIGHT="20" ALIGN="TOP"><DT><B><A HREF="timath.html#tan">tan</A></B><DD>Floating point tangent.<IMG WIDTH="1" HEIGHT="20" ALIGN="TOP"><DT><B><A HREF="timath.html#tanh">tanh</A></B><DD>Floating point hyperbolic tangent.</DL>
<H3><U>Constants</U></H3>
<DL INDENT="20"><DT><B><A HREF="timath.html#HALF_PI">HALF_PI</A></B><DD>A constant with value <A HREF="timath.html#PI">PI</A>/2.<IMG WIDTH="1" HEIGHT="20" ALIGN="TOP"><DT><B><A HREF="timath.html#NAN">NAN</A></B><DD>A constant defining an undefined value.<IMG WIDTH="1" HEIGHT="20" ALIGN="TOP"><DT><B><A HREF="timath.html#NEGATIVE_INF">NEGATIVE_INF</A></B><DD>Represents an infinitely large negative quantity.<IMG WIDTH="1" HEIGHT="20" ALIGN="TOP"><DT><B><A HREF="timath.html#NEGATIVE_ZERO">NEGATIVE_ZERO</A></B><DD>Represents an infinitely small quantity which is known to be always non-positive.<IMG WIDTH="1" HEIGHT="20" ALIGN="TOP"><DT><B><A HREF="timath.html#PI">PI</A></B><DD>An approximated value of pi.<IMG WIDTH="1" HEIGHT="20" ALIGN="TOP"><DT><B><A HREF="timath.html#POSITIVE_INF">POSITIVE_INF</A></B><DD>Represents an infinitely large positive quantity.<IMG WIDTH="1" HEIGHT="20" ALIGN="TOP"><DT><B><A HREF="timath.html#POSITIVE_ZERO">POSITIVE_ZERO</A></B><DD>Represents an infinitely small quantity which is known to be always non-negative.<IMG WIDTH="1" HEIGHT="20" ALIGN="TOP"><DT><B><A HREF="timath.html#UNSIGNED_INF">UNSIGNED_INF</A></B><DD>Represents an infinite quantity.<IMG WIDTH="1" HEIGHT="20" ALIGN="TOP"><DT><B><A HREF="timath.html#UNSIGNED_ZERO">UNSIGNED_ZERO</A></B><DD>Represents an infinitely small quantity with indeterminate sign.<IMG WIDTH="1" HEIGHT="20" ALIGN="TOP"><DT><B><A HREF="timath.html#ZERO">ZERO</A></B><DD>A deprecated constant.</DL>
<H3><U>Predefined Types</U></H3>
<DL INDENT="20"><DT><B><A HREF="timath.html#bcd">bcd</A></B><DD>Represents the internal organization of floating point numbers
in the format recognized by the TIOS.<IMG WIDTH="1" HEIGHT="20" ALIGN="TOP"><DT><B><A HREF="alloc.html#Bool">Bool</A></B><DD>An enumeration to describe true or false values.</DL>
<P><B>Note:</B> All functions which return a result of type float are
implemented as macros, although many of them exist as TIOS entries. This is done
because the GCC convention for returning floating point values as function results
differs from the convention expected by the TIOS. This note is mainly unimportant from
the user's point of view. Also note that the <A HREF="timath.html">timath.h</A> header file
contains all functions from math.h, but in addition to this, it also contains some
TIOS-specific low-level floating point functions.</P>
<HR>
<H3><A HREF="index.html">Return to the main index</A></H3>
</BODY>
</HTML>