Improve scientific notation display in calc.

Add unit tests.