Boost logo

Boost :

From: Cromwell Enage (sponage_at_[hidden])
Date: 2005-09-14 14:01:26

--- Dan McLeran <dan.mcleran_at_[hidden]> wrote:
> I also do some static assertions and I was thinking
> of adding static functionality to add, multiply,
> divide, etc. at compile time. One could do this if
> one knew the lhs & rhs values at compile-time.

Have you checked out MPL?

If you haven't done so, check out the section on
"Numeric Metafunctions".

> >>I would love to figure out how to trick the
> >>compiler into evaluating a floating point,
> >>argument but so far I haven't found it (a few
> >>though :)
> This makes me think about something like
> the float in unsigned format: sign, exponent,
> mantissa. You could figure out how to add and
> subtract, etc. the floats in this form and use
> meta-programming techniques to do some
> math with the compiler.

Peder Holt and I are doing some work in that area.
Peder's work is in the "metamath" sections of the
Sandbox CVS
as soon as I fix a couple of bugs, I'll upload my work
to the Vault <>. In
the meantime, keep track of the "metadouble" threads
and any discussions regarding MPL and numerics.

                              Cromwell D. Enage

Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around

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