Replace global Infinity usage with 1/0