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

mathimf and windows

Petros_Mamales
Beginner
3,325 Views

Hi,

I have a couple of questions on the usage of the math library in windows (64bit, vs2010).

In the documentation of the intel c++ compiler (12.1), in the article "Using Intel Math Library" a simple program appropriate for windows is presented and then the user is instructed to add the compilation flags /Qlong-double /Qpc80 . After adding them in the Additional Compile Options of project properties (there is no visual entry for this), I got a warning that the options are not recognized and therefore ignored . What am I doing wrong ?

Also, tried to go through the mathimf.h file and so some ppc macro __INTEL_COMPILER (or something very similar). Where is this defined ? Should I define it ? Also there seems to be __ICL etc. where can one obtain a list of the meaning of these macros ? Unfortunately the documentation shipped with the product (Parallel Studio 2011) leaves some to be desired..

Thank you in advance for your help,

Petros

0 Kudos
97 Replies
SergeyKostrov
Valued Contributor II
594 Views
>>it aborts on line : >> >>uiControlWordx87 = CrtControl87( _RTFPU_PC_64, _RTFPU_MCW_PC ); [ SergeyK ] Could you try the same test with _RTFPU_PC_53 ( 53-bit precision )? >> >>( something about an assertion on ieee.c line 109) Petros, could you provide a screenshot, or a description of what you've done, or any additional information ( as much as you can ) about origins of ieee.c file? Also, I will create a complete Visual Studio project by the end of the week to simplify your investigation. It is not clear for me what is going on on your computer.
0 Kudos
Bernard
Valued Contributor I
594 Views

Sergey Kostrov wrote:

>>>>...In particular I don't know what RTuint, RTint, _RTFPU_PC_64 and _RTFPU_MCW_PC are...
>>
>>...do these typedefs belong to your Real time library?

Yes and I provided a short instruction on required changes a couple of posts before this one. RT stands for Run-Time.

I confused it with  Real-Time  library.IIRC few months ago you talked about the such a library.

0 Kudos
Petros_Mamales
Beginner
594 Views

Sergey,

I have never used ieee.c. Simply including the float.h and the mathimf.h.

I think it is better to wait for your test project (it is already Thursday, even beginning/middle of next week would be very OK )

.Thank you very much for all your help !

P-

