next up previous
Next: Making sense of scope Up: FP98: Rounding Modes from Previous: ModesFlags

Scoping affects how we control modes.

Let's say we were not using Mathematica or some other language with built-in intervals. How hard would it be to get a language to ``do the right thing''?

Here we use the setting of the rounding mode as a prototype to illustrate the language options.

sine of 1.0 radians is 0.841470984807...

A reasonably rounded answer to single precision is 0.841471. We might also find it useful to compute a lower and an upper bound on sin(1), to single precision (as we just illustrated, for interval arithmetic).

How could we accomplish this in your favorite language?

What happens when you utter the equivalent of:

set Rounding_mode to ToNEGV;
compute sin(1.0) ?

Your intention is to obtain an answer like 0.814709 or some other nearby but distinctly lower bound on sin(1) .

What does your system provide?

Your system might




next up previous
Next: Making sense of scope Up: FP98: Rounding Modes from Previous: ModesFlags

Richard J. Fateman
Wed Aug 12 22:53:48 PDT 1998