Imaginary type -------------- Can be implemented with a suffix. 1i 1.2i 3 - 1i 1ie9 // This should probably not be allowed 2e3i // 2*10^(3i) TOOD: how should complex arithmetic work? Floating point exceptions ------------------------- Problem 1: fp flags Solution 1a. Have a pop_exception function double z = (3*x-i) / y; fp:pop_exception(); // Problem: Any function might pop the fp flags! Solution 1b. Save and restore flags using (fp:flags) { // fp flags are saved double z = (3*x-i) / y; if (fp:flags.bad()) leave; } // fp flags are restored Problem 2: fp traps Solution 2a. Change behaviour with a function fp:trap:make_abort(); fp:trap:make_ignore(); Solution 2a. Use "using" using (fp:trap) { // ... using (fp:notrap) { // ... } } Integer exceptions ------------------ Same problems as with fp exceptions. The integer exceptions are: * Overfow/underflow - from aritmetic operations - from negation - from conversion from floating point * Division by zero * More? Links ----- * http://www.cs.berkeley.edu/~wkahan/JAVAhurt.pdf