[ 1 0 >base ] must-fail
[ 1 -1 >base ] must-fail
[ 2+1/2 -1 >base ] [ invalid-radix? ] must-fail-with
-[ 123.456 8 >base ] [ invalid-base? ] must-fail-with
-[ 123.456 2 >base ] [ invalid-base? ] must-fail-with
+[ 123.456 8 >base ] [ invalid-radix? ] must-fail-with
+[ 123.456 2 >base ] [ invalid-radix? ] must-fail-with
[ "0/0." ] [ 0.0 0.0 / number>string ] unit-test
ERROR: invalid-radix radix ;
-ERROR: invalid-base n base ;
-
<PRIVATE
-TUPLE: number-parse
+TUPLE: number-parse
{ str read-only }
{ length fixnum read-only }
{ radix fixnum read-only } ;
dup [ 0 = ] find drop head >string
fix-float ;
-: float>base ( n base -- str )
+: float>base ( n radix -- str )
{
{ 16 [ float>hex ] }
{ 10 [ "%.16g" format-float ] }
- [ invalid-base ]
+ [ invalid-radix ]
} case ; inline
PRIVATE>