public static BigDecimal /*!*/ CreateBigDecimal(RubyContext /*!*/ context, RubyClass /*!*/ self, [DefaultProtocol] MutableString /*!*/ value, [Optional] int n) { return(BigDecimal.Create(GetConfig(context), value.ConvertToString(), n)); }
public static RubyArray /*!*/ Coerce(RubyContext /*!*/ context, BigDecimal /*!*/ self, BigInteger /*!*/ other) { return(RubyOps.MakeArray2(BigDecimal.Create(GetConfig(context), other.ToString(CultureInfo.InvariantCulture)), self)); }
public static BigDecimal /*!*/ Add(RubyContext /*!*/ context, BigDecimal /*!*/ self, int other, int n) { BigDecimal.Config config = GetConfig(context); return(BigDecimal.Add(config, self, BigDecimal.Create(config, other), n)); }
public static RubyArray /*!*/ DivMod(RubyContext /*!*/ context, BigDecimal /*!*/ self, [NotNull] BigInteger /*!*/ other) { return(DivMod(context, self, BigDecimal.Create(GetConfig(context), other))); }
public BigDecimal ToBigDecimal() { return(_bipart == null?BigDecimal.Create(_lpart) : BigDecimal.Create(_bipart)); }
public static BigDecimal /*!*/ Multiply(RubyContext /*!*/ context, BigDecimal /*!*/ self, [NotNull] BigInteger /*!*/ other) { BigDecimal.Config config = GetConfig(context); return(BigDecimal.Multiply(config, self, BigDecimal.Create(config, other))); }
public static BigDecimal /*!*/ Modulo(RubyContext /*!*/ context, BigDecimal /*!*/ self, int other) { return(Modulo(context, self, BigDecimal.Create(GetConfig(context), other))); }
public void CanConvertBetweenProto() { ConvertThroughProto(new Numeric(BigDecimal.Create("123456.789"))); ConvertThroughProto(new Numeric(BigDecimal.Create(LargeInt))); ConvertThroughProto(new Numeric(BigDecimal.Create(LargeDecimal))); }
public static Numeric FromProto(string number) => new Numeric(BigDecimal.Create(number));
public static BigDecimal InducedFrom(RubyContext /*!*/ context, RubyClass /*!*/ self, int value) { return(BigDecimal.Create(GetConfig(context), value.ToString())); }
public static RubyArray /*!*/ Coerce(RubyContext /*!*/ context, BigDecimal /*!*/ self, int other) { return(RubyOps.MakeArray2(BigDecimal.Create(GetConfig(context), other.ToString()), self)); }
public static object CreateBigDecimal(RubyContext /*!*/ context, object /*!*/ self, [DefaultProtocol] MutableString value, [Optional] int n) { return(BigDecimal.Create(BigDecimalOps.GetConfig(context), value.ConvertToString(), n)); }
public static object LessThan(RubyContext /*!*/ context, BigDecimal /*!*/ self, [NotNull] BigInteger /*!*/ other) { return(LessThenResult(self.CompareBigDecimal(BigDecimal.Create(GetConfig(context), other)))); }
public static object GreaterThan(RubyContext /*!*/ context, BigDecimal /*!*/ self, double other) { return(GreaterThenResult(self.CompareBigDecimal(BigDecimal.Create(GetConfig(context), other)))); }
public static BigDecimal /*!*/ Subtract(RubyContext /*!*/ context, BigDecimal /*!*/ self, int other) { BigDecimal.Config config = GetConfig(context); return(BigDecimal.Subtract(config, self, BigDecimal.Create(config, other))); }
public static object LessThanOrEqual(RubyContext /*!*/ context, BigDecimal /*!*/ self, double other) { return(LessThanOrEqualResult(self.CompareBigDecimal(BigDecimal.Create(GetConfig(context), other)))); }
public static BigDecimal /*!*/ Subtract(RubyContext /*!*/ context, BigDecimal /*!*/ self, [NotNull] BigInteger /*!*/ other, int n) { BigDecimal.Config config = GetConfig(context); return(BigDecimal.Subtract(config, self, BigDecimal.Create(config, other), n)); }
public static bool Equal(RubyContext /*!*/ context, BigDecimal /*!*/ self, [NotNull] BigInteger /*!*/ other) { return(self.Equals(BigDecimal.Create(GetConfig(context), other))); }
public static BigDecimal /*!*/ Multiply(RubyContext /*!*/ context, BigDecimal /*!*/ self, double other, int n) { BigDecimal.Config config = GetConfig(context); return(BigDecimal.Multiply(config, self, BigDecimal.Create(config, other), n)); }
public static bool Equal(RubyContext /*!*/ context, BigDecimal /*!*/ self, double other) { return(self.Equals(BigDecimal.Create(GetConfig(context), other))); }
public static BigDecimal /*!*/ Modulo(RubyContext /*!*/ context, BigDecimal /*!*/ self, [NotNull] BigInteger /*!*/ other) { return(Modulo(context, self, BigDecimal.Create(GetConfig(context), other))); }
public static BigDecimal InducedFrom(RubyContext /*!*/ context, RubyClass /*!*/ self, [NotNull] BigInteger /*!*/ value) { return(BigDecimal.Create(GetConfig(context), value.ToString(CultureInfo.InvariantCulture))); }
public static object Compare(RubyContext /*!*/ context, BigDecimal /*!*/ self, int other) { return(self.CompareBigDecimal(BigDecimal.Create(GetConfig(context), other))); }
public Number(object initialValue) { value = BigDecimal.Create(new BigDecimal.Config(), initialValue.ToString()); }