a + b modulo 2^64; both arms are evaluated, so neither may overflow
167def deviceArenaAddModulo =
168 (lambda unrestricted a : Nat .
169 (lambda unrestricted b : Nat .
170 (let unrestricted room =
171 (naturalSaturatingSubtract deviceArenaWordMaximum a)
172 in
173 (naturalSelect
174 (naturalLess room b)
175 (naturalSaturatingSubtract (naturalSaturatingSubtract b room) 1)
176 (naturalAdd a (naturalSelect (naturalLess room b) room b))))))The compiler supplied declaration spans and resolved links from this source snapshot. This page does not assert that this file belongs to a checked closure.