FFT Golang Implementation

Source: Internet
Author: User

The recent project to use the fast Fourier transform, wrote an algorithm, test, performance and precision can also accept

Len,time= 1048576 378.186167ms

diff=-0.00000000000225974794 I0.00000000000936106748 Success: Process exit code 0.

Millions, the transformation took 378ms.

Inverse conversion Error and 0.000000000009

   L: =MVM. POWEROF2 (20)
   For i,_: =range arr{
  Arr[i]=complex (Rand. Float64 (), Rand. Float64 ())
   Now: =time. Now ()
   Fft:= MVM. Corefft (Arr,false)
   Println ("Len,time=", L,time. Now (). Sub (now))
   Println ("arr=", arr)
   Println ("fft=", FFT)
   Reverse:=mvm. Corefft (Fft,true)
   Println ("reverse=", reverse)
var Sumdiff complex128
   For i,v: =range reverse{
  Sumdiff =sumdiff+v-arr[i]
   Printf ("diff=%.20f i%.20f", Real (Sumdiff), Imag (Sumdiff))

FFT Golang Implementation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.