상속: Number, System.IComparable
예제 #1
0
파일: FanDecimal.cs 프로젝트: nomit007/f4
 //////////////////////////////////////////////////////////////////////////
 // Identity
 //////////////////////////////////////////////////////////////////////////
 public static bool equals(BigDecimal self, object obj)
 {
     if (obj is BigDecimal)
       {
     return self.Equals(obj);
       }
       return false;
 }
예제 #2
0
파일: FanDecimal.cs 프로젝트: nomit007/f4
 public static BigDecimal mod(BigDecimal self, BigDecimal x)
 {
     return self.remainder(x);
 }
예제 #3
0
 public static BigDecimal div(BigDecimal self, BigDecimal x)
 {
     return(self.divide(x));
 }
예제 #4
0
파일: FanDecimal.cs 프로젝트: nomit007/f4
 public static BigDecimal div(BigDecimal self, BigDecimal x)
 {
     return self.divide(x);
 }
예제 #5
0
파일: FanDecimal.cs 프로젝트: nomit007/f4
 public static string toCode(BigDecimal self)
 {
     return self.ToString() + "d";
 }
예제 #6
0
파일: FanDecimal.cs 프로젝트: nomit007/f4
 public static Type type(BigDecimal self)
 {
     return Sys.DecimalType;
 }
예제 #7
0
 public static BigDecimal plus(BigDecimal self, BigDecimal x)
 {
     return(self.add(x));
 }
예제 #8
0
파일: FanDecimal.cs 프로젝트: nomit007/f4
 //////////////////////////////////////////////////////////////////////////
 // Operators
 //////////////////////////////////////////////////////////////////////////
 public static BigDecimal negate(BigDecimal self)
 {
     return BigDecimal.valueOf(-self.decimalValue());
 }
예제 #9
0
 public static BigDecimal modInt(BigDecimal self, long x)
 {
     return(self.remainder(BigDecimal.valueOf(x)));
 }
예제 #10
0
 public static BigDecimal modFloat(BigDecimal self, double x)
 {
     return(self.remainder(BigDecimal.valueOf(x)));
 }
예제 #11
0
 public static BigDecimal mod(BigDecimal self, BigDecimal x)
 {
     return(self.remainder(x));
 }
예제 #12
0
 public static BigDecimal divFloat(BigDecimal self, double x)
 {
     return(self.divide(BigDecimal.valueOf(x)));
 }
예제 #13
0
 public static BigDecimal divInt(BigDecimal self, long x)
 {
     return(self.divide(BigDecimal.valueOf(x)));
 }
예제 #14
0
파일: FanDecimal.cs 프로젝트: nomit007/f4
 public static BigDecimal modInt(BigDecimal self, long x)
 {
     return self.remainder(BigDecimal.valueOf(x));
 }
예제 #15
0
 public static BigDecimal plusInt(BigDecimal self, long x)
 {
     return(self.add(BigDecimal.valueOf(x)));
 }
예제 #16
0
파일: FanDecimal.cs 프로젝트: nomit007/f4
 public static BigDecimal multFloat(BigDecimal self, double x)
 {
     return self.multiply(BigDecimal.valueOf(x));
 }
예제 #17
0
 public static BigDecimal plusFloat(BigDecimal self, double x)
 {
     return(self.add(BigDecimal.valueOf(x)));
 }
예제 #18
0
파일: FanDecimal.cs 프로젝트: nomit007/f4
 public static BigDecimal plusFloat(BigDecimal self, double x)
 {
     return self.add(BigDecimal.valueOf(x));
 }
예제 #19
0
 public static BigDecimal minus(BigDecimal self, BigDecimal x)
 {
     return(self.subtract(x));
 }
예제 #20
0
파일: FanDecimal.cs 프로젝트: nomit007/f4
        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);
        }
예제 #21
0
 public static BigDecimal minusInt(BigDecimal self, long x)
 {
     return(self.subtract(BigDecimal.valueOf(x)));
 }
예제 #22
0
파일: FanDecimal.cs 프로젝트: nomit007/f4
 public static long compare(BigDecimal self, object obj)
 {
     return self.CompareTo(obj);
 }
예제 #23
0
 public static BigDecimal minusFloat(BigDecimal self, double x)
 {
     return(self.subtract(BigDecimal.valueOf(x)));
 }
예제 #24
0
파일: FanDecimal.cs 프로젝트: nomit007/f4
 public static BigDecimal divInt(BigDecimal self, long x)
 {
     return self.divide(BigDecimal.valueOf(x));
 }
예제 #25
0
        //////////////////////////////////////////////////////////////////////////
        // Math
        //////////////////////////////////////////////////////////////////////////

        public static BigDecimal abs(BigDecimal self)
        {
            return((self.decimalValue() >= 0) ? self : BigDecimal.valueOf(-self.decimalValue()));
        }
예제 #26
0
파일: FanNum.cs 프로젝트: nomit007/f4
        internal int size; // size of digits used

        #endregion Fields

        #region Constructors

        internal NumDigits(BigDecimal d)
            : this(d.ToString())
        {
        }
예제 #27
0
        //////////////////////////////////////////////////////////////////////////
        // Conversion
        //////////////////////////////////////////////////////////////////////////

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

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