carta
cosf(3)

cosf3

Cosine functions

Part of cos(3).

Usage

double

float

long double

Library

Math Library (libm, -lm)

Overview

The cos(), cosf(), and cosl() functions compute the cosine of x (measured in radians). A large magnitude argument may yield a result with little or no significance. For a discussion of error due to roundoff, see math(3).

Return values

The cos(), cosf(), and cosl() functions return the cosine value.

History

  • FreeBSD 16.0-CURRENT (2026-10-27) to FreeBSD 15.0-RELEASE: the text shown here
  • FreeBSD 14.5-RELEASE to FreeBSD 13.3-RELEASE
  • FreeBSD 13.2-RELEASE to FreeBSD 13.0-RELEASE
  • FreeBSD 12.4-RELEASE
  • FreeBSD 12.3-RELEASE
  • FreeBSD 12.2-RELEASE
  • FreeBSD 12.1-RELEASE
  • FreeBSD 12.0-RELEASE
  • FreeBSD 11.4-RELEASE
  • FreeBSD 11.3-RELEASE
  • FreeBSD 11.2-RELEASE
  • FreeBSD 11.1-RELEASE
  • FreeBSD 11.0-RELEASE
  • FreeBSD 10.4-RELEASE
  • FreeBSD 10.3-RELEASE
  • FreeBSD 10.2-RELEASE
  • FreeBSD 10.1-RELEASE
  • FreeBSD 10.0-RELEASE
  • FreeBSD 9.3-RELEASE
  • FreeBSD 9.2-RELEASE
  • FreeBSD 9.1-RELEASE
  • FreeBSD 9.0-RELEASE
  • FreeBSD 8.4-RELEASE
  • FreeBSD 8.3-RELEASE
  • FreeBSD 8.2-RELEASE
  • FreeBSD 8.1-RELEASE
  • FreeBSD 8.0-RELEASE
  • FreeBSD 7.4-RELEASE
  • FreeBSD 7.3-RELEASE
  • FreeBSD 7.2-RELEASE
  • FreeBSD 7.1-RELEASE
  • FreeBSD 7.0-RELEASE
  • FreeBSD 6.4-RELEASE
  • FreeBSD 6.3-RELEASE
  • FreeBSD 6.2-RELEASE to FreeBSD 5.0-RELEASE
  • FreeBSD 4.11-RELEASE to FreeBSD 4.5-RELEASE
  • FreeBSD 4.4-RELEASE
  • FreeBSD 4.3-RELEASE
  • FreeBSD 4.2-RELEASE to FreeBSD 4.0-RELEASE
  • FreeBSD 3.5.1-RELEASE to FreeBSD 3.3-RELEASE
  • FreeBSD 3.2-RELEASE to FreeBSD 3.0-RELEASE
  • FreeBSD 2.2.9-RELEASE
  • FreeBSD 2.2.8-RELEASE to FreeBSD 2.2.6-RELEASE
  • FreeBSD 2.2.5-RELEASE to FreeBSD 2.2.2-RELEASE

Standards

These functions conform to ISO/IEC 9899:1999 (“ISO C99”).

History

The cos() function first appeared in Version 1 AT&T UNIX.

From base 16.0-CURRENT-20261027-61c70dc16a79 in FreeBSD 16.0-CURRENT (2026-10-27). Parsed by carta from the page's mdoc source.