about summary refs log tree commit diff
path: root/example/std_example.rs
diff options
context:
space:
mode:
authorbjorn3 <bjorn3@users.noreply.github.com>2019-08-19 15:48:32 +0200
committerbjorn3 <bjorn3@users.noreply.github.com>2019-08-19 16:27:09 +0200
commitedbb5730ea966be9d810a3ec46db8245dce51b4e (patch)
treecfbfb30af6c27be4334c4380faa30ef3db706261 /example/std_example.rs
parentce860e5fdebd626d025d94d53629264923e441d8 (diff)
downloadrust-edbb5730ea966be9d810a3ec46db8245dce51b4e.tar.gz
rust-edbb5730ea966be9d810a3ec46db8245dce51b4e.zip
Implement copysign{f32,f64} intrinsics
Diffstat (limited to 'example/std_example.rs')
-rw-r--r--example/std_example.rs1
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);