Also, a comment is needed to explain why such a bizarre
condition is used/needed for just the INT64_MIN case.


The last patch I sent has this bit:
+              /*
+               * Some machines throw a floating-point exception
+               * for INT64_MIN % -1, the correct answer being
+               * zero in any case.
+               */
How would you reformulate that à-la-Fabien?

This one about modulo is fine.

I was refering to this other one in the division case:

+            /* overflow check (needed for INT64_MIN) */
+            if (lval != 0 && (*retval < 0 == lval < 0))

Why not use "if (lval == INT64_MIN)" instead of this complicated condition? If it is really needed for some reason, I think that a comment could help.

--
Fabien.
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to