xref: /openbsd-src/lib/libm/man/cos.3 (revision 83348857057bb4d7e8af1e261e2c940878592523)
1*83348857Sschwarze.\"	$OpenBSD: cos.3,v 1.16 2019/09/06 19:25:08 schwarze Exp $
2df930be7Sderaadt.\" Copyright (c) 1991 The Regents of the University of California.
3df930be7Sderaadt.\" All rights reserved.
4df930be7Sderaadt.\"
5df930be7Sderaadt.\" Redistribution and use in source and binary forms, with or without
6df930be7Sderaadt.\" modification, are permitted provided that the following conditions
7df930be7Sderaadt.\" are met:
8df930be7Sderaadt.\" 1. Redistributions of source code must retain the above copyright
9df930be7Sderaadt.\"    notice, this list of conditions and the following disclaimer.
10df930be7Sderaadt.\" 2. Redistributions in binary form must reproduce the above copyright
11df930be7Sderaadt.\"    notice, this list of conditions and the following disclaimer in the
12df930be7Sderaadt.\"    documentation and/or other materials provided with the distribution.
136580fee3Smillert.\" 3. Neither the name of the University nor the names of its contributors
14df930be7Sderaadt.\"    may be used to endorse or promote products derived from this software
15df930be7Sderaadt.\"    without specific prior written permission.
16df930be7Sderaadt.\"
17df930be7Sderaadt.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
18df930be7Sderaadt.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19df930be7Sderaadt.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20df930be7Sderaadt.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
21df930be7Sderaadt.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22df930be7Sderaadt.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23df930be7Sderaadt.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24df930be7Sderaadt.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25df930be7Sderaadt.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26df930be7Sderaadt.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27df930be7Sderaadt.\" SUCH DAMAGE.
28df930be7Sderaadt.\"
29df930be7Sderaadt.\"     from: @(#)cos.3	5.1 (Berkeley) 5/2/91
30df930be7Sderaadt.\"
31*83348857Sschwarze.Dd $Mdocdate: September 6 2019 $
32df930be7Sderaadt.Dt COS 3
33df930be7Sderaadt.Os
34df930be7Sderaadt.Sh NAME
358a2f5500Sderaadt.Nm cos ,
36854ac34eSmartynas.Nm cosf ,
37854ac34eSmartynas.Nm cosl
388a2f5500Sderaadt.Nd cosine functions
39df930be7Sderaadt.Sh SYNOPSIS
4086f9d4cdStedu.In math.h
41df930be7Sderaadt.Ft double
42df930be7Sderaadt.Fn cos "double x"
43df930be7Sderaadt.Ft float
44df930be7Sderaadt.Fn cosf "float x"
45854ac34eSmartynas.Ft long double
46854ac34eSmartynas.Fn cosl "long double x"
47df930be7Sderaadt.Sh DESCRIPTION
48df930be7SderaadtThe
49df930be7Sderaadt.Fn cos
5078c42625Sjasonfunction computes the cosine of
51df930be7Sderaadt.Fa x
52df930be7Sderaadt(measured in radians).
53a0cccc5bSjasonThe
54a0cccc5bSjason.Fn cosf
55a0cccc5bSjasonfunction is a single precision version of
56a0cccc5bSjason.Fn cos .
57854ac34eSmartynasThe
58854ac34eSmartynas.Fn cosl
59854ac34eSmartynasfunction is an extended precision version of
60854ac34eSmartynas.Fn cos .
61df930be7SderaadtA large magnitude argument may yield a result with little or no
62df930be7Sderaadtsignificance.
63df930be7Sderaadt.Sh RETURN VALUES
64df930be7SderaadtThe
65854ac34eSmartynas.Fn cos ,
6643527048Sjason.Fn cosf
67854ac34eSmartynasand
68854ac34eSmartynas.Fn cosl
6943527048Sjasonfunctions return the cosine value.
70df930be7Sderaadt.Sh SEE ALSO
71df930be7Sderaadt.Xr acos 3 ,
72350bb3b8Salex.Xr asin 3 ,
73df930be7Sderaadt.Xr atan 3 ,
74df930be7Sderaadt.Xr atan2 3 ,
75df930be7Sderaadt.Xr cosh 3 ,
76350bb3b8Salex.Xr sin 3 ,
77350bb3b8Salex.Xr sinh 3 ,
78350bb3b8Salex.Xr tan 3 ,
79350bb3b8Salex.Xr tanh 3
80df930be7Sderaadt.Sh STANDARDS
81df930be7SderaadtThe
82df930be7Sderaadt.Fn cos
83df930be7Sderaadtfunction conforms to
84df930be7Sderaadt.St -ansiC .
85*83348857Sschwarze.Sh HISTORY
86*83348857SschwarzeA
87*83348857Sschwarze.Fn cos
88*83348857Sschwarzefunction first appeared in
89*83348857Sschwarze.At v1 .
90