Handle infinity values.