Boost logo

Boost :

From: Paul A Bristow (pbristow_at_[hidden])
Date: 2005-10-26 10:30:44


 

| -----Original Message-----
| From: boost-bounces_at_[hidden]
| [mailto:boost-bounces_at_[hidden]] On Behalf Of Noah Stein
| Sent: 26 October 2005 15:39
| To: boost_at_[hidden]
| Subject: Re: [boost] Interest in dimension/unit-checking library?
|
| > 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.

| 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!

You are right - I could have chosen better words.

But it is only a teeny-weeny loss compared to the catastrophic int to char,
or even double to float, that people really, really hate!

Paul

--
Paul A Bristow
Prizet Farmhouse, Kendal, Cumbria UK LA8 8AB
Phone and SMS text +44 1539 561830, Mobile and SMS text +44 7714 330204
mailto: pbristow_at_[hidden]  www.hetp.u-net.com

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