bend-lawful-stdlib
Search uses release 0.1.0.0 · 248 definitions
Definitions (248)
- type Bin
- def one
- def is_zero
- def trim.cons0
- def trimthe same number without high zero bits, so equal numbers are equal terms
- def odd
- def inc
- def cons
- def adc.one
- def adca + b + carry, one bit at a time: bits 0+0 pass the carry through and carry nothing, 0+1 flip it and carry it, 1+1 pass it and carry one
- def add
- def dec
- def sbb.one
- def sbba - b - borrow, for a >= b (callers order the operands with cmp first)
- def sub
- def mul
- def cmp.fin
- def cmp
- def shla * 2^n
- def pow2
- def len.up
- def lennumber of significant bits
- def shra / 2^k, with the last bit shifted out (round) and whether any bit below it was set (sticky); r and s are the bits already shifted out
- def of_wordthe n low bits of a word, and back
- def to_word
- def to_nat
- def of_nat
- def lowthe low k bits of a
- def take.cons
- def takethe low k bits of a word as a Bin, and the word that remains
- def void
- def no_f{False == True} and {True == False} are empty
- def no_t
- def first
- def split.cons
- def splita word's first n bits, and its last bit (the sign, for n = 31)
- def unsplita word with s appended as its last bit
- law split_unsplit
- def magthe 31 bits below the sign: exponent and fraction
- def neg.go
- def neg_bitsIEEE 754 negation: the sign bit flipped
- type Keyhow the IEEE order reads a float: NaN, or a number with a sign and a magnitude.
- def IsKey
- def inf_mag.goinfinity's magnitude, 0x7F800000
- def inf_mag
- def key.cls
- def key.go
- def key
- def zero
- def lt.signs
- def lt.key
- def lt_bitsIEEE 754 a < b: false when either is NaN; -0 and +0 are equal
- def NotGT
- def le.signs
- def LE.key
- def LEa <= b in the IEEE order, as a type: Empty when either is NaN
- def swap
- law bool_cmp_refl
- law Word.cmp_refl
- law fin_swap
- law Word.cmp_swap
- law lt_notgt
- law notlt_swap
- law lt_le.signs
- law lt_le.keya < b gives a <= b
- law lt_keyonly an ordered value is below something
- law le_key_l
- law le_key_r
- law le_refl.signs
- law le_refl.key
- law total.same
- law total.mixed
- law total.signs
- law total.keytwo ordered values: not a < b gives b <= a
- def LtOkthe hardware's < is IEEE 754's
- def NegOkthe hardware's negation flips the sign bit of every non-NaN float.
- law bits_lt
- law min_le_r.go
- law clamp_le_hiclamp(x, lo, hi) <= hi for every x, NaN and infinities included
- law lo_le_clamp.go
- law lo_le_clamplo <= clamp(x, lo, hi) for every x, when lo <= hi
- law neg_mag.go
- law neg_mag.bits
- law neg_mag|-a| is |a|, bit for bit
- law key_signwhether a value is NaN does not depend on its sign
- law neg_key.go
- law neg_key.bits
- law neg_keythe negation of a non-NaN is not NaN