Discrete Fourier transform: Difference between revisions

m
comments
m (comments)
Line 39:
 
=={{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}
F = zeros(complex(float(T)), size(A)...)
4,108

edits