Port from OBEX: TrigPack.spin
Reinhard
Posts: 489
Hi,
I have ported a part from TrigPack.spin in gcc.
The port is not completed, several functions don't work correct or are not ported currently.
What I can show is the sinus function in first quadrant ( 0 ... 90 degree)
and a multiply / divide demo.
All functions are not well tested, so I can not guarantee for right results in all situations.
If I find time in next days I will complete this.
best regards
Reinhard
I have ported a part from TrigPack.spin in gcc.
The port is not completed, several functions don't work correct or are not ported currently.
What I can show is the sinus function in first quadrant ( 0 ... 90 degree)
and a multiply / divide demo.
All functions are not well tested, so I can not guarantee for right results in all situations.
If I find time in next days I will complete this.
best regards
Reinhard
zip
26K
Comments
with ports like this I can improve my knowledge in SPIN language.
Here I am the absolute newbie.
Sometimes I see the strength of any SPIN operator, in other cases I find not the C equivalent.
For example for the Multiply operators * and ** Return low, Return High , I found not a shorter C statement.
However I prefer C in hobby and work, so it is not really an effort, more a fun.
best regards,
Reinhard
To get the upper 32 bits of X*Y (which I guess is X**Y in spin) use:
Eric
yes with a construct like this, it would be possible to replace the ** spin operator.
best regards,
Reinhard