@@ -475,8 +475,8 @@ impl Fractional for float {
475475
476476impl Algebraic for float {
477477 #[ inline( always) ]
478- fn pow ( & self , n : float ) -> float {
479- ( * self as f64 ) . pow ( n as f64 ) as float
478+ fn pow ( & self , n : & float ) -> float {
479+ ( * self as f64 ) . pow ( & ( * n as f64 ) ) as float
480480 }
481481
482482 #[ inline( always) ]
@@ -495,8 +495,8 @@ impl Algebraic for float {
495495 }
496496
497497 #[ inline( always) ]
498- fn hypot ( & self , other : float ) -> float {
499- ( * self as f64 ) . hypot ( other as f64 ) as float
498+ fn hypot ( & self , other : & float ) -> float {
499+ ( * self as f64 ) . hypot ( & ( * other as f64 ) ) as float
500500 }
501501}
502502
@@ -532,8 +532,8 @@ impl Trigonometric for float {
532532 }
533533
534534 #[ inline( always) ]
535- fn atan2 ( & self , other : float ) -> float {
536- ( * self as f64 ) . atan2 ( other as f64 ) as float
535+ fn atan2 ( & self , other : & float ) -> float {
536+ ( * self as f64 ) . atan2 ( & ( * other as f64 ) ) as float
537537 }
538538
539539 /// Simultaneously computes the sine and cosine of the number
@@ -566,8 +566,8 @@ impl Exponential for float {
566566
567567 /// Returns the logarithm of the number with respect to an arbitrary base
568568 #[ inline( always) ]
569- fn log ( & self , base : float ) -> float {
570- ( * self as f64 ) . log ( base as f64 ) as float
569+ fn log ( & self , base : & float ) -> float {
570+ ( * self as f64 ) . log ( & ( * base as f64 ) ) as float
571571 }
572572
573573 /// Returns the base 2 logarithm of the number
0 commit comments