Skip to content

Commit 40355f4

Browse files
mbrubeckbrson
authored andcommitted
---
yaml --- r: 5977 b: refs/heads/master c: 8dba51b h: refs/heads/master i: 5975: 10afe13 v: v3
1 parent d0d7046 commit 40355f4

File tree

2 files changed

+31
-1
lines changed

2 files changed

+31
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 361adf9f862c9127adf245c681c8c89ef2edda11
2+
refs/heads/master: 8dba51b87c2889df2be4f9795fbec4179d94343d

trunk/src/lib/float.rs

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,36 @@ fn neg_infinity() -> float {
223223
ret -1./0.;
224224
}
225225

226+
pure fn add(x: float, y: float) -> float { ret x + y; }
227+
228+
pure fn sub(x: float, y: float) -> float { ret x - y; }
229+
230+
pure fn mul(x: float, y: float) -> float { ret x * y; }
231+
232+
pure fn div(x: float, y: float) -> float { ret x / y; }
233+
234+
pure fn rem(x: float, y: float) -> float { ret x % y; }
235+
236+
pure fn lt(x: float, y: float) -> bool { ret x < y; }
237+
238+
pure fn le(x: float, y: float) -> bool { ret x <= y; }
239+
240+
pure fn eq(x: float, y: float) -> bool { ret x == y; }
241+
242+
pure fn ne(x: float, y: float) -> bool { ret x != y; }
243+
244+
pure fn ge(x: float, y: float) -> bool { ret x >= y; }
245+
246+
pure fn gt(x: float, y: float) -> bool { ret x > y; }
247+
248+
pure fn positive(x: float) -> bool { ret x > 0.; }
249+
250+
pure fn negative(x: float) -> bool { ret x < 0.; }
251+
252+
pure fn nonpositive(x: float) -> bool { ret x <= 0.; }
253+
254+
pure fn nonnegative(x: float) -> bool { ret x >= 0.; }
255+
226256
//
227257
// Local Variables:
228258
// mode: rust

0 commit comments

Comments
 (0)