The following issue was found by an AI while I was using VCL to test GCC. I don't know if it is correct, but it did lead to test failures.
The exp2 test in testbench3.cpp (testcase 11) is incorrect for integer input types.
The reference function computes exp2 as powl(2., a), which goes through floating-point pow and can introduce rounding errors for integer exponents. It also does not model VCL's overflow and underflow behavior correctly at the type boundaries.
In addition, the test data generator uses the normal floating-point data path for integer tests. After conversion to integer types, this can produce invalid inputs, including values derived from infinities or NaNs.
As a result, the integer exp2 test can fail even when the implementation is correct.
Expected behavior
For integer input types, the reference function should compute exact powers of two and apply the same overflow and underflow limits as VCL. The test data generator should produce integer exponent values directly, including relevant boundary cases.
The following issue was found by an AI while I was using VCL to test GCC. I don't know if it is correct, but it did lead to test failures.
The
exp2test intestbench3.cpp(testcase11) is incorrect for integer input types.The reference function computes
exp2aspowl(2., a), which goes through floating-pointpowand can introduce rounding errors for integer exponents. It also does not model VCL's overflow and underflow behavior correctly at the type boundaries.In addition, the test data generator uses the normal floating-point data path for integer tests. After conversion to integer types, this can produce invalid inputs, including values derived from infinities or NaNs.
As a result, the integer
exp2test can fail even when the implementation is correct.Expected behavior
For integer input types, the reference function should compute exact powers of two and apply the same overflow and underflow limits as VCL. The test data generator should produce integer exponent values directly, including relevant boundary cases.