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...
This commit is contained in:
Jared Boone 2015-11-08 16:33:32 -08:00
parent 5dcca89172
commit 85383e488b

View File

@ -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;
}