[PD] tanh approximation

Andy Farnell padawan12 at obiwannabe.co.uk
Tue Oct 7 14:06:09 CEST 2008


Hi all,

An approximation to tanh(x) is a continued fraction 

x/1+ (x^2)/3+ (4x^2)/5+ (16x^2)/9+ ...

See attached.

I got it working, but by trial and error needed to scale the
domain by 1/pi and add some weird scale to the range.
I'm confused about where these numbers come from. Can anyone
explain this please?

cheers,

Andy

-- 
Use the source
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tanh-cfrac.pd
Type: application/octet-stream
Size: 22580 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20081007/c41238cb/attachment.obj>


More information about the Pd-list mailing list