8301205: Port fdlibm log10 to Java

Reviewed-by: bpb
This commit is contained in:
Joe Darcy 2023-01-30 20:33:01 +00:00
parent b84f4c40fd
commit 63bb2ce8de
4 changed files with 222 additions and 15 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -281,7 +281,9 @@ public final class StrictMath {
* @return the base 10 logarithm of {@code a}.
* @since 1.5
*/
public static native double log10(double a);
public static double log10(double a) {
return FdLibm.Log10.compute(a);
}
/**
* Returns the correctly rounded positive square root of a