On Thu, Mar 12 2015, Matt Turner wrote:
> I think you misread. rint() *does* provide the behavior we want
> (round-to-nearest, half to even) when the rounding mode is the default
> round-to-nearest.

Thanks. I did at least verify that behaviorally as I just mentioned in a
separate mail.

> As Eric noted in his original patch, the man pages for
> rint(3)/nearbyint(3) don't describe the half-to-even behavior but
> round(3) does:

Ah. Yes, I was using the man pages, so that was the source of my
confusion.

> Maybe I should send a patch to the Linux man-pages project too.

That definitely wouldn't hurt.

>>         assert (fegetround() == FE_TONEAREST);
>
> I don't really want to do this. We rely on the default rounding mode
> everywhere. I don't think asserting here is useful.

What's useful is increasing the likelihood that when somebody does
violate the assumption, they are alterted to the issue, rather than
having Mesa quietly misbehave in hard-to-predict ways.

It seems obvious to me that we should improve robustness when we've
already identified exactly where (at least one piece) of fragility lies
in Mesa.

> Also it requires adding code for MSVC since it doesn't have
> fegetround().

Not code, no. I'd be happy with just the #ifndef to hide the call from
MSVC. I won't ask you find equivalent functionality for MSVC.

-Carl

Attachment: pgpWezL81msfM.pgp
Description: PGP signature

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to