code reworking to avoid nan in variations for null scale factors - 2nd
improve precision when computing some errors from variations