161f28255Scgd.\" Copyright (c) 1991 The Regents of the University of California. 261f28255Scgd.\" All rights reserved. 361f28255Scgd.\" 461f28255Scgd.\" Redistribution and use in source and binary forms, with or without 561f28255Scgd.\" modification, are permitted provided that the following conditions 661f28255Scgd.\" are met: 761f28255Scgd.\" 1. Redistributions of source code must retain the above copyright 861f28255Scgd.\" notice, this list of conditions and the following disclaimer. 961f28255Scgd.\" 2. Redistributions in binary form must reproduce the above copyright 1061f28255Scgd.\" notice, this list of conditions and the following disclaimer in the 1161f28255Scgd.\" documentation and/or other materials provided with the distribution. 12eb7c1594Sagc.\" 3. Neither the name of the University nor the names of its contributors 1361f28255Scgd.\" may be used to endorse or promote products derived from this software 1461f28255Scgd.\" without specific prior written permission. 1561f28255Scgd.\" 1661f28255Scgd.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 1761f28255Scgd.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1861f28255Scgd.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1961f28255Scgd.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 2061f28255Scgd.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2161f28255Scgd.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2261f28255Scgd.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2361f28255Scgd.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2461f28255Scgd.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2561f28255Scgd.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2661f28255Scgd.\" SUCH DAMAGE. 2761f28255Scgd.\" 28dfb9caabSmycroft.\" from: @(#)cos.3 5.1 (Berkeley) 5/2/91 29*d284e45cSsevan.\" $NetBSD: cos.3,v 1.17 2019/09/02 00:51:48 sevan Exp $ 3061f28255Scgd.\" 31*d284e45cSsevan.Dd September 2, 2019 3261f28255Scgd.Dt COS 3 3361f28255Scgd.Os 3461f28255Scgd.Sh NAME 35f8173630Skleink.Nm cos , 363cdbcb3eSmaya.Nm cosf , 373cdbcb3eSmaya.Nm cosl 38df8b005fSjtc.Nd cosine function 39312aca53Sperry.Sh LIBRARY 40312aca53Sperry.Lb libm 4161f28255Scgd.Sh SYNOPSIS 42472351e1Swiz.In math.h 4361f28255Scgd.Ft double 4461f28255Scgd.Fn cos "double x" 45fd8d17a5Sjtc.Ft float 46fd8d17a5Sjtc.Fn cosf "float x" 473cdbcb3eSmaya.Ft long double 483cdbcb3eSmaya.Fn cosl "long double x" 4961f28255Scgd.Sh DESCRIPTION 5061f28255ScgdThe 513cdbcb3eSmaya.Fn cos , 523cdbcb3eSmaya.Fn cosf , 53fd8d17a5Sjtcand 543cdbcb3eSmaya.Fn cosl 55fd8d17a5Sjtcfunctions compute the cosine of 5661f28255Scgd.Fa x 5761f28255Scgd(measured in radians). 5861f28255ScgdA large magnitude argument may yield a result with little or no 5961f28255Scgdsignificance. 6061f28255ScgdFor a discussion of error due to roundoff, see 6161f28255Scgd.Xr math 3 . 6261f28255Scgd.Sh RETURN VALUES 6361f28255ScgdThe 6461f28255Scgd.Fn cos 6561f28255Scgdfunction returns the cosine value. 6661f28255Scgd.Sh SEE ALSO 6761f28255Scgd.Xr acos 3 , 68306d24c5Swiz.Xr asin 3 , 6961f28255Scgd.Xr atan 3 , 7061f28255Scgd.Xr atan2 3 , 7161f28255Scgd.Xr cosh 3 , 72306d24c5Swiz.Xr math 3 , 73306d24c5Swiz.Xr sin 3 , 74306d24c5Swiz.Xr sinh 3 , 75306d24c5Swiz.Xr tan 3 , 76306d24c5Swiz.Xr tanh 3 7761f28255Scgd.Sh STANDARDS 7861f28255ScgdThe 796ca09b61Sjtc.Fn cos 8061f28255Scgdfunction conforms to 8161f28255Scgd.St -ansiC . 82*d284e45cSsevan.Sh HISTORY 83*d284e45cSsevanA 84*d284e45cSsevan.Fn cos 85*d284e45cSsevanfunction appeared in 86*d284e45cSsevan.At v1 . 87