Current Version

Parse Float Comparison

Test Values

Results

Function Output toString()
Results will go here

Explanation

A discussion in a comp.lang.javascript thread is attempting to find a reasonable way to convert non-integer strings to numbers using bases other than 10. The functions listed below are the major ones discussed so far. Enter a string representing a number and the base to parse it in and submit the form. The output from each of these algorithms is displayed in the results table. Note that it is converted back into the original format using value.toString(base).

This does not attempt to compare performance, and by inspection it's clear that there are likely to be significant differences in performance.

Examples

Functions