Patent ID: 6493738
Filing Date: 2002-12-10
Classification: G06F

Abstract:
A rounding apparatus comprising:an input portion for entering a numerical value x to be rounded and a rounding interval w; a first storage portion which comprises a numeral storage portion for storing digits in successive digit places of the entered numerical value x; a second storage portion for storing the entered rounding interval w; and a rounding processing portion for rounding the numerical value x stored in said first storage portion with a digit place determined by the rounding interval w stored in said second storage portion, and including a less significant numeral extraction portion for extracting a less significant numerical value y composed of digits in digit places to the right of a digit place corresponding to the rounding interval w stored in said rounding interval storage portion, a rounding interval rounding processing portion for replacing the numerical value x stored in said numeral storage portion by a numerical value selected from a sequence of multiples of the rounding interval w stored in said rounding interval storage portion according to result of a comparison of the rounding interval w stored in said rounding interval storage portion with twice of the less significant numerical value y extracted by said less significant numeral exaction portion, said rounding interval rounding portion comprising a remainder calculation portion for calculating a remainder b occurring when the rounded digit R extracted by said rounded numeral extraction portion is divided by 2, an adder portion for adding 1 to the rounded digit R extracted by said rounded numeral exaction portion if the rounding interval w stored in said rounding interval storage portion is smaller than twice of the less significant numerical value y extracted by said less significant numeral extraction portion or if the rounding interval w stored in said rounding interval storage portion is equal to twice of the less significant numerical value y extracted by said less significant numeral extraction portion and, at the same time, the remainder b calculated by said remainder calculation portion is 1, and a dropping portion for dropping the less significant numerical value y extracted by said less significant numeral extraction portion, and a rounded numeral extraction portion for extracting a rounded digit R from the numerical value x stored in said numeral storage portion, the rounding digit R being in a digit place corresponding to the rounding interval w stored in said rounding interval storage portion.