On 25 October 2013 14:52, Tom Musta <tommu...@gmail.com> wrote: > On 10/24/2013 5:10 PM, Peter Maydell wrote: >> >> Can't you use the min and max softfloat functions? Those are >> there specifically because the corner cases mean you can't >> implement them using the comparisons. (For instance for >> the example you quote of max(-0.0, +0.0) they return +0.0 >> as you require.)
> I tried this but didn't have much luck getting results to match > the P7 hardware. Unfortunately, I don't recall the details. > Let me try this approach again. The functions are supposed to match the IEEE mandated min/max behaviour, and I tested the ARM instructions that use them, so unless the PPC chip designers have gone rather off-piste they ought to work :-) (It can happen, though, IIRC x86 has some rather weird non-IEEE min/max insns.) -- PMM