Boost logo

Boost :

From: Kevlin Henney (kevlin_at_[hidden])
Date: 2000-04-25 06:31:11


In message <60287F7A6768D3118A270008C728E305112670_at_tnt_server_25>,
Hibbs, Philip <philip.hibbs_at_[hidden]> writes
>I agree with your point in principle. However, any equality comparison of
>floating point values is in effect asking "is this value equal to that value,
>to a tolerance of x decimal places". What the safe_double, or
>comparable_double, or whatever is doing is giving the user control over this
>already-present approximation.

The user has control in both cases, and the same question can be said to
be answered in both instances. The difference is that the type seems to
favour frequent use of comparisons such that those are made relatively
transparent, whereas the comparison function approach favours normal,
transparent use of the float types but more intrusive comparison syntax.
____________________________________________________________

  Kevlin Henney phone: +44 117 942 2990
  Curbralan Ltd mobile: +44 7801 073 508
  kevlin_at_[hidden] fax: +44 870 052 2289
____________________________________________________________


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