mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8283143: Use minimal-length literals to initialize PI and E constants
Reviewed-by: smarks
This commit is contained in:
parent
f43ffe211f
commit
671b6efd61
2 changed files with 5 additions and 5 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1994, 2021, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1994, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -131,14 +131,14 @@ public final class Math {
|
||||||
* The {@code double} value that is closer than any other to
|
* The {@code double} value that is closer than any other to
|
||||||
* <i>e</i>, the base of the natural logarithms.
|
* <i>e</i>, the base of the natural logarithms.
|
||||||
*/
|
*/
|
||||||
public static final double E = 2.7182818284590452354;
|
public static final double E = 2.718281828459045;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The {@code double} value that is closer than any other to
|
* The {@code double} value that is closer than any other to
|
||||||
* <i>pi</i>, the ratio of the circumference of a circle to its
|
* <i>pi</i>, the ratio of the circumference of a circle to its
|
||||||
* diameter.
|
* diameter.
|
||||||
*/
|
*/
|
||||||
public static final double PI = 3.14159265358979323846;
|
public static final double PI = 3.141592653589793;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constant by which to multiply an angular value in degrees to obtain an
|
* Constant by which to multiply an angular value in degrees to obtain an
|
||||||
|
|
|
@ -92,14 +92,14 @@ public final class StrictMath {
|
||||||
* The {@code double} value that is closer than any other to
|
* The {@code double} value that is closer than any other to
|
||||||
* <i>e</i>, the base of the natural logarithms.
|
* <i>e</i>, the base of the natural logarithms.
|
||||||
*/
|
*/
|
||||||
public static final double E = 2.7182818284590452354;
|
public static final double E = 2.718281828459045;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The {@code double} value that is closer than any other to
|
* The {@code double} value that is closer than any other to
|
||||||
* <i>pi</i>, the ratio of the circumference of a circle to its
|
* <i>pi</i>, the ratio of the circumference of a circle to its
|
||||||
* diameter.
|
* diameter.
|
||||||
*/
|
*/
|
||||||
public static final double PI = 3.14159265358979323846;
|
public static final double PI = 3.141592653589793;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the trigonometric sine of an angle. Special cases:
|
* Returns the trigonometric sine of an angle. Special cases:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue