@@ -374,7 +374,7 @@ pub trait Float
374374 fn from_str_r ( s : & str , round : Round ) -> Result < StatusAnd < Self > , ParseError > ;
375375 fn to_bits ( self ) -> u128 ;
376376
377- /// Convert a floating point number to an integer according to the
377+ /// Converts a floating point number to an integer according to the
378378 /// rounding mode. In case of an invalid operation exception,
379379 /// deterministic values are returned, namely zero for NaNs and the
380380 /// minimal or maximal value respectively for underflow or overflow.
@@ -387,7 +387,7 @@ pub trait Float
387387 ///
388388 /// The *is_exact output tells whether the result is exact, in the sense
389389 /// that converting it back to the original floating point type produces
390- /// the original value. This is almost equivalent to result== Status::OK,
390+ /// the original value. This is almost equivalent to ` result == Status::OK` ,
391391 /// except for negative zeroes.
392392 fn to_i128_r ( self , width : usize , round : Round , is_exact : & mut bool ) -> StatusAnd < i128 > {
393393 let status;
@@ -457,48 +457,48 @@ pub trait Float
457457 }
458458 }
459459
460- /// IEEE-754R isSignMinus: Returns true if and only if the current value is
460+ /// IEEE-754R isSignMinus: Returns whether the current value is
461461 /// negative.
462462 ///
463463 /// This applies to zeros and NaNs as well.
464464 fn is_negative ( self ) -> bool ;
465465
466- /// IEEE-754R isNormal: Returns true if and only if the current value is normal.
466+ /// IEEE-754R isNormal: Returns whether the current value is normal.
467467 ///
468468 /// This implies that the current value of the float is not zero, subnormal,
469469 /// infinite, or NaN following the definition of normality from IEEE-754R.
470470 fn is_normal ( self ) -> bool {
471471 !self . is_denormal ( ) && self . is_finite_non_zero ( )
472472 }
473473
474- /// Returns true if and only if the current value is zero, subnormal, or
474+ /// Returns ` true` if the current value is zero, subnormal, or
475475 /// normal.
476476 ///
477477 /// This means that the value is not infinite or NaN.
478478 fn is_finite ( self ) -> bool {
479479 !self . is_nan ( ) && !self . is_infinite ( )
480480 }
481481
482- /// Returns true if and only if the float is plus or minus zero.
482+ /// Returns ` true` if the float is plus or minus zero.
483483 fn is_zero ( self ) -> bool {
484484 self . category ( ) == Category :: Zero
485485 }
486486
487- /// IEEE-754R isSubnormal(): Returns true if and only if the float is a
487+ /// IEEE-754R isSubnormal(): Returns whether the float is a
488488 /// denormal.
489489 fn is_denormal ( self ) -> bool ;
490490
491- /// IEEE-754R isInfinite(): Returns true if and only if the float is infinity.
491+ /// IEEE-754R isInfinite(): Returns whether the float is infinity.
492492 fn is_infinite ( self ) -> bool {
493493 self . category ( ) == Category :: Infinity
494494 }
495495
496- /// Returns true if and only if the float is a quiet or signaling NaN.
496+ /// Returns ` true` if the float is a quiet or signaling NaN.
497497 fn is_nan ( self ) -> bool {
498498 self . category ( ) == Category :: NaN
499499 }
500500
501- /// Returns true if and only if the float is a signaling NaN.
501+ /// Returns ` true` if the float is a signaling NaN.
502502 fn is_signaling ( self ) -> bool ;
503503
504504 // Simple Queries
@@ -517,19 +517,19 @@ pub trait Float
517517 self . is_zero ( ) && self . is_negative ( )
518518 }
519519
520- /// Returns true if and only if the number has the smallest possible non-zero
520+ /// Returns ` true` if the number has the smallest possible non-zero
521521 /// magnitude in the current semantics.
522522 fn is_smallest ( self ) -> bool {
523523 Self :: SMALLEST . copy_sign ( self ) . bitwise_eq ( self )
524524 }
525525
526- /// Returns true if and only if the number has the largest possible finite
526+ /// Returns ` true` if the number has the largest possible finite
527527 /// magnitude in the current semantics.
528528 fn is_largest ( self ) -> bool {
529529 Self :: largest ( ) . copy_sign ( self ) . bitwise_eq ( self )
530530 }
531531
532- /// Returns true if and only if the number is an exact integer.
532+ /// Returns ` true` if the number is an exact integer.
533533 fn is_integer ( self ) -> bool {
534534 // This could be made more efficient; I'm going for obviously correct.
535535 if !self . is_finite ( ) {
@@ -571,11 +571,11 @@ pub trait Float
571571}
572572
573573pub trait FloatConvert < T : Float > : Float {
574- /// Convert a value of one floating point type to another.
574+ /// Converts a value of one floating point type to another.
575575 /// The return value corresponds to the IEEE754 exceptions. *loses_info
576576 /// records whether the transformation lost information, i.e., whether
577577 /// converting the result back to the original type will produce the
578- /// original value (this is almost the same as return value== Status::OK,
578+ /// original value (this is almost the same as return ` value == Status::OK` ,
579579 /// but there are edge cases where this is not so).
580580 fn convert_r ( self , round : Round , loses_info : & mut bool ) -> StatusAnd < T > ;
581581 fn convert ( self , loses_info : & mut bool ) -> StatusAnd < T > {
0 commit comments