Boost logo

Boost Users :

Subject: Re: [Boost-users] [Units] Un-scaling dimensionless value
From: Lindley French (lindleyf_at_[hidden])
Date: 2014-02-17 09:48:12


What's the best way to access the current scaling of a dimensionless value?
Maybe I can back it out myself rather than relying on type conversion to do
it.

On Sun, Feb 16, 2014 at 6:28 PM, Lindley French <lindleyf_at_[hidden]> wrote:

> Hmm. Ideally, I'd love it if floating point conversions were only used
> when the value type is floating point; the rest of the time, an integer
> conversion or static assert if necessary could be used. But thanks for the
> insight into the current behavior.
>
> > On Feb 16, 2014, at 2:26 PM, Steven Watanabe <watanabesj_at_[hidden]>
> wrote:
> >
> > AMDG
> >
> >> On 02/16/2014 11:08 AM, Lindley French wrote:
> >> I find it very surprising that the conversion would use floating point,
> since scaled units use static_rational. Are you certain that's how it works?
> >
> > Given that I wrote the code, yes I'm certain.
> > The values can be too large to fit in an
> > integer type (even long long).
> >
> > In Christ,
> > Steven Watanabe
> >
> > _______________________________________________
> > Boost-users mailing list
> > Boost-users_at_[hidden]
> > http://lists.boost.org/mailman/listinfo.cgi/boost-users
>



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