changed sign logic for sqrt and geo_mean to account for -Inf