Skip to content

Rename round to nearestint. #38

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 2, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ml-proto/src/arithmetic.ml
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ struct
| Ceil -> ceil
| Floor -> floor
| Trunc -> fun _ -> 0.0 (* TODO *)
| Round -> fun _ -> 0.0 (* TODO *)
| Nearest -> fun _ -> 0.0 (* TODO *)
| Sqrt -> sqrt
in fun v -> Float.to_value (f (Float.of_value 1 v))

Expand Down
2 changes: 1 addition & 1 deletion ml-proto/src/ast.ml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ end

module FloatOp () =
struct
type unop = Neg | Abs | Ceil | Floor | Trunc | Round | Sqrt
type unop = Neg | Abs | Ceil | Floor | Trunc | Nearest | Sqrt
type binop = Add | Sub | Mul | Div | CopySign
type relop = Eq | Neq | Lt | Le | Gt | Ge
type cvt = ToInt32S | ToInt32U | ToInt64S | ToInt64U | ToIntCast
Expand Down
2 changes: 1 addition & 1 deletion ml-proto/src/lexer.mll
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ rule token = parse
| "ceil."(fxx as t) { UNARY (floatop t F32.Ceil F64.Ceil) }
| "floor."(fxx as t) { UNARY (floatop t F32.Floor F64.Floor) }
| "trunc."(fxx as t) { UNARY (floatop t F32.Trunc F64.Trunc) }
| "round."(fxx as t) { UNARY (floatop t F32.Round F64.Round) }
| "nearest."(fxx as t) { UNARY (floatop t F32.Nearest F64.Nearest) }
| "sqrt."(fxx as t) { UNARY (floatop t F32.Sqrt F64.Sqrt) }

| "add."(ixx as t) { BINARY (intop t I32.Add I64.Add) }
Expand Down