Use math functions from libnstd
WIP