Date: Sun, 6 Jan 2019 20:09:27 +0100 From: Thomas Gude <thgude@googlemail.com> To: "java@freebsd.org" <java@FreeBSD.org> Subject: Bug in openjdk8 8.192.26_1 ? Message-ID: <7B0150C2-2E2D-46C1-9C8E-C1D5D50BD60E@googlemail.com>
next in thread | raw e-mail | index | archive | help
--Apple-Mail=_9874CA48-989F-4B1A-912E-E11BEDB8981E Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Hi all, while researching a malfunction in the OpenHAB Astro binding, I think I = found a bug in the Math.asin() implementation of openjdk8-8.192.26_1. = Please have a look at the provided test programme (CheckMathIssue.java) = and the results provided in the other attached file (comparison.log). It = lists the output of four different java implementations: FreeBSD 11.2 openjdk8-8.192.26 FreeBSD 11.2 openjdk8-8.172.* MacOS 10.14 (Build 1.8.0_192-b12) Linux-OSMC 4.14 Java 8.191 The first one is obviously giving wrong values. Is this a bug or do you have any other idea why this may happen? Thank you and kind regards, Thomas Gude. --Apple-Mail=_9874CA48-989F-4B1A-912E-E11BEDB8981E Content-Disposition: attachment; filename=CheckMathIssue.java Content-Type: application/octet-stream; x-unix-mode=0644; name="CheckMathIssue.java" Content-Transfer-Encoding: 7bit public class CheckMathIssue { public static void main(String[] args) { System.out.println("Operating System: " + System.getProperty("os.name") + " " + System.getProperty("os.arch") + " " + System.getProperty("os.version")); System.out.println("Java: " + System.getProperty("java.version") + " " + System.getProperty("java.vendor")); System.out.println("Java Specification: " + System.getProperty("java.specification.name") + " " + System.getProperty("java.specification.vendor") + " " + System.getProperty("java.specification.version")); System.out.println("Java VM: " + System.getProperty("java.vm.version") + " " + System.getProperty("java.vm.vendor")); System.out.println("Java VM Specification: " + System.getProperty("java.vm.specification.name") + " " + System.getProperty("java.vm.specification.vendor") + " " + System.getProperty("java.vm.specification.version")); double value1 = Math.asin(0.5); double value2 = Math.asin(-0.38147821481517075); double value3 = StrictMath.asin(0.5); double value4 = StrictMath.asin(-0.38147821481517075); System.out.println("asin(0.5)= " + value1); System.out.println("asin(-0.38147821481517075)= " + value2); System.out.println("StrictMath asin(0.5)= " + value3); System.out.println("StrictMath asin(-0.38147821481517075)= " + value4); } } --Apple-Mail=_9874CA48-989F-4B1A-912E-E11BEDB8981E Content-Disposition: attachment; filename=comparison.log Content-Type: application/octet-stream; x-unix-mode=0644; name="comparison.log" Content-Transfer-Encoding: 7bit Operating System: FreeBSD amd64 11.2-STABLE Java: 1.8.0_192 Oracle Corporation Java Specification: Java Platform API Specification Oracle Corporation 1.8 Java VM: 25.192-b26 Oracle Corporation Java VM Specification: Java Virtual Machine Specification Oracle Corporation 1.8 asin(0.5)= 0.5 asin(-0.38147821481517075)= -0.38147821481517075 StrictMath asin(0.5)= 0.5 StrictMath asin(-0.38147821481517075)= -0.38147821481517075 Operating System: FreeBSD amd64 11.2-STABLE Java: 1.8.0_172 Oracle Corporation Java Specification: Java Platform API Specification Oracle Corporation 1.8 Java VM: 25.172-b11 Oracle Corporation Java VM Specification: Java Virtual Machine Specification Oracle Corporation 1.8 asin(0.5)= 0.5235987755982989 asin(-0.38147821481517075)= -0.391394915510742 StrictMath asin(0.5)= 0.5235987755982989 StrictMath asin(-0.38147821481517075)= -0.391394915510742 Operating System: Mac OS X x86_64 10.14.2 Java: 1.8.0_192 Oracle Corporation Java Specification: Java Platform API Specification Oracle Corporation 1.8 Java VM: 25.192-b12 Oracle Corporation Java VM Specification: Java Virtual Machine Specification Oracle Corporation 1.8 asin(0.5)= 0.5235987755982989 asin(-0.38147821481517075)= -0.391394915510742 StrictMath asin(0.5)= 0.5235987755982989 StrictMath asin(-0.38147821481517075)= -0.391394915510742 Operating System: Linux arm 4.14.78-2-osmc Java: 1.8.0_191 Oracle Corporation Java Specification: Java Platform API Specification Oracle Corporation 1.8 Java VM: 25.191-b12 Oracle Corporation Java VM Specification: Java Virtual Machine Specification Oracle Corporation 1.8 asin(0.5)= 0.5235987755982989 asin(-0.38147821481517075)= -0.391394915510742 StrictMath asin(0.5)= 0.5235987755982989 StrictMath asin(-0.38147821481517075)= -0.391394915510742 --Apple-Mail=_9874CA48-989F-4B1A-912E-E11BEDB8981E--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7B0150C2-2E2D-46C1-9C8E-C1D5D50BD60E>