The attached fixes the two functions to properly handle being passed undefined as per spec, and not to exception. toFixed is supposed to handle it as 0; while toExponential has special handling; that was implemented, but was prevented from running by a wrong range check. This is tested by KJS's Number.js
Created attachment 5323 [details] patch
Comment on attachment 5323 [details] patch r=me The second throwError message needs the verb "be" before this lands.
We need to land the Number.js test too with this patch -- can't land a patch without a test.
Maciej landed the entire KJS testsuite.
Landed.