On Wed, 03 Sep 2003 15:10:13 -0400, David Abrahams wrote
> "Jeff Garland" <[EMAIL PROTECTED]> writes:
> 
> >>Jeff G wrote:
> >> I'm thinking it would have to be defined like this
> >>   Duration / Duration --> Integer
> >>
> >>I think Duration / Duration --> double would be more appropriate.
> >
> > I have intentionally avoided floating point types in the library
> > because there is no reason to suffer the loss of correctness
> > associated with these types.
> 
> Huh?
> 
>      3/2 == 1
> 
> is correct?

Yes.  Of course to make this useful you will need % as well.
 
> You get a much bigger round-off error from ints than from floats.

Yes, but you know what you are getting up front.  With floats you don't know
until runtime what the round-off will be.  Anyway, I have yet to here a
compelling use case in this domain for using non-integer arithmetic. 

Jeff

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to