摘要 |
One embodiment of the present invention provides a system for performing a division operation between arithmetic intervals within a computer system. The system operates by receiving interval operands, including a first interval and a second interval, wherein the first interval is to be divided by the second interval to produce a resulting interval. Next, the system uses the operand values to create a mask. The system uses this mask to perform a multi-way branch, so that an execution flow of a program performing the division operation is directed to code that is tailored to compute the resulting interval for specific relationships between the interval operands and zero. In one embodiment of the present invention, creating the mask additionally involves, determining whether the first and/or second intervals are empty, and modifying the mask so that the multi-way branch directs the execution flow of the program to the appropriate code for this case. In one embodiment of the present invention, if the first interval is empty or if the second interval is empty, the multi-way branch directs the execution flow of the program to code that sets the resulting interval to be empty.
|