public abstract Ops opsWith(DoubleOps x);
public override Ops opsWith(DoubleOps x) { return DOUBLE_OPS; }
public override Ops opsWith(DoubleOps x) { return this; }
public Ops opsWith(DoubleOps x) { return DOUBLE_OPS; }
public Ops opsWith(DoubleOps x) { return this; }
private void AppendFloat(char type) { double v; if (!Converter.TryConvertToDouble(_opts.Value, out v)) { throw PythonOps.TypeError("float argument required"); } // scientific exponential format Debug.Assert(type == 'E' || type == 'e' || // floating point decimal type == 'F' || type == 'f' || // Same as "e" if exponent is less than -4 or more than precision, "f" otherwise. type == 'G' || type == 'g'); bool forceDot = false; // update our precision first... if (_opts.Precision != UnspecifiedPrecision) { if (_opts.Precision == 0 && _opts.AltForm) { forceDot = true; } if (_opts.Precision > 50) { _opts.Precision = 50; } } else { // alternate form (#) specified, set precision to zero... if (_opts.AltForm) { _opts.Precision = 0; forceDot = true; } else { _opts.Precision = 6; } } type = AdjustForG(type, v); nfi.NumberDecimalDigits = _opts.Precision; // then append if (_opts.LeftAdj) { AppendLeftAdj(v, DoubleOps.Sign(v) >= 0, type); } else if (_opts.ZeroPad) { AppendZeroPadFloat(v, type); } else { AppendNumeric(v, DoubleOps.Sign(v) >= 0, type); } if (DoubleOps.Sign(v) < 0 && v > -1 && _buf[0] != '-') { FixupFloatMinus(); } if (forceDot) { FixupAltFormDot(v); } }
private static int DoubleHash(object o) { return(DoubleOps.__hash__((double)o)); }
public static double copysign(double x, double y) { return(DoubleOps.Sign(y) * Math.Abs(x)); }
public static double copysign(double x, double y) { return(DoubleOps.CopySign(x, y)); }