0 Kudos
SergeyKostrov
Valued Contributor II
594 Views
A short follow up. >>...>>( something about an assertion on ieee.c line 109)... I reproduced the Debug Assertion Failed error message and I need a confirmation that you've tried to execute a 64-bit test application on a 64-bit Windows platform. I'll provide all the rest details as soon as the VS test project is ready.
0 Kudos
SergeyKostrov
Valued Contributor II
594 Views
>>...I'll provide all the rest details as soon as the VS test project is ready Here it is:
debugassertionfailed.jpg
and it comes from msvcr80d.dll. In Debug configuration expression ( mask &~ ( _MCW_DN | _MCW_EM | _MCW_RC ) ) == 0 checks that _MCW_PC bits are not set ( you need to press Ignore button because the message is actually a warning ).
0 Kudos
SergeyKostrov
Valued Contributor II
594 Views
VS 2005 ( Professional Edition ) projects for Intel and Microsoft C/C++ compilers attached.
0 Kudos
SergeyKostrov
Valued Contributor II
594 Views
This is what you should see: [ Microsoft C++ compiler / on 32-bit Windows / DEBUG ] Output: 32-bit Windows platform - Configuration: DEBUG Test-Case 1 Size of [ long double ] is: 8 Test-Case 2 _CW_DEFAULT & ALLBITSON: 0x9001F _PC_24 & _MCW_PC : 0xA001F _PC_53 & _MCW_PC : 0x9001F _PC_64 & _MCW_PC : 0x8001F Test-Case 3.1 Accuracy _CW_DEFAULT - long double - Result: 1.0000000000079181 Sub-Test 3.2 Accuracy _PC_24 - long double - Result: 1.0090389251708984 Test-Case 3.3 Accuracy _PC_53 - long double - Result: 1.0000000000079181 Test-Case 3.4 Accuracy _PC_64 - long double - Result: 1.0000000000079181 Test-Case 4 Matrix A 101.0 201.0 301.0 401.0 501.0 601.0 701.0 801.0 901.0 1001.0 1101.0 1201.0 1301.0 1401.0 1501.0 1601.0 1701.0 1801.0 1901.0 2001.0 2101.0 2201.0 2301.0 2401.0 2501.0 2601.0 2701.0 2801.0 2901.0 3001.0 3101.0 3201.0 3301.0 3401.0 3501.0 3601.0 3701.0 3801.0 3901.0 4001.0 4101.0 4201.0 4301.0 4401.0 4501.0 4601.0 4701.0 4801.0 4901.0 5001.0 5101.0 5201.0 5301.0 5401.0 5501.0 5601.0 5701.0 5801.0 5901.0 6001.0 6101.0 6201.0 6301.0 6401.0 Matrix B 101.0 201.0 301.0 401.0 501.0 601.0 701.0 801.0 901.0 1001.0 1101.0 1201.0 1301.0 1401.0 1501.0 1601.0 1701.0 1801.0 1901.0 2001.0 2101.0 2201.0 2301.0 2401.0 2501.0 2601.0 2701.0 2801.0 2901.0 3001.0 3101.0 3201.0 3301.0 3401.0 3501.0 3601.0 3701.0 3801.0 3901.0 4001.0 4101.0 4201.0 4301.0 4401.0 4501.0 4601.0 4701.0 4801.0 4901.0 5001.0 5101.0 5201.0 5301.0 5401.0 5501.0 5601.0 5701.0 5801.0 5901.0 6001.0 6101.0 6201.0 6301.0 6401.0 MFPT Used Matrix C - Result 13826808.0 14187608.0 14548408.0 14909208.0 15270008.0 15630808.0 15991608.0 16352408.0 32393208.0 33394008.0 34394808.0 35395608.0 36396408.0 37397208.0 38398008.0 39398808.0 50959608.0 52600408.0 54241208.0 55882008.0 57522808.0 59163608.0 60804408.0 62445208.0 69526008.0 71806808.0 74087608.0 76368408.0 78649208.0 80930008.0 83210808.0 85491608.0 88092408.0 91013208.0 93934008.0 96854808.0 99775608.0 102696408.0 105617208.0 108538008.0 106658808.0 110219608.0 113780408.0 117341208.0 120902008.0 124462808.0 128023608.0 131584408.0 125225208.0 129426008.0 133626808.0 137827616.0 142028416.0 146229216.0 150430016.0 154630816.0 143791616.0 148632416.0 153473216.0 158314016.0 163154816.0 167995616.0 172836416.0 177677216.0 Press ESC to Exit... [ Microsoft C++ compiler / on 32-bit Windows / RELEASE ] Output: 32-bit Windows platform - Configuration: RELEASE Test-Case 1 Size of [ long double ] is: 8 Test-Case 2 _CW_DEFAULT & ALLBITSON: 0x9001F _PC_24 & _MCW_PC : 0xA001F _PC_53 & _MCW_PC : 0x9001F _PC_64 & _MCW_PC : 0x8001F Test-Case 3.1 Accuracy _CW_DEFAULT - long double - Result: 1.0000000000079181 Sub-Test 3.2 Accuracy _PC_24 - long double - Result: 1.0090389251708984 Test-Case 3.3 Accuracy _PC_53 - long double - Result: 1.0000000000079181 Test-Case 3.4 Accuracy _PC_64 - long double - Result: 1.0000000000000109 Test-Case 4 Matrix A 101.0 201.0 301.0 401.0 501.0 601.0 701.0 801.0 901.0 1001.0 1101.0 1201.0 1301.0 1401.0 1501.0 1601.0 1701.0 1801.0 1901.0 2001.0 2101.0 2201.0 2301.0 2401.0 2501.0 2601.0 2701.0 2801.0 2901.0 3001.0 3101.0 3201.0 3301.0 3401.0 3501.0 3601.0 3701.0 3801.0 3901.0 4001.0 4101.0 4201.0 4301.0 4401.0 4501.0 4601.0 4701.0 4801.0 4901.0 5001.0 5101.0 5201.0 5301.0 5401.0 5501.0 5601.0 5701.0 5801.0 5901.0 6001.0 6101.0 6201.0 6301.0 6401.0 Matrix B 101.0 201.0 301.0 401.0 501.0 601.0 701.0 801.0 901.0 1001.0 1101.0 1201.0 1301.0 1401.0 1501.0 1601.0 1701.0 1801.0 1901.0 2001.0 2101.0 2201.0 2301.0 2401.0 2501.0 2601.0 2701.0 2801.0 2901.0 3001.0 3101.0 3201.0 3301.0 3401.0 3501.0 3601.0 3701.0 3801.0 3901.0 4001.0 4101.0 4201.0 4301.0 4401.0 4501.0 4601.0 4701.0 4801.0 4901.0 5001.0 5101.0 5201.0 5301.0 5401.0 5501.0 5601.0 5701.0 5801.0 5901.0 6001.0 6101.0 6201.0 6301.0 6401.0 MFPT Used Matrix C - Result 13826808.0 14187608.0 14548408.0 14909208.0 15270008.0 15630808.0 15991608.0 16352408.0 32393208.0 33394008.0 34394808.0 35395608.0 36396408.0 37397208.0 38398008.0 39398808.0 50959608.0 52600408.0 54241208.0 55882008.0 57522808.0 59163608.0 60804408.0 62445208.0 69526008.0 71806808.0 74087608.0 76368408.0 78649208.0 80930008.0 83210808.0 85491608.0 88092408.0 91013208.0 93934008.0 96854808.0 99775608.0 102696408.0 105617208.0 108538008.0 106658808.0 110219608.0 113780408.0 117341208.0 120902008.0 124462808.0 128023608.0 131584408.0 125225208.0 129426008.0 133626808.0 137827616.0 142028416.0 146229216.0 150430016.0 154630816.0 143791616.0 148632416.0 153473216.0 158314016.0 163154816.0 167995616.0 172836416.0 177677216.0 Press ESC to Exit...
0 Kudos
SergeyKostrov
Valued Contributor II
594 Views
[ Intel C++ compiler / on 32-bit Windows / DEBUG ] Output: 32-bit Windows platform - Configuration: DEBUG Test-Case 1 Size of [ long double ] is: 16 Test-Case 2 _CW_DEFAULT & ALLBITSON: 0x9001F _PC_24 & _MCW_PC : 0xA001F _PC_53 & _MCW_PC : 0x9001F _PC_64 & _MCW_PC : 0x8001F Test-Case 3.1 Accuracy _CW_DEFAULT - long double - Result: 1.0000000000079181 Sub-Test 3.2 Accuracy _PC_24 - long double - Result: 1.0090389251708984 Test-Case 3.3 Accuracy _PC_53 - long double - Result: 1.0000000000079181 Test-Case 3.4 Accuracy _PC_64 - long double - Result: 1.0000000000000109 Test-Case 4 Matrix A 101.0 201.0 301.0 401.0 501.0 601.0 701.0 801.0 901.0 1001.0 1101.0 1201.0 1301.0 1401.0 1501.0 1601.0 1701.0 1801.0 1901.0 2001.0 2101.0 2201.0 2301.0 2401.0 2501.0 2601.0 2701.0 2801.0 2901.0 3001.0 3101.0 3201.0 3301.0 3401.0 3501.0 3601.0 3701.0 3801.0 3901.0 4001.0 4101.0 4201.0 4301.0 4401.0 4501.0 4601.0 4701.0 4801.0 4901.0 5001.0 5101.0 5201.0 5301.0 5401.0 5501.0 5601.0 5701.0 5801.0 5901.0 6001.0 6101.0 6201.0 6301.0 6401.0 Matrix B 101.0 201.0 301.0 401.0 501.0 601.0 701.0 801.0 901.0 1001.0 1101.0 1201.0 1301.0 1401.0 1501.0 1601.0 1701.0 1801.0 1901.0 2001.0 2101.0 2201.0 2301.0 2401.0 2501.0 2601.0 2701.0 2801.0 2901.0 3001.0 3101.0 3201.0 3301.0 3401.0 3501.0 3601.0 3701.0 3801.0 3901.0 4001.0 4101.0 4201.0 4301.0 4401.0 4501.0 4601.0 4701.0 4801.0 4901.0 5001.0 5101.0 5201.0 5301.0 5401.0 5501.0 5601.0 5701.0 5801.0 5901.0 6001.0 6101.0 6201.0 6301.0 6401.0 MFPT Used Matrix C - Result 13826808.0 14187608.0 14548408.0 14909208.0 15270008.0 15630808.0 15991608.0 16352408.0 32393208.0 33394008.0 34394808.0 35395608.0 36396408.0 37397208.0 38398008.0 39398808.0 50959608.0 52600408.0 54241208.0 55882008.0 57522808.0 59163608.0 60804408.0 62445208.0 69526008.0 71806808.0 74087608.0 76368408.0 78649208.0 80930008.0 83210808.0 85491608.0 88092408.0 91013208.0 93934008.0 96854808.0 99775608.0 102696408.0 105617208.0 108538008.0 106658808.0 110219608.0 113780408.0 117341208.0 120902008.0 124462800.0 128023600.0 131584400.0 125225200.0 129426000.0 133626800.0 137827600.0 142028400.0 146229200.0 150430000.0 154630800.0 143791600.0 148632400.0 153473200.0 158314000.0 163154800.0 167995600.0 172836400.0 177677200.0 Press ESC to Exit... [ Intel C++ compiler / on 32-bit Windows / RELEASE ] Output: 32-bit Windows platform - Configuration: RELEASE Test-Case 1 Size of [ long double ] is: 16 Test-Case 2 _CW_DEFAULT & ALLBITSON: 0x109001F _PC_24 & _MCW_PC : 0x10A001F _PC_53 & _MCW_PC : 0x109001F _PC_64 & _MCW_PC : 0x108001F Test-Case 3.1 Accuracy _CW_DEFAULT - long double - Result: 1.0000000000079181 Sub-Test 3.2 Accuracy _PC_24 - long double - Result: 1.0090389251708984 Test-Case 3.3 Accuracy _PC_53 - long double - Result: 1.0000000000079181 Test-Case 3.4 Accuracy _PC_64 - long double - Result: 1.0000000000000109 Test-Case 4 Matrix A 101.0 201.0 301.0 401.0 501.0 601.0 701.0 801.0 901.0 1001.0 1101.0 1201.0 1301.0 1401.0 1501.0 1601.0 1701.0 1801.0 1901.0 2001.0 2101.0 2201.0 2301.0 2401.0 2501.0 2601.0 2701.0 2801.0 2901.0 3001.0 3101.0 3201.0 3301.0 3401.0 3501.0 3601.0 3701.0 3801.0 3901.0 4001.0 4101.0 4201.0 4301.0 4401.0 4501.0 4601.0 4701.0 4801.0 4901.0 5001.0 5101.0 5201.0 5301.0 5401.0 5501.0 5601.0 5701.0 5801.0 5901.0 6001.0 6101.0 6201.0 6301.0 6401.0 Matrix B 101.0 201.0 301.0 401.0 501.0 601.0 701.0 801.0 901.0 1001.0 1101.0 1201.0 1301.0 1401.0 1501.0 1601.0 1701.0 1801.0 1901.0 2001.0 2101.0 2201.0 2301.0 2401.0 2501.0 2601.0 2701.0 2801.0 2901.0 3001.0 3101.0 3201.0 3301.0 3401.0 3501.0 3601.0 3701.0 3801.0 3901.0 4001.0 4101.0 4201.0 4301.0 4401.0 4501.0 4601.0 4701.0 4801.0 4901.0 5001.0 5101.0 5201.0 5301.0 5401.0 5501.0 5601.0 5701.0 5801.0 5901.0 6001.0 6101.0 6201.0 6301.0 6401.0 MFPT Used Matrix C - Result 13826808.0 14187608.0 14548408.0 14909208.0 15270008.0 15630808.0 15991608.0 16352408.0 32393208.0 33394008.0 34394808.0 35395608.0 36396408.0 37397208.0 38398008.0 39398808.0 50959608.0 52600408.0 54241208.0 55882008.0 57522808.0 59163608.0 60804408.0 62445208.0 69526008.0 71806808.0 74087608.0 76368408.0 78649208.0 80930008.0 83210808.0 85491608.0 88092408.0 91013208.0 93934008.0 96854808.0 99775608.0 102696408.0 105617208.0 108538008.0 106658808.0 110219608.0 113780408.0 117341208.0 120902008.0 124462800.0 128023600.0 131584400.0 125225200.0 129426000.0 133626800.0 137827600.0 142028400.0 146229200.0 150430000.0 154630800.0 143791600.0 148632400.0 153473200.0 158314000.0 163154800.0 167995600.0 172836400.0 177677200.0 Press ESC to Exit...
0 Kudos
SergeyKostrov
Valued Contributor II
594 Views
[ Microsoft C++ compiler / on 64-bit Windows / DEBUG ] Output: 64-bit Windows platform - Configuration: DEBUG Test-Case 1 Size of [ long double ] is: 8 Test-Case 2 Not executed on a 64-bit Windows platform Test-Case 3.1 Accuracy _CW_DEFAULT - long double - Result: 1.0000000000079181 Sub-Test 3.2 Accuracy _PC_24 - long double - Result: 1.0000000000079181 Test-Case 3.3 Accuracy _PC_53 - long double - Result: 1.0000000000079181 Test-Case 3.4 Accuracy _PC_64 - long double - Result: 1.0000000000079181 Test-Case 4 Matrix A 101.0 201.0 301.0 401.0 501.0 601.0 701.0 801.0 901.0 1001.0 1101.0 1201.0 1301.0 1401.0 1501.0 1601.0 1701.0 1801.0 1901.0 2001.0 2101.0 2201.0 2301.0 2401.0 2501.0 2601.0 2701.0 2801.0 2901.0 3001.0 3101.0 3201.0 3301.0 3401.0 3501.0 3601.0 3701.0 3801.0 3901.0 4001.0 4101.0 4201.0 4301.0 4401.0 4501.0 4601.0 4701.0 4801.0 4901.0 5001.0 5101.0 5201.0 5301.0 5401.0 5501.0 5601.0 5701.0 5801.0 5901.0 6001.0 6101.0 6201.0 6301.0 6401.0 Matrix B 101.0 201.0 301.0 401.0 501.0 601.0 701.0 801.0 901.0 1001.0 1101.0 1201.0 1301.0 1401.0 1501.0 1601.0 1701.0 1801.0 1901.0 2001.0 2101.0 2201.0 2301.0 2401.0 2501.0 2601.0 2701.0 2801.0 2901.0 3001.0 3101.0 3201.0 3301.0 3401.0 3501.0 3601.0 3701.0 3801.0 3901.0 4001.0 4101.0 4201.0 4301.0 4401.0 4501.0 4601.0 4701.0 4801.0 4901.0 5001.0 5101.0 5201.0 5301.0 5401.0 5501.0 5601.0 5701.0 5801.0 5901.0 6001.0 6101.0 6201.0 6301.0 6401.0 MFPT Used Matrix C - Result 13826808.0 14187608.0 14548408.0 14909208.0 15270008.0 15630808.0 15991608.0 16352408.0 32393208.0 33394008.0 34394808.0 35395608.0 36396408.0 37397208.0 38398008.0 39398808.0 50959608.0 52600408.0 54241208.0 55882008.0 57522808.0 59163608.0 60804408.0 62445208.0 69526008.0 71806808.0 74087608.0 76368408.0 78649208.0 80930008.0 83210808.0 85491608.0 88092408.0 91013208.0 93934008.0 96854808.0 99775608.0 102696408.0 105617208.0 108538008.0 106658808.0 110219608.0 113780408.0 117341208.0 120902008.0 124462800.0 128023600.0 131584400.0 125225200.0 129426000.0 133626800.0 137827600.0 142028400.0 146229200.0 150430000.0 154630800.0 143791600.0 148632400.0 153473200.0 158314000.0 163154800.0 167995600.0 172836400.0 177677200.0 Press ESC to Exit... [ Microsoft C++ compiler / on 64-bit Windows / RELEASE ] Output: 64-bit Windows platform - Configuration: RELEASE Test-Case 1 Size of [ long double ] is: 8 Test-Case 2 Not executed on a 64-bit Windows platform Test-Case 3.1 Accuracy _CW_DEFAULT - long double - Result: 1.0000000000079181 Sub-Test 3.2 Accuracy _PC_24 - long double - Result: 1.0000000000079181 Test-Case 3.3 Accuracy _PC_53 - long double - Result: 1.0000000000079181 Test-Case 3.4 Accuracy _PC_64 - long double - Result: 1.0000000000079181 Test-Case 4 Matrix A 101.0 201.0 301.0 401.0 501.0 601.0 701.0 801.0 901.0 1001.0 1101.0 1201.0 1301.0 1401.0 1501.0 1601.0 1701.0 1801.0 1901.0 2001.0 2101.0 2201.0 2301.0 2401.0 2501.0 2601.0 2701.0 2801.0 2901.0 3001.0 3101.0 3201.0 3301.0 3401.0 3501.0 3601.0 3701.0 3801.0 3901.0 4001.0 4101.0 4201.0 4301.0 4401.0 4501.0 4601.0 4701.0 4801.0 4901.0 5001.0 5101.0 5201.0 5301.0 5401.0 5501.0 5601.0 5701.0 5801.0 5901.0 6001.0 6101.0 6201.0 6301.0 6401.0 Matrix B 101.0 201.0 301.0 401.0 501.0 601.0 701.0 801.0 901.0 1001.0 1101.0 1201.0 1301.0 1401.0 1501.0 1601.0 1701.0 1801.0 1901.0 2001.0 2101.0 2201.0 2301.0 2401.0 2501.0 2601.0 2701.0 2801.0 2901.0 3001.0 3101.0 3201.0 3301.0 3401.0 3501.0 3601.0 3701.0 3801.0 3901.0 4001.0 4101.0 4201.0 4301.0 4401.0 4501.0 4601.0 4701.0 4801.0 4901.0 5001.0 5101.0 5201.0 5301.0 5401.0 5501.0 5601.0 5701.0 5801.0 5901.0 6001.0 6101.0 6201.0 6301.0 6401.0 MFPT Used Matrix C - Result 13826808.0 14187608.0 14548408.0 14909208.0 15270008.0 15630808.0 15991608.0 16352408.0 32393208.0 33394008.0 34394808.0 35395608.0 36396408.0 37397208.0 38398008.0 39398808.0 50959608.0 52600408.0 54241208.0 55882008.0 57522808.0 59163608.0 60804408.0 62445208.0 69526008.0 71806808.0 74087608.0 76368408.0 78649208.0 80930008.0 83210808.0 85491608.0 88092408.0 91013208.0 93934008.0 96854808.0 99775608.0 102696408.0 105617208.0 108538008.0 106658808.0 110219608.0 113780408.0 117341208.0 120902008.0 124462800.0 128023600.0 131584400.0 125225200.0 129426000.0 133626800.0 137827600.0 142028400.0 146229200.0 150430000.0 154630800.0 143791600.0 148632400.0 153473200.0 158314000.0 163154800.0 167995600.0 172836400.0 177677200.0 Press ESC to Exit...
0 Kudos
SergeyKostrov
Valued Contributor II
594 Views
Petros, here a couple of final Notes: - Please try to contact Intel Premium Support and discuss the situation with your current Intel C/C++ compiler - These Intel C++ compiler options did not affect accuracy of my test results: /Qfimf-accuracy-bits= 64 | 80 | 96 | etc /Qimf-precision=high /fp:extended - You could also try to control floating-point precision in a command line of Intel C++ compiler ( take into account that this is not a portable solution ): ... Use the -pc{32|64|80} option to enable floating-point significand precision control. Some floating-point algorithms, created for specific IA-32 and Itanium-based systems, are sensitive to the accuracy of the significand or fractional part of the floating-point value. Use appropriate version of the option to round the significand to the number of bits as follows: -pc32: 24 bits (single precision) -pc64: 53 bits (double precision) -pc80: 64 bits (extended precision) The default is -pc80 for extended floating-point precision ... Best regards, Sergey
0 Kudos
Petros_Mamales
Beginner
594 Views

