[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #65089] assert may become excessively slow in
From: |
anonymous |
Subject: |
[Octave-bug-tracker] [bug #65089] assert may become excessively slow in case of large matrices |
Date: |
Thu, 28 Dec 2023 16:23:09 -0500 (EST) |
Follow-up Comment #7, bug#65089 (group octave):
What I was thinking about is something like this:
assert_msg_limit=1000;
tol = eps;
N = 1000;
a = rand(N, N);
b = rand(N, N);
tic;
cond_fail=(abs(a - b) > tol);
n_fail=sum(cond_fail(:));
toc;
if (n_fail > assert_msg_limit)
error("assert failed: %d values are out of tolerance; max difference is %g >
%g; message is too long ...", n_fail, max(abs(a - b)(:)), tol);
endif
[comment #6 comment #6:]
> Should it just return at the first FALSE?
>
> Dmitri.
> --
>
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?65089>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #65089] assert may become excessively slow in case of large matrices, anonymous, 2023/12/28
- Message not available
- [Octave-bug-tracker] [bug #65089] assert may become excessively slow in case of large matrices, anonymous, 2023/12/28
- Message not available
- [Octave-bug-tracker] [bug #65089] assert may become excessively slow in case of large matrices, John W. Eaton, 2023/12/28
- [Octave-bug-tracker] [bug #65089] assert may become excessively slow in case of large matrices, anonymous, 2023/12/28
- Message not available
- [Octave-bug-tracker] [bug #65089] assert may become excessively slow in case of large matrices, John W. Eaton, 2023/12/28
- [Octave-bug-tracker] [bug #65089] assert may become excessively slow in case of large matrices, anonymous, 2023/12/28
- Message not available
- [Octave-bug-tracker] [bug #65089] assert may become excessively slow in case of large matrices, Dmitri A. Sergatskov, 2023/12/28
- [Octave-bug-tracker] [bug #65089] assert may become excessively slow in case of large matrices,
anonymous <=
- Message not available
- [Octave-bug-tracker] [bug #65089] assert may become excessively slow in case of large matrices, anonymous, 2023/12/28