Next: Type bigfr, Previous: Type bigq, Up: Types of Numbers [Contents][Index]
The type ‘bigf’ is an abstract C type for arbitrary-precision real number approximations (so called floats). The actual C type provided by the GMP-MPF library is ‘mpf_t’.
Any other library which implements something similar to MPF, should be accessed via the abstract type ‘bigf’, too.
Lisp objects can be tested for the type ‘bigq’ by the following predicates.
This predicate tests whether its argument is a MP-float (as provided
by GMP-MPF), and returns t
if so, nil
otherwise.
This is roughly the same as bigfp
and is provided for
compatibility to XEmacs.
The read syntax (and print syntax) of ‘bigf’s is the same as for emacs floats. The interpretation in the lisp reader depends on the variable read-real-as (see Category real).
There are no other forms of creation, especially there are no constructors for ‘bigf’ objects.
As the name arbitrary-precision suggested, numbers of type ‘bigf’ can be assigned a precision. This precision can be queried and even may be changed at any time.
Return the precision of number as an integer.
Set the precision of number to precision, a nonnegative integer. The new precision of number is returned.
Note that the return value may differ from precision if the underlying library is unable to support exactly precision bits of precision. Note also, that setting the precision is lossy, that means number after setting the precision is not necessarily the same as the original number.
Next: Type bigfr, Previous: Type bigq, Up: Types of Numbers [Contents][Index]