Skip to content

Commit 1eced52

Browse files
authored
Be less opinionated (and more accurate) when evaluating saturated arithmetic (#59607)
1 parent 59bc99d commit 1eced52

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

doc/src/manual/faq.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -546,9 +546,9 @@ way that is compatible with C and Fortran. Saturated integer arithmetic, however
546546
The first and most obvious issue is that this is not the way machine integer arithmetic works,
547547
so implementing saturated operations requires emitting instructions after each machine integer
548548
operation to check for underflow or overflow and replace the result with [`typemin(Int)`](@ref)
549-
or [`typemax(Int)`](@ref) as appropriate. This alone expands each integer operation from a single,
550-
fast instruction into half a dozen instructions, probably including branches. Ouch. But it gets
551-
worse – saturating integer arithmetic isn't associative. Consider this Matlab computation:
549+
or [`typemax(Int)`](@ref) as appropriate. This expands each integer operation from a single, fast
550+
instruction into a few instructions. But it gets worse – saturating integer arithmetic isn't
551+
associative. Consider this Matlab computation:
552552

553553
```
554554
>> n = int64(2)^62

0 commit comments

Comments
 (0)