File tree Expand file tree Collapse file tree 4 files changed +12
-12
lines changed Expand file tree Collapse file tree 4 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -856,13 +856,13 @@ impl f128 {
856856 // Overflow is impossible
857857 ( a + b) / 2.
858858 } else if abs_a < LO {
859- // Not safe to halve a
859+ // Not safe to halve `a` (would underflow)
860860 a + ( b / 2. )
861861 } else if abs_b < LO {
862- // Not safe to halve b
862+ // Not safe to halve `b` (would underflow)
863863 ( a / 2. ) + b
864864 } else {
865- // Not safe to halve a and b
865+ // Safe to halve `a` and `b`
866866 ( a / 2. ) + ( b / 2. )
867867 }
868868 }
Original file line number Diff line number Diff line change @@ -885,13 +885,13 @@ impl f16 {
885885 // Overflow is impossible
886886 ( a + b) / 2.
887887 } else if abs_a < LO {
888- // Not safe to halve a
888+ // Not safe to halve `a` (would underflow)
889889 a + ( b / 2. )
890890 } else if abs_b < LO {
891- // Not safe to halve b
891+ // Not safe to halve `b` (would underflow)
892892 ( a / 2. ) + b
893893 } else {
894- // Not safe to halve a and b
894+ // Safe to halve `a` and `b`
895895 ( a / 2. ) + ( b / 2. )
896896 }
897897 }
Original file line number Diff line number Diff line change @@ -1070,13 +1070,13 @@ impl f32 {
10701070 // Overflow is impossible
10711071 ( a + b) / 2.
10721072 } else if abs_a < LO {
1073- // Not safe to halve a
1073+ // Not safe to halve `a` (would underflow)
10741074 a + ( b / 2. )
10751075 } else if abs_b < LO {
1076- // Not safe to halve b
1076+ // Not safe to halve `b` (would underflow)
10771077 ( a / 2. ) + b
10781078 } else {
1079- // Not safe to halve a and b
1079+ // Safe to halve `a` and `b`
10801080 ( a / 2. ) + ( b / 2. )
10811081 }
10821082 }
Original file line number Diff line number Diff line change @@ -1064,13 +1064,13 @@ impl f64 {
10641064 // Overflow is impossible
10651065 ( a + b) / 2.
10661066 } else if abs_a < LO {
1067- // Not safe to halve a
1067+ // Not safe to halve `a` (would underflow)
10681068 a + ( b / 2. )
10691069 } else if abs_b < LO {
1070- // Not safe to halve b
1070+ // Not safe to halve `b` (would underflow)
10711071 ( a / 2. ) + b
10721072 } else {
1073- // Not safe to halve a and b
1073+ // Safe to halve `a` and `b`
10741074 ( a / 2. ) + ( b / 2. )
10751075 }
10761076 }
You can’t perform that action at this time.
0 commit comments