Discrete Fourier transform: Difference between revisions

Content added Content deleted
m (comments)
Line 39: Line 39:


=={{header|Julia}}==
=={{header|Julia}}==
The cispi function was added in Julia 1.6. The cispi of x is e to the power of (pi times i times x). Other syntax, such as real() and tuple() in the loop, is designed to cue the compiler so as to have mostly constants in the loop at runtime, speeding run time with large arrays.
<lang julia>function dft(A::AbstractArray{T,N}) where {T,N}
<lang julia>function dft(A::AbstractArray{T,N}) where {T,N}
F = zeros(complex(float(T)), size(A)...)
F = zeros(complex(float(T)), size(A)...)