Boost logo

Boost :

Subject: Re: [boost] Numeric constants
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2009-01-30 12:28:03


John Maddock wrote:
>> I was wondering what kind of constants this would include. Physical
>> constants, or just mathematical ones? And what about constants with
>> multiple expressions depending on units? For example, H_bar =
>> 6.626e-34 J-s = 4.135e-15 eV-s.
> In the first instance I think we'll stick to well defined
> non-controvercial numerical constants, the example you give being a
> good reason to do so ;-)
> *If* we can get agreement on the interface, then a later submission of
> more physical constants would seem to be in order - perhaps this would
> be a good use for Boost.Units?

We already have a number of physical constants in SI units using doubles
Actually, the

template<class T>
T H_bar();

interface would work pretty well, because it allows T to contain the
unit information.

In Christ,
Steven Watanabe

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