No matching definitions.

tur/r7rs/bignum

stdlib/r7rs/bignum.tur

exact integers outside int64 for #lang r7rs (T1).

GENERATED by tools/gen-r7rs-inc.py -- do not edit; regenerate. The C below is src/compiler/r7rs_bignum.inc, which the interpreter #includes (registering natives over these wrappers), so both back ends compute a bignum with the same code. A bignum crosses as its decimal spelling.

Since: r7rs-lang-plan T1

defn

r7rs-int-ovf?__

(r7rs-int-ovf?__ [op :int a :int b :int] :bool)

internal: the int64 op (0 +, 1 -, 2 *) on a and b overflows, so the answer is a bignum.

defn

r7rs-big-op__

(r7rs-big-op__ [op :int a :cstr b :cstr] :cstr)

internal: one exact-integer operation on decimal spellings (the R7BN_* codes: 0 + 1 - 2 * 3 quotient 4 remainder 5 modulo 6 gcd 7 expt 8 isqrt 9 negate).

defn

r7rs-big-cmp__

(r7rs-big-cmp__ [a :cstr b :cstr] :int)

internal: -1, 0 or 1.

defn

r7rs-big-cmp-float__

(r7rs-big-cmp-float__ [a :cstr f :float] :int)

internal: an exact integer against a double, exactly: -1, 0, 1, or 2 for a NaN.

defn

r7rs-big->float__

(r7rs-big->float__ [a :cstr] :float)

internal: the nearest double.

defn

r7rs-float->big__

(r7rs-float->big__ [f :float] :cstr)

internal: a finite integral double, exactly.

defn

r7rs-big-radix__

(r7rs-big-radix__ [a :cstr radix :int] :cstr)

internal: the spelling in radix 2, 8, 10 or 16.

defn

r7rs-exact-of-float__

(r7rs-exact-of-float__ [f :float] :cstr)

internal: T2 -- the exact value of a finite double, spelled "n" or "n/d".

defn

r7rs-ratio->float__

(r7rs-ratio->float__ [n :cstr d :cstr] :float)

internal: T2 -- the double nearest n/d.

defn

r7rs-ratio-part__

(r7rs-ratio-part__ [s :cstr which :int] :cstr)

internal: T2 -- the numerator (0) or denominator (1) of an "n/d" spelling.

defn

r7rs-big-fits?__

(r7rs-big-fits?__ [a :cstr] :bool)

internal: the spelling is an int64.

defn

r7rs-big-int__

(r7rs-big-int__ [a :cstr] :int)

internal: the int64 a fitting spelling is.