|
Boost : |
Subject: Re: [boost] [xint] Fourth release, requesting preliminary review again
From: DE (satan66613_at_[hidden])
Date: 2010-06-10 15:49:05
on 10.06.2010 at 23:04
Chad Nelson wrote :
>> yes you are right
>> i can see the rationale behind this now
>> i guess the cost of allocation compared to cost of operations is
>> negligible so in fact stack version will not gain much
>> and it seems to me that i recalled the discussion about it
> If you're doing anything more than simple addition and subtraction, it
> probably will be.
forgive me for repeating myself but yes, you did everything right
i recalled that one ought to first measure and only then optimize
(first shoot then ask questions...)
>> but as i understood from the docs fixed_integer does not exercise
>> modular arithmetic like built-in types do
> The library's fixed-size integers act like unsigned ints, as far as
> modular arithmetic goes. Except, of course, that they're signed as well.
> That's why I took pains to describe their behavior thoroughly, it's not
> entirely obvious from knowledge of the built-in types.
it's rather unusual for me
so if i want to go unsigned bigint i just ignore the sign of fixed
integers (in other words they're all positive)
am i right?
one small issue i can think about is 'a - b' where a<b
according to mod. arith. 'a - b' is equivalent to '(mod + a - b)%mod'
is that case preserved by fixed_integer?
i misunderstood the docs and probably poorly expressed my thought
sorry
-- Pavel P.S. if you notice a grammar mistake or weird phrasing in my message please point it out
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk