.. include:: ../../global.rst .. _`bignum type`: Bignum Type =========== Bignums are "arbitrary" precision integers or floating point numbers with a concept of exactness. In principle, bignums allow arbitrary precision but most operations involving bignums (including reading them in!) will "normalize" the result to a value with up to 18 significant digits. A bignum exponent is a signed 32-bit entity. There is no support for special values such as "not a number" and infinities. Bignum Predicates ----------------- .. _`bignum?`: .. idio:function:: bignum? o test if `o` is a bignum :param o: object to test :return: ``#t`` if `o` is a bignum, ``#f`` otherwise .. _`real?`: .. idio:function:: real? n test if `n` is a real :param n: number to test :type n: bignum :return: ``#t`` if `n` is a real, ``#f`` otherwise .. _`exact?`: .. idio:function:: exact? n test if `n` is exact :param n: number to test :type n: bignum or fixnum :return: ``#t`` if `n` is exact, ``#f`` otherwise .. _`inexact?`: .. idio:function:: inexact? n test if `n` is inexact :param n: number to test :type n: bignum or fixnum :return: ``#t`` if `n` is inexact, ``#f`` otherwise Bignum Attributes ----------------- .. _`mantissa`: .. idio:function:: mantissa n return the mantissa of `n` :param n: number to find mantissa of :type n: bignum or fixnum :return: mantissa of `n` .. _`exponent`: .. idio:function:: exponent n return the exponent of `n` :param n: number to find exponent of :type n: bignum :return: exponent of `n` Bignum Converters ----------------- .. _`exact->inexact`: .. idio:function:: exact->inexact n return an inexact version of `n` :param n: number to convert :type n: bignum or fixnum :return: inexact value of `n` .. _`inexact->exact`: .. idio:function:: inexact->exact n return an exact version of `n` :param n: number to convert :type n: bignum or fixnum :return: exact value of `n` Bignum Utilities ---------------- .. _`bignum-dump`: .. idio:function:: bignum-dump n dump the bignum structure of `n` to *stderr* :param n: number to dump :type n: bignum :return: ``#`` .. include:: ../../commit.rst