# MATH_IFFTReal

## C Specification

      #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. Takes the complex number series data in the output format of the `MATH_FFTReal` function, and transforms it into the real number series data in the input format of this same function.

In the explanation below, the value 2nShift (2 to the nShift power) is represented as N. data is a type fx32 array of length N, and is in the output format of the MATH_FFTReal function. 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

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

CONFIDENTIAL