@@ -28,9 +28,14 @@ use to_str;
2828use from_str;
2929
3030#[ cfg( notest) ] use cmp:: { Eq , Ord } ;
31- #[ cfg( notest) ] use ops;
32-
33- pub use f64:: { add, sub, mul, div, rem, lt, le, eq, ne, ge, gt} ;
31+ #[ cfg( stage0, notest) ]
32+ use ops:: { Add , Sub , Mul , Div , Modulo , Neg } ;
33+ #[ cfg( stage1, notest) ]
34+ #[ cfg( stage2, notest) ]
35+ #[ cfg( stage3, notest) ]
36+ use ops:: { Add , Sub , Mul , Quot , Rem , Neg } ;
37+
38+ pub use f64:: { add, sub, mul, quot, rem, lt, le, eq, ne, ge, gt} ;
3439pub use f64:: logarithm;
3540pub use f64:: { acos, asin, atan2, cbrt, ceil, copysign, cosh, floor} ;
3641pub use f64:: { erf, erfc, exp, expm1, exp2, abs_sub} ;
@@ -449,33 +454,41 @@ impl num::Round for float {
449454}
450455
451456#[cfg(notest)]
452- impl ops::Add<float,float> for float {
453- #[inline(always)]
457+ impl Add<float,float> for float {
454458 fn add(&self, other: &float) -> float { *self + *other }
455459}
456460#[cfg(notest)]
457- impl ops::Sub<float,float> for float {
458- #[inline(always)]
461+ impl Sub<float,float> for float {
459462 fn sub(&self, other: &float) -> float { *self - *other }
460463}
461464#[cfg(notest)]
462- impl ops::Mul<float,float> for float {
463- #[inline(always)]
465+ impl Mul<float,float> for float {
464466 fn mul(&self, other: &float) -> float { *self * *other }
465467}
466- #[cfg(notest)]
467- impl ops::Div<float,float> for float {
468- #[inline(always)]
468+ #[cfg(stage0,notest)]
469+ impl Div<float,float> for float {
469470 fn div(&self, other: &float) -> float { *self / *other }
470471}
471- #[cfg(notest)]
472- impl ops::Modulo<float,float> for float {
472+ #[cfg(stage1,notest)]
473+ #[cfg(stage2,notest)]
474+ #[cfg(stage3,notest)]
475+ impl Quot<float,float> for float {
473476 #[inline(always)]
477+ fn quot(&self, other: &float) -> float { *self / *other }
478+ }
479+ #[cfg(stage0,notest)]
480+ impl Modulo<float,float> for float {
474481 fn modulo(&self, other: &float) -> float { *self % *other }
475482}
476- #[cfg(notest)]
477- impl ops::Neg<float> for float {
483+ #[cfg(stage1,notest)]
484+ #[cfg(stage2,notest)]
485+ #[cfg(stage3,notest)]
486+ impl Rem<float,float> for float {
478487 #[inline(always)]
488+ fn rem(&self, other: &float) -> float { *self % *other }
489+ }
490+ #[cfg(notest)]
491+ impl Neg<float> for float {
479492 fn neg(&self) -> float { -*self }
480493}
481494
0 commit comments