Sergey,

These are very comprehensive tests and thank you very much for this.

I unzipped the files and openned the solution fputest.vs05 win vs2010 which transormed it into a 2010 solution - should presumably be innocuous.

On Building I got :

1>------ Rebuild All started: Project: FpuTestApp, Configuration: Debug Win32 ------
1>Build started 1/27/2013 8:15:26 PM.
1>_PrepareForClean:
1>  Deleting file "Debug\FpuTestApp.lastbuildstate".
1>InitializeBuildStatus:
1>  Creating "Debug\FpuTestApp.unsuccessfulbuild" because "AlwaysCreate" was specified.
1>MessageBuildingWithCompiler:
1>  Building with Intel(R) C++ Compiler 12.1
1>ClCompile:
1>  ***** ClCompile (Win32 - Intel C++)
1>icl : warning #10148: option '/Qlong-double' not supported
1>icl : warning #10148: option '/Qpc80' not supported
1>  Stdafx.cpp
1>icl : warning #10148: option '/Qlong-double' not supported
1>icl : warning #10148: option '/Qpc80' not supported
1>  FpuTestApp.cpp
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(990,5): warning MSB8012: TargetPath(C:\_petros\_otc\tests\FpuTestApp.Icc\Debug\FpuTestApp.exe) does not match the Linker's OutputFile property value (C:\_petros\_otc\tests\FpuTestApp.Icc\Debug\FpuTestApp32D.exe). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(992,5): warning MSB8012: TargetName(FpuTestApp) does not match the Linker's OutputFile property value (FpuTestApp32D). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
1>Link:
1>  xilink: executing 'link'
1>Manifest:
1>  Deleting file "Debug\FpuTestApp.exe.embed.manifest".
1>LinkEmbedManifest:
1>  xilink: executing 'link'
1>  FpuTestApp.VS05.vcxproj -> C:\_petros\_otc\tests\FpuTestApp.Icc\Debug\FpuTestApp.exe
1>FinalizeBuildStatus:
1>  Deleting file "Debug\FpuTestApp.unsuccessfulbuild".
1>  Touching "Debug\FpuTestApp.lastbuildstate".
1>
1>Build succeeded.
1>
1>Time Elapsed 00:00:02.51

