Inheritance: Number, System.IComparable
Exemplo n.º 1
0
 //////////////////////////////////////////////////////////////////////////
 // Identity
 //////////////////////////////////////////////////////////////////////////
 public static bool equals(BigDecimal self, object obj)
 {
     if (obj is BigDecimal)
       {
     return self.Equals(obj);
       }
       return false;
 }
Exemplo n.º 2
0
 public static BigDecimal mod(BigDecimal self, BigDecimal x)
 {
     return self.remainder(x);
 }
Exemplo n.º 3
0
 public static BigDecimal div(BigDecimal self, BigDecimal x)
 {
     return(self.divide(x));
 }
Exemplo n.º 4
0
 public static BigDecimal div(BigDecimal self, BigDecimal x)
 {
     return self.divide(x);
 }
Exemplo n.º 5
0
 public static string toCode(BigDecimal self)
 {
     return self.ToString() + "d";
 }
Exemplo n.º 6
0
 public static Type type(BigDecimal self)
 {
     return Sys.DecimalType;
 }
Exemplo n.º 7
0
 public static BigDecimal plus(BigDecimal self, BigDecimal x)
 {
     return(self.add(x));
 }
Exemplo n.º 8
0
 //////////////////////////////////////////////////////////////////////////
 // Operators
 //////////////////////////////////////////////////////////////////////////
 public static BigDecimal negate(BigDecimal self)
 {
     return BigDecimal.valueOf(-self.decimalValue());
 }
Exemplo n.º 9
0
 public static BigDecimal modInt(BigDecimal self, long x)
 {
     return(self.remainder(BigDecimal.valueOf(x)));
 }
Exemplo n.º 10
0
 public static BigDecimal modFloat(BigDecimal self, double x)
 {
     return(self.remainder(BigDecimal.valueOf(x)));
 }
Exemplo n.º 11
0
 public static BigDecimal mod(BigDecimal self, BigDecimal x)
 {
     return(self.remainder(x));
 }
Exemplo n.º 12
0
 public static BigDecimal divFloat(BigDecimal self, double x)
 {
     return(self.divide(BigDecimal.valueOf(x)));
 }
Exemplo n.º 13
0
 public static BigDecimal divInt(BigDecimal self, long x)
 {
     return(self.divide(BigDecimal.valueOf(x)));
 }
Exemplo n.º 14
0
 public static BigDecimal modInt(BigDecimal self, long x)
 {
     return self.remainder(BigDecimal.valueOf(x));
 }
Exemplo n.º 15
0
 public static BigDecimal plusInt(BigDecimal self, long x)
 {
     return(self.add(BigDecimal.valueOf(x)));
 }
Exemplo n.º 16
0
 public static BigDecimal multFloat(BigDecimal self, double x)
 {
     return self.multiply(BigDecimal.valueOf(x));
 }
Exemplo n.º 17
0
 public static BigDecimal plusFloat(BigDecimal self, double x)
 {
     return(self.add(BigDecimal.valueOf(x)));
 }
Exemplo n.º 18
0
 public static BigDecimal plusFloat(BigDecimal self, double x)
 {
     return self.add(BigDecimal.valueOf(x));
 }
Exemplo n.º 19
0
 public static BigDecimal minus(BigDecimal self, BigDecimal x)
 {
     return(self.subtract(x));
 }
Exemplo n.º 20
0
        public static string toLocale(BigDecimal self, string pattern)
        {
            // get current locale
              Locale locale = Locale.cur();
              NumberFormatInfo df = locale.dec();

              // get default pattern if necessary
              if (pattern == null)
            pattern = Env.cur().locale(Sys.m_sysPod, "decimal", "#,###.0##");

              // parse pattern and get digits
              NumPattern p = NumPattern.parse(pattern);
              NumDigits d = new NumDigits(self);

              // route to common FanNum method
              return FanNum.toLocale(p, d, df);
        }
Exemplo n.º 21
0
 public static BigDecimal minusInt(BigDecimal self, long x)
 {
     return(self.subtract(BigDecimal.valueOf(x)));
 }
Exemplo n.º 22
0
 public static long compare(BigDecimal self, object obj)
 {
     return self.CompareTo(obj);
 }
Exemplo n.º 23
0
 public static BigDecimal minusFloat(BigDecimal self, double x)
 {
     return(self.subtract(BigDecimal.valueOf(x)));
 }
Exemplo n.º 24
0
 public static BigDecimal divInt(BigDecimal self, long x)
 {
     return self.divide(BigDecimal.valueOf(x));
 }
Exemplo n.º 25
0
        //////////////////////////////////////////////////////////////////////////
        // Math
        //////////////////////////////////////////////////////////////////////////

        public static BigDecimal abs(BigDecimal self)
        {
            return((self.decimalValue() >= 0) ? self : BigDecimal.valueOf(-self.decimalValue()));
        }
Exemplo n.º 26
0
        internal int size; // size of digits used

        #endregion Fields

        #region Constructors

        internal NumDigits(BigDecimal d)
            : this(d.ToString())
        {
        }
