
Aug. 1, 2001
9:49 p.m.
I'm trying to understand how a decimal number context would work. Is the context a variable and/or flag that defines the rounding rules and precision of a number when it is used in a calculation?
Yes -- I believe advanced HP calculators have such functionality. So does IEEE 754 for binary floating point.
I forgot: also which exceptional conditions raise exceptions, and a bunch of (resettable?) state flags that tell you whether the last calculation did certain things like lose precision or overflow etc. I know nothing about this stuff, but Tim talks about it a lot and I seem to learn by osmosis. :-) --Guido van Rossum (home page: http://www.python.org/~guido/)