Code review request for 4900206 "Include worst-case rounding tests for Math library functions"
Hello. Cleaning up my bug backlog, please review the addition of some new math library tests: 4900206 "Include worst-case rounding tests for Math library functions" http://cr.openjdk.java.net/~darcy/4900206.0/ These tests probe at hard to round values generated by number-theoretic techniques. I've verified the tests pass on Linux x86 and Solaris sparc. Thanks, -Joe
Joe Darcy wrote:
Hello.
Cleaning up my bug backlog, please review the addition of some new math library tests:
4900206 "Include worst-case rounding tests for Math library functions" http://cr.openjdk.java.net/~darcy/4900206.0/
These tests probe at hard to round values generated by number-theoretic techniques. I've verified the tests pass on Linux x86 and Solaris sparc.
Thanks,
-Joe This looks good to me (I didn't of course check each case against the results on the JMD site). One small suggestion is to mention in the comment that its based on teh Sep 5, 2000 update on the off chance that new cases are added and we find ourselves wondering if the test is up to date.
-Alan.
Hi Alan. On 8/11/2011 7:20 AM, Alan Bateman wrote:
Joe Darcy wrote:
Hello.
Cleaning up my bug backlog, please review the addition of some new math library tests:
4900206 "Include worst-case rounding tests for Math library functions" http://cr.openjdk.java.net/~darcy/4900206.0/
These tests probe at hard to round values generated by number-theoretic techniques. I've verified the tests pass on Linux x86 and Solaris sparc.
Thanks,
-Joe This looks good to me (I didn't of course check each case against the results on the JMD site). One small suggestion is to mention in the comment that its based on teh Sep 5, 2000 update on the off chance that new cases are added and we find ourselves wondering if the test is up to date.
-Alan.
I've revised and augmented tests in a few ways. I've added more test cases from some more recent work on the team in question and included a URL to that paper. Additionally, following an off-list suggestion from you, I've added @run tag using the Xcomp option. New webrev is here: http://cr.openjdk.java.net/~darcy/4900206.1/ Thanks, -Joe
Your fix adds worst-case rounding tests for math functions. It may also be useful to include worst-case rounding tests for number conversions (string-to-double). I have explored string-to-double issues, including problems when the converted numbers are close to the breakpoints between doubles. This happens when the string is (m + 0.5 + eps)*2^exp I found three relevant test cases: 1) The shortest string with eps = 0 "1e23" = 0x1.52d02c7e14af6p76 + (0.5 + 0.0)*1p24 2) The minimum positive eps = 2.1546568143020914E-19 "3743626360493413e-165" = 0x1.8823a57adbef9p-497 + (-0.5 + 2.1546568143020914E-19)*1p-549 3) The maximum negative eps = -8.318563789335443E-19 "1864950924021923e213" = 0x1.3ae60753af6cap758 + (0.5 + -8.318563789335443E-19)*1p706 These examples may be useful for testing Double.parseDouble and Double.toString -Dmitry On Thu, Aug 11, 2011 at 1:24 AM, Joe Darcy <joe.darcy@oracle.com> wrote:
Hello.
Cleaning up my bug backlog, please review the addition of some new math library tests:
4900206 "Include worst-case rounding tests for Math library functions" http://cr.openjdk.java.net/~**darcy/4900206.0/<http://cr.openjdk.java.net/%7Edarcy/4900206.0/>
These tests probe at hard to round values generated by number-theoretic techniques. I've verified the tests pass on Linux x86 and Solaris sparc.
Thanks,
-Joe
participants (3)
-
Alan Bateman
-
Dmitry Nadezhin
-
Joe Darcy