Skip to content

Commit

Permalink
Merge pull request #2762 from matwey/i586-2
Browse files Browse the repository at this point in the history
Use L suffix for long double constants
  • Loading branch information
JohanMabille committed Jan 4, 2024
2 parents cd06b35 + e515bcb commit 9c18ab6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/test_xcomplex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -308,15 +308,15 @@ namespace xt
{
using cmplx = std::complex<long double>;
xt::xtensor<cmplx, 2> a = xt::empty<cmplx>({5, 5});
xt::real(a) = 123.321;
xt::imag(a) = -123.321;
xt::real(a) = 123.321L;
xt::imag(a) = -123.321L;

EXPECT_EQ(a(4, 4), cmplx(123.321, -123.321));
EXPECT_EQ(a(4, 4), cmplx(123.321L, -123.321L));

xt::real(a) = xt::imag(a);

EXPECT_EQ(a(0, 0), cmplx(-123.321, -123.321));
EXPECT_EQ(a(4, 4), cmplx(-123.321, -123.321));
EXPECT_EQ(a(0, 0), cmplx(-123.321L, -123.321L));
EXPECT_EQ(a(4, 4), cmplx(-123.321L, -123.321L));
}

TEST(xcomplex, build_from_double)
Expand Down

0 comments on commit 9c18ab6

Please sign in to comment.