From 98f813a8e4005e97d523e76496d9e5bc7771eac5 Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Fri, 4 Sep 2015 15:44:16 +0200 Subject: Small bugfix --- main.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 2cf77af..7fd05ad 100644 --- a/main.go +++ b/main.go @@ -17,12 +17,13 @@ import ( ) func seed(N *big.Int) (<-chan *big.Int, <-chan *big.Int) { - // we start with sqrt(N) + // begin with floor(sqrt(N)) p := mathutil.SqrtBig(N) p.SetBit(p, 0, 1) // ensure it's odd + // corelated value floor(N/q) q := new(big.Int).Div(N, p) - q.SetBit(p, 0, 1) // ensure it's odd + q.SetBit(q, 0, 1) // ensure it's odd nxt := make(chan *big.Int) go func(c chan *big.Int, n *big.Int) { -- cgit v1.2.3