~/bend-docscommunity

consts.bend checks

raw source on the hub · import bend-float64@0.1.4.0/consts.bend as Consts

bend-float64's constants for the math functions, as big integers: c = floor(value * 2^bits), so value lies in [c, c + 1) * 2^-bits. Generated with mpmath (test/gen_consts.py).

1 import
import Base

Definitions

def pi source · line 6 · raw

List<&2, U32>

floor(pi * 2^2400)

def pi_bits source · line 15 · raw

U32

def ln2 source · line 19 · raw

List<&2, U32>

floor(ln 2 * 2^2400)

def ln2_bits source · line 28 · raw

U32

def ln10 source · line 32 · raw

List<&2, U32>

floor(ln 10 * 2^2400)

def ln10_bits source · line 41 · raw

U32

def two_over_pi source · line 45 · raw

List<&2, U32>

floor(2 / pi * 2^3600)

def two_over_pi_bits source · line 57 · raw

U32