On 8 November 2011 14:22, Jason Wessel <jason.wes...@windriver.com> wrote: > +#define FPU_MIN(size, a, b) float ## size ## _lt(a, b, &env->sse_status) ? > (a) : (b) > +#define FPU_MAX(size, a, b) float ## size ## _lt(b, a, &env->sse_status) ? > (a) : (b)
This will give the wrong answers for special cases involving +0, -0 and NaNs. Check the intel architecture manual which says how these should work. (You can't use float*_min() and float*_max() either, as those have sane semantics and you need to implement the Intel ones here.) -- PMM