Verification حسام علي حسن فهمي: التحقق (original) (raw)
Try our test vectors
The first work on our test vectors was inspired by the FPGenproject of IBM. The test vectors files follow the same syntax as in that project. Specifically, each line represents a single test vector with parts separated by spaces as follows:
- The type and precision: d64 for Decimal64, or d128 for Decimal128.
- The operation: + for add, - for subtract, * for multiply, / for divide, *+ for fused multiply-add, *- for fused multiply-subtract, or V for square root.
- The rounding mode: > for (positive infinity), < for (negative infinity), 0 for (zero), =0 for (nearest, ties to even), or h> (nearest, ties away from zero).
- The data for input operands: sign_significand_E_exp. Where the sign is either + or -, the significand is a string of decimal digits, exp is the value of the unbiased exponent written as an integer number.
- SNaN numbers are represented using the string S.
- QNaN numbers are represented using the string Q.
- Infinities are represented using the string +inf or -inf.
- A "->" sign, to separate inputs from results.
- The data for output operand: sign_significand_E_exp. Where the sign is either + or -, the significand is a string of decimal digits, exp is the value of the unbiased exponent written as an integer number.
- SNaN numbers are represented using the string S.
- QNaN numbers are represented using the string Q.
- Infinities are represented using the string +inf or -inf.
- Exceptions that occur due to the operation: x (inexact), u (underflow), o (overflow), z (division by zero) and i (invalid).
Decimal FP operations
For an explanation of the relevant models used to generate the test vectors please refer to the publications section, especially the MSc thesis of Amr Sayed-Ahmed.
Each zip file below archives a directory with files for the operation indicated by the file name and dated as in the name as well. The md5sum files hold checksum values for the corresponding files. The DecTool of SilMinds is able to parse our files and generate the corresponding hexadecimal or binary strings necessary for circuit simulation.
The files provided below with test vectors for the decimal FP operations are copyrighted to Amr Sayed-Ahmed and Hossam A. H. Fahmy. They are provided as is without any implied warranties. The persons who download the files are free to use them for any purpose under their own responsibilities. The copyright owners provide the files in the hope that they will be useful to others but give no guarantees. We would appreciate if you reference our work and give us credit for it.
| Operation | Number of vectors | Covered models |
|---|---|---|
| Add | ||
| <2010%5F07%5Fd64%5Fadd.zip>(03MB),<2010%5F07%5Fd64%5Fadd.md5sum> | 0136356 | cancel, clamping, overflow, result, rounding, shift, sticky, trailing, type |
| <2011%5F09%5Fd128%5Fadd.zip>(35MB),<2011%5F09%5Fd128%5Fadd.md5sum> | 1247467 | cancel, carry, overflow, result, rounding, shift, sticky, trailing, type |
| Mul | ||
| <2010%5F07%5Fd64%5Fmul.zip>(02MB),<2010%5F07%5Fd64%5Fmul.md5sum> | 0096853 | clamping, overflow, result, rounding, sticky, trailing, type, underflow |
| <2011%5F10%5Fd128%5Fmul.zip>(34MB),<2011%5F10%5Fd128%5Fmul.md5sum> | 1103450 | clamping, nines, overflow, result, rounding, sticky, trailing, type, underflow, zeros |
| FMA | ||
| <2010%5F07%5Fd64%5Ffma.zip>(11MB),<2010%5F07%5Fd64%5Ffma.md5sum> | 0425599 | cancel, clamping, overflow, result, rounding, shift, sticky, trailing, type, underflow |
| <2011%5F02%5Fd64%5Ffma.zip>(14MB),<2011%5F02%5Fd64%5Ffma.md5sum> | 0502069 | cancel, carry, clamping, overflow, result, rounding, shift, sticky, trailing, type, underflow |
| <2011%5F09%5Fd128%5Ffma.zip>(180MB),<2011%5F09%5Fd128%5Ffma.md5sum> | 4388066 | cancel, carry, clamping, overflow, result, rounding, shift, sticky, trailing, type, underflow |
| Div | ||
| <2011%5F03%5Fd64%5Fdiv.zip>(03MB),<2011%5F03%5Fd64%5Fdiv.md5sum> | 0146148 | nines, overflow, result, rounding, sticky, trailing, type, underflow, zeros |
| <2011%5F10%5Fd64%5Fdiv.zip>(17MB),<2011%5F10%5Fd64%5Fdiv.md5sum> | 0798816 | nines, overflow, rounding, sticky, trailing, underflow, zeros |
| <2011%5F04%5Fd128%5Fdiv.zip>(12MB),<2011%5F04%5Fd128%5Fdiv.md5sum> | 0341808 | nines, overflow, result, rounding, sticky, trailing, type, underflow, zeros |
| <2011%5F11%5Fd128%5Fdiv.zip>(62MB),<2011%5F11%5Fd128%5Fdiv.md5sum> | 1665375 | nines, overflow, rounding, sticky, trailing, type, underflow, zeros |
| Sqrt | ||
| <2011%5F03%5Fd64%5Fsqrt.zip>(01MB),<2011%5F03%5Fd64%5Fsqrt.md5sum> | 0057833 | nines, result, rounding, sticky, trailing, type, zeros |
| <2011%5F04%5Fd128%5Fsqrt.zip>(06MB),<2011%5F04%5Fd128%5Fsqrt.md5sum> | 0199025 | nines, result, rounding, sticky, trailing, type, zeros |