I write a program of assembly and c version both(data used are mainly single float point). And found the result is a little different in decimal point . I debug and could not find any error. is sse float instruction is the same as scalar instruction in computing presion ?
You give so little information that we can't focus on your concern. Besides general issues about floating point, you must consider implications of compiler options you choose. icc requires the option -fp-model source (Windows spelling /fp:source) in order to adhere to C and C++ standards.
I write a program of assembly and c version both(data used are mainly single float point).
[SergeyK] In a C/C++ application a set ofCRT functions, like'control87' or'controlfp',is used to control settings of FPU.There areexamples in MSDN on how these functions work.
In case of an assembler application that uses some SSE instructions a set of macroscould be used to control MXCSRmodes ( please take a look at xmmintrin.h ), like _MM_SET_ROUNDING_MODE(...).
And found the result is a little different in decimal point . I debug and could not find any error.
[SergeyK] If you would give a little example it would help to everybody to understand your issues.
Even if results are different you should look for absolute and relative errors. Onsome scientific projects a person withMS degree in mathematics ( of course if there is one... ) could do some analysis of these results to confirm that everythingis looking good or, results are not aceptible.