Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
 public BigNumberExpr(BigDecimal n, int argFPPrec) : base(EPrecisionNumber.BFloat, n, BigMath.Round(n, new MathContext(argFPPrec)), argFPPrec)
 {
 }