which is due to the naming of the file (in the debug version in vs2010 the output goes to different directories so there is no collision issue).

1>Build started 1/27/2013 8:19:49 PM.

1>_PrepareForClean:
1>  Deleting file "Debug\FpuTestApp.lastbuildstate".
1>InitializeBuildStatus:
1>  Creating "Debug\FpuTestApp.unsuccessfulbuild" because "AlwaysCreate" was specified.
1>MessageBuildingWithCompiler:
1>  Building with Intel(R) C++ Compiler 12.1
1>ClCompile:
1>  ***** ClCompile (Win32 - Intel C++)
1>icl : warning #10148: option '/Qlong-double' not supported
1>icl : warning #10148: option '/Qpc80' not supported
1>  Stdafx.cpp
1>icl : warning #10148: option '/Qlong-double' not supported
1>icl : warning #10148: option '/Qpc80' not supported
1>  FpuTestApp.cpp
1>Link:
1>  xilink: executing 'link'
1>Manifest:
1>  Deleting file "Debug\FpuTestApp.exe.embed.manifest".
1>LinkEmbedManifest:
1>  xilink: executing 'link'
1>  FpuTestApp.VS05.vcxproj -> C:\_petros\_otc\tests\FpuTestApp.Icc\Debug\FpuTestApp.exe
1>FinalizeBuildStatus:
1>  Deleting file "Debug\FpuTestApp.unsuccessfulbuild".
1>  Touching "Debug\FpuTestApp.lastbuildstate".
1>
1>Build succeeded.
1>
1>Time Elapsed 00:00:02.45
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========

