Opened 13 years ago

Closed 13 years ago

## #4 closed defect (fixed)

# on powerpc, fft(zeros) sometimes gives phase = pi

Reported by: | Paul Brossier | Owned by: | Paul Brossier |
---|---|---|---|

Priority: | normal | Milestone: | 0.3.3 |

Component: | corelib | Version: | 0.3.2 |

Severity: | blocker | Keywords: | |

Cc: |

### Description

when computing the fft on a vector of zeroes, the phase elements can be found equal to zero or pi on powerpc, whereas they are always zero on x86.

this is due to the way real and imaginary parts are computed in fftw on both platforms. on x86. the result is always +0.0000, whereas on ppc, it can be -0.0000; atan2f(-0.00,0.00) = pi

see test in source:tests/python/src/spectral/fft.py, test_do_zeroes

**Note:**See TracTickets for help on using tickets.

(In ,543) closes #4, fft.c: if real part is zero, have phase = 0