Need help on FPU division/Multiplication
Halesh S
halesh.s@gmail.com
Wed Feb 11 04:32:00 GMT 2009
Thanks Tim.
You are correct, using fstp instruction instead of fst will resolve
this problem.
On Mon, Feb 9, 2009 at 6:46 PM, Tim Prince <TimothyPrince@sbcglobal.net> wrote:
> 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?
>
>
More information about the Gcc-help
mailing list