Replacement for @raoulb pr#914

See #914

ToDo:
- [x] tests
- [x] final rebase
There are such rules for all other functions.
Usually there are some conditions restricting the general equality.
For `asin` it is x not `+-1`, `+-oo` I think.
How should we handle such stuff? Ignore for the moment?