The Netlib library module for the Brent root-finding function checks that the signs of two variables are different like this:
if (fa * (fb/dabs(fb)) .le. 0.0d0) go to 20
...
Why would this check include /dabs(fb) instead of being simply (fa*fb) .le. 0.0d0? I did a quick check with Python and it seems for very large values (+/-1e200) for x and y, where x*y=+/- inf, the comparison x*y<= 0 still works correctly.