Replacement for @raoulb pr#914

See #914

ToDo:
- [x] tests
- [x] final rebase
Why do not all functions have this `inverse` function?
The one of `tan` has the same spell error.