bugGNU Octave - Bugs: bug #51143, Overflow result with mixed...


bug #51143: Overflow result with mixed precision types

Submitted by:  Marco Caliari <caliari>
Submitted on:  Tue 30 May 2017 12:54:15 PM UTC  
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: NoneAssigned to: None
Originator Name: Open/Closed: Open
Release: devOperating System: GNU/Linux

Add a New Comment(Rich Markup)

You are not logged in

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


Tue 30 May 2017 05:52:37 PM UTC, comment #2:


Ceral Paquet <octavebugs>
Tue 30 May 2017 03:08:34 PM UTC, comment #1:

Yes, for mixed single/double operations is both operands are converted to single. I thought that was compatible behavior. If instead the computation is performed in double and then the result is converted to single, then we should probably define mixed-type operators and eliminate the "demotion" functions that are currently defined. It should not be too hard with templates, but some care will be needed to ensure that all cases are covered consistently.

John W. Eaton <jwe>
Project Administrator
Tue 30 May 2017 12:54:15 PM UTC, original submission:

The following

gives Inf, even if the final result is smaller then realmax ('single'). It seems that exp (100) is converted to single before the multiplication with 1e-20.

Marco Caliari <caliari>
Project Member


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

Attach File(s):

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by octavebugs (Posted a comment)
  • -unavailable- added by jwe (Posted a comment)
  • -unavailable- added by caliari (Submitted the item)

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

    Only project members can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    No Changes Have Been Made to This Item

    Back to the top

    Powered by Savane 3.1-cleanup1