Using "powf()" with nRF52840 in Zephyr environment

I'm attempting to use the "powf()" function in a Zephyr thread.

When I try to run:

LOG_INF("powf: %f",powf(2.0f,-8.0f));
the result is "inf".     (Code compiles, but doesn't give the correct result.)
I'm using nRF Connect 2.0.2 SDK.   I set the FPU check box in the Kconfig editor.
Is there some other setting that needs to be invoked (for example in prj.conf)?
Thanks!
  • I'm glad you found the cause! 

    CktDesigner said:
    By the way, in the process of debugging, I thought I'd try upgrading from version v2.0.2 to v2.1.0...    But evidently the device-tree definitions for all of the nrf52840 peripherals changed!   Since I have a custom board, I'll have to re-write the .dts file before I can upgrade...

    If you get stuck doing the migration, feel free to open a new ticket.

    Best regards,

    Simon

Related