blob: 5578739ebb1778399c1ba83bb961abe77ef8ea3a [file] [log] [blame]
James Kuszmaulcf324122023-01-14 14:07:17 -08001From 907608f09061ab272b0a127330b1b24e28d50a9f Mon Sep 17 00:00:00 2001
2From: PJ Reiniger <pj.reiniger@gmail.com>
3Date: Thu, 5 May 2022 18:09:45 -0400
4Subject: [PATCH 15/28] Delete numbers from MathExtras
5
6---
7 llvm/include/llvm/Support/MathExtras.h | 36 --------------------------
8 1 file changed, 36 deletions(-)
9
10diff --git a/llvm/include/llvm/Support/MathExtras.h b/llvm/include/llvm/Support/MathExtras.h
11index fac12dd0e..e8f1f2aca 100644
12--- a/llvm/include/llvm/Support/MathExtras.h
13+++ b/llvm/include/llvm/Support/MathExtras.h
14@@ -50,42 +50,6 @@ enum ZeroBehavior {
15 ZB_Width
16 };
17
18-/// Mathematical constants.
19-namespace numbers {
20-// TODO: Track C++20 std::numbers.
21-// TODO: Favor using the hexadecimal FP constants (requires C++17).
22-constexpr double e = 2.7182818284590452354, // (0x1.5bf0a8b145749P+1) https://oeis.org/A001113
23- egamma = .57721566490153286061, // (0x1.2788cfc6fb619P-1) https://oeis.org/A001620
24- ln2 = .69314718055994530942, // (0x1.62e42fefa39efP-1) https://oeis.org/A002162
25- ln10 = 2.3025850929940456840, // (0x1.24bb1bbb55516P+1) https://oeis.org/A002392
26- log2e = 1.4426950408889634074, // (0x1.71547652b82feP+0)
27- log10e = .43429448190325182765, // (0x1.bcb7b1526e50eP-2)
28- pi = 3.1415926535897932385, // (0x1.921fb54442d18P+1) https://oeis.org/A000796
29- inv_pi = .31830988618379067154, // (0x1.45f306bc9c883P-2) https://oeis.org/A049541
30- sqrtpi = 1.7724538509055160273, // (0x1.c5bf891b4ef6bP+0) https://oeis.org/A002161
31- inv_sqrtpi = .56418958354775628695, // (0x1.20dd750429b6dP-1) https://oeis.org/A087197
32- sqrt2 = 1.4142135623730950488, // (0x1.6a09e667f3bcdP+0) https://oeis.org/A00219
33- inv_sqrt2 = .70710678118654752440, // (0x1.6a09e667f3bcdP-1)
34- sqrt3 = 1.7320508075688772935, // (0x1.bb67ae8584caaP+0) https://oeis.org/A002194
35- inv_sqrt3 = .57735026918962576451, // (0x1.279a74590331cP-1)
36- phi = 1.6180339887498948482; // (0x1.9e3779b97f4a8P+0) https://oeis.org/A001622
37-constexpr float ef = 2.71828183F, // (0x1.5bf0a8P+1) https://oeis.org/A001113
38- egammaf = .577215665F, // (0x1.2788d0P-1) https://oeis.org/A001620
39- ln2f = .693147181F, // (0x1.62e430P-1) https://oeis.org/A002162
40- ln10f = 2.30258509F, // (0x1.26bb1cP+1) https://oeis.org/A002392
41- log2ef = 1.44269504F, // (0x1.715476P+0)
42- log10ef = .434294482F, // (0x1.bcb7b2P-2)
43- pif = 3.14159265F, // (0x1.921fb6P+1) https://oeis.org/A000796
44- inv_pif = .318309886F, // (0x1.45f306P-2) https://oeis.org/A049541
45- sqrtpif = 1.77245385F, // (0x1.c5bf8aP+0) https://oeis.org/A002161
46- inv_sqrtpif = .564189584F, // (0x1.20dd76P-1) https://oeis.org/A087197
47- sqrt2f = 1.41421356F, // (0x1.6a09e6P+0) https://oeis.org/A002193
48- inv_sqrt2f = .707106781F, // (0x1.6a09e6P-1)
49- sqrt3f = 1.73205081F, // (0x1.bb67aeP+0) https://oeis.org/A002194
50- inv_sqrt3f = .577350269F, // (0x1.279a74P-1)
51- phif = 1.61803399F; // (0x1.9e377aP+0) https://oeis.org/A001622
52-} // namespace numbers
53-
54 namespace detail {
55 template <typename T, std::size_t SizeOfT> struct TrailingZerosCounter {
56 static unsigned count(T Val, ZeroBehavior) {