Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7929 Discussions

Which is more precise, "-mp1" or "-prec-div -prec-sqrt"?

maverick6664
Beginner
396 Views
Title says it all. Which is precise when sse,sse2,sse3 is enabled in icc 9.0/9.1? IMHO they look the same in concept...



Thanks in advance!

Message Edited by maverick6664 on 05-02-200607:22 AM

0 Kudos
4 Replies
TimP
Black Belt
396 Views
-mp1 includes the effect of -prec-div -prec-sqrt. Either way, you require the compiler to use the fully accurate instructions for divide and sqrt().
0 Kudos
maverick6664
Beginner
396 Views
Thank you for your reply.

Then how about replacing -mp1 with "-prec-div -prec-sqrt"? Are they the same? Reading the manual, I cannot see the difference between these two. But it sounds like -mp1 performs NaN comparison closer to (or compliant with?) ieee754 while "-prec-div -prec-sqrt" doesn't. Then they are different. I noticed -mp1 option is significantly faster than -mp option. So I want to know the behaviour of -mp1.

I'm eager to know this because I'm using icc/ifort(?) in scientific math program (scilab).

regards,

-Tetsuji

Message Edited by maverick6664 on 05-02-200610:11 AM

0 Kudos
TimP
Black Belt
396 Views
You could set the additional option -# and see the expansion in terms of internal options for your option choices. One would expect that -mp1 makes more settings conservative than simply the divide and sqrt().
If you are looking for more frequent IEEE compliance on NaN handling, you should consider the -fp-model options. -fp-model precise treats parentheses similar to -mp, but does not promote expressions to long double, as -mp does.
0 Kudos
maverick6664
Beginner
396 Views
ok, thanks! I forgot -# option!

regards,

-Tetsuji
0 Kudos
Reply