Partager via


sin, sinh (Windows CE 5.0)

Send Feedback

Developing an Application > Microsoft C Run-time Library for Windows CE > Run-time Library Reference

Calculate sines and hyperbolic sines.

double sin( doublex);double sinh( doublex);

Parameters

  • x
    Angle in radians.

Return Values

sin returns the sine of x. If x is greater than or equal to 263, or less than or equal to –263, a loss of significance in the result occurs, in which case the function generates a _TLOSS error and returns an indefinite (same as a quiet NaN).

sinh returns the hyperbolic sine of x. If the result is too large, sinh returns ±HUGE_VAL. You can modify error handling with _matherr.

Example

Description

This program displays the sine, hyperbolic sine, cosine, and hyperbolic cosine of pi / 2.

Code

void main( void )
{
   double pi = 3.1415926535;
   double x, y;

   x = pi / 2;
   y = sin( x );
   printf( "sin( %f ) = %f\n", x, y );
   y = sinh( x );
   printf( "sinh( %f ) = %f\n",x, y );
   y = cos( x );
   printf( "cos( %f ) = %f\n", x, y );
   y = cosh( x );
   printf( "cosh( %f ) = %f\n",x, y );
}
// Output
sin( 1.570796 ) = 1.000000
sinh( 1.570796 ) = 2.301299
cos( 1.570796 ) = 0.000000
cosh( 1.570796 ) = 2.509178

Requirements

OS Versions: Windows CE 2.0 and later.

Header: stdlib.h.

Link Library: coredll.dll.

See Also

acos | asin | atan | cos | tan

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.