Skip to content

Commit 1773a4c

Browse files
committed
---
yaml --- r: 36504 b: refs/heads/try2 c: 28ecef7 h: refs/heads/master v: v3
1 parent ff14416 commit 1773a4c

File tree

3 files changed

+25
-1
lines changed

3 files changed

+25
-1
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: eb8fd119c65c67f3b1b8268cc7341c22d39b7b61
55
refs/heads/try: d324a424d8f84b1eb049b12cf34182bda91b0024
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 05e7ba8d397274a3ab7f621b0a1e84ca27f0c219
8+
refs/heads/try2: 28ecef7bf5c25439a565a000fe9acad1463a05c7
99
refs/heads/incoming: d9317a174e434d4c99fc1a37fd7dc0d2f5328d37
1010
refs/heads/dist-snap: 22efa39382d41b084fde1719df7ae8ce5697d8c9
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596

branches/try2/src/libcore/f32.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,18 @@ pub pure fn logarithm(n: f32, b: f32) -> f32 {
138138
return log2(n) / log2(b);
139139
}
140140

141+
impl f32 : cmp::Eq {
142+
pure fn eq(&self, other: &f32) -> bool { (*self) == (*other) }
143+
pure fn ne(&self, other: &f32) -> bool { (*self) != (*other) }
144+
}
145+
146+
impl f32 : cmp::Ord {
147+
pure fn lt(&self, other: &f32) -> bool { (*self) < (*other) }
148+
pure fn le(&self, other: &f32) -> bool { (*self) <= (*other) }
149+
pure fn ge(&self, other: &f32) -> bool { (*self) >= (*other) }
150+
pure fn gt(&self, other: &f32) -> bool { (*self) > (*other) }
151+
}
152+
141153
impl f32: num::Num {
142154
pure fn add(other: &f32) -> f32 { return self + *other; }
143155
pure fn sub(other: &f32) -> f32 { return self - *other; }

branches/try2/src/libcore/f64.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,18 @@ pub pure fn logarithm(n: f64, b: f64) -> f64 {
157157
return log2(n) / log2(b);
158158
}
159159

160+
impl f64 : cmp::Eq {
161+
pure fn eq(&self, other: &f64) -> bool { (*self) == (*other) }
162+
pure fn ne(&self, other: &f64) -> bool { (*self) != (*other) }
163+
}
164+
165+
impl f64 : cmp::Ord {
166+
pure fn lt(&self, other: &f64) -> bool { (*self) < (*other) }
167+
pure fn le(&self, other: &f64) -> bool { (*self) <= (*other) }
168+
pure fn ge(&self, other: &f64) -> bool { (*self) >= (*other) }
169+
pure fn gt(&self, other: &f64) -> bool { (*self) > (*other) }
170+
}
171+
160172
impl f64: num::Num {
161173
pure fn add(other: &f64) -> f64 { return self + *other; }
162174
pure fn sub(other: &f64) -> f64 { return self - *other; }

0 commit comments

Comments
 (0)