For x64 configuration though the result was :

64-bit Windows platform - Configuration: DEBUG
Test-Case 1
Size of [ long double ] is: 8
Test-Case 2
Not executed on a 64-bit Windows platform
Test-Case 3.1
Press any key to continue . . .

After I changed this I got ( 32bit configuration on 64bit windows):

32-bit Windows platform - Configuration: RELEASE
Test-Case 1
Size of [ long double ] is: 8
Test-Case 2
_CW_DEFAULT & ALLBITSON: 0x9001F
_PC_24 & _MCW_PC       : 0xA001F
_PC_53 & _MCW_PC       : 0x9001F
_PC_64 & _MCW_PC       : 0x8001F
Test-Case 3.1
Accuracy _CW_DEFAULT  - long double - Result: 1.0000000000079181
Sub-Test 3.2
Accuracy _PC_24       - long double - Result: 1.0000000000079181
Test-Case 3.3
Accuracy _PC_53       - long double - Result: 1.0000000000079181
Test-Case 3.4
Accuracy _PC_64       - long double - Result: 1.0000000000079181
Test-Case 4

Matrix A
         101.0  201.0  301.0  401.0  501.0  601.0  701.0  801.0
         901.0 1001.0 1101.0 1201.0 1301.0 1401.0 1501.0 1601.0
        1701.0 1801.0 1901.0 2001.0 2101.0 2201.0 2301.0 2401.0
        2501.0 2601.0 2701.0 2801.0 2901.0 3001.0 3101.0 3201.0
        3301.0 3401.0 3501.0 3601.0 3701.0 3801.0 3901.0 4001.0
        4101.0 4201.0 4301.0 4401.0 4501.0 4601.0 4701.0 4801.0
        4901.0 5001.0 5101.0 5201.0 5301.0 5401.0 5501.0 5601.0
        5701.0 5801.0 5901.0 6001.0 6101.0 6201.0 6301.0 6401.0

