Floating point consistency

Floating point consistency

Portrait de Community Admin

I have a CVF DLL which can be called either by a FORTRAN program or a DELPHI PASCAL program. The values that these two programs pass to the DLL are absolutely identical in every bit ( I've painstakingly checked them all ) These numbers are passed ( still bit perfect), to a simple multiplication/addition which produces answers different in the last bit.


I've looked through all of the floating point consistency flags / optimisations etc., but as exactly the same DLL is being used and the inputs are identical, I can't see what else I should try.

My application is chaotic; the rogue last bit causes the final answers to be completely different. The point of the exercise was to show that the two calling programs produce identical answers, so I'm rather stuck. I don't see what it has actually got to do with the calling program.

Anyone got any ideas?

3 posts / 0 nouveau(x)
Dernière contribution
Reportez-vous à notre Notice d'optimisation pour plus d'informations sur les choix et l'optimisation des performances dans les produits logiciels Intel.
Portrait de Community Admin

Have you tried playing with GETCONTROLFPQQ and SETCONTROLFPQQ? Different FP precision on entry to your DLL from different environments looks like the likely culprit.

Portrait de Community Admin

Entirely correct. For the record, DELPHI sets up Extended Precision, while CVF defaults to Double Precision. They also differ over what to do with infinity. When I forced these to be the same, every bit behaved itself.


Connectez-vous pour laisser un commentaire.