@web-font-path: "roboto-debian.css";
Loading...
Searching...
No Matches
pico_double

Optimized double-precision floating point functions.

Optimized double-precision floating point functions.

An application can take control of the floating point routines used in the application over and above what is provided by the compiler, by depending on the pico_double library. A user might want to do this:

  1. To use optimized software implementations provided by the RP2-series device's bootrom or the SDK
  2. To use optimized combined software/hardware implementations utilizing custom RP2-series hardware for acceleration
  3. To control the amount of C compiler/library code bloat
  4. To make sure no floating point is called at all

The pico_double library comes in three main flavors:

  1. pico_double_none - all floating point operations cause a panic - no double-precision floating point code is included
  2. pico_double_compiler - no custom functions are provided; all double-precision floating point is handled by the C compiler/library
  3. pico_double_pico - the smallest and fastest available for the platform, along with additional functionality (e.g. fixed point conversions) which are detailed below

The user can control which version they want (e.g. pico_double_xxx by either setting the CMake global variable PICO_DEFAULT_DOUBLE_IMPL=xxx, or by using the CMake function pico_set_double_implementation(<TARGET> xxx). Note that in the absence of either, pico_double_pico is used by default.

On RP2040, pico_double_pico uses optimized hand coded implementations from the bootrom and the SDK for both basic double-precision floating point operations and floating point math library functions. These implementations are generally faster and smaller than those provided by the C compiler/library, though they don't support all the features of a fully compliant floating point implementation; they are however usually fine for the majority of cases

On Arm, (replacement) optimized implementations are provided for the following compiler built-ins and math library functions when using pico_double_pico:

On Arm, the following additional optimized functions are also provided when using pico_double_pico: