Solving the generalized mask constraint for test generation of binary floating point add operation
Abstract
The mathematical problem discussed is important for generating test cases in order to debug floating point adders designs. Floating point numbers are assumed to be written as strings of {0, 1} bits, in a format compatible with IEEE standard 754. A mask is a string of characters, composed of {‘0’, ‘1’, ‘x’}. A number and a mask are compatible if they have the same length and each numerical character of the mask (‘0’ or ‘1’) is equal, numerically, to the bit of the number, in the same position. The problem discussed is: Given masks Ma, Mb, Mc, of identical lengths, generate three floating point numbers Ā, b̄, c̄, which are compatible with the masks and satisfy c̄=round(ā±b̄). If there are many solutions, choose one at random. A fast algorithm is given which solves the problem for all IEEE floating point data types and all rounding modes. © 2002 Elsevier Science B.V. All rights reserved.