Boost logo

Boost :

Subject: Re: [boost] [Boost.Units] non-integral unit exponents
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2009-10-09 19:08:42


Belcourt, Kenneth wrote:
> I'd like to use Boost.Units but am unsure whether I can declare a unit
> like this:
> W/m^2 Pa^0.25 K^1.523

The exponents can be rational numbers.

> In addition, I'd like the ability to change the pressure (Pa) and
> temperature (K) coefficients at runtime (user supplied input might
> change the default coefficients).

Do you mean that you want a unit like:

double pressure_coefficient, temperature_coefficient;

W/m^2 (pressure_coefficient Pa)^0.25 (temperature_coefficient K)^1.523

> Are these things possible with Boost.Units and, if so, could someone
> point me to an example? (I need this for nucleate boiling curves).

In Christ,
Steven Watanabe

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