A move to fixed format was erroneously made in
4893f0e82c and
ff85fc6489, where stream formatting of floating
points has been replaced by the use of std::to_string().
Use an iterator wrapped inside std::optional instead of a possibly-singular
iterator, because the latter has undefined behaviour.
By the way, pass arguments by const reference.
In particular, no longer rely on a duplicate implementation of the evaluator to
locate where the NaN or Inf is produced. Rather directly pass the pointer to
the faulty operator.
Class Evaluate had data members with the same name as members of
ErrorMsg (which it derives from). In practice, this means that the data members
from ErrorMsg could be unitialized when displaying error messages.
– before erroring out, check whether the residuals for the block are already
zero (in which case, move to next block)
– improve error message that is printed otherwise
Note that trying to solve under-determined blocks (as in dynare_solve.m) would
require too many changes in the existing code, so let’s leave it out.
Closes: #1851
Previously, LBJ was available:
– under stack_solve_algo=6 when neither block nor bytecode were present
– under stack_solve_algo=1 with either block or bytecode (but the documentation
was not making it clear that it was LBJ)
This commit merges the two values for the option, and makes them
interchangeable. LBJ should now be invoked with stack_solve_algo=1 (but
stack_solve_algo=6 is kept for compatibility, and is a synonymous).
The variable “gap” is compared to zero, so the intent probably was that it
could be negative. But size_t is an unsigned type. Rather use a signed type.
They don’t bring any added value, and break compilation in C++20 mode (because
they are then of type “const char8_t *” which is distinct from “const char *”).
Since Octave 7, LDFLAGS as returned by mkoctfile include -shared, which is
undesirable for generic LDFLAGS. Pass the --link-stand-alone option to strip
this flag.
It is now supported by the MATLAB editor (as of R2022a).
The old ASCII notation is left in some files that we copy as-is from other
sources (e.g. in the contrib/ and m4/ subdirectories).
The particles submodule is not updated at this point, because it is in an
inconsistent state.
[skip ci]
There was no user interface, and the feature that it provides has lost
relevance over time.
Note that algorithms for block and/or bytecode still internally use some
equivalent of this parameter, but its initial value will no longer be
modifiable (which could lead to bugs, see commit
e49e7e906f).