public static SqlNumber Round(SqlNumber value, int precision) { if (SqlNumber.IsNumber(value)) { var result = BigMath.Round(value.innerValue, new MathContext(precision, RoundingMode.HalfUp)); return(new SqlNumber(result)); } return(value); }
public BigNumberExpr(BigDecimal n, int argFPPrec) : base(EPrecisionNumber.BFloat, n, BigMath.Round(n, new MathContext(argFPPrec)), argFPPrec) { }