When you type
absF -1.0;;
OCaml interprets it as
(absF) - (1.0);;
i.e. as a subtraction. Instead, do
absF (-1.0);;
Related Posts:
- List.fold_left in OCaml
- Ocaml Error Unbound Value when using Recursion
- Print a List in OCaml
- “Error: unbound module” in OCaml
- OCaml cons (::) operator?
- can’t multiply sequence by non-int of type ‘float’
- How do you round UP a number?
- How do you round UP a number?
- What is the difference between float and double?
- ValueError: could not convert string to float: id
- What is float in Java?
- Floating point exception (core dumped)
- Correct format specifier for double in printf
- (Python) TypeError: ‘float’ object is not subscriptable
- Floating Point Exception C++ Why and what is it?
- How do I parse a string to a float or int?
- Round a floating-point number down to the nearest integer?
- Limiting floats to two decimal points
- Should I use np.absolute or np.abs?
- TypeError: ‘float’ object not iterable
- 1e-9 or -1e9, which one is correct?
- C: printf a float value
- How to get a random number between a float range?
- How to deal with floating point number precision in JavaScript?
- C++: How to round a double to an int?
- Does != have meaning in OCaml?
- Floating Point Exception C++ Why and what is it?
- Best way to generate a random float in C#
- Random float number generation
- Why does a float variable stop incrementing at 16777216 in C#?
- How do I check if a string is a number (float)?
- C++ int float casting
- How to convert float number to Binary?
- Python, print all floats to 2 decimal places in output
- IDE for OCaml language
- How to truncate float values?
- How can I convert integer into float in Java?
- Difference between decimal, float and double in .NET?
- Difference between decimal, float and double in .NET?
- C convert floating point to int
- Numpy float64 vs Python float
- OCaml: Match expression inside another one?
- Easy pretty printing of floats?
- Float and double datatype in Java
- Python: Converting string into decimal number
- What does the `and` keyword mean in OCaml?
- Dealing with float precision in Javascript
- Integer absolute value in MIPS?
- How to parse float with two decimal places in javascript?
- What do F and D mean at the end of numeric literals?
- Using floats with sprintf() in embedded C
- Printf width specifier to maintain precision of floating-point value
- why f is placed after float values?
- Division of integers in Java
- Convert floats to ints in Pandas?
- How to convert string to float?
- C++ floating point to integer type conversions
- Is there a float input type in HTML5?
- OCaml mod function returns different result compared with %
- Value for epsilon in Python
- Convert float to double without losing precision
- Function to determine if two numbers are nearly equal when rounded to n significant decimal digits
- How to normalize a mantissa
- C++ float array initialization