Lines Matching full:infinity
63 expression.type.integer.modulus = "infinity"
177 expression.type.integer.minimum_value = "-infinity"
178 expression.type.integer.maximum_value = "infinity"
216 expression.type.integer.maximum_value = "infinity"
249 """Adds a and b, where a and b are ints, "infinity", or "-infinity"."""
250 if a in ("infinity", "-infinity"):
252 if b == "infinity":
253 assert a != "-infinity"
254 return "infinity"
255 if b == "-infinity":
256 assert a != "infinity"
257 return "-infinity"
262 """Subtracts b from a, where a and b are ints, "infinity", or "-infinity"."""
263 if b == "infinity":
264 return _add(a, "-infinity")
265 if b == "-infinity":
266 return _add(a, "infinity")
272 if a == "infinity":
274 if a == "-infinity":
284 """Multiplies a and b, where a and b are ints, "infinity", or "-infinity"."""
290 return "infinity"
292 return "-infinity"
298 return a in ("infinity", "-infinity")
302 """Returns max of a, where elements are ints, "infinity", or "-infinity"."""
303 if any(n == "infinity" for n in a):
304 return "infinity"
305 if all(n == "-infinity" for n in a):
306 return "-infinity"
311 """Returns min of a, where elements are ints, "infinity", or "-infinity"."""
312 if any(n == "-infinity" for n in a):
313 return "-infinity"
314 if all(n == "infinity" for n in a):
315 return "infinity"
335 if new_modulus == "infinity":
384 if all(bound.modulus == "infinity" for bound in bounds):
386 expression.type.integer.modulus = "infinity"
391 if any(bound.modulus == "infinity" for bound in bounds):
408 if bounds[0].modulus == "infinity":
415 expression.type.integer.modulus = "infinity"
468 If `modulus` is "infinity", asserts that `minimum_value`, `maximum_value`, and
472 is equal to both, and that `modulus` is "infinity".
481 if bounds.modulus == "infinity":
487 if bounds.minimum_value != "-infinity":
489 if bounds.maximum_value != "infinity":
497 assert bounds.modulus == "infinity"
498 if bounds.minimum_value != "-infinity" and bounds.maximum_value != "infinity":
532 expression.type.integer.modulus = "infinity"
555 expression.type.integer.modulus = "infinity"
618 # automatically by the fact that _greatest_common_divisor("infinity", x)
623 if new_modulus == "infinity":
624 # The only way for the new_modulus to come out as "infinity" *should* be
627 assert left_modulus == right_modulus == "infinity"
681 a: an integer, a stringified integer, or the string "infinity"
682 b: an integer, a stringified integer, or the string "infinity"
685 Conceptually, "infinity" is treated as the product of all integers.
687 If both a and b are 0, returns "infinity".
689 Otherwise, if either a or b are "infinity", and the other is 0, returns
690 "infinity".
692 Otherwise, if either a or b are "infinity", returns the other.
696 if a != "infinity": a = int(a)
697 if b != "infinity": b = int(b)
698 assert a == "infinity" or a >= 0
699 assert b == "infinity" or b >= 0
700 if a == b == 0: return "infinity"
704 if a == "infinity": return b
705 if b == "infinity": return a