/// <inheritdoc /> public override void VisitIntervalLongintValue(LongintIntervalValue value) { if (isIncrement) { if (value.End < long.MaxValue) { result = OutSet.CreateLongintInterval(value.Start + 1, value.End + 1); } else { result = OutSet.CreateFloatInterval(TypeConversion.ToFloat(value.Start) + 1.0, TypeConversion.ToFloat(value.End) + 1.0); } } else { if (value.Start > long.MinValue) { result = OutSet.CreateLongintInterval(value.Start - 1, value.End - 1); } else { result = OutSet.CreateFloatInterval(TypeConversion.ToFloat(value.Start) - 1.0, TypeConversion.ToFloat(value.End) - 1.0); } } }
/// <inheritdoc /> public override void VisitIntervalLongintValue(LongintIntervalValue value) { if (value.Start == value.End) { VisitLongintValue(OutSet.CreateLong(value.Start)); return; } switch (operation) { case Operations.Minus: // Result of arithmetic negation can overflow if ((value.Start == 0) || ((-value.Start) != 0)) { result = OutSet.CreateLongintInterval(-value.End, -value.Start); } else { // <seealso cref="UnaryOperationEvaluator.VisitIntegerValue" /> result = OutSet.CreateFloatInterval(-TypeConversion.ToFloat(value.End), -TypeConversion.ToFloat(value.Start)); } break; case Operations.BitNegation: result = OutSet.CreateLongintInterval(~value.End, ~value.Start); break; case Operations.Int32Cast: IntervalValue <int> integerInterval; if (TypeConversion.TryConvertToIntegerInterval(OutSet, value, out integerInterval)) { result = integerInterval; } else { result = OutSet.AnyIntegerValue; } break; case Operations.FloatCast: case Operations.DoubleCast: result = OutSet.CreateFloatInterval(TypeConversion.ToFloat(value.Start), TypeConversion.ToFloat(value.End)); break; default: base.VisitIntervalLongintValue(value); break; } }
/// <inheritdoc /> /// <exception cref="System.NotSupportedException">Thrown always</exception> public override void VisitIntervalLongintValue(LongintIntervalValue value) { throw new NotSupportedException("Long integer is not currently supported"); }
/// <inheritdoc /> public override void VisitIntervalLongintValue(LongintIntervalValue value) { Result = snapshot.CreateIntegerInterval((int)value.Start, (int)value.End); }
/// <inheritdoc /> public override void VisitIntervalLongintValue(LongintIntervalValue value) { Result = snapshot.CreateFloatInterval(value.Start, value.End); }
/// <inheritdoc /> public override void VisitIntervalLongintValue(LongintIntervalValue value) { Result = value; }
/// <inheritdoc /> public override void VisitIntervalIntegerValue(IntegerIntervalValue value) { Result = snapshot.CreateLongintInterval(value.Start, value.End); }
/// <inheritdoc /> public override void VisitIntervalFloatValue(FloatIntervalValue value) { Result = snapshot.CreateLongintInterval((long)value.Start, (long)value.End); }
/// <inheritdoc /> public override void VisitIntervalLongintValue(LongintIntervalValue value) { containsLong = true; minLong = Math.Min(Math.Min(minLong, value.Start), value.End); maxLong = Math.Max(Math.Max(maxLong, value.Start), value.End); }
/// <inheritdoc /> public override void VisitIntervalLongintValue(LongintIntervalValue value) { numberFound(); }
/// <inheritdoc /> public override void VisitIntervalLongintValue(LongintIntervalValue value) { Max = Math.Max(Max, value.End); }