]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/alien/c-types/c-types.factor
Merge branch 'master' into simd-cleanup
[factor.git] / basis / alien / c-types / c-types.factor
index 1245aedc324f734b12eed52220e2058d57e3f81a..3ed0a78f14916764f27f5ebe6cb258ac613a3e06 100644 (file)
@@ -550,4 +550,6 @@ M: double-2-rep rep-component-type drop double ;
         { [ dup { uchar ushort uint ulong ulonglong } member-eq? ] [ unsigned-interval ] }
     } cond ; foldable
 
-: c-type-clamp ( value c-type -- value' ) c-type-interval clamp ; inline
+: c-type-clamp ( value c-type -- value' )
+    dup { float double } member-eq?
+    [ drop ] [ c-type-interval clamp ] if ; inline