- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
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?
Link Copied
0 Replies

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page