]> gitweb.factorcode.org Git - factor.git/commitdiff
add unit test that doubles stored in single-precision float arrays round to nearest
authorJoe Groff <arcata@gmail.com>
Sat, 17 Oct 2009 05:07:08 +0000 (00:07 -0500)
committerJoe Groff <arcata@gmail.com>
Sat, 17 Oct 2009 05:07:08 +0000 (00:07 -0500)
basis/specialized-arrays/specialized-arrays-tests.factor

index 07a457db5c646d5873e2f20ac97102104055dfaa..1ee877608537ae50118019add491c4767d70d116 100755 (executable)
@@ -36,6 +36,9 @@ SPECIALIZED-ARRAYS: bool ushort char uint float ulonglong ;
     int-array{ 3 1 3 3 7 } malloc-byte-array 5 <direct-int-array> >array
 ] unit-test
 
+[ float-array{ HEX: 1.222,222   HEX: 1.111,112   } ]
+[ float-array{ HEX: 1.222,222,2 HEX: 1.111,111,1 } ] unit-test
+
 [ f ] [ float-array{ 4 3 2 1 } dup clone [ underlying>> ] bi@ eq? ] unit-test
 
 [ f ] [ [ float-array{ 4 3 2 1 } dup clone [ underlying>> ] bi@ eq? ] compile-call ] unit-test