From b624f814439cfa2a9994ce44b0569cabd86beca1 Mon Sep 17 00:00:00 2001 From: Jared Hance Date: Thu, 5 Jun 2014 10:51:20 -0400 Subject: [PATCH 1/2] Fix serious bug with div:fl. --- arvo/hoon.hoon | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arvo/hoon.hoon b/arvo/hoon.hoon index 34c2ecfa9..24527d67c 100644 --- a/arvo/hoon.hoon +++ b/arvo/hoon.hoon @@ -1321,7 +1321,7 @@ ++ div |= [p=@u n=[s=? e=@s a=@u] m=[s=? e=@s a=@u]] ^- [s=? e=@ a=@] =+ b=(rnd p (^div (lsh 0 (^mul p 2) a.n) a.m)) - ?: (^gte e.n e.m) + ?: (^gte a.n a.m) [s=|(s.n s.m) e=(dif:si e.n e.m) a=b] [s=|(s.n s.m) e=(dif:si (dif:si e.n e.m) (sun:si 1)) a=b] From 8a15ab76853924e27091a17fdf9575b2d74265af Mon Sep 17 00:00:00 2001 From: Jared Hance Date: Thu, 5 Jun 2014 12:50:07 -0400 Subject: [PATCH 2/2] Fix bug in mul:fl. --- arvo/hoon.hoon | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arvo/hoon.hoon b/arvo/hoon.hoon index 24527d67c..3f6b5aa36 100644 --- a/arvo/hoon.hoon +++ b/arvo/hoon.hoon @@ -1317,7 +1317,7 @@ :: =+ a4=(rnd p (rsh 0 e2 a3)) =+ a4=(rnd p (rsh 0 e2 a2)) =+ s2=|(s.n s.m) - [s=s2 e=:(sum:si e.n e.m e2) a=a4] + [s=s2 e=:(sum:si e.n e.m (sun:si e2)) a=a4] ++ div |= [p=@u n=[s=? e=@s a=@u] m=[s=? e=@s a=@u]] ^- [s=? e=@ a=@] =+ b=(rnd p (^div (lsh 0 (^mul p 2) a.n) a.m))