File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -96,14 +96,14 @@ where
9696 // Work aroudn this by using a different algorithm that calculates the prescale
9797 // dynamically based on the maximum possible value. This adds more operations per round
9898 // since it needs to construct the scale, but works better in the general case.
99- let add = -( n + sig_total_bits as i32 ) . clamp ( exp_min, sig_total_bits as i32 ) ;
99+ let add = -( n + sig_total_bits as i32 ) . max ( exp_min) ;
100100 let mul = F :: from_parts ( false , ( F :: EXP_BIAS as i32 - add) as u32 , zero) ;
101101
102102 x *= mul;
103103 n += add;
104104
105105 if n < exp_min {
106- let add = -( n + sig_total_bits as i32 ) . clamp ( exp_min, sig_total_bits as i32 ) ;
106+ let add = -( n + sig_total_bits as i32 ) . max ( exp_min) ;
107107 let mul = F :: from_parts ( false , ( F :: EXP_BIAS as i32 - add) as u32 , zero) ;
108108
109109 x *= mul;
You can’t perform that action at this time.
0 commit comments