Matrix B
         101.0  201.0  301.0  401.0  501.0  601.0  701.0  801.0
         901.0 1001.0 1101.0 1201.0 1301.0 1401.0 1501.0 1601.0
        1701.0 1801.0 1901.0 2001.0 2101.0 2201.0 2301.0 2401.0
        2501.0 2601.0 2701.0 2801.0 2901.0 3001.0 3101.0 3201.0
        3301.0 3401.0 3501.0 3601.0 3701.0 3801.0 3901.0 4001.0
        4101.0 4201.0 4301.0 4401.0 4501.0 4601.0 4701.0 4801.0
        4901.0 5001.0 5101.0 5201.0 5301.0 5401.0 5501.0 5601.0
        5701.0 5801.0 5901.0 6001.0 6101.0 6201.0 6301.0 6401.0

MFPT Used

Matrix C - Result
         13826808.0  14187608.0  14548408.0  14909208.0  15270008.0  15630808.0  15991608.0  16352408.0
         32393208.0  33394008.0  34394808.0  35395608.0  36396408.0  37397208.0  38398008.0  39398808.0
         50959608.0  52600408.0  54241208.0  55882008.0  57522808.0  59163608.0  60804408.0  62445208.0
         69526008.0  71806808.0  74087608.0  76368408.0  78649208.0  80930008.0  83210808.0  85491608.0
         88092408.0  91013208.0  93934008.0  96854808.0  99775608.0 102696408.0 105617208.0 108538008.0
        106658808.0 110219608.0 113780408.0 117341208.0 120902008.0 124462808.0 128023608.0 131584408.0
        125225208.0 129426008.0 133626808.0 137827616.0 142028416.0 146229216.0 150430016.0 154630816.0
        143791616.0 148632416.0 153473216.0 158314016.0 163154816.0 167995616.0 172836416.0 177677216.0

