Halesh S wrote: > I wrote a small code to perform FPU division and multiplication. & I > have attached the same. > > The output is as follows > > $./test > 1.000000 > 81.000000 > 1.000000 > nan > > Why the last o/p is giving NAN? Please let me the answer, why its > failing to return the proper product. > If any problem in my code please let me know. Aren't you overflowing the x87 internal stack, by always pushing data and never popping?