Skip to content

Commit

Permalink
fabs->fabsf (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeoliphant authored Apr 2, 2023
1 parent 73e7c69 commit adc6f68
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions NAM/dsp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,14 +205,14 @@ void sigmoid_(Eigen::MatrixXf &x, const long i_start, const long i_end,
}

inline float fast_tanh_(const float x) {
const float ax = fabs(x);
const float ax = fabsf(x);
const float x2 = x * x;

return (x *
(2.45550750702956f + 2.45550750702956f * ax +
(0.893229853513558f + 0.821226666969744f * ax) * x2) /
(2.44506634652299f +
(2.44506634652299f + x2) * fabs(x + 0.814642734961073f * x * ax)));
(2.44506634652299f + x2) * fabsf(x + 0.814642734961073f * x * ax)));
}

inline float hard_tanh_(const float x) {
Expand Down

0 comments on commit adc6f68

Please sign in to comment.