FFT question

Posted on
  • Hi all;
    The FFT display example on the Pixel intrigued me. Is the FFT implemented in JavaScript? Do the NRF parts have a hardware FPU?
    Thanks,
    ChrisZ

  • The FFT is part of standard Espruino (via the E.FFT method) and is written in C - the NRF52 parts do have a 32 bit hardware FPU, but it's not actually used.

    At the moment the FFT uses 64 bit floats (like the rest of JavaScript), so it all has to be done in software. It's not fast, but it's good enough for the relatively slow update rate.

    There's actually an issue open that I started a week ago about moving the FFT to float32 - as I don't think anyone is really using the accuracy of float64 for the FFT. It would definitely improve speeds.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

FFT question

Posted by Avatar for ChrisZ @ChrisZ

Actions