Excel and the Math Coprocessor for DLLs
"Martin Brown" wrote:
On 03/04/2012 01:33, joeu2004 wrote:
There is a difference(!) when calling InitTestDLL from
XL2003 VBA v. XL2010 VBA. And I misinterpreted the results
from XL2003 VBA.
[....]
This is also the behaviour in XL2007 so it looks like
XL2010 is the point where MS went back to using full
64 bit mantissas (80 bit reals).
I don't believe so.
Normally, XL2003 VBA does compute using _PC_64, just as XL2007 and XL2010
VBA do.
However, I did not uncover a defect in XL2003 VBA that is reproducible
nearly 100% of the time.
Inexplicably, after we import a module into XL2003 VBA (SP3), the FPU
control word is set to _PC_53. And apparently it remains in that state
until we change it by calling _controlfp ourselves.
That does not happen in XL2007 and XL2010.
I say "nearly 100% of the time" because I believe there were a couple times
out of 20 or 30 when that did not happen; that is, when the precision mode
continued to be _PC_64.
Be that as it may, that has nothing to do with Lynn's problems.
You seem to be doing a great job of disassembling his DLL and ferreting out
the root cause.
So I will leave you to it.
|