Skip to content

Commit 3515b49

Browse files
committed
Remove unnecessary infinity check
1 parent 44cb46f commit 3515b49

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/libcore/num/f32.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -464,9 +464,8 @@ impl Hyperbolic for f32 {
464464
#[inline(always)]
465465
fn asinh(&self) -> f32 {
466466
match *self {
467-
infinity => infinity,
468467
neg_infinity => neg_infinity,
469-
x => (x + ((x * x) + 1.0).sqrt()).ln(),
468+
x => (x + ((x * x) + 1.0).sqrt()).ln(),
470469
}
471470
}
472471

src/libcore/num/f64.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -476,9 +476,8 @@ impl Hyperbolic for f64 {
476476
#[inline(always)]
477477
fn asinh(&self) -> f64 {
478478
match *self {
479-
infinity => infinity,
480479
neg_infinity => neg_infinity,
481-
x => (x + ((x * x) + 1.0).sqrt()).ln(),
480+
x => (x + ((x * x) + 1.0).sqrt()).ln(),
482481
}
483482
}
484483

0 commit comments

Comments
 (0)