Boost logo

Boost :

From: Joel Eidsath (jeidsath_at_[hidden])
Date: 2005-09-03 16:00:23


>
>Maths my field too (I thought you might figure that out of the expression
>'Z[sqrt(2)])(log(2))' ) but now I do not understand your original point (9)
>
>
Sorry about that. It looks like I got some words got cut out from my
original post at 9). Basically it's a choice between:

//first implementation of "set_precision"
rational a,b;
a.set_precision(50); //a's precision now set at 50
b.set_precision(150) //b's precision now set at 150, a's precision
still at 50
//Do some math
cout << (a + b) << endl << (b + a) //issues with the return values of
the expressions here

//second implementation
rational a,b;
set_precision(25) //a's and b's precision now at 25

I much prefer doing things the second way, but I wanted to get some
comments. Thread safety will be an issue the second way.

>Anyway I can say I agree with you on almost everything. Do you want to move
>forward with this idea?
>
>
I'd like to.

I discovered N1692 and N1794 while looking through the C++0x proceedings
yesterday. Here is the second:
http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2005/n1781.pdf

It is a proposal for an arbitrary integer library. It doesn't really
say anything about implementation, but I think that I'll follow its
guidelines -- whether it is adopted or not (has it been already? -- I
don't know the comittee process), it's a good interface. Once that is
finished, I'll get started on the rationals side of things.

Joel Eidsath


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk