Examples using this doesn't work properly (shows random polygons). I think it's data overflow (but in float-point?).
Confirmed overflow in fixed-point version. Floating-point seems to work properly.
I've wrote a more-accurated version: al_polygon_z_sign. It uses 64bit.