Don_A_Corbitt@cup.portal.com (04/06/89)
[request for info on intermediate results kept in FP chip] Trivial answer for Turbo C using 80x87. It keeps intermediate results of a single expression in the '87 as 80 bit values. Also, all float/double/long double functions actually return an 80 bit value in the FP top of stack. This was a hassle for my Numerical Analysis class, where they wanted us to show the difference between 32 and 64 bit arithmetic (had to store each intermediate result to a memory variable, and reload through an aliased pointer :->) Seems to work fine. Code is simpler (stack-based instructions), results are 'better' (although numerical analysis people have complained - see above). Of course, the 387 supposedly runs faster when one of the operands is in _memory_ as opposed to being in a register! (Is this because it knows a memory op is only 32 bits long, so it doesn't need to do the entire 80 bit operation? Confusion reigns) Don Corbitt, occasional grad student Don_A_Corbitt@cup.portal.com