Optimized taylorCos

This commit is contained in:
Christophe Riccio
2016-11-21 00:06:05 +01:00
parent 3945098589
commit 1a95482b50
2 changed files with 117 additions and 3 deletions

View File

@@ -9,9 +9,9 @@ namespace detail
{
return static_cast<T>(1)
- (x * x) * (1.f / 2.f)
+ (x * x * x * x) * (1.f / 24.f)
- (x * x * x * x * x * x) * (1.f / 720.f)
+ (x * x * x * x * x * x * x * x) (1.f / 40320.f);
+ ((x * x) * (x * x)) * (1.f / 24.f)
- (((x * x) * (x * x)) * (x * x)) * (1.f / 720.f)
+ (((x * x) * (x * x)) * ((x * x) * (x * x))) * (1.f / 40320.f);
}
template <typename T>