Boost logo

Boost :

From: Daniel Frey (daniel.frey_at_[hidden])
Date: 2003-09-19 07:34:03

Stephen Nutt wrote:
> Thank Daniel. I hadn't thought about not using the BOOST_STATIC_CONSTANT,
> but using enums directly. Makes a BIG improvement. I'll update when I've
> made the changes, and some others I have in mind. (BTW, uses a little over
> half the memory in half the time when used with another change I made!)

Good, I'm looking forward to the new version. The question remains how
to handle compilers that can't use enums - the
BOOST_STATIC_CONSTANT-macro is not provided for fun AFAIK ;)

> The square root template I agree is not optimised. However this shouldn't
> present a problem as only one square root is used for each prime candidate.

I wasn't thinking of prime candidates. If you supply square_root, people
will use it for other purposes as well, and probably very often. I also
noticed that I should have specialized root<x,2> instead of providing
square_root<x>, but you most likely already noticed that...

> I was actually hoping to breaking both power and root out into a separate
> file, perhaps adding a floating point version (not sure how feasible that
> would be) so fractions and negative powers could be passed.

I think that your efforts should be combined with the existing
ct-algorithms from Daryle for GCD and LCM (see
to form a new library.

Regards, Daniel

Daniel Frey
aixigo AG - financial training, research and technology
Schloß-Rahe-Straße 15, 52072 Aachen, Germany
fon: +49 (0)241 936737-42, fax: +49 (0)241 936737-99
eMail: daniel.frey_at_[hidden], web:

Boost list run by bdawes at, gregod at, cpdaniel at, john at