diff options
| author | Raph Levien <raph.levien@gmail.com> | 2018-10-17 18:15:00 -0700 |
|---|---|---|
| committer | Raph Levien <raph.levien@gmail.com> | 2018-10-17 18:15:00 -0700 |
| commit | 0e6c3f29be98176c91aa77eb71c04cca18c51115 (patch) | |
| tree | 50d22acd767b9d2974c31c48f0e3aa1377b1e0db /src/rustllvm/ArchiveWrapper.cpp | |
| parent | 5ea8eb55cd9f4547b332f43c9f723de30187c223 (diff) | |
| download | rust-0e6c3f29be98176c91aa77eb71c04cca18c51115.tar.gz rust-0e6c3f29be98176c91aa77eb71c04cca18c51115.zip | |
Add a `copysign` function to f32 and f64
This patch adds a `copysign` function to the float primitive types. It is an exceptionally useful function for writing efficient numeric code, as it often avoids branches, is auto-vectorizable, and there are efficient intrinsics for most platforms. I think this might work as-is, as the relevant `copysign` intrinsic is already used internally for the implementation of `signum`. It's possible that an implementation might be needed in japaric/libm for portability across all platforms, in which case I'll do that also. Part of the work towards #55107
Diffstat (limited to 'src/rustllvm/ArchiveWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
