Re: [go-nuts] Find n-th root of a big number

2020-09-22 Thread roger peppe
Relevant issue: https://golang.org/issue/14102 On Tue, 22 Sep 2020 at 08:54, Nasir Hussain wrote: > The Amazing Rob Pike :D > > On Tue, Sep 22, 2020 at 12:13 PM Rob Pike wrote: > >> I'm not going to debug you program for you - you'll learn more doing it >> yourself, but I glanced at it and saw

Re: [go-nuts] Find n-th root of a big number

2020-09-22 Thread Nasir Hussain
The Amazing Rob Pike :D On Tue, Sep 22, 2020 at 12:13 PM Rob Pike wrote: > I'm not going to debug you program for you - you'll learn more doing it > yourself, but I glanced at it and saw immediately that you're missing an > easy optimization. Raising a number to an integer power can be done much

Re: [go-nuts] Find n-th root of a big number

2020-09-22 Thread Rob Pike
I'm not going to debug you program for you - you'll learn more doing it yourself, but I glanced at it and saw immediately that you're missing an easy optimization. Raising a number to an integer power can be done much faster by repeated squaring according to the bit pattern of the exponent. I'll le