bugGNU Octave - Bugs: bug #51143, mixed precision operations should...

 
 

bug #51143: mixed precision operations should be performed as double

Submitted by:  Marco Caliari <caliari>
Submitted on:  Tue 30 May 2017 12:54:15 PM UTC  
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Matlab Compatibility
Status:  Confirmed Assigned to:  None
Originator Name:  Open/Closed:  Open
Release:  dev Operating 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:

MATLAB

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 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 (Updated the item)
  • -email is unavailable- added by octavebugs (Posted a comment)
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by caliari (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 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-03-30 mtmiller CategoryNone => Interpreter
        Item GroupIncorrect Result => Matlab Compatibility
        StatusNone => Confirmed
        SummaryOverflow result with mixed precision types => mixed precision operations should be performed as double

    Back to the top


    Powered by Savane 3.3