Previous: Generic Functions, Up: Mathematics

2.2 Conditions

Conditions and handlers are defined for common mathematical computations.

The condition making-complex-number is signalled when a calculation would make a complex number. If this outcome is desirable, and handler such as defined by the macro handling-complex-number is used.

— Condition: antik:making-complex-number

Class precedence list: making-complex-number, arithmetic-error, error, serious-condition, condition, t

Signalled when a mathematical calculation would result in a complex number.

— Macro: antik:arithmetic-errors-return-nan &body body

Return a NaN for a variety of arithmetic errors.

— Macro: antik:handling-complex-number restart &body body

A handler to make the complex number.

2.3 Iterate generalized numbers

Extensions to the iterate system are provided. The following reductions and finders are provided:

These are exactly like those provided in iterate, but are extended to use the appropriate generic functions.

The driver for numerical iteration will work with generalized numbers.