Fix incorrect tests, add tests for e-20 in %g.
Fix bugs in %g.