bugGNU Octave - Bugs: bug #38142, Compiling with -std=c++11...

 
 

bug #38142: Compiling with -std=c++11 introduces a couple make check failures

Submitter:  Mike Miller <mtmiller>
Submitted:  Tue 22 Jan 2013 12:41:11 PM UTC
   
 
Category:  Libraries Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Inaccurate Result
Status:  Wont Fix Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 23 Jan 2013 01:43:02 AM UTC, comment #3: 

Ok, I guess I just closed it...

Mike Miller <mtmiller>
Group Member
Wed 23 Jan 2013 01:42:37 AM UTC, comment #2: 

Yeah, my mistake, I must have missed that discussion. I didn't dig too deep when I submitted this. I looked it up now, here's the relevant part of the thread for reference:

http://octave.1599824.n4.nabble.com/Welcome-C-11-td4647840.html#a4647903

I agree, there should ideally not be any round-off error, but if we're basically just relying on the library, then pow(complex<double>, double) is all we can count on being implemented. I guess it could potentially be handled in libstdc++ at some point.

Feel free to close as won't fix or leave open as you like, I'm not overly concerned about it at the moment.

Mike Miller <mtmiller>
Group Member
Tue 22 Jan 2013 03:30:00 PM UTC, comment #1: 

I'm not sure build failures with C++11 are a bug.

As an annoying thing that we've discussed on the mailing list, C++11 apparently gets rid of the std::pow(double,int) specialisation that gives you e.g. pow(1.5,2) exactly, without round-off error.

The tests that fail here seem to be related to std::pow, and I think pow(1.5,2) should not have round-off error. Are other library implementors besides GNU doing this?

Jordi GutiƩrrez Hermoso <jordigh>
Group Member
Tue 22 Jan 2013 12:41:11 PM UTC, original submission:  

Compiling default with g++ 4.7 with -std=c++11 makes the following tests fail for me on Debian 64-bit:


octave:1> test ../default/libinterp/interp-core/sparse-xpow.cc
  ***** assert (sparse (2i) .^ [3, 4], sparse ([-0-8i, 16]));
!!!!! test failed
assert (sparse (2i) .^ [3, 4],sparse ([-0 - 8i, 16])) expected
Compressed Column Sparse (rows = 1, cols = 2, nnz = 2 [100%])

  (1, 1) -> -0 - 8i
  (1, 2) ->  16 +  0i
but got
Compressed Column Sparse (rows = 1, cols = 2, nnz = 2 [100%])

  (1, 1) -> -1.4695e-15 - 8.0000e+00i
  (1, 2) ->  1.6000e+01 - 3.9187e-15i
values do not match



octave:2> test realpow
  ***** assert (realpow (1i,2), -1)
!!!!! test failed
realpow: produced complex result


Same build with g++ 4.7 with -std=c++98 or without -std passes the same tests.

Mike Miller <mtmiller>
Group Member

 

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

Attach Files:
   
   
Comment:
   

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 jordigh (Posted a comment)
  • -email is unavailable- added by mtmiller (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-01-23 mtmiller StatusNone Wont Fix
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code