diff options
author | Damien Zammit <damien@zamaudio.com> | 2018-08-18 21:00:01 +1000 |
---|---|---|
committer | Damien Zammit <damien@zamaudio.com> | 2018-08-18 21:00:01 +1000 |
commit | 3d1beb1e43067475daad8a9fbd10a3f55c63d494 (patch) | |
tree | 1041e269021425286ccdc39617b8b80150fb20b4 | |
parent | 1aab0b117fe0288091490b264970b1b22c1a1b18 (diff) |
ZamTube: Fix long standing bug with exp() never using approximation
-rw-r--r-- | plugins/ZamTube/triode.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/ZamTube/triode.cpp b/plugins/ZamTube/triode.cpp index b40220f..e138f45 100644 --- a/plugins/ZamTube/triode.cpp +++ b/plugins/ZamTube/triode.cpp @@ -61,7 +61,7 @@ void Triode::compute(T Pbb, T Gbb, T Kbb) inline T _exp(const T x) { - if(x < 10.0 && x > 10.0) + if(x > -10.0 && x < 10.0) return 1.0 + x + x*x/2.0 + x*x*x/6.0 + x*x*x*x/24.0 + x*x*x*x*x/120.0 + x*x*x*x*x*x/720.0 + x*x*x*x*x*x*x/5040.0; else |