I saw this issue on stackoverflow:
http://stackoverflow.com/questions/42838708/why-math-simplify1e-10-tostring-of-math-js-returns-0
When you simplify a very small constant, zero is returned instead.
I haven't looked deeply into it but I think the issue is caused by this piece of code which turns a number into a fraction:
https://github.com/josdejong/mathjs/blob/master/lib/function/algebra/simplify/simplifyConstant.js#L49-L54
'number': function(s) {
if (digits(s) <= 15) {
return math.fraction(s);
}
return s;
},
Apparently Fraction.js rounds such a small value to zero:
math.fraction(1e-10) // Fraction {d: 1, n: 0, s: 1}