diff options
| author | bjorn3 <bjorn3@users.noreply.github.com> | 2019-08-19 15:48:32 +0200 |
|---|---|---|
| committer | bjorn3 <bjorn3@users.noreply.github.com> | 2019-08-19 16:27:09 +0200 |
| commit | edbb5730ea966be9d810a3ec46db8245dce51b4e (patch) | |
| tree | cfbfb30af6c27be4334c4380faa30ef3db706261 /example/std_example.rs | |
| parent | ce860e5fdebd626d025d94d53629264923e441d8 (diff) | |
| download | rust-edbb5730ea966be9d810a3ec46db8245dce51b4e.tar.gz rust-edbb5730ea966be9d810a3ec46db8245dce51b4e.zip | |
Implement copysign{f32,f64} intrinsics
Diffstat (limited to 'example/std_example.rs')
| -rw-r--r-- | example/std_example.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/example/std_example.rs b/example/std_example.rs index 61182a49b9c..2aa2235d7bd 100644 --- a/example/std_example.rs +++ b/example/std_example.rs @@ -35,6 +35,7 @@ fn main() { println!("{}", 2.3f32.max(1.0)); println!("{}", 2.3f32.powi(2)); println!("{}", 2.3f32.log2()); + assert_eq!(2.3f32.copysign(-1.0), -2.3f32); assert_eq!(0b0000000000000000000000000010000010000000000000000000000000000000_0000000000100000000000000000000000001000000000000100000000000000u128.leading_zeros(), 26); assert_eq!(0b0000000000000000000000000010000000000000000000000000000000000000_0000000000000000000000000000000000001000000000000000000010000000u128.trailing_zeros(), 7); |