Press ESC to Exit...

Therefore different results !!!

and the DEBUG for win32 configuration :

32-bit Windows platform - Configuration: RELEASE
Test-Case 1
Size of [ long double ] is: 8
Test-Case 2
_CW_DEFAULT & ALLBITSON: 0x9001F
_PC_24 & _MCW_PC       : 0xA001F
_PC_53 & _MCW_PC       : 0x9001F
_PC_64 & _MCW_PC       : 0x8001F
Test-Case 3.1
Accuracy _CW_DEFAULT  - long double - Result: 1.0000000000079181
Sub-Test 3.2
Accuracy _PC_24       - long double - Result: 1.0000000000079181
Test-Case 3.3
Accuracy _PC_53       - long double - Result: 1.0000000000079181
Test-Case 3.4
Accuracy _PC_64       - long double - Result: 1.0000000000079181
Test-Case 4

Matrix A
         101.0  201.0  301.0  401.0  501.0  601.0  701.0  801.0
         901.0 1001.0 1101.0 1201.0 1301.0 1401.0 1501.0 1601.0
        1701.0 1801.0 1901.0 2001.0 2101.0 2201.0 2301.0 2401.0
        2501.0 2601.0 2701.0 2801.0 2901.0 3001.0 3101.0 3201.0
        3301.0 3401.0 3501.0 3601.0 3701.0 3801.0 3901.0 4001.0
        4101.0 4201.0 4301.0 4401.0 4501.0 4601.0 4701.0 4801.0
        4901.0 5001.0 5101.0 5201.0 5301.0 5401.0 5501.0 5601.0
        5701.0 5801.0 5901.0 6001.0 6101.0 6201.0 6301.0 6401.0

