bugGNU Octave - Bugs: bug #43531, gnuplot integer overflow with...

 
 

bug #43531: gnuplot integer overflow with large values for histogram bin centers

Submitter:  <mfreemon>
Submitted:  Tue 04 Nov 2014 10:39:27 PM UTC
   
 
Category:  Plotting with gnuplot Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  mfreemon Open/Closed:  * Closed
Release:  * 3.8.2 Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 06 Dec 2014 09:24:17 PM UTC, comment #1: 

I fixed the code on the development branch in this cset http://hg.savannah.gnu.org/hgweb/octave/rev/52ae096f038b.  To access the fix you will need to build from Mercurial sources, or just continue to use your own patched copy of _go_draw_axes_.m.  Thanks for identifying what needed to be fixed, it made this easy.  Closing report.

Rik <rik5>
Group administrator
Tue 04 Nov 2014 10:39:27 PM UTC, original submission:  

CentOS 6.6
Linux 2.6.32-431.29.2.el6.x86_64 #1 SMP Tue Sep 9 21:36:05 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

Plotting a histogram with large values for the bin centers results in a failure to create the X axis:

>> hist(filesizes, 0:1e9:5e10);


gnuplot> set xtics in scale  1.4 border mirror ( 0, 1000000000, 2000000000, 3000000000, 4000000000, 5000000000, 6000000000, 7000000000, 8000000000, 9000000000, 10000000000, 11000000000, 12000000000, 13000000000, 14000000000, 15000000000, 16000000000, 17000000000, 18000000000, 19000000000, 20000000000, 21000000000, 22000000000, 23000000000, 24000000000, 25000000000, 26000000000, 27000000000, 28000000000, 29000000000, 30000000000, 31000000000, 32000000000, 33000000000, 34000000000, 35000000000, 36000000000, 37000000000, 38000000000, 39000000000, 40000000000, 41000000000, 42000000000, 43000000000, 44000000000, 45000000000, 46000000000, 47000000000, 48000000000, 49000000000, 50000000000)font "{},10";
                                                                            ^
         line 0: integer overflow; change to floating point

>>


The root problem is fundamentally the same as bug #33059.  I will attach a patch for this one momentarily.

<mfreemon>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #32369:  patch.txt added by mfreemon (893B - text/plain - As you can see, I took a different approach than that in bug #33059. I reduced the precision to 9, to allow the fixed point notation to continue for not-really-big-numbers.)

 

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 jordigh (Updated the item)
  • -email is unavailable- added by mfreemon (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 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-12-06 rik5 StatusPatch Submitted Fixed
        Open/ClosedOpen Closed
    2014-11-11 jordigh StatusNone Patch Submitted
    2014-11-04 mfreemon Attached File- Added patch.txt, #32369

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code