fix erf, erfc

fix for special values: trigonometric functions
This commit is contained in:
bolero-MURAKAMI 2013-04-23 23:07:20 +09:00
parent 5f40808f75
commit a27c83e939
12 changed files with 313 additions and 87 deletions

View file

@ -19,8 +19,8 @@ namespace sprout {
>
inline SPROUT_CONSTEXPR FloatType
hypot(FloatType x, FloatType y) {
return y == 0 ? sprout::fabs(x)
: x == 0 ? sprout::fabs(y)
return y == 0 ? sprout::math::fabs(x)
: x == 0 ? sprout::math::fabs(y)
: y == std::numeric_limits<FloatType>::infinity() || y == -std::numeric_limits<FloatType>::infinity()
? std::numeric_limits<FloatType>::infinity()
: x == std::numeric_limits<FloatType>::infinity() || x == -std::numeric_limits<FloatType>::infinity()