about summary refs log tree commit diff
path: root/src/libnum
diff options
context:
space:
mode:
Diffstat (limited to 'src/libnum')
-rw-r--r--src/libnum/complex.rs4
-rw-r--r--src/libnum/rational.rs12
2 files changed, 8 insertions, 8 deletions
diff --git a/src/libnum/complex.rs b/src/libnum/complex.rs
index 069dd2164f5..e0fdc8a363d 100644
--- a/src/libnum/complex.rs
+++ b/src/libnum/complex.rs
@@ -82,7 +82,7 @@ impl<T: Clone + Float> Cmplx<T> {
     /// Calculate |self|
     #[inline]
     pub fn norm(&self) -> T {
-        self.re.hypot(&self.im)
+        self.re.hypot(self.im)
     }
 }
 
@@ -90,7 +90,7 @@ impl<T: Clone + Float> Cmplx<T> {
     /// Calculate the principal Arg of self.
     #[inline]
     pub fn arg(&self) -> T {
-        self.im.atan2(&self.re)
+        self.im.atan2(self.re)
     }
     /// Convert to polar form (r, theta), such that `self = r * exp(i
     /// * theta)`
diff --git a/src/libnum/rational.rs b/src/libnum/rational.rs
index 8f2efc8626b..cff1fb30b56 100644
--- a/src/libnum/rational.rs
+++ b/src/libnum/rational.rs
@@ -631,19 +631,19 @@ mod test {
 
         // f32
         test(3.14159265359f32, ("13176795", "4194304"));
-        test(2f32.powf(&100.), ("1267650600228229401496703205376", "1"));
-        test(-2f32.powf(&100.), ("-1267650600228229401496703205376", "1"));
-        test(1.0 / 2f32.powf(&100.), ("1", "1267650600228229401496703205376"));
+        test(2f32.powf(100.), ("1267650600228229401496703205376", "1"));
+        test(-2f32.powf(100.), ("-1267650600228229401496703205376", "1"));
+        test(1.0 / 2f32.powf(100.), ("1", "1267650600228229401496703205376"));
         test(684729.48391f32, ("1369459", "2"));
         test(-8573.5918555f32, ("-4389679", "512"));
 
         // f64
         test(3.14159265359f64, ("3537118876014453", "1125899906842624"));
-        test(2f64.powf(&100.), ("1267650600228229401496703205376", "1"));
-        test(-2f64.powf(&100.), ("-1267650600228229401496703205376", "1"));
+        test(2f64.powf(100.), ("1267650600228229401496703205376", "1"));
+        test(-2f64.powf(100.), ("-1267650600228229401496703205376", "1"));
         test(684729.48391f64, ("367611342500051", "536870912"));
         test(-8573.5918555, ("-4713381968463931", "549755813888"));
-        test(1.0 / 2f64.powf(&100.), ("1", "1267650600228229401496703205376"));
+        test(1.0 / 2f64.powf(100.), ("1", "1267650600228229401496703205376"));
     }
 
     #[test]