This implements the sin addition optimization for the SPDM signal production mentioned in #9 . Now, instead of performing three sin calculations, we only do two.
Testing this waveform (without the bit shifting, just multiplying by -0.5), provided a frequency of around 22 kHz, which although is lower than expected is still above the 20 kHz threshold. Additionally, the waveform was much cleaner than that from the Taylor series approximation and in fact, was exactly the same as what we had before any optimizations. This makes sense because of the addition formula, which is an equivalence, not an approximation.
I will test the code with the bit shifting after break.
This implements the
sin
addition optimization for the SPDM signal production mentioned in #9 . Now, instead of performing threesin
calculations, we only do two.Testing this waveform (without the bit shifting, just multiplying by -0.5), provided a frequency of around 22 kHz, which although is lower than expected is still above the 20 kHz threshold. Additionally, the waveform was much cleaner than that from the Taylor series approximation and in fact, was exactly the same as what we had before any optimizations. This makes sense because of the addition formula, which is an equivalence, not an approximation.
I will test the code with the bit shifting after break.