[time-nuts] Re: pulling some crystals

dschuecker Detlef.Schuecker at dschuecker.de
Fri Dec 29 11:28:20 UTC 2023


Hi,

I generate Sin/Cos without a table by rotating complex numbers 
(a+i*b)*(u+i*v)

a,b,u,v may be 16Bit integers, for most appplications this prooved 
sufficient for me. a is the cos-component, b is the sine component. 
(a+i*b) is rotated by the angle of (u+i*v). For integer calculation 
|u+i*v| = sqrt(u*u+v*v) is normalized to ,say 2^16 and followed by a 
rightshift of 16Bit. It is necessary to watch |a+i*b|=sqrt(a*a+b*b) 
because vectorlength is shrinking or expanding due to calculation noise.

Cheers Detlef



_______________________________________________

> time-nuts mailing list -- time-nuts at lists.febo.com
> To unsubscribe send an email to time-nuts-leave at lists.febo.com
>




More information about the Time-nuts_lists.febo.com mailing list