Skip to content
Snippets Groups Projects
Commit 1bcf028a authored by Jean-Marc Valin's avatar Jean-Marc Valin
Browse files

Using floor(.5+x) instead of lrint(x) for C90 compilers

parent 1b61303f
No related branches found
No related tags found
No related merge requests found
...@@ -74,7 +74,7 @@ static inline double tansig_approx(double x) ...@@ -74,7 +74,7 @@ static inline double tansig_approx(double x)
x=-x; x=-x;
sign=-1; sign=-1;
} }
i = lrint(25*x); i = floor(.5+25*x);
x -= .04*i; x -= .04*i;
y = tansig_table[i]; y = tansig_table[i];
dy = 1-y*y; dy = 1-y*y;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment