Skip to content
Permalink
Browse files
8283143: Use minimal-length literals to initialize PI and E constants
Reviewed-by: smarks
  • Loading branch information
jddarcy committed Mar 15, 2022
1 parent f43ffe2 commit 671b6ef
Show file tree
Hide file tree
Showing 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.
*
* This code is free software; you can redistribute it and/or modify it
@@ -131,14 +131,14 @@ private Math() {}
* The {@code double} value that is closer than any other to
* <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
* <i>pi</i>, the ratio of the circumference of a circle to its
* 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
@@ -92,14 +92,14 @@ private StrictMath() {}
* The {@code double} value that is closer than any other to
* <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
* <i>pi</i>, the ratio of the circumference of a circle to its
* diameter.
*/
public static final double PI = 3.14159265358979323846;
public static final double PI = 3.141592653589793;

/**
* Returns the trigonometric sine of an angle. Special cases:

1 comment on commit 671b6ef

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.