Merge branch 'master' of git://factorcode.org/git/factor

db4
John Benediktsson 2008-09-30 17:03:29 -07:00
commit 841342bb1a
2 changed files with 5 additions and 2 deletions

View File

@ -108,3 +108,6 @@ unit-test
[ -1.0/0.0 ] [ "-1/0." string>number ] unit-test
[ "-0.0" ] [ -0.0 number>string ] unit-test
[ "-3/4" ] [ -3/4 number>string ] unit-test
[ "-1-1/4" ] [ -5/4 number>string ] unit-test

View File

@ -105,7 +105,7 @@ GENERIC# >base 1 ( n radix -- str )
<PRIVATE
: (>base) ( n -- str ) radix get >base ;
: (>base) ( n -- str ) radix get positive>base ;
PRIVATE>
@ -123,7 +123,7 @@ M: integer >base
M: ratio >base
[
dup 0 < negative? set
1 /mod
abs 1 /mod
[ dup zero? [ drop "" ] [ (>base) sign append ] if ]
[
[ numerator (>base) ]