next up previous
Next: Newton Polygons Up: Rings and their Fields Previous: Discrete Valuation Rings

The Real and Complex Fields

The real and complex fields are different from most structures in that exact computation in them is almost never possible.


Two different models of the real and complex field are available in Magma. The default version is based on semantics developed by Henri Cohen for PARI. In this model, the precision of a real or complex number is determined by the accuracy of the operands and the operation. Whenever a real or complex number is known exactly, it is kept in exact form and only converted to real/complex form when it has to be used as an argument in some operation. Thus, during a calculation, real or complex numbers will appear with varying precisions, where the precision for a particular number is chosen in such a way that all digits should be meaningful. This is achieved through use of a form of interval arithmetic. We call this model of the real or complex field, the free model. Magma implements its free model using a modified version of the PARI code. The PARI code achieves its speed by using assembler for a small number of critical operations and by careful organization. This has been carried over into the Magma version so that the speed of the Magma version is virtually the same as the native PARI code in all but a few instances. The hundred or more real and complex functions implemented in PARI are available in Magma.

A second model of the real field is provided whereby all numbers are stored to a fixed precision. This version is based on Richard Brent's MP package and is known as the truncated model.


next up previous
Next: Newton Polygons Up: Rings and their Fields Previous: Discrete Valuation Rings