|
Boost : |
Subject: Re: [boost] [mp_int] new release
From: Kevin Sopp (baraclese_at_[hidden])
Date: 2008-10-10 07:44:52
> Sorry, you are right. I confused the two issues. I had to add:
> mp_int operator - () const; //unary negate.
You are right this function needs to be added. I implemented this as
free function now.
> operation. When I changed the %= to reflect that the value was the remainder
> it worked. Why is it that you add the rhs in the event that the sign of the
> remainder is not the same as the rhs term?
I don't know, it's what libtommath does so I just did the same ;-)
I've always wanted to change it, but somehow forgot about it. It will
now give the expected result.
> The pattern seems to be that subtracting maxLong from den nets a +2 gain on
> den.
> den values:
> 185745031
> 185745033
> 185745035
> 185745037
Okay I will look into it, btw there's a mp_int<>::print() function
which prints the internal representation to cout.
> P.S. Let me know if I can be of any more assistance.
Oh you're doing well, just keep on testing. I will upload a new
version with the bugfixes to the vault soon.
Thanks for your help,
Kevin
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk