@@ -424,6 +424,8 @@ impl f32 {
424
424
425
425
/// Returns the natural logarithm of the number.
426
426
///
427
+ /// This returns NaN when the number is negative, and negative infinity when number is zero.
428
+ ///
427
429
/// # Unspecified precision
428
430
///
429
431
/// The precision of this function is non-deterministic. This means it varies by platform, Rust version, and
@@ -451,6 +453,8 @@ impl f32 {
451
453
452
454
/// Returns the logarithm of the number with respect to an arbitrary base.
453
455
///
456
+ /// This returns NaN when the number is negative, and negative infinity when number is zero.
457
+ ///
454
458
/// The result might not be correctly rounded owing to implementation details;
455
459
/// `self.log2()` can produce more accurate results for base 2, and
456
460
/// `self.log10()` can produce more accurate results for base 10.
@@ -480,6 +484,8 @@ impl f32 {
480
484
481
485
/// Returns the base 2 logarithm of the number.
482
486
///
487
+ /// This returns NaN when the number is negative, and negative infinity when number is zero.
488
+ ///
483
489
/// # Unspecified precision
484
490
///
485
491
/// The precision of this function is non-deterministic. This means it varies by platform, Rust version, and
@@ -505,6 +511,8 @@ impl f32 {
505
511
506
512
/// Returns the base 10 logarithm of the number.
507
513
///
514
+ /// This returns NaN when the number is negative, and negative infinity when number is zero.
515
+ ///
508
516
/// # Unspecified precision
509
517
///
510
518
/// The precision of this function is non-deterministic. This means it varies by platform, Rust version, and
0 commit comments