Accurate arithmetic

Sabre manual

The default, FAST, arithmetic in Sabre uses standard double precision variables and arithmetic. This is adequate for most applications but occasionally, in very large problems, intermediate calculations can require the calculation of values which are beyond the range of double precision numbers. This range is approximately 10 to the power -308 to 10 to the power +308.

This range can be greatly extended by using the ARITHMETIC ACCURATE command in Sabre. In this case all calculations are performed using specially written arithmetic code in which the exponent of the variable is stored separately in a 4 byte integer. This extends the range of intermediate calculations to approximately 10 to the power -2 billion to 10 to the power +2 billion. The precision with which numbers are stored is the same for both FAST and ACCURATE arithmetic, viz. about 15 decimal digits.

The greater range comes at the cost of increased run time, typically 15 times as long as in FAST arithmetic. However, particularly when using parallel Sabre on a large number of processors, this may be a cost well worth paying as the problem may not otherwise be soluble.

Go to: Sabre home page | Sabre manual | Downloading & Installing Sabre | Sabre examples | Training materials | Sabre mailing list | Contact us

Other links: Centre for e-Science | Centre for Applied Statistics