Yes I modelled it according to the `tan` function.  This is primarily because the taylor term consists of `E(n)`(Euler Number) and I couldn't exactly find a simple closed form relating `E(n)` to `E(n-1)`.
>Ok. If so, then we should add cacheit decorator.

Yes, I missed that part. Added in the next commit.
Also I added spaces after `#`. 
`/bin/doctest/` didn't raise any issue so I got away with it.