Infinite precision integer

Currently I'm working for LWG on a spec for tr2 for an infinite precision integer, which is almost finished. When it is finished I will put it here for you all to read and comment. Also I have a C++ implementation that will be submitted to boost some time. It will be a version that is pure C++, but that can also link in assembler code for performance. Currently I have the assembler for 32-bit x86 processors using MMX/SSE. The implementation compiles with Borland C++ Builder, Visual C++ and Gnu C++, with matching assemblers. Assembler speeds up the implementation considerably. So my implementation should bring together the best of C++ and assembler. Regards, Maarten.

Maarten Kronenburg wrote:
Currently I'm working for LWG on a spec for tr2 for an infinite precision integer, which is almost finished. When it is finished I will put it here for you all to read and comment. Also I have a C++ implementation that will be submitted to boost some time.
sounds good, I'm waiting for it! B.

--- Bronek Kozicki wrote:
Maarten Kronenburg wrote:
Currently I'm working for LWG on a spec for tr2 for an infinite precision integer, which is almost finished. When it is finished I will put it here for you all to read and comment. Also I have a C++ implementation that will be submitted to boost some time.
sounds good, I'm waiting for it!
Same here. Cromwell D. Enage __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com

I am new to boost from a participation stand point. Where will the library be posted? Will you just post the link? What does SoC stand for anyway? -----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Maarten Kronenburg Sent: Wednesday, May 17, 2006 2:59 PM To: boost@lists.boost.org Subject: [boost] Infinite precision integer Currently I'm working for LWG on a spec for tr2 for an infinite precision integer, which is almost finished. When it is finished I will put it here for you all to read and comment. Also I have a C++ implementation that will be submitted to boost some time. It will be a version that is pure C++, but that can also link in assembler code for performance. Currently I have the assembler for 32-bit x86 processors using MMX/SSE. The implementation compiles with Borland C++ Builder, Visual C++ and Gnu C++, with matching assemblers. Assembler speeds up the implementation considerably. So my implementation should bring together the best of C++ and assembler. Regards, Maarten. _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Maarten Kronenburg wrote:
Also I have a C++ implementation that will be submitted to boost some time.
How does your work relate to [1], especially when it comes to the point of existing practice for tr2? Regards, David. [1] http://www.swox.com/gmp

David, In my design document I mention GMP as existing practice. The basic assembler method for example for multiplying is of course identical. But the large multiplications are different, see my document http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1718.pdf Another difference is that I use C++ in my implementation, while GMP uses C with a C++ wrapper interface. By the way I am already implementing the real, and computed 10^8 decimals of square roots and pi with my implementation, checked with a computer algebra program. After I submitted my source code to boost I assume it will be as public domain as GMP is, but subject to the boost license. Regards, Maarten. "David Gruener" <David.Gruener@gmx.net> wrote in message news:446C781E.8050205@gmx.net...
Maarten Kronenburg wrote:
Also I have a C++ implementation that will be submitted to boost some time.
How does your work relate to [1], especially when it comes to the point of existing practice for tr2?
Regards, David.
[1] http://www.swox.com/gmp _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Maarten Kronenburg wrote:
In my design document I mention GMP as existing practice. The basic assembler method for example for multiplying is of course identical. But the large multiplications are different, see my document http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1718.pdf
I see. Thanks for the link! David.

Maarten Kronenburg wrote:
Currently I'm working for LWG on a spec for tr2 for an infinite precision integer, which is almost finished.
I hope it's not too late for implementation suggestion - I'm familiar with similar attempt [1] and what threw me away was aggressive use of heap. Is it possible to employ technique similar to "small string optimization", that is when number of bytes stored is below some treshold (presumably set in preprocessor), it will not be allocated from heap, but instead employ some fixed buffer inside the number object itself? B. [1] http://www.codeguru.com/Cpp/data/data-misc/values/article.php/c4563/

Bronek Kozicki wrote:
Maarten Kronenburg wrote:
Currently I'm working for LWG on a spec for tr2 for an infinite precision integer, which is almost finished.
I hope it's not too late for implementation suggestion - I'm familiar with similar attempt [1] and what threw me away was aggressive use of heap. Is it possible to employ technique similar to "small string optimization", that is when number of bytes stored is below some treshold (presumably set in preprocessor), it will not be allocated from heap, but instead employ some fixed buffer inside the number object itself?
Which brings up, again, the issue of control over how such an infinite integer class interacts with memory <http://article.gmane.org/gmane.comp.lib.boost.devel/142234>. Maarten, do you plan on addressing such issues in your updated proposal? -- -- Grafik - Don't Assume Anything -- Redshift Software, Inc. - http://redshift-software.com -- rrivera/acm.org - grafik/redshift-software.com -- 102708583/icq - grafikrobot/aim - grafikrobot/yahoo

Bronek Kozicki wrote:
Maarten Kronenburg wrote:
Currently I'm working for LWG on a spec for tr2 for an infinite precision integer, which is almost finished.
I hope it's not too late for implementation suggestion - I'm familiar with similar attempt [1] and what threw me away was aggressive use of heap. Is it possible to employ technique similar to "small string optimization",
Bronek, Rene, Yes, there will be an abstract integer_allocator class with allocate(), reallocate() and deallocate() member functions, so that the user can provide memory management functions by deriving it. Regards, Maarten. "Rene Rivera" <grafik.list@redshift-software.com> wrote in message news:446CFD5F.9090309@redshift-software.com... that is
when number of bytes stored is below some treshold (presumably set in preprocessor), it will not be allocated from heap, but instead employ some fixed buffer inside the number object itself?
Which brings up, again, the issue of control over how such an infinite integer class interacts with memory <http://article.gmane.org/gmane.comp.lib.boost.devel/142234>.
Maarten, do you plan on addressing such issues in your updated proposal?
-- -- Grafik - Don't Assume Anything -- Redshift Software, Inc. - http://redshift-software.com -- rrivera/acm.org - grafik/redshift-software.com -- 102708583/icq - grafikrobot/aim - grafikrobot/yahoo _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
participants (6)
-
Bronek Kozicki
-
Cromwell Enage
-
David Gruener
-
Jarrad Waterloo
-
Maarten Kronenburg
-
Rene Rivera