hello,
I have noticed that sometimes what is printed in an output file (using "printf") is different from what is shown using the "display" command in the IDE. Is this a bug or normal?
On Mon, Nov 28, 2022 at 11:09 PM UTC, AMPL Google Group <am...@googlegroups.com> wrote:
Use Ctl+C to stop a solver and get the best solution that has been found. We have tested that this works with both the old "ASL" and the new "MP" version of Gurobi 10 for AMPL.
--
Robert Fourer
am...@googlegroups.com
thank you for your reply.
Actually, the number is an integer. Sometimes in the output file, it is 71 (wrong) but when I display it using "display" it is 72 (correct).
On Fri, Dec 2, 2022 at 8:59 PM UTC, AMPL Google Group <am...@googlegroups.com> wrote:
At the default setting, display shows numbers to 6 significant digits. (You can change this by setting non-default values for option display_precision or option display_round -- see Display Command Options at https://dev.ampl.com/ampl/options.html.) Also display can decide whether to use exponential notation (as in 1.23e+08 or 123000000) depending on what results in a shorter expression.
The printf command works differently. It includes a format string that specifies the appearance of each number, including the number of digits and the notation used. Thus an expression shown using display may appear differently than the same expression shown using printf.
--
Robert Fourer
am...@googlegroups.com