File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -546,9 +546,9 @@ way that is compatible with C and Fortran. Saturated integer arithmetic, however
546
546
The first and most obvious issue is that this is not the way machine integer arithmetic works,
547
547
so implementing saturated operations requires emitting instructions after each machine integer
548
548
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:
552
552
553
553
```
554
554
>> n = int64(2)^62
You can’t perform that action at this time.
0 commit comments