-
-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
organizing constants and complex in math library
- Loading branch information
1 parent
5e2d8ae
commit 2c45f4b
Showing
21 changed files
with
109 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...e/universal/math/complex_manipulators.hpp → ...e/universal/math/complex/manipulators.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#pragma once | ||
// double_constants.hpp: definition of math constants in double precision | ||
// | ||
// Copyright (C) 2017 Stillwater Supercomputing, Inc. | ||
// SPDX-License-Identifier: MIT | ||
// | ||
// This file is part of the universal numbers project, which is released under an MIT Open Source license. | ||
|
||
namespace sw { namespace universal { | ||
|
||
// best practice for C++11 | ||
// inject mathematical constants in our namespace | ||
|
||
// double values | ||
constexpr double d_pi_4 = 0.785398163397448309616; // pi/4 | ||
constexpr double d_pi_3 = 1.04719755119659774615; // pi/3 | ||
constexpr double d_pi_2 = 1.57079632679489661923; // pi/2 | ||
constexpr double d_pi = 3.14159265358979323846; // pi | ||
constexpr double d_3pi_4 = 4.71238898038468985769; // 3*pi/4 | ||
constexpr double d_2pi = 6.28318530717958647693; // 2*pi | ||
|
||
constexpr double d_1_pi = 0.318309886183790671538; // 1/pi | ||
constexpr double d_2_pi = 0.636619772367581343076; // 2/pi | ||
constexpr double d_2_sqrtpi = 1.12837916709551257390; // 2/sqrt(pi) | ||
constexpr double d_sqrt2 = 1.41421356237309504880; // sqrt(2) | ||
constexpr double d_sqrt1_2 = 0.707106781186547524401; // 1/sqrt(2) | ||
constexpr double d_e = 2.71828182845904523536; // e | ||
constexpr double d_log2e = 1.44269504088896340736; // log2(e) | ||
constexpr double d_log10e = 0.434294481903251827651; // log10(e) | ||
constexpr double d_ln2 = 0.693147180559945309417; // ln(2) | ||
constexpr double d_ln10 = 2.30258509299404568402; // ln(10) | ||
|
||
}} // namespace sw::universal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#pragma once | ||
// longdouble_constants.hpp: definition of math constants in long double precision | ||
// | ||
// Copyright (C) 2017 Stillwater Supercomputing, Inc. | ||
// SPDX-License-Identifier: MIT | ||
// | ||
// This file is part of the universal numbers project, which is released under an MIT Open Source license. | ||
|
||
namespace sw { namespace universal { | ||
|
||
// best practice for C++11 | ||
// inject mathematical constants in our namespace | ||
|
||
// long double values | ||
constexpr long double ld_pi_4 = 0.78539816339744830961566084581988l; // pi/4 | ||
constexpr long double ld_pi_3 = 1.0471975511965977461542144610932l; // pi/3 | ||
constexpr long double ld_pi_2 = 1.5707963267948966192313216916398l; // pi/2 | ||
constexpr long double ld_pi = 3.1415926535897932384626433832795l; // pi | ||
constexpr long double ld_3pi_4 = 4.7123889803846898576939650749193l; // 3*pi/4 | ||
constexpr long double ld_2pi = 6.283185307179586476925286766559l; // 2*pi | ||
|
||
}} // namespace sw::universal |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.