put_dbl I/O macro destroys some of the XMMx registers. Following the
call to put_dbl add statements in the program that help you determine which
registers are destroyed by the call.
error= Math.abs(estimate - goal);
if (error <= cutoff)
System.out.println("Answer is: "+estimate);
else
System.out.println("Try again!");
NOTE: We calculate the absolute value of the difference of the estimate and the goal because the difference could be negative.
Use what you know about calling C-language functions in assembly code to calculate x= fabs(-2.4); by calling the C fabs function.
NOTE: To properly assemble and link the code you'll need to add the -lm switch to indicate you want to include C's math library:
nasm -f elf64 myprog.asm gcc myprog.o -lm