mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Small fixes
This MR fixes a bunch of smaller issues, making the following changes: * Template parameters in the documentation are documented with `\tparam` instead of `\param` * Superfluous semicolon warnings fixed * Fixed the type of literals used to initialize float variables
This commit is contained in:
committed by
David Tellenbach
parent
2a6594de29
commit
f7a056bf04
@@ -209,8 +209,8 @@ void test_numtraits()
|
||||
|
||||
void test_arithmetic()
|
||||
{
|
||||
VERIFY_IS_EQUAL(static_cast<float>(bfloat16(2) + bfloat16(2)), 4);
|
||||
VERIFY_IS_EQUAL(static_cast<float>(bfloat16(2) + bfloat16(-2)), 0);
|
||||
VERIFY_IS_EQUAL(static_cast<float>(bfloat16(2) + bfloat16(2)), 4.f);
|
||||
VERIFY_IS_EQUAL(static_cast<float>(bfloat16(2) + bfloat16(-2)), 0.f);
|
||||
VERIFY_IS_APPROX(static_cast<float>(bfloat16(0.33333f) + bfloat16(0.66667f)), 1.0f);
|
||||
VERIFY_IS_EQUAL(static_cast<float>(bfloat16(2.0f) * bfloat16(-5.5f)), -11.0f);
|
||||
VERIFY_IS_APPROX(static_cast<float>(bfloat16(1.0f) / bfloat16(3.0f)), 0.3339f);
|
||||
|
||||
Reference in New Issue
Block a user