aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2022-02-06 22:29:07 -0500
committerMarshall Lochbaum <mwlochbaum@gmail.com>2022-02-06 22:29:07 -0500
commit0363af515deaac6fa4e716e5e57b58a57e8c9633 (patch)
tree95cc23ecdc485750adb9d3b55759b6a686a287dc
parentbf4449ba339e9e026bccacfcfbc88e56359ec08a (diff)
Currently n⍉≍ is faster than ≍⎉(-n)
-rw-r--r--fft.bqn2
1 files changed, 1 insertions, 1 deletions
diff --git a/fft.bqn b/fft.bqn
index 2d10ccf..735e92a 100644
--- a/fft.bqn
+++ b/fft.bqn
@@ -15,6 +15,6 @@ Sin‿Cos ← •math
r ← (Cos≍Sin) π × (1↓s) ⥊ -⍟inv ↕⊸÷ l÷2 # Roots of unity
M ← -˝∘× ≍ +˝∘×⟜⌽ # Complex multiplication
- F ← { 𝕨 ⊏⎉1⊸𝕊⍟(1<=𝕨) (+˝˘≍⎉(-=𝕨)𝕨M-˝˘)𝕩 } # FFT loop
+ F ← { 𝕨 ⊏⎉1⊸𝕊⍟(1<=𝕨) (=𝕨)⍉(+˝˘≍𝕨M-˝˘)𝕩 } # FFT loop
÷⟜l⍟inv ⥊˘ r F s⊸⥊˘ ≍⟜(0¨)⍟(1==) 𝕩
}