ifft

std.seq.ifft · Level L4

The inverse discrete Fourier transform: zⱼ = (1/n)·Σₖ yₖ·e^(2πi·jk/n), so ifft(fft(z)) = z.

zⱼ = (1/n)·Σₖ yₖ·e^(2πi·jk/n)

Signature

ifft(y: f64[2, n]) → f64[2, n]

Structure

The function as NOVA stores it: one box per input, operation and output, and arrows that carry values. A double border marks another library function this one runs — called once, or by Scan once per element; select it to open that function.

yf64[2, n]IFFTzzf64[2, n]
  • input
  • operation
  • constant
  • call
  • output

Verification

  • Signature proven by NOVA’s shape solver, for every size.
  • Agrees with the reference np.fft.ifft(y[0] + 1j*y[1]) to 80 digits (100-digit arithmetic), on all 40 test cases.
  • All 262 float64 results inside the running error bound; the closest uses 4% of it.
  • Interpreter and NumPy backend return bit-identical results.
Accuracy in detail
correctly rounded (the float64 nearest the exact value)
61%
bit-equal to the NumPy formula in float64
100%
largest error, in units in the last place
31

Large ulp counts appear where a result is tiny next to the numbers it is computed from (after cancellation, for example), so one unit in the last place is tiny too; the absolute error is still inside the bound. Results within their own error of zero are not counted.

Note

A complex vector is a [2, n] array: real parts in the first row, imaginary parts in the second. The reference computes the transform exactly by a radix-2 recursion where n is even; the exact check sums the definition directly, so two different routes have to agree.

Identity

Calls
—
Called by
—
sha256:6a5e0bab41b271d6f65522eb9845e6a5d0b5587ee825863e9d6647ff8800e9f9

The semantic hash of the graph. It changes when the program changes, and never when only its documentation does.