Matrix B
         101.0  201.0  301.0  401.0  501.0  601.0  701.0  801.0
         901.0 1001.0 1101.0 1201.0 1301.0 1401.0 1501.0 1601.0
        1701.0 1801.0 1901.0 2001.0 2101.0 2201.0 2301.0 2401.0
        2501.0 2601.0 2701.0 2801.0 2901.0 3001.0 3101.0 3201.0
        3301.0 3401.0 3501.0 3601.0 3701.0 3801.0 3901.0 4001.0
        4101.0 4201.0 4301.0 4401.0 4501.0 4601.0 4701.0 4801.0
        4901.0 5001.0 5101.0 5201.0 5301.0 5401.0 5501.0 5601.0
        5701.0 5801.0 5901.0 6001.0 6101.0 6201.0 6301.0 6401.0

MFPT Used

Matrix C - Result
         13826808.0  14187608.0  14548408.0  14909208.0  15270008.0  15630808.0  15991608.0  16352408.0
         32393208.0  33394008.0  34394808.0  35395608.0  36396408.0  37397208.0  38398008.0  39398808.0
         50959608.0  52600408.0  54241208.0  55882008.0  57522808.0  59163608.0  60804408.0  62445208.0
         69526008.0  71806808.0  74087608.0  76368408.0  78649208.0  80930008.0  83210808.0  85491608.0
         88092408.0  91013208.0  93934008.0  96854808.0  99775608.0 102696408.0 105617208.0 108538008.0
        106658808.0 110219608.0 113780408.0 117341208.0 120902008.0 124462808.0 128023608.0 131584408.0
        125225208.0 129426008.0 133626808.0 137827616.0 142028416.0 146229216.0 150430016.0 154630816.0
        143791616.0 148632416.0 153473216.0 158314016.0 163154816.0 167995616.0 172836416.0 177677216.0

Press ESC to Exit...

Finally with the flag fp:precision enabled I get the same resuling matrix the same size of long double (8), as before and very different and very different sub-test 3.2 result :
Sub-Test 3.2
Accuracy _PC_24       - long double - Result: 1.0090389251708984

All this is very confusing at this point. And it is a shame with all the effort you have put into this. One thing that I take from your notes is that probably /Qpc80 is the same as fp:extended flag ?

I do not have premium support so ..

Anyway, I am indebted for your help !

0 Kudos
SergeyKostrov
Valued Contributor II
594 Views
>>...One thing that I take from your notes is that probably /Qpc80 is the same as fp:extended flag ? Yes, and here is a quote from Intel docs: ... -pc32: 24 bits ( single precision ) -pc64: 53 bits ( double precision ) -pc80: 64 bits ( extended precision ) ... Petros, I think it also makes sence to try some latest evaluation version of Intel C++ compiler. You really need to get this: ... Test-Case 3.4 Accuracy _PC_64 - long double - Result: 1.0000000000000109 ... and this is the best result. Let's say you installed a newer evaluation version of Intel C++ compiler. If accuracy of your calculations is not improved, when FPU is really set to 64-bits precision and sizeof( long double ) is equal to 16, then something else is wrong in the software.
0 Kudos
SergeyKostrov
Valued Contributor II
594 Views
>>...Anyway, I am indebted for your help ! And a couple of more IDZ users... Melanie, Tim and Iliya, Thank you for your time and help!
0 Kudos
Petros_Mamales
Beginner
594 Views

>> And a couple of more IDZ users...

goes w/out saying! Thank you all very much!

0 Kudos
Reply