cakeml icon indicating copy to clipboard operation
cakeml copied to clipboard

Double.fma not returning anything.

Open bksaiki opened this issue 5 years ago • 2 comments

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.

bksaiki avatar Mar 02 '20 22:03 bksaiki

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

HeikoBecker avatar Mar 05 '20 10:03 HeikoBecker

@HeikoBecker AMD64. Which ones are supported?

bksaiki avatar Mar 05 '20 16:03 bksaiki