From 76d766fe252f55668ab7d1a21bb889d2de8e110c Mon Sep 17 00:00:00 2001 From: Tres Finocchiaro Date: Mon, 8 Dec 2014 12:30:16 -0500 Subject: [PATCH] fmaf() code cleanup, typos --- include/lmms_math.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/lmms_math.h b/include/lmms_math.h index 8c7d07cb0..393a16d8b 100644 --- a/include/lmms_math.h +++ b/include/lmms_math.h @@ -131,7 +131,7 @@ static inline int fast_rand() } //! @brief Takes advantage of fmal() function if present in hardware -static inline long fastFmal( long a, long b, long c) { +static inline long fastFmal( long a, long b, long c ) { #ifdef FP_FAST_FMAF #ifdef __clang__ return fma(a, b, c); @@ -139,12 +139,12 @@ static inline long fastFmal( long a, long b, long c) { return fmal( a, b, c ); #endif #else - return a * ( b - c ) + c; + return a * b + c; #endif } //! @brief Takes advantage of fmaf() function if present in hardware -static inline float fastFmaf( float a, float b, float c) { +static inline float fastFmaf( float a, float b, float c ) { #ifdef FP_FAST_FMAF #ifdef __clang__ return fma( a, b, c ); @@ -152,16 +152,16 @@ static inline float fastFmaf( float a, float b, float c) { return fmaf( a, b, c ); #endif #else - return a * ( b - c ) + c; + return a * b + c; #endif } //! @brief Takes advantage of fma() function if present in hardware -static inline int fastFma( int a, int b, int c) { +static inline int fastFma( int a, int b, int c ) { #ifdef FP_FAST_FMAF return fma( a, b, c ); #else - return a * ( b - c ) + c; + return a * b + c; #endif }