CakeML / CakeML/cakeml

Double.fma not returning anything.

Open
#730 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Standard ML
Stars
1.2k
Forks
104
Avg merge
2d 21h
Merged PRs (30d)
16

Description

Double.fma doesn't return a value and breaks subsequent code in certain cases. It does, however, always compile.

Example program:
```
fun main () =
let
val a = (Double.fromString "1.0")
val b = (Double.fromString "2.0")
val c = (Double.fromString "3.0")
val r = (Double.fma a b c)
val r2 = (Double.+ a r)
in
print ((Double.toString a) ^ "\nHello, World!\n")
end;

main ();
```

As expected, this program prints:
```
1.000000000000
Hello, World!
```
However, attempting to print the results of fma by replacing `(Double.toString a)` with `(Double.toString r)`, results in no output.

Additionally, attempting to print the results of later mathematical operations involving the result of fma with `(Double.toString r2)`, results in no output.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.