Skip to content

Commit 8f1b3c5

Browse files
committed
[numerics.sat.func] Simplify specification of div_sat.
We know precisely when saturation happens, so we can say that directly.
1 parent f3254b3 commit 8f1b3c5

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

source/algorithms.tex

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10847,14 +10847,11 @@
1084710847
\expects
1084810848
\tcode{y != 0} is \tcode{true}.
1084910849

10850-
\pnum
10851-
Let \tcode{q} be \tcode{x / y}, with any fractional part discarded.
10852-
1085310850
\pnum
1085410851
\returns
10855-
If \tcode{q} is representable as a value of type \tcode{T}, \tcode{q};
10856-
otherwise, either the largest or smallest representable value of type \tcode{T},
10857-
whichever is closer to the value of \tcode{q}.
10852+
If \tcode{T} is a signed integer type
10853+
and \tcode{x == numeric_limits<T>::min() \&\& y == -1} is \tcode{true},
10854+
\tcode{numeric_limits<T>::max()}, otherwise, \tcode{x / y}.
1085810855

1085910856
\pnum
1086010857
\remarks

0 commit comments

Comments
 (0)