fix the NaN or Infinity values from the Formula used in a VM