mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2025-07-12 14:54:10 +00:00
fix erf, erfc
fix for special values: trigonometric functions
This commit is contained in:
parent
5f40808f75
commit
a27c83e939
12 changed files with 313 additions and 87 deletions
|
@ -10,7 +10,7 @@
|
|||
#include <sprout/math/factorial.hpp>
|
||||
#include <sprout/math/log.hpp>
|
||||
#include <sprout/math/sin.hpp>
|
||||
#include <sprout/math/abs.hpp>
|
||||
#include <sprout/math/fabs.hpp>
|
||||
#include <sprout/math/itrunc.hpp>
|
||||
#include <sprout/type_traits/enabler_if.hpp>
|
||||
|
||||
|
@ -20,7 +20,7 @@ namespace sprout {
|
|||
template<typename T>
|
||||
inline SPROUT_CONSTEXPR T
|
||||
lgamma_impl_3(T x, T y) {
|
||||
return x < 0 ? sprout::log(sprout::math::pi<T>() / sprout::abs(x * sprout::sin(x * sprout::math::pi<T>()))) - y
|
||||
return x < 0 ? sprout::log(sprout::math::pi<T>() / sprout::math::fabs(x * sprout::math::sin(x * sprout::math::pi<T>()))) - y
|
||||
: y
|
||||
;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue