This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.
Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Here're a few more tests for libm-test.inc inspired by the last PR about nearbyint. Andreas 2000-02-15 Andreas Jaeger <aj@suse.de> * math/libm-test.inc (nearbyint_test): Add some tests. (rint_test): Likewise. Index: libm-test.inc =================================================================== RCS file: /cvs/glibc/libc/math/libm-test.inc,v retrieving revision 1.10 diff -u -c -r1.10 libm-test.inc *** libm-test.inc 1999/10/31 17:02:25 1.10 --- libm-test.inc 2000/02/15 08:44:47 *************** *** 3101,3106 **** --- 3101,3112 ---- TEST_f_f (nearbyint, minus_infty, minus_infty); TEST_f_f (nearbyint, nan_value, nan_value); + /* Default rounding mode is round to nearest. */ + TEST_f_f (nearbyint, 0.5, 0.0); + TEST_f_f (nearbyint, 1.5, 2.0); + TEST_f_f (nearbyint, -0.5, minus_zero); + TEST_f_f (nearbyint, -1.5, -2.0); + END (nearbyint); } *************** *** 3383,3388 **** --- 3389,3400 ---- TEST_f_f (rint, minus_zero, minus_zero); TEST_f_f (rint, plus_infty, plus_infty); TEST_f_f (rint, minus_infty, minus_infty); + + /* Default rounding mode is round to nearest. */ + TEST_f_f (rint, 0.5, 0.0); + TEST_f_f (rint, 1.5, 2.0); + TEST_f_f (rint, -0.5, -0.0); + TEST_f_f (rint, -1.5, -2.0); END (rint); } -- Andreas Jaeger SuSE Labs aj@suse.de private aj@arthur.rhein-neckar.de
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |