Boost logo

Boost :

From: Noah Stein (noah_at_[hidden])
Date: 2005-10-26 09:39:24


> Paul A Bristow wrote:
> Sent: Wednesday, October 26, 2005 1:46 AM
> To: boost_at_[hidden]
> Subject: Re: [boost] Interest in dimension/unit-checking library?

> We are talking about implicit conversions from feet to meters here -
> almost
> certainly lossless. You need to read Matt's quite complicated arguments
> for
> these.

Unless I'm mistaken, this is only a theoretically lossless operation. In
the real world of precision issues and whatnot, a conversion back and forth
might result in a slightly different answer. Given the fact that a number
divided by 10 and then multiplied by 10 might not result in the original
number, the feet-meter conversion certainly can't be made lossless. Even
worse, although converting from feet to inches is lossless (excluding
overflow considerations), converting from inches to feet is not lossless. I
really hate floating point!

-- Noah


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk