|
Boost : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2002-08-21 06:43:08
From: "Noel Yap" <yap_noel_at_[hidden]>
> > > to do the job. IMHO, if I understand the problem
> > > correctly, treating:
> > >
> > > x = y*z/u;
> > >
> > > differently from:
> > >
> > > x = y*z;
> > > x /= u;
> > >
> > > would complicate the language.
> >
> > Those are already different when x/y/z are floating
> > point.
>
> Please forgive this question: How does the language
> treat the two differently for floating point?
In "x = y * z / u;", y * z is allowed to live in a FP register that has
better precision than 'x'.
In "x = y * z; x /= u;" y * z is required to be truncated to x's precision
first.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk