From 1cfcf39bda3a64f00b40a000f6938124519b6339 Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Mon, 25 Nov 2013 16:42:52 -0800 Subject: [PATCH] Revert "math.functions: make float sqrt a little faster." This reverts commit 7ae5e9c0c11bbc82ac7854bfa5964723e1cb42d9. --- basis/math/functions/functions.factor | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/basis/math/functions/functions.factor b/basis/math/functions/functions.factor index d31112bce2..3ba6bfd324 100644 --- a/basis/math/functions/functions.factor +++ b/basis/math/functions/functions.factor @@ -16,10 +16,9 @@ M: ratio >fraction [ numerator ] [ denominator ] bi ; inline GENERIC: sqrt ( x -- y ) foldable -M: real sqrt >float sqrt ; inline - -M: float sqrt - dup 0.0 < [ neg fsqrt [ 0.0 ] dip rect> ] [ fsqrt ] if ; inline +M: real sqrt + >float dup 0.0 < + [ neg fsqrt [ 0.0 ] dip rect> ] [ fsqrt ] if ; inline : factor-2s ( n -- r s ) #! factor an integer into 2^r * s