Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

optimization problem?

mmquan
초급자
346 조회수
I do some optimization to a fortran program, and I have another java program with the same function. I found that a real*8 (that is double in java) subtraction in fortran and java sometimes can result in different outputs! But not all the times, and the difference is also only the least significant bit. for example, 4084D455E2CFF392 and 4084D455E2CFF391.
But then I wrote another small program with the same operands and do subtraction again, fortran and java get the same output, that is 4084D455E2CFF391 instead of 4084D455E2CFF392.
So, I doubt whether the optimization has some problems?
0 포인트
0 응답
응답