Re: [PD] tanh~ (core dumped)

2017-09-01 Thread Claude Heiland-Allen
On 01/09/17 06:42, Claude Heiland-Allen wrote: > On 15/08/17 23:46, Matt Davey wrote to : >> I've always used: >> >> tanh(x) ~= x*(27+x*x) / (27+9*x*x) >> >> works well and is pretty CPU cheap > > Nice. I also see it's smooth if you clip the input to -3..3:

Re: [PD] tanh~ (core dumped)

2017-08-31 Thread Claude Heiland-Allen
On 15/08/17 23:46, Matt Davey wrote to : > I've always used: > > tanh(x) ~= x*(27+x*x) / (27+9*x*x) > > works well and is pretty CPU cheap Nice. That seems accurate to about 5 or 6 bits in my tests (over the range -4 to 4). A slightly more accurate (about 7 or 8 bits)

Re: [PD] tanh~ (core dumped)

2017-08-15 Thread Matt Davey
I've always used: tanh(x) ~= x*(27+x*x) / (27+9*x*x) works well and is pretty CPU cheap ___ Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list

Re: [PD] tanh~ (core dumped)

2017-08-15 Thread Dario Sanfilippo
Hi, Kosmas. I'm using (1 - e^-2x)/(1 + e^-2x) and it seems to work fine though you wouldn't have the parameters you mentioned. Cheers, D On 15 August 2017 at 13:41, Kosmas Giannoutakis < giannoutakiskos...@hotmail.com> wrote: > Hi, i want to implement the tanh function in PD Vanilla. I use the

Re: [PD] tanh~ (core dumped)

2017-08-15 Thread Alexandre Torres Porres
hi, epxr~ (which is vanilla) has a tanh function. I updated the expr help file to include all its functions for the 0.48-0 release, in case people missed it. so an easy vanilla tanh~ implementation can just be: [expr~ tanh($v1)] cheers 2017-08-15 17:41 GMT-03:00 Kosmas Giannoutakis <