bugGNU Octave - Bugs: bug #51966, psi function wrong when built with...

 
 

bug #51966: psi function wrong when built with 64-bit Fortran indexing

Submitter:  Mike Miller <mtmiller>
Submitted:  Fri 08 Sep 2017 09:45:15 PM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed 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
   

Fri 08 Sep 2017 11:06:34 PM UTC, comment #1: 

Ok, this is actually pretty trivial, the compiler flag to build to the right integer size was not being passed equally to all Fortran sources. Fixed on default

https://hg.savannah.gnu.org/hgweb/octave/rev/fbdefffeaa21

Mike Miller <mtmiller>
Group Member
Fri 08 Sep 2017 09:45:15 PM UTC, original submission:  

When Octave is built with support for 64-bit indexed Fortran arrays, the psi function returns a lot of wrong results on real inputs and fails its tests.


>> psi (1, 0.5)
ans = -Inf


The problem occurs in the Fortran routines DPSIFN and PSIFN (the initial value of ierr doesn't matter):


Breakpoint 1, dpsifn (x=0.5, n=1, kode=1, m=1, ans=..., nz=0, ierr=140289603415448)
(gdb) finish
3366              F77_XFCN (dpsifn, DPSIFN, (z, n, 1, 1, ans, flag, t_ierr));
(gdb) p t_ierr
$3 = 2


IERR = 2 indicates an overflow occurred in the routine. So even though the only thing different is the size of the INTEGER variable type, something in these routines is calculating an overflow differently than when built with 32-bit integers.

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 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
    2017-09-08 mtmiller StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code