CakeML / cakeml

CakeML: A Verified Implementation of ML
https://cakeml.org
Other
964 stars 84 forks source link

Double.fma not returning anything. #730

Open bksaiki opened 4 years ago

bksaiki commented 4 years ago

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.

HeikoBecker commented 4 years ago

@bksaiki Which platform are you compiling for? CakeML supports FMA's only on certain architectures.

bksaiki commented 4 years ago

@HeikoBecker AMD64. Which ones are supported?