From 85383e488be4e99eab40b34d59e20d0114dfaaa3 Mon Sep 17 00:00:00 2001 From: Jared Boone Date: Sun, 8 Nov 2015 16:33:32 -0800 Subject: [PATCH] std::fma not necessary with proper compiler options. std::fma isn't available on Ubuntu 15.04 arm-gcc, apparently. Hence my reviewing this code... --- firmware/common/sine_table.hpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/firmware/common/sine_table.hpp b/firmware/common/sine_table.hpp index 479de877..84979dfe 100644 --- a/firmware/common/sine_table.hpp +++ b/firmware/common/sine_table.hpp @@ -142,8 +142,7 @@ inline float sin_f32(const float w) { const float p0 = sine_table_f32[n_int + 0]; const float p1 = sine_table_f32[n_int + 1]; const float diff = p1 - p0; - //const float result = p0 + n_frac * diff; - const float result = std::fma(n_frac, diff, p0); + const float result = p0 + n_frac * diff; return result; }