About 97,200 results
Open links in new tab
  1. math - How should I implement a generic FMA/FMAF instruction …

    Sep 23, 2022 · FMA is a fused multiply-add instruction. The fmaf (float x, float y, float z) function in glibc calls the vfmadd213ss instruction. I want to know how this instruction is implemented. …

  2. floating point - How is fma () implemented - Stack Overflow

    Feb 20, 2015 · According to the documentation, there is a fma() function in math.h. That is very nice, and I know how FMA works and what to use it for. However, I am not so certain how this …

  3. Very fast approximate Logarithm (natural log) function in C++?

    This code heavily relies on the fused multiply-add operation FMA supported directly in the hardware on most current processors, CPU or GPU. On platforms where fmaf() maps to …

  4. How can I make an alias to a standard library function?

    Mar 27, 2021 · I'm trying to make an alias to the standard library function fmaf with the alias attribute. #include <math.h> float float_fma (float x, float y, float z) __attribute__ ( (alias ("fmaf")...

  5. algorithm - Accurate computation of the inverse gamma function …

    Nov 17, 2025 · The mapping of C floating-point types to IEEE-754 formats (double → binary64; float → binary32) can be assumed, as can the presence of hardware support for the fused …

  6. c - Best machine-optimized polynomial minimax approximation to ...

    Nov 2, 2014 · For the simple and efficient implementation of fast math functions with reasonable accuracy, polynomial minimax approximations are often the method of choice. Minimax …

  7. Inverse Error Function in C - Stack Overflow

    Dec 1, 2014 · The code takes maximum advantage of the fused multiply-add operation FMA, which is exposed via the standard math functions fma() and fmaf() in C. Many common …

  8. Rules-of-thumb for minimising floating-point errors in C?

    Aug 7, 2014 · However, in the particular case of the fused-multiply-add compound operation, you can use the C99 standard function fmaf() to tell the compiler to compute the multiplication and …

  9. Single precision argument reduction for trigonometric functions in C

    Sep 25, 2020 · I have implemented some approximations for trigonometric functions (sin,cos,arctan) computed with single precision (32 bit floating point) in C. They are accurate to …

  10. c++ - fmaf weird performance - Stack Overflow

    Oct 19, 2012 · The non- fmaf option produces inline multiply and add instructions, without the function call overhead, so it's considerably faster. When in doubt, use g++ -S, and inspect the …