GMX_EXPECT_SIMD_FUNC_NEAR(std::exp2, exp2, settings);
// Subnormal range, require matching, but DTZ is fine
- settings = { Range(lowestRealThatProducesDenormal, lowestRealThatProducesNormal), ulpTol_,
- absTol_, MatchRule::Dtz };
+ settings = { Range(lowestRealThatProducesDenormal, lowestRealThatProducesNormal),
+ ulpTol_,
+ absTol_,
+ MatchRule::Dtz };
GMX_EXPECT_SIMD_FUNC_NEAR(std::exp2, exp2, settings);
// Normal range, standard result expected
- settings = { Range(lowestRealThatProducesNormal, highestRealThatProducesNormal), ulpTol_,
- absTol_, MatchRule::Normal };
+ settings = { Range(lowestRealThatProducesNormal, highestRealThatProducesNormal),
+ ulpTol_,
+ absTol_,
+ MatchRule::Normal };
GMX_EXPECT_SIMD_FUNC_NEAR(std::exp2, exp2, settings);
}
- 1; // adding the significant corresponds to one more unit in exponent
CompareSettings settings{ Range(lowestRealThatProducesNormal, highestRealThatProducesNormal),
- ulpTol_, absTol_, MatchRule::Normal };
+ ulpTol_,
+ absTol_,
+ MatchRule::Normal };
GMX_EXPECT_SIMD_FUNC_NEAR(std::exp2, exp2<MathOptimization::Unsafe>, settings);
}
GMX_EXPECT_SIMD_FUNC_NEAR(std::exp, exp, settings);
// Subnormal range, require matching, but DTZ is fine
- settings = { Range(lowestRealThatProducesDenormal, lowestRealThatProducesNormal), ulpTol_,
- absTol_, MatchRule::Dtz };
+ settings = { Range(lowestRealThatProducesDenormal, lowestRealThatProducesNormal),
+ ulpTol_,
+ absTol_,
+ MatchRule::Dtz };
GMX_EXPECT_SIMD_FUNC_NEAR(std::exp, exp, settings);
// Normal range, standard result expected
- settings = { Range(lowestRealThatProducesNormal, highestRealThatProducesNormal), ulpTol_,
- absTol_, MatchRule::Normal };
+ settings = { Range(lowestRealThatProducesNormal, highestRealThatProducesNormal),
+ ulpTol_,
+ absTol_,
+ MatchRule::Normal };
GMX_EXPECT_SIMD_FUNC_NEAR(std::exp, exp, settings);
}
(std::numeric_limits<real>::max_exponent - 1) * std::log(2.0);
CompareSettings settings{ Range(lowestRealThatProducesNormal, highestRealThatProducesNormal),
- ulpTol_, absTol_, MatchRule::Normal };
+ ulpTol_,
+ absTol_,
+ MatchRule::Normal };
GMX_EXPECT_SIMD_FUNC_NEAR(std::exp, exp<MathOptimization::Unsafe>, settings);
}
TEST_F(SimdMathTest, erfc)
{
// Our erfc algorithm has 4 ulp accuracy, so relax tolerance a bit to 4*ulpTol
- CompareSettings settings{ Range(-9, 9), 4 * ulpTol_, std::numeric_limits<real>::min(),
- MatchRule::Normal };
+ CompareSettings settings{ Range(-9, 9), 4 * ulpTol_, std::numeric_limits<real>::min(), MatchRule::Normal };
GMX_EXPECT_SIMD_FUNC_NEAR(refErfc, erfc, settings);
}
GMX_EXPECT_SIMD_FUNC_NEAR(std::exp2, exp2SingleAccuracy, settings);
// Subnormal range, require matching, but DTZ is fine
- settings = { Range(lowestRealThatProducesDenormal, lowestRealThatProducesNormal), ulpTol_,
- absTol_, MatchRule::Dtz };
+ settings = { Range(lowestRealThatProducesDenormal, lowestRealThatProducesNormal),
+ ulpTol_,
+ absTol_,
+ MatchRule::Dtz };
GMX_EXPECT_SIMD_FUNC_NEAR(std::exp2, exp2SingleAccuracy, settings);
// Normal range, standard result expected
- settings = { Range(lowestRealThatProducesNormal, highestRealThatProducesNormal), ulpTol_,
- absTol_, MatchRule::Normal };
+ settings = { Range(lowestRealThatProducesNormal, highestRealThatProducesNormal),
+ ulpTol_,
+ absTol_,
+ MatchRule::Normal };
GMX_EXPECT_SIMD_FUNC_NEAR(std::exp2, exp2SingleAccuracy, settings);
}
setUlpTolSingleAccuracy(ulpTol_);
CompareSettings settings{ Range(lowestRealThatProducesNormal, highestRealThatProducesNormal),
- ulpTol_, absTol_, MatchRule::Normal };
+ ulpTol_,
+ absTol_,
+ MatchRule::Normal };
GMX_EXPECT_SIMD_FUNC_NEAR(std::exp2, exp2SingleAccuracy<MathOptimization::Unsafe>, settings);
}
GMX_EXPECT_SIMD_FUNC_NEAR(std::exp, expSingleAccuracy, settings);
// Subnormal range, require matching, but DTZ is fine
- settings = { Range(lowestRealThatProducesDenormal, lowestRealThatProducesNormal), ulpTol_,
- absTol_, MatchRule::Dtz };
+ settings = { Range(lowestRealThatProducesDenormal, lowestRealThatProducesNormal),
+ ulpTol_,
+ absTol_,
+ MatchRule::Dtz };
GMX_EXPECT_SIMD_FUNC_NEAR(std::exp, expSingleAccuracy, settings);
// Normal range, standard result expected
- settings = { Range(lowestRealThatProducesNormal, highestRealThatProducesNormal), ulpTol_,
- absTol_, MatchRule::Normal };
+ settings = { Range(lowestRealThatProducesNormal, highestRealThatProducesNormal),
+ ulpTol_,
+ absTol_,
+ MatchRule::Normal };
GMX_EXPECT_SIMD_FUNC_NEAR(std::exp, expSingleAccuracy, settings);
}
setUlpTolSingleAccuracy(ulpTol_);
CompareSettings settings{ Range(lowestRealThatProducesNormal, highestRealThatProducesNormal),
- ulpTol_, absTol_, MatchRule::Normal };
+ ulpTol_,
+ absTol_,
+ MatchRule::Normal };
GMX_EXPECT_SIMD_FUNC_NEAR(std::exp, expSingleAccuracy<MathOptimization::Unsafe>, settings);
}