TIP: Click on subject to list as thread! ANSI
echo: public_domain
to: All
from: Paul Edwards
date: 1996-01-02 04:28:24
subject: ansi c maths

4.5.2 Trigonometric functions


4.5.2.1 The acos function


Synopsis


         #include 
         double acos(double x);



Description

   The acos function computes the principal value of the arc cosine
of x .  A domain error occurs for arguments not in the range [-1,
+1].   

Returns

   The acos function returns the arc cosine in the range [0, PI] radians.  

4.5.2.2 The asin function


Synopsis


         #include 
         double asin(double x);



Description

   The asin function computes the principal value of the arc sine of
x .  A domain error occurs for arguments not in the range [-1, +1].
 

Returns

   The asin function returns the arc sine in the range [-PI/2,
+PI/2] radians.   

4.5.2.3 The atan function


Synopsis


         #include 
         double atan(double x);



Description

   The atan function computes the principal value of the arc tangent of x .  

Returns

   The atan function returns the arc tangent in the range [-PI/2,
+PI/2] radians.   

4.5.2.4 The atan2 function


Synopsis


         #include 
         double atan2(double y, double x);



Description

   The atan2 function computes the principal value of the arc
tangent of y/x , using the signs of both arguments to determine the
quadrant of the return value.  A domain error may occur if both
arguments are zero.   

Returns

   The atan2 function returns the arc tangent of y/x , in the range
[-PI, +PI] radians.   

4.5.2.5 The cos function


Synopsis


         #include 
         double cos(double x);



Description

   The cos function computes the cosine of x (measured in radians).
A large magnitude argument may yield a result with little or no
significance.   
   

Returns

   The cos function returns the cosine value.  

4.5.2.6 The sin function


Synopsis


         #include 
         double sin(double x);



Description

   The sin function computes the sine of x (measured in radians).  A
large magnitude argument may yield a result with little or no
significance.   

Returns

   The sin function returns the sine value.  

4.5.2.7 The tan function


Synopsis


         #include 
         double tan(double x);



Description

   The tan function returns the tangent of x (measured in radians).
A large magnitude argument may yield a result with little or no
significance.   

Returns

   The tan function returns the tangent value.  

4.5.3 Hyperbolic functions


4.5.3.1 The cosh function


Synopsis


         #include 
         double cosh(double x);



Description

   The cosh function computes the hyperbolic cosine of x .  A range
error occurs if the magnitude of x is too large.   

Returns

   The cosh function returns the hyperbolic cosine value.  

4.5.3.2 The sinh function


Synopsis


         #include 
         double sinh(double x);



Description

   The sinh function computes the hyperbolic sine of x .  A range
error occurs if the magnitude of x is too large.   

Returns

   The sinh function returns the hyperbolic sine value.  

4.5.3.3 The tanh function


Synopsis


         #include 
         double tanh(double x);



Description

   The tanh function computes the hyperbolic tangent of x .  

Returns

   The tanh function returns the hyperbolic tangent value.  

4.5.4 Exponential and logarithmic functions


4.5.4.1 The exp function


Synopsis


         #include 
         double exp(double x);



Description

   The exp function computes the exponential function of x .  A
range error occurs if the magnitude of x is too large.   

Returns

   The exp function returns the exponential value.  

4.5.4.2 The frexp function


Synopsis


         #include 
         double frexp(double value, int *exp);



Description

   The frexp function breaks a floating-point number into a
normalized fraction and an integral power of 2. It stores the
integer in the int object pointed to by exp .   

Returns

   The frexp function returns the value x , such that x is a double
with magnitude in the interval [1/2, 1) or zero, and value equals x
times 2 raised to the power *exp .  If value is zero, both parts of
the result are zero.   

4.5.4.3 The ldexp function


Synopsis


         #include 
         double ldexp(double x, int exp);



Description

   The ldexp function multiplies a floating-point number by an
integral power of 2. A range error may occur.   

Returns

   The ldexp function returns the value of x times 2 raised to the
power exp .   

4.5.4.4 The log function


Synopsis


         #include 
         double log(double x);



Description

   The log function computes the natural logarithm of x. A domain
error occurs if the argument is negative.  A range error occurs if
the argument is zero and the logarithm of zero cannot be
represented.   
   
   

Returns

   The log function returns the natural logarithm.  

4.5.4.5 The log10 function


Synopsis


         #include 
         double log10(double x);



Description

   The log10 function computes the base-ten logarithm of x .  A
domain error occurs if the argument is negative.  A range error
occurs if the argument is zero and the logarithm of zero cannot be
represented.   

Returns

   The log10 function returns the base-ten logarithm.  

4.5.4.6 The modf function


Synopsis


         #include 
         double modf(double value, double *iptr);



Description

   The modf function breaks the argument value into integral and
fractional parts, each of which has the same sign as the argument.
It stores the integral part as a double in the object pointed to by
iptr .   

Returns

   The modf function returns the signed fractional part of value .  

4.5.5 Power functions


4.5.5.1 The pow function


Synopsis


         #include 
         double pow(double x, double y);



Description

   The pow function computes x raised to the power y .  A domain
error occurs if x is negative and y is not an integer.  A domain
error occurs if the result cannot be represented when x is zero and
y is less than or equal to zero.  A range error may occur.   

Returns

   The pow function returns the value of x raised to the power y .  

4.5.5.2 The sqrt function


Synopsis


         #include 
         double sqrt(double x);



Description

   The sqrt function computes the nonnegative square root of x .  A
domain error occurs if the argument is negative.   

Returns

   The sqrt function returns the value of the square root.  

4.5.6 Nearest integer, absolute value, and remainder functions


4.5.6.1 The ceil function


Synopsis


         #include 
         double ceil(double x);



Description

   The ceil function computes the smallest integral value not less
than x .   

Returns

   The ceil function returns the smallest integral value not less
than x , expressed as a double.   

4.5.6.2 The fabs function


Synopsis


         #include 
         double fabs(double x);



Description

   The fabs function computes the absolute value of a floating-point
number x .   

Returns

   The fabs function returns the absolute value of x.  

4.5.6.3 The floor function


Synopsis


         #include 
         double floor(double x);



Description

   The floor function computes the largest integral value not
greater than x .   

Returns

   The floor function returns the largest integral value not greater
than x , expressed as a double.   

4.5.6.4 The fmod function


Synopsis


         #include 
         double fmod(double x, double y);



Description

   The fmod function computes the floating-point remainder of x/y .  

Returns

   The fmod function returns the value x i y , for some integer i
such that, if y is nonzero, the result has the same sign as x and
magnitude less than the magnitude of y .  If y is zero, whether a
domain error occurs or the fmod function returns zero is
implementation-defined.   
@EOT:

---
* Origin: X (3:711/934.9)

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.