Boost logo

Boost Users :

Subject: Re: [Boost-users] [math][tools][units] generic libraries not genericenough
From: Alfredo Correa (alfredo.correa_at_[hidden])
Date: 2011-08-26 15:27:50


2011/8/26 Michael Powell <mwpowellnm_at_[hidden]>

> Okay that helps, yes. However, I thought this was necessarily the whole
> point motivating b::u, or any units library for that matter. However, when I
> stop to consider the whole point of b::u compile-time-type-safety, doesn't
> it stand to reason that some units can't necessarily find a root? Like I
> wouldn't want to root a m^3, this doesn't make sense to do so; even if I
> could, what would the unit outcome be? Although I expect I should be able to
> root a m^2. These are simple examples of course.
>
>
[Please don't top post]
physical quantities are well defined arithmetic objects, including rational
powers. sqrt( 1.*m^3 ) = 1.*m^(3/2), there is nothing wrong with that and
Boost.Units handles this very elegantly. I happens all the time, for example
in intermediate calculations.

>
>



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net