bugGNU Octave - Bugs: bug #54385, NaN and Inf printed instead of nan...


bug #54385: NaN and Inf printed instead of nan and inf

Submitted by:  John W. Eaton <jwe>
Submitted on:  Thu 26 Jul 2018 01:10:45 PM UTC  
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Unexpected Error
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  Closed
Release:  dev Operating System:  Solaris/SunOS

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Fri 27 Jul 2018 08:55:27 PM UTC, comment #3:

Yes, your fix is fine. Thanks.

John W. Eaton <jwe>
Project Administrator
Fri 27 Jul 2018 07:23:51 PM UTC, comment #2:

@jwe: Okay to close this now?

Rik <rik5>
Project Administrator
Thu 26 Jul 2018 07:09:13 PM UTC, comment #1:

The difference is in the C++ iostream implementation. It's complicated to follow, but eventuall the octave code is using

If that value is NaN it gets formatted however the iostream library thinks it should be. Since case sensitivity isn't important in this warning message I see no reason to try and make this consistent across operating systems.

I pushed a change to the stable branch which changes the BIST tests so they are case insensitive. See https://hg.savannah.gnu.org/hgweb/octave/rev/61f8d94f6bbb.

Marking as Ready for Test.

Rik <rik5>
Project Administrator
Thu 26 Jul 2018 01:10:45 PM UTC, original submission:

Running the test suite on Solaris showed the following errors:

The errors appear to be correct except that "Inf" and "NaN" are displayed and the test is expecting "inf" and "nan".

Should we fix the tests, or fix Octave to always print Inf and NaN values a particular way? The latter seems more difficult unless we can be sure that all printing of Inf and NaN values goes through Octave's I/O system and none are printed directly with a system library.

John W. Eaton <jwe>
Project Administrator


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by jwe (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.




    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-07-27 jwe StatusReady For Test => Fixed
        Open/ClosedOpen => Closed
    2018-07-26 rik5 StatusNone => Ready For Test

    Back to the top

    Powered by Savane 3.4