Bug 1630996 - [aarch64] Math.log(4.9E-324) produces wrong result
Summary: [aarch64] Math.log(4.9E-324) produces wrong result
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: java-11-openjdk
Version: 28
Hardware: aarch64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Severin Gehwolf
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-09-19 16:31 UTC by Severin Gehwolf
Modified: 2018-10-30 17:16 UTC (History)
2 users (show)

Fixed In Version: java-11-openjdk-11.0.ea.28-6.fc30 java-11-openjdk-11.0.ea.28-8.fc27 java-11-openjdk-11.0.ea.28-8.fc28 java-11-openjdk-11.0.ea.28-8.fc29
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-11 22:49:01 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
openjdk bug system JDK-8210858 0 None None None 2018-09-19 16:31:50 UTC

Description Severin Gehwolf 2018-09-19 16:31:10 UTC
Description of problem:
Similar to bug 1628612. It produces -710.989276736877 instead of -744.4400719213812 as a result.

Version-Release number of selected component (if applicable):
$ rpm -q java-11-openjdk
java-11-openjdk-11.0.ea.28-5.fc28.aarch64

How reproducible:
100%

Steps to Reproduce:
$ cat TestMath.java 
public class TestMath {
	public static void main(String[] args) {
		int testfail = 0;
		double expected = 0.7833030468809974;
		double res = Math.cos(1647100);
		if (res != expected) {
			System.out.println("Test Math.cos() FAILED! Got: " + res + " instead of " + expected);
			testfail++;
		}
	        double x = 4.9E-324; 
		res = Math.log(x);
		expected = -744.4400719213812;
		if (res != expected) {
			System.out.println("Test Math.log() FAILED! Got: " + res + " instead of " + expected);
			testfail++;
		}
	        if (testfail > 0) {
			System.out.println("Test FAILED! Got " + testfail + " failures.");
		} else {
			System.out.println("Test(s) passed!");
		}
	}
}
$ javac TestMath.java
$ /usr/lib/jvm/java-11-openjdk/bin/java TestMath
Test Math.log() FAILED! Got: -710.989276736877 instead of -744.4400719213812
Test FAILED! Got 1 failures.

Actual results:
Test Math.log() FAILED! Got: -710.989276736877 instead of -744.4400719213812
Test FAILED! Got 1 failures.

Expected results:
Test(s) passed!

Additional info:
This issue is tracked upstream here:
https://bugs.openjdk.java.net/browse/JDK-8210858

Comment 1 Severin Gehwolf 2018-09-20 15:29:39 UTC
Proposed fix:
https://src.fedoraproject.org/rpms/java-11-openjdk/pull-request/5

Comment 2 Severin Gehwolf 2018-09-21 08:07:05 UTC
With a build including the fix from the PR I see this:

<mock-chroot> sh-4.4# rpm -qf /usr/lib/jvm/java-11-openjdk/bin/java
java-11-openjdk-headless-11.0.ea.28-6.fc30.aarch64
<mock-chroot> sh-4.4# /usr/lib/jvm/java-11-openjdk/bin/java TestMath
Test(s) passed!

I'm going to merge it in.

Comment 3 Fedora Update System 2018-09-24 09:25:26 UTC
java-11-openjdk-11.0.ea.28-6.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-22ef555fb7

Comment 4 Fedora Update System 2018-09-24 09:25:35 UTC
java-11-openjdk-11.0.ea.28-6.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-22ef555fb7

Comment 5 Fedora Update System 2018-09-24 09:27:03 UTC
java-11-openjdk-11.0.ea.28-6.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2018-972ab7ba3e

Comment 6 Fedora Update System 2018-09-27 02:08:40 UTC
java-11-openjdk-11.0.ea.28-6.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-972ab7ba3e

Comment 7 Fedora Update System 2018-09-27 04:46:16 UTC
java-11-openjdk-11.0.ea.28-6.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-22ef555fb7

Comment 8 Fedora Update System 2018-09-28 06:44:58 UTC
java-11-openjdk-11.0.ea.28-8.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2018-f10566c2e0

Comment 9 Fedora Update System 2018-09-28 06:45:18 UTC
java-11-openjdk-11.0.ea.28-8.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-e402b3f75c

Comment 10 Fedora Update System 2018-09-28 06:45:34 UTC
java-11-openjdk-11.0.ea.28-8.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-c34978a9f4

Comment 11 Fedora Update System 2018-09-28 19:06:47 UTC
java-11-openjdk-11.0.ea.28-8.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-c34978a9f4

Comment 12 Fedora Update System 2018-09-28 19:34:52 UTC
java-11-openjdk-11.0.ea.28-8.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-f10566c2e0

Comment 13 Fedora Update System 2018-09-28 20:31:39 UTC
java-11-openjdk-11.0.ea.28-8.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-e402b3f75c

Comment 14 Fedora Update System 2018-10-11 22:49:01 UTC
java-11-openjdk-11.0.ea.28-8.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.

Comment 15 Fedora Update System 2018-10-11 23:49:20 UTC
java-11-openjdk-11.0.ea.28-8.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.

Comment 16 Fedora Update System 2018-10-30 17:16:54 UTC
java-11-openjdk-11.0.ea.28-8.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.