Skip to content

Commit c3af385

Browse files
committed
---
yaml --- r: 140189 b: refs/heads/try2 c: 500078e h: refs/heads/master i: 140187: 9f8d937 v: v3
1 parent 46f5682 commit c3af385

File tree

7 files changed

+12
-6
lines changed

7 files changed

+12
-6
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: d3f494f5c3ce96da2e0c8090fc17a8738e4396c1
8+
refs/heads/try2: 500078e147e1e5f5cf9bd57459ebbdda652d97ed
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/libcore/core.rc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ pub use iter::{ExtendedMutableIter};
105105

106106
pub use num::{Num, NumCast};
107107
pub use num::{Orderable, Signed, Unsigned, Round};
108-
pub use num::{Algebraic, Trigonometric, Exponential};
108+
pub use num::{Algebraic, Trigonometric, Exponential, Hyperbolic};
109109
pub use num::{Integer, Fractional, Real, RealExt};
110110
pub use num::{Bitwise, BitCount, Bounded};
111111
pub use num::{Primitive, Int, Float};

branches/try2/src/libcore/num/f32.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,9 @@ impl Exponential for f32 {
425425

426426
#[inline(always)]
427427
fn log10(&self) -> f32 { log10(*self) }
428+
}
428429

430+
impl Hyperbolic for f32 {
429431
#[inline(always)]
430432
fn sinh(&self) -> f32 { sinh(*self) }
431433

branches/try2/src/libcore/num/f64.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,9 @@ impl Exponential for f64 {
437437

438438
#[inline(always)]
439439
fn log10(&self) -> f64 { log10(*self) }
440+
}
440441

442+
impl Hyperbolic for f64 {
441443
#[inline(always)]
442444
fn sinh(&self) -> f64 { sinh(*self) }
443445

branches/try2/src/libcore/num/float.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,9 @@ impl Exponential for float {
547547
fn log10(&self) -> float {
548548
(*self as f64).log10() as float
549549
}
550+
}
550551
552+
impl Hyperbolic for float {
551553
#[inline(always)]
552554
fn sinh(&self) -> float {
553555
(*self as f64).sinh() as float

branches/try2/src/libcore/num/num.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,9 @@ pub trait Exponential {
131131
fn log(&self) -> Self;
132132
fn log2(&self) -> Self;
133133
fn log10(&self) -> Self;
134+
}
134135

135-
// The Hyperbolic Functions are trivially implemented in terms of `exp`, so it's simpler
136-
// to group them within this trait. In the future these would have default implementations.
136+
pub trait Hyperbolic: Exponential {
137137
fn sinh(&self) -> Self;
138138
fn cosh(&self) -> Self;
139139
fn tanh(&self) -> Self;
@@ -146,7 +146,7 @@ pub trait Real: Signed
146146
+ Fractional
147147
+ Algebraic
148148
+ Trigonometric
149-
+ Exponential {
149+
+ Hyperbolic {
150150
// Common Constants
151151
// FIXME (#5527): These should be associated constants
152152
fn pi() -> Self;

branches/try2/src/libcore/prelude.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ pub use iter::{CopyableIter, CopyableOrderedIter, CopyableNonstrictIter};
3939
pub use iter::{Times, ExtendedMutableIter};
4040
pub use num::{Num, NumCast};
4141
pub use num::{Orderable, Signed, Unsigned, Round};
42-
pub use num::{Algebraic, Trigonometric, Exponential};
42+
pub use num::{Algebraic, Trigonometric, Exponential, Hyperbolic};
4343
pub use num::{Integer, Fractional, Real, RealExt};
4444
pub use num::{Bitwise, BitCount, Bounded};
4545
pub use num::{Primitive, Int, Float};

0 commit comments

Comments
 (0)