Module decimal :: Class Overflow
[hide private]
[frames] | no frames]

Class Overflow

              object --+                        
                       |                        
exceptions.BaseException --+                    
                           |                    
        exceptions.Exception --+                
                               |                
        exceptions.StandardError --+            
                                   |            
          exceptions.ArithmeticError --+        
                                       |        
                        DecimalException --+    
                                           |    
                                     Inexact --+
                                               |
              object --+                       |
                       |                       |
exceptions.BaseException --+                   |
                           |                   |
        exceptions.Exception --+               |
                               |               |
        exceptions.StandardError --+           |
                                   |           |
          exceptions.ArithmeticError --+       |
                                       |       |
                        DecimalException --+   |
                                           |   |
                                     Rounded --+
                                               |
                                              Overflow

Numerical overflow.

This occurs and signals overflow if the adjusted exponent of a result (from a conversion or from an operation that is not an attempt to divide by zero), after rounding, would be greater than the largest value that can be handled by the implementation (the value Emax).

The result depends on the rounding mode:

For round-half-up and round-half-even (and for round-half-down and round-up, if implemented), the result of the operation is [sign,inf], where sign is the sign of the intermediate result. For round-down, the result is the largest finite number that can be represented in the current precision, with the sign of the intermediate result. For round-ceiling, the result is the same as for round-down if the sign of the intermediate result is 1, or is [0,inf] otherwise. For round-floor, the result is the same as for round-down if the sign of the intermediate result is 0, or is [1,inf] otherwise. In all cases, Inexact and Rounded will also be raised.

Instance Methods [hide private]
 
handle(self, context, sign, *args)

Inherited from exceptions.ArithmeticError: __init__, __new__

Inherited from exceptions.BaseException: __delattr__, __getattribute__, __getitem__, __getslice__, __reduce__, __repr__, __setattr__, __setstate__, __str__

Inherited from object: __hash__, __reduce_ex__

Properties [hide private]

Inherited from exceptions.BaseException: args, message

Inherited from object: __class__

Method Details [hide private]

handle(self, context, sign, *args)

 
Overrides: DecimalException.handle