Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
J
jsexplain
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Verified Software
jsexplain
Commits
d8dc2e98
Commit
d8dc2e98
authored
9 years ago
by
Alan Schmitt
Browse files
Options
Downloads
Patches
Plain Diff
some comments
parent
69a4a6bb
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
generator/stdlib_ml/stdlib.mli
+33
-1
33 additions, 1 deletion
generator/stdlib_ml/stdlib.mli
with
33 additions
and
1 deletion
generator/stdlib_ml/stdlib.mli
+
33
−
1
View file @
d8dc2e98
...
...
@@ -4,7 +4,6 @@
(* todo : factorize and clean up *)
val
(
~+
)
:
int
->
int
val
(
~-
)
:
int
->
int
val
(
+
)
:
int
->
int
->
int
...
...
@@ -12,17 +11,29 @@ val ( - ) : int -> int -> int
val
(
*
)
:
int
->
int
->
int
val
(
/
)
:
int
->
int
->
int
(* Alan: I don't think fpclass is needed *)
type
fpclass
=
|
FP_normal
|
FP_subnormal
|
FP_zero
|
FP_infinite
|
FP_nan
(* Alan: these can be implemented directly, using NaN, Infinity, -Infinity *)
val
nan
:
float
val
infinity
:
float
val
neg_infinity
:
float
(* Alan: Do we need these ? *)
val
max_float
:
float
val
min_float
:
float
(* Alan: these should all be implemented along with the int operations as the JS
ones. ** is Math.pow *)
val
(
~+.
)
:
float
->
float
val
(
~-.
)
:
float
->
float
val
(
+.
)
:
float
->
float
->
float
...
...
@@ -30,18 +41,33 @@ val ( -. ) : float -> float -> float
val
(
*.
)
:
float
->
float
->
float
val
(
/.
)
:
float
->
float
->
float
val
(
**
)
:
float
->
float
->
float
(* Alan: Math.abs, if we need it *)
val
abs_float
:
float
->
float
(* Alan: % infix *)
val
mod_float
:
float
->
float
->
float
(* Alan: Why do we need these? If need be, they are all in Math *)
val
atan
:
float
->
float
val
exp
:
float
->
float
val
log
:
float
->
float
val
floor
:
float
->
float
val
min
:
float
->
float
->
float
val
max
:
float
->
float
->
float
(* Alan: do we need this? *)
val
classify_float
:
float
->
fpclass
val
int_abs
:
int
->
int
(* Alan: Ideally we would add these to the spec, but for the moment conversion
to a string is doing a foo+"", and conversion to an int is doing +foo *)
val
float_of_int
:
int
->
float
val
float_of_string
:
string
->
float
val
int_of_char
:
char
->
int
...
...
@@ -77,6 +103,9 @@ val number_of_int : int -> float (* = fun x -> float_of_int x *)
val
nat_eq
:
int
->
int
->
bool
(* nat_eq x y = int_eq x y *)
(* Alan: why are these here? *)
val
pi
:
float
val
e
:
float
val
ln2
:
float
...
...
@@ -154,6 +183,9 @@ end
(*--------------------*)
(* todo: remove when JsNumber.ml becomes .mli file *)
(* Alan: I'll do this *)
module
Int32
:
sig
val
logand
:
int32
->
int32
->
int32
val
lognot
:
int32
->
int32
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment