This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

C166 library problem

Hi!
Who have expirence with C166 math library.
I have a grate and interesting problem with using Sin,Cos, Asin, Acos ant etc.
Asin work only in one point asin(1)=1.57, but all others break program to trap 0A (Illegal Word Operand Access Flag).
I use sqrt from library and everything is OK.
There are no problem with stak, I checked it with interupt routine. Also OK with RAM and ROM volume.
Help who know anything abt library problem.
Thank you

Jury

Parents
  • Did you try with simulation to be sure that problem come from library. I did try with this loop:
    for (i=0; i<10;i++) printf("%g %g\n",sin(0.1*i),asin(sin(0.1*i)))
    and all returned values are ok.

    Bruno

Reply
  • Did you try with simulation to be sure that problem come from library. I did try with this loop:
    for (i=0; i<10;i++) printf("%g %g\n",sin(0.1*i),asin(sin(0.1*i)))
    and all returned values are ok.

    Bruno

Children
No data