Generic api

The generic api we are currently discussing on the ml.
- ported all numeric api functions to the generic api
- tested generic functions with generative testing against the numerical api

Please create a generic branch and merge it in there if you don't think it is ready for develop jet