- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello All,
Recently I met some result differences when I tried to use compier options from O0 to O3.
Though theyare trvial and even can be ignored, I still want to know more clear about them.
1. one variable value is 2.468057e-18for O0 and 1.676039e-18for O3.
This variable looks very small.
I tried '-ftz/-zero/-no-bss-init' options with O3 but no any influence.
2. variable F=4867459.8367both for O0 and O3
While F-ksi=-9.31323e-10 for O0 and -1.86265e-09 for O3
All data here are double.
In my memory double stype data has 15-16 valid numbers, then F-ksi e-9 should not make sense at all.
But how to eliminate these differences from compiler site?
Thanks & Best Regards
Recently I met some result differences when I tried to use compier options from O0 to O3.
Though theyare trvial and even can be ignored, I still want to know more clear about them.
1. one variable value is 2.468057e-18for O0 and 1.676039e-18for O3.
This variable looks very small.
I tried '-ftz/-zero/-no-bss-init' options with O3 but no any influence.
2. variable F=4867459.8367both for O0 and O3
While F-ksi=-9.31323e-10 for O0 and -1.86265e-09 for O3
All data here are double.
In my memory double stype data has 15-16 valid numbers, then F-ksi e-9 should not make sense at all.
But how to eliminate these differences from compiler site?
Thanks & Best Regards
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Could you please try the following:
Linux and Mac OS X: -fp-modelprecise
Windows: /fp:precise
If the above does not work then you may try
Linux and Mac OS X: -fp-model source
Windows: /fp:source
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Om Sachan,
Thanks, I forget fp-model option :-)
In fact fp-model precise worked and eliminated these difference.
To my unstandings, fp-model precise may decrease performance.
Based my upper decription, could these difference be ignored?
Thanks
Thanks, I forget fp-model option :-)
In fact fp-model precise worked and eliminated these difference.
To my unstandings, fp-model precise may decrease performance.
Based my upper decription, could these difference be ignored?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, the fp-model precise may decrease performance.
The error tolerance depends on the application. The application owner should know better.
The error tolerance depends on the application. The application owner should know better.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting xuzheng97
1. one variable value is 2.468057e-18for O0 and 1.676039e-18for O3.
This variable looks very small.
"Small" compared to what? 1 ? How about compared to 0 ? The diameter of an electron in light-years ?
2. variable F=4867459.8367both for O0 and O3
While F-ksi=-9.31323e-10 for O0 and -1.86265e-09 for O3
... then F-ksi e-9 should not make sense at all.
We have no idea what "F-ksi" is; therefore, any judgements about its value making sense are premature.
But how to eliminate these differences from compiler site?
You cannot, except in a contrived and pointless way. You would benefit by reading books and articles about what to expect from finite-precision calculations. For starters, Google "perfidious polynomial" and read some of the articles related to that.
1. one variable value is 2.468057e-18for O0 and 1.676039e-18for O3.
This variable looks very small.
"Small" compared to what? 1 ? How about compared to 0 ? The diameter of an electron in light-years ?
2. variable F=4867459.8367both for O0 and O3
While F-ksi=-9.31323e-10 for O0 and -1.86265e-09 for O3
... then F-ksi e-9 should not make sense at all.
We have no idea what "F-ksi" is; therefore, any judgements about its value making sense are premature.
But how to eliminate these differences from compiler site?
You cannot, except in a contrived and pointless way. You would benefit by reading books and articles about what to expect from finite-precision calculations. For starters, Google "perfidious polynomial" and read some of the articles related to that.

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