xref: /dragonfly/contrib/openbsd_libm/man/sincos.3 (revision c37c9ab3)
1.\"	$OpenBSD: sincos.3,v 1.1 2018/03/10 20:52:58 kettenis Exp $
2.\" Copyright (c) 2011 Steven G. Kargl.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\"    notice, this list of conditions and the following disclaimer.
9.\" 2. Redistributions in binary form must reproduce the above copyright
10.\"    notice, this list of conditions and the following disclaimer in the
11.\"    documentation and/or other materials provided with the distribution.
12.\"
13.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
14.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
17.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23.\" SUCH DAMAGE.
24.\"
25.\" $FreeBSD: head/lib/msun/man/sincos.3 319047 2017-05-28 06:13:38Z mmel $
26.\"
27.Dd $Mdocdate: March 10 2018 $
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 SYNOPSIS
36.In math.h
37.Ft void
38.Fn sincos "double x" "double *s" "double *c"
39.Ft void
40.Fn sincosf "float x" "float *s" "float *c"
41.Ft void
42.Fn sincosl "long double x" "long double *s" "long double *c"
43.Sh DESCRIPTION
44The
45.Fn sincos ,
46.Fn sincosf ,
47and
48.Fn sincosl
49functions compute the sine and cosine of
50.Fa x .
51Using these functions allows argument reduction to occur only
52once instead of twice with individual invocations of
53.Fn sin
54and
55.Fn cos .
56Like
57.Fn sin
58and
59.Fn cos ,
60a large magnitude argument may yield a result with little
61or no significance.
62.Sh RETURN VALUES
63Upon returning from
64.Fn sincos ,
65.Fn sincosf ,
66and
67.Fn sincosl ,
68the objects pointed to by
69.Ar "*s"
70and
71.Ar "*c"
72are assigned the values of sine and cosine, respectively.
73.Sh SEE ALSO
74.Xr cos 3 ,
75.Xr sin 3
76.Sh HISTORY
77These functions first appeared in
78.Ox 6.3 .
79