On this page
  1. math.cos
  2. Import
  3. Signature & Overview
  4. Usage
  5. Gotchas
  6. REPL Inspect

math.cos

Prev: math.copysign | Up: math | Next: math.cosh
Rel: math.acos, math.acosh, math.asin, math.asinh
Ref: docs.python.org — math.cos
Tags: #public #python3 #stdlib #math


Import

import math
from math import cos

Signature & Overview

math.cos(x, /)

Return the cosine of x (measured in radians).

Usage

import math

assert math.isclose(math.cos(0.0), 1.0)
assert math.isclose(math.cos(math.pi), -1.0)

Gotchas

REPL Inspect

from math import cos
help(cos)

Linked from

Related notes