ColinIanKing / stress-ng

This is the stress-ng upstream project git repository. stress-ng will stress test a computer system in various selectable ways. It was designed to exercise various physical subsystems of a computer as well as the various operating system kernel interfaces.
https://github.com/ColinIanKing/stress-ng
GNU General Public License v2.0
1.82k stars 290 forks source link

fp-error: a duplicate sqrt test case? #450

Closed woodrow-shen closed 1 month ago

woodrow-shen commented 1 month ago

Hi @ColinIanKing ,

Just checking the fp-error code, and wondering there are two cases that use the same value. Typo?

#if defined(EDOM) && defined(FE_INVALID)
                stress_fp_clear_error();
                stress_fp_check(args, "sqrt(-1.0)", sqrt(-1.0), (double)NAN,
                        true, false, EDOM, FE_INVALID, &rc);
#endif
#if defined(EDOM) && defined(FE_INVALID)
                stress_fp_clear_error();
                stress_fp_check(args, "sqrt(-1.0)", sqrt(-1.0), (double)NAN,                                                        
                        true, false, EDOM, FE_INVALID, &rc);
#endif
ColinIanKing commented 1 month ago

This was duplicated. Fix pushed.