Next: , Previous: , Up: Types of Numbers   [Contents][Index]


63.2.6 The Type ‘bigg

As of November 2005, there is no library dedicated to Gaussian numbers available. Thusly, the abstract C type ‘bigg’ is implemented only via the SXEmacs pseudo implementation based on GMP-MPZ. Gaussian numbers are represented by two MPZ objects.

Nonetheless, any library which implements Gaussian numbers should be accessed via the abstract type ‘bigg’ in the future.

Lisp objects can be tested for the type ‘bigg’ by the following predicate.

Function: biggp object

This predicate tests whether its argument is a Gaussian number (as provided by the SXEmacs pseudo-implementation), and returns t if so, nil otherwise.

For ‘bigg’ objects exist the same accessor functions as for ‘bigc’ objects, real-part and imaginary-part to access the respective parts of a Gaussian number. Hereby, real-part returns the integral rational part.

The read syntax of ‘bigg’s is inspired by the traditional notation of the elements of a Gaussian lattice. In these terms the lisp reader interprets a+bi as ‘bigg’ whenever both a and b are written in integer syntax, alternatively it is allowed to capitalise the imaginary symbol. If the imaginary part of a ‘bigg’ is one, it is additionally allowed to omit b. Consider the examples:

2+3i
     ⇒ 2+3i
2+3I
     ⇒ 2+3i
3+i
     ⇒ 3+1i

And similar to ‘bigc’ complex numbers, there is a constructor which composes a Gaussian number from a given integral rational and a given imaginary component.

Function: make-bigg real-part imaginary-part

Return the bigg number whose rational component is real-part and whose imaginary component is imaginary-part.


Next: , Previous: , Up: Types of Numbers   [Contents][Index]