private int CompareFloat(FloatDatum x, FloatDatum y) { return(Comparer <long> .Default.Compare ( BitConverter.DoubleToInt64Bits(x.Value), BitConverter.DoubleToInt64Bits(y.Value) )); }
private bool EqualFloat(FloatDatum x, FloatDatum y) { return(string.Compare ( Convert.ToBase64String(BitConverter.GetBytes(x.Value)), Convert.ToBase64String(BitConverter.GetBytes(y.Value)), StringComparison.Ordinal ) == 0); }
public bool VisitFloat(FloatDatum d) { bw.Write(B_FLOAT); bw.Write(d.Value); return(true); }
public State VisitFloat(State state, FloatDatum d) => state;
public string VisitFloat(FloatDatum d) { return(d.Value.ToString("G")); }
public SetDatum VisitFloat(FloatDatum d) => SetDatum.Empty;
public string VisitFloat(FloatDatum d) { return("f" + Convert.ToBase64String(BitConverter.GetBytes(d.Value))); }