View Single Post
Old 01-16-2019, 10:01 PM   #27
SaulT
Human being with feelings
 
Join Date: Oct 2013
Location: Seattle, WA
Posts: 876
Default

Well, I looked into it and it ended up being more of a hassle than I remembered, with an abs() and sign() call and blah. I did find this one, though, I hadn't remembered it.

out = (a*x)/sqrt(a + x*x);

It's pretty close to tanh(x) when a = 1 but of course feel free to experiment...
SaulT is offline   Reply With Quote