Looks like spaces at the end count as the fractional part, which ruins the result:
toNumber("070.070", 8) -> 56.109375
toNumber("070.070 ", 8) -> 56.013671875
toNumber("070.070 ", 8) -> 56.001708984375
toNumber("0F0.0F0", 16) -> 240.05859375
toNumber("0F0.0F0 ", 16) -> 240.003662109375
toNumber("0F0.0F0 ", 16) -> 240.00022888183594