[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Why "call cos(.2)" returns garbage?
From: |
icegood |
Subject: |
Re: Why "call cos(.2)" returns garbage? |
Date: |
Mon, 24 May 2010 10:19:36 -0700 (PDT) |
pilgrim2 wrote:
>
> Hi,
>
> I was wondering how come the call to "call cos(.2)" returns the wrong
> answer in:
>
> #include <math.h>
> double (*fcn)(double);
> main()
> {
> double t;
> fcn = cos;
> t=cos(.2);
> t=cos(-.2);
> }
>
> (gdb) call cos(.2)
> $16 = 104
> (gdb) call fcn(.2)
> $17 = 0.98006657784124163
>
> Thanks,
>
> Linh
>
I wonder too. Why just debug symbols has no info about types of used
functions... Of course, naive casting has no luck - result rather in other
registry (somewhere in r0-r7 and not in ax,...)
--
View this message in context:
http://old.nabble.com/Why-%22call-cos%28.2%29%22-returns-garbage--tp26909516p28659353.html
Sent from the Gnu - gdb - General mailing list archive at Nabble.com.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: Why "call cos(.2)" returns garbage?,
icegood <=