Permalink
Browse files

[cleanup] bsl: unused number functions

  • Loading branch information...
1 parent 4f16905 commit 2bd2d1658ed3b3780d497e6134e9de9108699575 Raja committed with Thomas Refis Sep 13, 2011
Showing with 0 additions and 50 deletions.
  1. +0 −32 opabsl/jsbsl/bslNumber.js
  2. +0 −18 opabsl/mlbsl/bslNumber.ml
View
@@ -97,36 +97,12 @@
return c1 <= c2
}
-##register lt:int, int -> bool
-##args(c1,c2)
-{
- return c1 < c2
-}
-
-##register eq:int, int -> bool
-##args(c1,c2)
-{
- return c1 == c2
-}
-
##register geq:int, int -> bool
##args(c1,c2)
{
return c1 >= c2
}
-##register gt:int, int -> bool
-##args(c1,c2)
-{
- return c1 > c2
-}
-
-##register neq:int, int -> bool
-##args(c1,c2)
-{
- return c1 != c2
-}
-
##register ordering: int,int -> opa[Order.ordering]
##args(c1,c2)
{
@@ -236,12 +212,6 @@
return %%BslPervasives.compare_gt%%
}
-##register round : float -> int
- ##args(v)
- {
- return Math.round(v)
- }
-
##endmodule
##module Math \ bsl_math
@@ -281,8 +251,6 @@
##register is_normal \ `isFinite` : float -> bool
-##register pi \ `Math.PI` : float
-
##endmodule
##module Random
View
@@ -52,21 +52,9 @@ let of_string_opt s =
##register leq: int, int -> bool
let leq (a:int) (b:int) = a <= b
-##register lt: int, int -> bool
-let lt (a:int) (b:int) = a < b
-
-##register eq: int, int -> bool
-let eq (a:int) (b:int) = a = b
-
##register geq: int, int -> bool
let geq (a:int) (b:int) = a >= b
-##register gt: int, int -> bool
-let gt (a:int) (b:int) = a > b
-
-##register neq: int, int -> bool
-let neq (a:int) (b:int) = a <> b
-
##register ordering: int, int -> opa[Order.ordering]
let ordering (a:int) (b:int) =
@@ -200,9 +188,6 @@ let comparison (a:float) (b:float) =
##module Math
-##register pi : float
- let pi = 4. *. (atan 1.);;
-
##register sqrt_f : float -> float
let sqrt_f = Pervasives.sqrt
@@ -254,9 +239,6 @@ let comparison (a:float) (b:float) =
##register tanh : float -> float
let tanh = Pervasives.tanh
-##register round : float -> int
- let round x = int_of_float (floor (x +. 0.5))
-
(* keep the coerse `x : float', otherwise isNaN(0.0 /. 0.0) is false *)
##register isNaN : float -> bool
let isNaN = (fun (x : float) -> not ( x = x ))

0 comments on commit 2bd2d16

Please sign in to comment.