Skip to content

Commit feb92a8

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

File tree

3 files changed

+42
-1
lines changed

3 files changed

+42
-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: 9e4c2b6bc60335f3eb64d4ea0514bafabd264675
2+
refs/heads/master: a9f9227a1c3d944ea9f5d88c721fbb32473b5454

trunk/src/lib/float.rs

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

226+
/* Function: add */
226227
pure fn add(x: float, y: float) -> float { ret x + y; }
227228

229+
/* Function: sub */
228230
pure fn sub(x: float, y: float) -> float { ret x - y; }
229231

232+
/* Function: mul */
230233
pure fn mul(x: float, y: float) -> float { ret x * y; }
231234

235+
/* Function: div */
232236
pure fn div(x: float, y: float) -> float { ret x / y; }
233237

238+
/* Function: rem */
234239
pure fn rem(x: float, y: float) -> float { ret x % y; }
235240

241+
/* Predicate: lt */
236242
pure fn lt(x: float, y: float) -> bool { ret x < y; }
237243

244+
/* Predicate: le */
238245
pure fn le(x: float, y: float) -> bool { ret x <= y; }
239246

247+
/* Predicate: eq */
240248
pure fn eq(x: float, y: float) -> bool { ret x == y; }
241249

250+
/* Predicate: ne */
242251
pure fn ne(x: float, y: float) -> bool { ret x != y; }
243252

253+
/* Predicate: ge */
244254
pure fn ge(x: float, y: float) -> bool { ret x >= y; }
245255

256+
/* Predicate: gt */
246257
pure fn gt(x: float, y: float) -> bool { ret x > y; }
247258

259+
/* Predicate: positive */
248260
pure fn positive(x: float) -> bool { ret x > 0.; }
249261

262+
/* Predicate: negative */
250263
pure fn negative(x: float) -> bool { ret x < 0.; }
251264

265+
/* Predicate: nonpositive */
252266
pure fn nonpositive(x: float) -> bool { ret x <= 0.; }
253267

268+
/* Predicate: nonnegative */
254269
pure fn nonnegative(x: float) -> bool { ret x >= 0.; }
255270

256271
//

trunk/src/lib/u8.rs

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,52 @@
1+
/*
2+
Module: u8
3+
*/
4+
5+
/*
6+
Function: max_value
7+
8+
The maximum value of a u8.
9+
*/
110
pure fn max_value() -> u8 { ret 255u8; }
11+
12+
/*
13+
Function: min_value
14+
15+
The minumum value of a u8.
16+
*/
217
pure fn min_value() -> u8 { ret 0u8; }
318

19+
/* Function: add */
420
pure fn add(x: u8, y: u8) -> u8 { ret x + y; }
521

22+
/* Function: sub */
623
pure fn sub(x: u8, y: u8) -> u8 { ret x - y; }
724

25+
/* Function: mul */
826
pure fn mul(x: u8, y: u8) -> u8 { ret x * y; }
927

28+
/* Function: div */
1029
pure fn div(x: u8, y: u8) -> u8 { ret x / y; }
1130

31+
/* Function: rem */
1232
pure fn rem(x: u8, y: u8) -> u8 { ret x % y; }
1333

34+
/* Predicate: lt */
1435
pure fn lt(x: u8, y: u8) -> bool { ret x < y; }
1536

37+
/* Predicate: le */
1638
pure fn le(x: u8, y: u8) -> bool { ret x <= y; }
1739

40+
/* Predicate: eq */
1841
pure fn eq(x: u8, y: u8) -> bool { ret x == y; }
1942

43+
/* Predicate: ne */
2044
pure fn ne(x: u8, y: u8) -> bool { ret x != y; }
2145

46+
/* Predicate: ge */
2247
pure fn ge(x: u8, y: u8) -> bool { ret x >= y; }
2348

49+
/* Predicate: gt */
2450
pure fn gt(x: u8, y: u8) -> bool { ret x > y; }
2551

2652
fn range(lo: u8, hi: u8, it: block(u8)) {

0 commit comments

Comments
 (0)