Opened 13 years ago

Closed 13 years ago

#3539 closed Bugs (fixed)

uBLAS: norm_inf returns incorrect output for complex vectors.

Reported by: karvind.umich@… Owned by: Gunter
Milestone: Boost 1.43.0 Component: uBLAS
Version: Boost 1.39.0 Severity: Problem
Keywords: Cc:

Description

The attached code shows that norm_inf returns an incorrect output for vector<complex> inputs.

I've tried it with VS using boost-1.39 and boost-1.40 as well as gcc4.4 on linux and mingw/windows with boost-1.39. They all return the incorrect output for norm_inf.

Attachments (1)

test_ublas.cpp (1.3 KB ) - added by karvind.umich@… 13 years ago.
test code that produces error

Download all attachments as: .zip

Change History (7)

by karvind.umich@…, 13 years ago

Attachment: test_ublas.cpp added

test code that produces error

comment:1 by Gunter, 13 years ago

Milestone: Boost 1.41.0Boost 1.42.0

too late for 1.41 now

comment:2 by Gunter, 13 years ago

(In [61135]) see #3539: a testcase was provided to recreate the problem

test/Jamfile.v2: added new target

test/test_complex_norms.cpp: added new testcase for complex vector norms

comment:3 by Gunter, 13 years ago

Milestone: Boost 1.42.0Boost 1.43.0
Status: newassigned

fix will go into current release.

comment:4 by Gunter, 13 years ago

(In [61136]) see #3539:

changed implementation of norm_inf and norm_1 for complex types to use abs(z) instead of max(abs(real(z)),abs(imag(z))).

comment:5 by Gunter, 13 years ago

(In [61137]) see #3539:

added release note and warning

comment:6 by Gunter, 13 years ago

Resolution: fixed
Status: assignedclosed

(In [61206]) fix #3539: merged [61135], [61136], [61137] into release

boost/numeric/ublas/traits.hpp: fixed complex_traits

libs/numeric/ublas/test/Jamfile.v2: added testcase

libs/numeric/ublas/test/test_complex_norms.cpp: new testcase

libs/numeric/ublas/doc/release_notes.htm: updated release notes

Note: See TracTickets for help on using tickets.