HP-UX Reference (11i v3 07/02) - 3 Library Functions N-Z (vol 7)
s
sincos(3M) sincos(3M)
(HP Integrity Server Only)
NAME
sincos(), sincosf(), sincosl(), sincosw(), sincosq() - functions that compute both sine and cosine
SYNOPSIS
#include <math.h>
void sincos(double x, double *sptr, double *cptr);
void sincosf(float x, float *sptr, float *cptr);
void sincosl(long double x, long double *sptr, long double *cptr);
void sincosw(extended x, extended *sptr, extended *cptr);
void sincosq(quad x, quad *sptr, quad *cptr);
DESCRIPTION
These functions are available only for Integrity servers.
sincos() stores the sine of x (x specified in radians) in the object pointed to by sptr and stores the cosine
of x in the object pointed to by cptr.
sincosf() is a float version of sincos(); it takes float and float * arguments.
sincosl() is a long double version of sincos(); it takes long double and long double
*
arguments.
sincosw() is an extended version of sincos(); it takes extended and extended * argu-
ments.
sincosq() is equivalent to sincosl() on HP-UX systems.
USAGE
To use these functions compile either with the default -Ae option or with the -Aa
and the
-D_HPUX_SOURCE options.
To use
sincosw() or sincosq() , compile also with the -fpwidetypes option.
To use any of these functions, make sure your program includes <math.h>, and link in the math library
by specifying -lm on the compiler or linker command line.
For more information, see the HP-UX floating-point guide for HP Integrity servers at the following site:
http://www.hp.com/go/fp
.
RETURN VALUE
sincos(±0,sptr,cptr) stores ±0 in the object pointed to by sptr and 1 in the object pointed to by cptr.
If x is ±INFINITY,
sincos() stores NaN in the objects pointed to by its pointer arguments and raises the
invalid exception.
If x is NaN,
sincos() stores NaN in the objects pointed to by its pointer arguments.
When it raises no other exception, whether sincos() raises the inexact exception is unspecified.
ERRORS
No errors are defined.
SEE ALSO
acos(3M), asin(3M), atan(3M), atan2(3M), ccos(3M), cis(3M), cos(3M), csin(3M), sin(3M), sincosd(3M),
tan(3M), math(5).
STANDARDS CONFORMANCE
These functions are not specified by any standard.
HP-UX 11i Version 3: February 2007 − 1 − Hewlett-Packard Company 421