Boost logo

Boost Users :

Subject: Re: [Boost-users] [Units] Un-scaling dimensionless value
From: Gavin Lambert (gavinl_at_[hidden])
Date: 2014-02-18 00:57:34


On 18/02/2014 11:14, Quoth Lindley French:
>> Bear in mind that scaling is used not just for SI prefixes but also
>> for lb/kg conversions and similar. Double is probably the only way
>> to go there.
>
> Yes, I caught that subtlety and I understand it in that context. I just
> feel there should be some way to use Boost.Units---portions of it,
> anyway---in a context where exact math is required and floating point is
> therefore forbidden.

I don't disagree (and it might theoretically be possible, when the units
involved only use rational scaling and not actual floating-point
conversion factors, and when scaling is not too large).

But I think the current implementation is fairly tightly wedded to
floating point internally, and it might be tricky to break that link.


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