Bug 234689 - java/openjdk8: Math.asin() (and StrictMath.asin()) seem to be broken
Summary: java/openjdk8: Math.asin() (and StrictMath.asin()) seem to be broken
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Many People
Assignee: freebsd-java mailing list
URL:
Keywords: needs-qa
Depends on:
Blocks: 234579
  Show dependency treegraph
 
Reported: 2019-01-07 10:41 UTC by thgude
Modified: 2019-01-16 15:14 UTC (History)
5 users (show)

See Also:
bugzilla: maintainer-feedback? (java)


Attachments
Java test program (3.27 KB, text/plain)
2019-01-07 10:41 UTC, thgude
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description thgude 2019-01-07 10:41:04 UTC
Created attachment 200862 [details]
Java test program

In openjdk8 (v8.192.26) the Math.asin() method returns wrong values. This can be reproduced by the attached test program (CheckMathIssue.java). Previous versions (e.g. 8.172) did return correct results. The comments in the test program show results of the test program for four different platforms:
- FreeBSD 11.2 openjdk8-8.192
- FreeBSD 11.2 openjdk8-8.172
- MacOs 10.14 Oracle JDK 8.192
- Linux OSMC (ARM) 4.14 openjdk8-8.191

The latter three return identical (and correct) results. So, there seems to be a bug in  the current version of openjdk8.
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2019-01-07 10:57:22 UTC
This may be related to bug 234579, if not the underlying cause of it.

If it is the same issue, please:

1) Set this issue as "Blocks" bug 234579, or
2) Close this issue as a duplicate of 234579, and update the summary of the latter to:

java/openjdk8: Math.asin() and StrictMath.asin() broken (affects at least math/geogebra)
Comment 2 Tobias C. Berner freebsd_committer 2019-01-09 07:20:11 UTC
Given that it works going back to the previous version, and me noticing the issue on december 12, the bug must have been introduced in one of the following :


------------------------------------------------------------------------
r487219 | glewis | 2018-12-11 04:23:57 +0100 (Di., 11 Dez. 2018) | 5 lines

. Fix build on gcc based architectures (e.g. powerpc64)

PR:             233883
Submitted by:   Piotr Kubaj <pkubaj@anongoth.pl>

------------------------------------------------------------------------
r486983 | glewis | 2018-12-08 20:09:28 +0100 (Sa., 08 Dez. 2018) | 5 lines

. Fix SCTP support.

PR:             230321
Submitted by:   Timo Voelker <timo.voelker@fh-muenster.de>

------------------------------------------------------------------------
r486976 | glewis | 2018-12-08 19:43:56 +0100 (Sa., 08 Dez. 2018) | 5 lines

. Fix compilation on powerpc64

PR:             223834
Submitted by:   Curtis Hamilton <hamiltcl@verizon.net>

------------------------------------------------------------------------
r486973 | glewis | 2018-12-08 19:35:30 +0100 (Sa., 08 Dez. 2018) | 4 lines

. Update to 8u192.

PR:             230364

------------------------------------------------------------------------
r485094 | jkim | 2018-11-16 18:30:17 +0100 (Fr., 16 Nov. 2018) | 7 lines

- Fix reversed ccache version detection logic.  Enable ccache support.
- Use '-pthread' for Clang.  Clang supports '-pthread' on all BSDs except
for Darwin. [1]

Reported by:    Achilleas Mantzios <achill@matrix.gatewaynet.com> [1]
Tested by:      Achilleas Mantzios <achill@matrix.gatewaynet.com> [1]

------------------------------------------------------------------------
Comment 3 Mark.Martinec 2019-01-16 15:14:29 UTC
This also breaks astro/josm and astro/osmosis.

(angles show up as multiples of 90 degrees, or results manifest as NaN)