Commit f7dfde4
Update src/test/assembly/x86_64-floating-point-clamp.rs
Simple Clamp Function
I thought this was more robust and easier to read. I also allowed this function to return early in order to skip the extra bound check (I'm sure the difference is negligible). I'm not sure if there was a reason for binding `self` to `x`; if so, please correct me.
Simple Clamp Function for f64
I thought this was more robust and easier to read. I also allowed this function to return early in order to skip the extra bound check (I'm sure the difference is negligible). I'm not sure if there was a reason for binding `self` to `x`; if so, please correct me.
Floating point clamp test
f32 clamp using mut self
f64 clamp using mut self
Update library/core/src/num/f32.rs
Update f64.rs
Update x86_64-floating-point-clamp.rs
Update src/test/assembly/x86_64-floating-point-clamp.rs
Update x86_64-floating-point-clamp.rs
Co-Authored-By: scottmcm <[email protected]>1 parent 4cf12a0 commit f7dfde4
2 files changed
+12
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1282 | 1282 | | |
1283 | 1283 | | |
1284 | 1284 | | |
1285 | | - | |
| 1285 | + | |
1286 | 1286 | | |
1287 | | - | |
1288 | | - | |
1289 | | - | |
| 1287 | + | |
| 1288 | + | |
1290 | 1289 | | |
1291 | | - | |
1292 | | - | |
| 1290 | + | |
| 1291 | + | |
1293 | 1292 | | |
1294 | | - | |
| 1293 | + | |
1295 | 1294 | | |
1296 | 1295 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1280 | 1280 | | |
1281 | 1281 | | |
1282 | 1282 | | |
1283 | | - | |
| 1283 | + | |
1284 | 1284 | | |
1285 | | - | |
1286 | | - | |
1287 | | - | |
| 1285 | + | |
| 1286 | + | |
1288 | 1287 | | |
1289 | | - | |
1290 | | - | |
| 1288 | + | |
| 1289 | + | |
1291 | 1290 | | |
1292 | | - | |
| 1291 | + | |
1293 | 1292 | | |
1294 | 1293 | | |
0 commit comments