Fix overflow bug in scientificToNumber