def _diff_to_snappea(value, snappeaValue):
    """
    The SnapPea kernel will always give us a number, but we might deal
    with a number or an interval.

    Cast to our numeric type so that we can compare.
    """
    NumericField = value.parent()
    return value - NumericField(snappeaValue)
