Add fma to math.h

This commit is contained in:
Nick Thompson
2023-12-09 13:26:38 -08:00
parent 173c500886
commit 51f8b47071
3 changed files with 35 additions and 0 deletions
+6
View File
@@ -62,6 +62,12 @@ TEST_CASE("'cbrt()' on quantity changes the value and the dimension accordingly"
REQUIRE(cbrt(8 * isq::volume[m3]) == 2 * isq::length[m]);
}
TEST_CASE("'fma()' on quantity changes the value and the dimension accordingly", "[math][cbrt]")
{
REQUIRE(fma(1.0 * isq::length[m], 2.0, 2.0 * isq::length[m]) == 4.0 * isq::length[m]);
}
TEST_CASE("'pow<Num, Den>()' on quantity changes the value and the dimension accordingly", "[math][pow]")
{
REQUIRE(pow<1, 4>(16 * isq::area[m2]) == sqrt(4 * isq::length[m]));