add tests/core/math.xtm

all tests pass at the moment