1.\" Copyright (c) 2011 Steven G. Kargl. 2.\" 3.\" Redistribution and use in source and binary forms, with or without 4.\" modification, are permitted provided that the following conditions 5.\" are met: 6.\" 1. Redistributions of source code must retain the above copyright 7.\" notice, this list of conditions and the following disclaimer. 8.\" 2. Redistributions in binary form must reproduce the above copyright 9.\" notice, this list of conditions and the following disclaimer in the 10.\" documentation and/or other materials provided with the distribution. 11.\" 12.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 13.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 14.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 15.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 16.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 17.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 18.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 19.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 20.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 21.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 22.\" SUCH DAMAGE. 23.\" 24.\" $FreeBSD: head/lib/msun/man/sincos.3 366583 2020-10-09 19:12:44Z gbe $ 25.\" $NetBSD: sincos.3,v 1.2 2023/06/11 15:28:21 christos Exp $ 26.\" 27.Dd June 11, 2023 28.Dt SINCOS 3 29.Os 30.Sh NAME 31.Nm sincos , 32.Nm sincosf , 33.Nm sincosl 34.Nd sine and cosine functions 35.Sh LIBRARY 36.Lb libm 37.Sh SYNOPSIS 38.In math.h 39.Ft void 40.Fn sincos "double x" "double *s" "double *c" 41.Ft void 42.Fn sincosf "float x" "float *s" "float *c" 43.Ft void 44.Fn sincosl "long double x" "long double *s" "long double *c" 45.Sh DESCRIPTION 46The 47.Fn sincos , 48.Fn sincosf , 49and 50.Fn sincosl 51functions compute the sine and cosine of 52.Fa x . 53Using these functions allows argument reduction to occur only 54once instead of twice with individual invocations of 55.Fn sin 56and 57.Fn cos . 58Like 59.Fn sin 60and 61.Fn cos , 62a large magnitude argument may yield a result with little 63or no significance. 64.Sh RETURN VALUES 65Upon returning from 66.Fn sincos , 67.Fn sincosf , 68and 69.Fn sincosl , 70the memory pointed to by 71.Ar "*s" 72and 73.Ar "*c" 74are assigned the values of sine and cosine, respectively. 75.Sh SEE ALSO 76.Xr cos 3 , 77.Xr sin 3 , 78.Sh HISTORY 79These functions were added to 80.Fx 11.2 81and 82.Nx 10.0 83to aid in writing various complex function contained in 84.St -isoC-99 . 85 86