Made mean calculation handle inf and nan
riTRAN/MULT :Improved handling of invalid operations 0/0 etc.