
Boost : 
From: Beman Dawes (bdawes_at_[hidden])
Date: 20060526 16:58:04
"Andras Erdei" <aerdei_at_[hidden]> wrote in message
news:7fe28deb0605260808j7af82ba6k897d3dca5d5dd435_at_mail.gmail.com...
> On 5/24/06, Maarten Kronenburg <M.Kronenburg_at_[hidden]> wrote:
>>
>> In the boost vault
>> http://boostconsulting.com/vault/
>> under Math  Numerics the document
>> infintdraft.pdf contains the
>> Proposal for an Infinite Precision Integer
>> for Library Technical Report 2, Draft.
>> Any comments are welcome.
>>
>
> 1. My main concern is that both the interface and the specification seem
> to
> be too implementationdriven.
>
> For example, i don't see any reason for specifying the timecomplexity of
> the operations...
The LWG discussed this, and decided that the timecomplexity should be
specified tightly enough to require implementations that are broadly useful,
but not so tightly as to require heroic efforts by implementors.
> 5. Summary
>
> It is high time to get an integer into the standard, but i would prefer a
> very minimal (strictly intmimicking, no additional operations etc) one.
The LWG also discussed this, and would like a fairly minimal approach
(incidently, it is for TR2, not the standard itself). However, certain
additional functions are required for realworld applications, and are more
efficient if part of the implementation.
> Of course, the boost _implementation_ can provide a lot more than
> this minimal integer, and when we have enough experience, then we
> can bloat the interface to support common usecases.
Yes.
> Similarly, let's restrict implementations as less as possible: if someone
> ever comes up with a logarithmic integer class that provides O(N)
> multiplication in exchange for addition being O(N*logN), then let them
> do so...
It might be possible to allow such an implementation by providing an escape
clause. Perhaps something like: "Complexity requirements for certain
functions may be relaxed if doing so allows improved complexity for other
functions. Such complexity relaxations and improvements shall be documented
by the implementation."
Is that a good idea? I don't know enough about the problem domain to have a
strong opinion.
Beman
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk