Bug 1628612 - [aarch64] Math.cos(1647100) produces wrong result
Summary: [aarch64] Math.cos(1647100) produces wrong result
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: java-11-openjdk
Version: 28
Hardware: aarch64
OS: Linux
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-13 14:38 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-5.fc28 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:04 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
openjdk bug system JDK-8210461 0 None None None 2018-09-13 14:38:42 UTC

Description Severin Gehwolf 2018-09-13 14:38:43 UTC
Description of problem:
Match.cos(1647100) produces wrong result. It should produce 0.7833030468809974.

Version-Release number of selected component (if applicable):
# rpm -qf /usr/lib/jvm/java-11-openjdk/bin/java
java-11-openjdk-headless-11.0.ea.28-4.fc28.aarch64

Steps to Reproduce:
$ cat TestMath.java 
public class TestMath {
	public static void main(String[] args) {
		double res = Math.cos(1647100);
		if (res != 0.7833030468809974) {
			System.out.println("Test FAILED! Got: " + res + " instead of 0.7833030468809974");
		} else {
			System.out.println("Test passed!");
		}
	}
}
$ javac TestMath.java
$ /usr/lib/jvm/java-11-openjdk/bin/java TestMath 
Test FAILED! Got: -0.2745634094819721 instead of 0.7833030468809974

Actual results:
Test FAILED! Got: -0.2745634094819721 instead of 0.7833030468809974

Expected results:
Test passed!

Additional info:
This is the corresponding upstream bug:
https://bugs.openjdk.java.net/browse/JDK-8210461

Comment 1 Severin Gehwolf 2018-09-13 14:47:46 UTC
https://src.fedoraproject.org/rpms/java-11-openjdk/pull-request/4

Works around this issue by disabling the relevant intrinsics.

Comment 2 Severin Gehwolf 2018-09-14 08:43:48 UTC
Prior the PR:

# /usr/lib/jvm/java-11-openjdk/bin/java TestMath
Test FAILED! Got: -0.2745634094819721 instead of 0.7833030468809974
# rpm -qf /usr/lib/jvm/java-11-openjdk/bin/java
java-11-openjdk-headless-11.0.ea.28-4.fc30.aarch64

With the patch (-5) from [1]:

# /usr/lib/jvm/java-11-openjdk/bin/java TestMath
Test passed!
# rpm -qf /usr/lib/jvm/java-11-openjdk/bin/java
java-11-openjdk-headless-11.0.ea.28-5.fc30.aarch64

[1] https://koji.fedoraproject.org/koji/taskinfo?taskID=29652239

I'm going to merge this.

Comment 3 Severin Gehwolf 2018-09-14 09:41:40 UTC
Should be fixed once this build completes:
https://koji.fedoraproject.org/koji/buildinfo?buildID=1144605

Comment 4 Fedora Update System 2018-09-18 15:05:06 UTC
java-11-openjdk-11.0.ea.28-5.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:25:32 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 6 Fedora Update System 2018-09-24 09:27:06 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 7 Fedora Update System 2018-09-27 02:08:43 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 8 Fedora Update System 2018-09-27 04:46:12 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 9 Fedora Update System 2018-09-28 06:45:02 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 10 Fedora Update System 2018-09-28 06:45:22 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 11 Fedora Update System 2018-09-28 06:45:37 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 12 Fedora Update System 2018-09-28 19:06:51 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 13 Fedora Update System 2018-09-28 19:34:55 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 14 Fedora Update System 2018-09-28 20:31:42 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 15 Fedora Update System 2018-10-11 22:49:04 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 16 Fedora Update System 2018-10-11 23:49:23 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 17 Fedora Update System 2018-10-30 17:16:57 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.