Boost logo

Boost :

From: Victor A. Wagner, Jr. (vawjr_at_[hidden])
Date: 2002-08-21 12:43:56


At Wednesday 2002/08/21 04:43, you wrote:
>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'.

which is precisely what the OP was complaining that the language does NOT
do for int (and it's relatives)

>In "x = y * z; x /= u;" y * z is required to be truncated to x's precision
>first.
>
>_______________________________________________
>Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Victor A. Wagner Jr. http://rudbek.com
PGP RSA fingerprint = 4D20 EBF6 0101 B069 3817 8DBF C846 E47A
PGP D-H fingerprint = 98BC 65E3 1A19 43EC 3908 65B9 F755 E6F4 63BB 9D93
The five most dangerous words in the English language:
               "There oughta be a law"


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