c++ - floating point values read from file and calculations discrepancy -


i have dll reads floating point values binary files, makes simple calculation , gives boolean result. each file 8bytes length variables of type double ( visual studio 2008 ). calculation simple:

if( fa < fb - ( ix * fc ) ) { return( 1 ); } else { return( 0 ); } 

this dll loaded , function called 2 different applications on same pc. debug reasons values read files written files, calculations split parts , written files. each app outputs same files except final result! 1 application gives 1, 0. dll compiled /mt /fp:precise /od options. ideas please?

unless dll goes out of way have different paths on different architectures (for instance 387 path , sse path), possibility @ least 1 of applications changes fpu state. typically, rounding mode, in case of 387 fpu, can significand width @ instructions compute (“the x87 can configured via special configuration/status register automatically round single or double precision after each operation”).


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

html - Unable to style the color of bullets in a list -

c# - must be a non-abstract type with a public parameterless constructor in redis -