GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
COSPI(3) FreeBSD Library Functions Manual COSPI(3)

cospi, cospif, cospil
half–cycle cosine functions

Math Library (libm, -lm)

#include <math.h>

double
cospi(double x);

float
cospif(float x);

long double
cospil(long double x);

The cospi(), cospif(), and cospil() functions compute the cosine of π × x. and measure angles in half-cycles.

The cospi(), cospif(), and cospil() functions returns cos(π × x). If |x| ≥ 2^(p - 1) where p is the floating–point precision of x, then the returned value is 1 and it has no significance.

cospi(±0) returns 1.
cospi(±n/2) returns 0 for positive integers n.
cospi(n) returns 1 for even integers n.
cospi(n) returns -1 for odd integers n.
cospi(±∞) return an NaN and raises an FE_INVALID exception.
cospi(NaN) return an NaN and raises an FE_INVALID exception.

cos(3), fenv(3), math(3), sin(3), sinpi(3), tan(3), tanpi(3)

The half–cycle trignometric functions were written by Steven G. Kargl <kargl@FreeBSD.org>.

These functions conform to IEEE Std 754™–2008 , "IEEE Standard for Floating-Point Arithmetic" and to ISO/IEC TS 18661-4 , "Information technology — Programming languages, their environments, and system software interfaces — Floating–point extensions for C" — Part 4: Supplementary functions.

April 1, 2017 FreeBSD 13.1-RELEASE

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.