# MATH_IFFTReal

## Syntax

      #include <nitro/math/fft.h>

      void MATH_IFFTReal( fx32* data, u32 nShift, const fx16* sinTable, const fx16* sinTable2 );

## Arguments

data | Pointer to the data to transform. Data after the transform is overwritten.
nShift | The value that is the base-2 logarithm of the number of real numbers that is expected to be output.
sinTable | Pointer to the table of sine values.
sinTable2 | Pointer to the sine value table that omits every other value in sinTable.

## Return Values

None.

## Description

Uses a fast Fourier transform algorithm to perform the inverse transform of a discrete Fourier transform. Converts an array of complex numbers in the `MATH_FFTReal` function's output format into an array of real numbers in that same function's input format.

In the explanation below, the value 2nShift (2 to the nShift power) is represented as N. `data` is an array of N `fx32` values in the `MATH_FFTReal` function's output format. sinTable is the pointer to the array of N*3/4 length that has fx16 type sine values assigned that satisfy `sinTable[k] = sin( (2π/N) * k ) (k = 0, 1,..., N*3/4-1)`. This can be created using the `MATH_MakeFFTSinTable` function. `sinTable2` is the pointer to the array of length (`N/2)*3/4`, where fx16 type sine values are assigned that satisfy `sinTable2[k] = sin( (2π/(N/2)) * k ) (k = 0, 1,..., (N/2)*3/4-1)`. This can be created by passing a value smaller by 1 to the `nShift` argument with the `MATH_MakeFFTSinTable` function.

The calculations are performed using fixed-decimal numbers, so if a large value is given as the input, there is a risk of overflow. When the input value is viewed as type s32, the absolute value should not be greater than or equal to `0x80000000/N`. Also note that the maximum error when performing both the forward transform and inverse transform is around several times `FX32_ONE`.

## See Also

`MATH_MakeFFTSinTable, MATH_FFT, MATH_IFFT, MATH_FFTReal`

## Revision History

2005/07/21 Corrected the explanation for `sinTable`.
2005/07/11 Corrected the explanation.
2005/05/13 Initial version.

CONFIDENTIAL