Skip to content

Commit 9bfebba

Browse files
committed
Don't use compile-time long double arithmetic in src/gentables
1 parent 21bb831 commit 9bfebba

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/gentables/fluid_cb2amp.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ struct Cb2AmpFunctor
1313
* between 0 and 144 dB. Therefore a negative attenuation is
1414
* not allowed.
1515
*/
16-
return gcem::pow(10.0L, static_cast<fluid_real_t>(i) / -200.0L);
16+
return gcem::pow(10.0, static_cast<fluid_real_t>(i) / -200.0);
1717
}
1818
};
1919

src/gentables/fluid_concave.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ struct ConcaveFunctor
1414
? 0
1515
: ((i == FLUID_VEL_CB_SIZE - 1)
1616
? 1
17-
: ((-200.0L * 2 / FLUID_PEAK_ATTENUATION) * gcem::log(((FLUID_VEL_CB_SIZE - 1) - i) / (FLUID_VEL_CB_SIZE - 1.0L)) / GCEM_LOG_10)
17+
: ((-200.0 * 2 / FLUID_PEAK_ATTENUATION) * gcem::log(((FLUID_VEL_CB_SIZE - 1) - i) / (FLUID_VEL_CB_SIZE - 1.0)) / GCEM_LOG_10)
1818
));
1919
}
2020
};

src/gentables/fluid_convex.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ struct ConvexFunctor
1414
? 0
1515
: ((i == FLUID_VEL_CB_SIZE - 1)
1616
? 1
17-
: (1.0L - ((-200.0L * 2 / FLUID_PEAK_ATTENUATION) * gcem::log(i / (FLUID_VEL_CB_SIZE - 1.0L)) / GCEM_LOG_10))
17+
: (1.0 - ((-200.0 * 2 / FLUID_PEAK_ATTENUATION) * gcem::log(i / (FLUID_VEL_CB_SIZE - 1.0)) / GCEM_LOG_10))
1818
));
1919
}
2020
};

src/gentables/fluid_pan.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ struct PanFunctor
99
static constexpr fluid_real_t calc(int i)
1010
{
1111
/* initialize the pan conversion table */
12-
return static_cast<fluid_real_t>(gcem::sin(i * (GCEM_HALF_PI / (FLUID_PAN_SIZE - 1.0L))));
12+
return static_cast<fluid_real_t>(gcem::sin(i * (GCEM_HALF_PI / (FLUID_PAN_SIZE - 1.0))));
1313
}
1414
};
1515

0 commit comments

Comments
 (0)