7 ms·
To the second question, I am also struggling to follow the step "Let’s move the multiplications by cos β_i into a separate loop". The recursive construction of
by seedless-sensat 8y ago
To the second question, I am also struggling to follow the step "Let’s move the multiplications by cos β_i into a separate loop".
The recursive construction of `c` doesn't allow the betas to be pulled out. The i-th term is multiplied by beta_i to beta_n, but not beta_0 to beta_{i-1}.
Clearly the method must work, but I'm not sure what I'm missing.
Edit: ignoring `direction`, I can prove this step by induction for both c(i) and s(i) together. At least to me though, this it isn't a simple algebraic simplification.
- edflsafoiewq 8y agoI got it. In terms of a complex variable, mathematically the loop before that step is z = Π_j cos β[j] (1 + i direction_j 2^{-j}) So the step corresponds to the trivial rearrangement z = ( Π_j cos β[j] ) ( Π_j (1 + i direction_j 2^{-j}) )
- edflsafoiewq 8y agoThis is what's happening mathematically: https://i.imgur.com/MclfpEN.png https://i.imgur.com/MclfpEN.png.