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

math.exp2

Prev: math.exp | Up: math | Next: math.expm1
Rel: math.acos, math.acosh, math.asin, math.asinh
Ref: docs.python.org — math.exp2
Tags: #public #python3 #stdlib #math


Import

import math
from math import exp2

Signature & Overview

math.exp2(x, /)

Return 2 raised to the power of x.

Usage

import math

assert math.exp2(10) == 1024.0
assert math.isclose(math.exp2(-2), 0.25)

Gotchas

REPL Inspect

from math import exp2
help(exp2)

Linked from

Related notes