Exemplo n.º 27
0
        //////////////////////////////////////////////////////////////////////////
        // Conversion
        //////////////////////////////////////////////////////////////////////////

        public static string toStr(BigDecimal self)
        {
            return(self.ToString());
        }
Exemplo n.º 28
0
 public static BigDecimal minusInt(BigDecimal self, long x)
 {
     return self.subtract(BigDecimal.valueOf(x));
 }
Exemplo n.º 29
0
 public static void encode(BigDecimal self, ObjEncoder @out)
 {
     @out.w(self.ToString()).w("d");
 }
Exemplo n.º 30
0
 public static BigDecimal modFloat(BigDecimal self, double x)
 {
     return self.remainder(BigDecimal.valueOf(x));
 }
Exemplo n.º 31
0
 public static string toCode(BigDecimal self)
 {
     return(self.ToString() + "d");
 }
Exemplo n.º 32
0
 public static BigDecimal mult(BigDecimal self, BigDecimal x)
 {
     return self.multiply(x);
 }
Exemplo n.º 33
0
 public static string toLocale(BigDecimal self)
 {
     return(toLocale(self, null));
 }
Exemplo n.º 34
0
 public static BigDecimal multInt(BigDecimal self, long x)
 {
     return self.multiply(BigDecimal.valueOf(x));
 }
Exemplo n.º 35
0
 public static long compare(BigDecimal self, object obj)
 {
     return(self.CompareTo(obj));
 }
Exemplo n.º 36
0
 public static BigDecimal plus(BigDecimal self, BigDecimal x)
 {
     return self.add(x);
 }
Exemplo n.º 37
0
 public static long hash(BigDecimal self)
 {
     return(self.GetHashCode());
 }
Exemplo n.º 38
0
 public static BigDecimal plusInt(BigDecimal self, long x)
 {
     return self.add(BigDecimal.valueOf(x));
 }
Exemplo n.º 39
0
 public static Type type(BigDecimal self)
 {
     return(Sys.DecimalType);
 }
Exemplo n.º 40
0
 public static string toLocale(BigDecimal self)
 {
     return toLocale(self, null);
 }
Exemplo n.º 41
0
        //////////////////////////////////////////////////////////////////////////
        // Operators
        //////////////////////////////////////////////////////////////////////////

        public static BigDecimal negate(BigDecimal self)
        {
            return(BigDecimal.valueOf(-self.decimalValue()));
        }
Exemplo n.º 42
0
 //////////////////////////////////////////////////////////////////////////
 // Conversion
 //////////////////////////////////////////////////////////////////////////
 public static string toStr(BigDecimal self)
 {
     return self.ToString();
 }
Exemplo n.º 43
0
 public static BigDecimal decrement(BigDecimal self)
 {
     return(BigDecimal.valueOf(self.decimalValue() - 1));
 }
Exemplo n.º 44
0
 //////////////////////////////////////////////////////////////////////////
 // Math
 //////////////////////////////////////////////////////////////////////////
 public static BigDecimal abs(BigDecimal self)
 {
     return (self.decimalValue() >= 0) ? self : BigDecimal.valueOf(-self.decimalValue());
 }
Exemplo n.º 45
0
 public static BigDecimal mult(BigDecimal self, BigDecimal x)
 {
     return(self.multiply(x));
 }
Exemplo n.º 46
0
 public static BigDecimal decrement(BigDecimal self)
 {
     return BigDecimal.valueOf(self.decimalValue()-1);
 }
Exemplo n.º 47
0
 public static BigDecimal multInt(BigDecimal self, long x)
 {
     return(self.multiply(BigDecimal.valueOf(x)));
 }
Exemplo n.º 48
0
 public static BigDecimal divFloat(BigDecimal self, double x)
 {
     return self.divide(BigDecimal.valueOf(x));
 }
Exemplo n.º 49
0
 public static BigDecimal min(BigDecimal self, BigDecimal that)
 {
     if (self.CompareTo(that) <= 0) return self;
       return that;
 }
Exemplo n.º 50
0
 public static void encode(BigDecimal self, ObjEncoder @out)
 {
     @out.w(self.ToString()).w("d");
 }
Exemplo n.º 51
0
 public static BigDecimal minus(BigDecimal self, BigDecimal x)
 {
     return self.subtract(x);
 }
Exemplo n.º 52
0
 public virtual OutStream writeDecimal(BigDecimal x)
 {
     return writeUtfString(x.ToString());
 }
Exemplo n.º 53
0
 public static BigDecimal minusFloat(BigDecimal self, double x)
 {
     return self.subtract(BigDecimal.valueOf(x));
 }
Exemplo n.º 54
0
Arquivo: Buf.cs Projeto: nomit007/f4
 public Buf writeDecimal(BigDecimal x)
 {
     m_out.writeDecimal(x); return this;
 }
Exemplo n.º 55
0
 public static BigDecimal multFloat(BigDecimal self, double x)
 {
     return(self.multiply(BigDecimal.valueOf(x)));
 }