Approximation algorithms for NP-hard problems
Online computation and competitive analysis
Online computation and competitive analysis
Integer Multiplication with Overflow Detection or Saturation
IEEE Transactions on Computers - Special issue on computer arithmetic
Developments from a June 1996 seminar on Online algorithms: the state of the art
Developments from a June 1996 seminar on Online algorithms: the state of the art
Online Perfect Matching and Mobile Computing
WADS '95 Proceedings of the 4th International Workshop on Algorithms and Data Structures
Multilevel Reverse-Carry Computation for Comparison and for Sign and Overflow Detection in Addition
ICCD '99 Proceedings of the 1999 IEEE International Conference on Computer Design
Hi-index | 0.00 |
Online problems arise in various applications ranging from load balancing and scheduling to network and financial problems. However, some of these online applications like financial tools, online calculators and online math programs suffer from the overflow problem caused by the multiply operation of two operands. The overflow occurs whenever the multiplication of any two-integer numbers exceeds the maximum limit available for the result. Many programming languages ignored this problem; therefore, the programmer has to handle it, mostly in "predict and avoid" approach. This paper addresses the detection and control of integer overflow in programming languages. Two examples from C and Java programming languages are considered. The paper suggests "detect and do" algorithms to handle the overflow. In addition, this paper suggests adding a built-in function to test whether an overflow will be generated by multiplication operation in advance.