Absolute value for floats in core OCaml

When you type

absF -1.0;;

OCaml interprets it as

(absF) - (1.0);;

i.e. as a subtraction. Instead, do

absF (-1.0);;

Leave a Comment

tech