.\" Copyright (c) 2012 Apple Inc. .\" All rights reserved. .Dd December 15, 2012 .Dt __SINCOS 3 .Os .Sh NAME .Nm __sincos .Nd sine-cosine function .Sh SYNOPSIS .Fd #include .Ft void .Fn __sincosf "float x" "float *sinp" "float *cosp" .Ft void .Fn __sincos "double x" "double *sinp" "double *cosp" .Sh DESCRIPTION The .Fn __sincos function computes the sine and cosine of .Fa x (measured in radians) and stores the sine in the memory pointed to by .Fa sinp and the cosine in the memory pointed to by .Fa cosp . .Sh SPECIAL VALUES .Fn __sincos "±0" "sinp" "cosp" sets .Fa *sinp to ±0 and sets .Fa *cosp to +1. .Pp .Fn __sincos "±infinity" "sinp" "cosp" raises the "invalid" floating-point exception and sets both .Fa *sinp and .Fa *cosp to NaN. .Sh VECTOR OPERATIONS If you need to apply the .Fn __sincos function to SIMD vectors or arrays, using the following functions provided by the Accelerate.framework may be useful: .Pp .Fd #include .Pp .Ft vFloat .Fn vsincosf "vFloat x" "vFloat *c" ; .br .Ft void .Fn vvsincosf "float *s" "float *c" "const float *x" "const int *n" ; .br .Ft void .Fn vvsincos "double *s" "double *c" "const double *x" "const int *n" ; .Sh SEE ALSO .Xr cos 3 , .Xr sin 3 , .Xr tan 3 , .Xr math 3