Skip to content

Commit

Permalink
Print intervals rather than balls and radii
Browse files Browse the repository at this point in the history
  • Loading branch information
bmsherman committed Jun 25, 2019
1 parent d3cf697 commit 65f20eb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/interval.ml
Original file line number Diff line number Diff line change
Expand Up @@ -63,19 +63,19 @@ struct

let to_string i =
let l = lower i in
let lbrack = if D.is_negative_infinity l then "(" else "[" in
let lbrack = if false (*D.is_negative_infinity l*) then "(" else "[" in
let r = upper i in
let rbrack = if D.is_positive_infinity r then ")" else "]" in
let rbrack = if false (*D.is_positive_infinity r*) then ")" else "]" in
lbrack ^ D.to_string (lower i) ^ ", " ^ D.to_string (upper i) ^ rbrack

let to_string_number i =
let a = lower i in
(* let a = lower i in
let b = upper i in
if D.is_number a && D.is_number b then
let c = D.average a b in
let r = D.halve ~round:D.up (D.sub ~round:D.up b a) in
D.to_string c ^ " +- " ^ D.to_string r
else
else *)
to_string i

(* \subsection{Arithmetic} *)
Expand Down
2 changes: 1 addition & 1 deletion src/main.ml
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ let help_text = "Toplevel commands:
(try
let ty = TC.type_of tenv ctx e in
let v = E.eval true trace env (E.hnf env e) in
print_endline ("- : " ^ E.S.string_of_type ty ^ " = " ^ E.S.string_of_expr v) ;
print_endline ("- : " ^ E.S.string_of_type ty ^ " |= " ^ E.S.string_of_expr v) ;
(ctx, env, tenv)
with error -> (Message.report error; (ctx, env, tenv)))
| E.S.Definition (x, e, ot) ->
Expand Down

0 comments on commit 65f20eb

Please sign in to comment.