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

 Submitted by: Marco 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

You are not logged in

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

document.write('<a onclick="document.getElementById(\'hidsubpartcontentdiscussion\').style.display=\'none\'; document.getElementById(\'hidsubpartlinkhidediscussion\').style.display=\'none\'; document.getElementById(\'hidsubpartlinkshowdiscussion\').style.display=\'block\';" id="hidsubpartlinkhidediscussion" style="display: block" href="#discussion"><span class="minusorplus">(-)</span> Discussion</a>'); document.write('<a onclick="document.getElementById(\'hidsubpartcontentdiscussion\').style.display=\'inline\'; document.getElementById(\'hidsubpartlinkhidediscussion\').style.display=\'block\'; document.getElementById(\'hidsubpartlinkshowdiscussion\').style.display=\'none\';" id="hidsubpartlinkshowdiscussion" style="display: none" href="#discussion"><span class="minusorplus">(+)</span> Discussion</a>'); Discussion

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>
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>

document.write('<a onclick="document.getElementById(\'hidsubpartcontentattached\').style.display=\'none\'; document.getElementById(\'hidsubpartlinkhideattached\').style.display=\'none\'; document.getElementById(\'hidsubpartlinkshowattached\').style.display=\'block\';" id="hidsubpartlinkhideattached" style="display: block" href="#attached"><span class="minusorplus">(-)</span> Attached Files</a>'); document.write('<a onclick="document.getElementById(\'hidsubpartcontentattached\').style.display=\'inline\'; document.getElementById(\'hidsubpartlinkhideattached\').style.display=\'block\'; document.getElementById(\'hidsubpartlinkshowattached\').style.display=\'none\';" id="hidsubpartlinkshowattached" style="display: none" href="#attached"><span class="minusorplus">(+)</span> Attached Files</a>'); Attached Files

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

Attach Files:

Comment:

No files currently attached

document.write('<a onclick="document.getElementById(\'hidsubpartcontentdependencies\').style.display=\'none\'; document.getElementById(\'hidsubpartlinkhidedependencies\').style.display=\'none\'; document.getElementById(\'hidsubpartlinkshowdependencies\').style.display=\'block\';" id="hidsubpartlinkhidedependencies" style="display: block" href="#dependencies"><span class="minusorplus">(-)</span> Dependencies</a>'); document.write('<a onclick="document.getElementById(\'hidsubpartcontentdependencies\').style.display=\'inline\'; document.getElementById(\'hidsubpartlinkhidedependencies\').style.display=\'block\'; document.getElementById(\'hidsubpartlinkshowdependencies\').style.display=\'none\';" id="hidsubpartlinkshowdependencies" style="display: none" href="#dependencies"><span class="minusorplus">(+)</span> Dependencies</a>'); Dependencies

Depends on the following items: None found

Items that depend on this one: None found

document.write('<a onclick="document.getElementById(\'hidsubpartcontentcc\').style.display=\'none\'; document.getElementById(\'hidsubpartlinkhidecc\').style.display=\'none\'; document.getElementById(\'hidsubpartlinkshowcc\').style.display=\'block\';" id="hidsubpartlinkhidecc" style="display: none" href="#cc"><span class="minusorplus">(-)</span> Mail Notification Carbon-Copy List</a>'); document.write('<a onclick="document.getElementById(\'hidsubpartcontentcc\').style.display=\'inline\'; document.getElementById(\'hidsubpartlinkhidecc\').style.display=\'block\'; document.getElementById(\'hidsubpartlinkshowcc\').style.display=\'none\';" id="hidsubpartlinkshowcc" style="display: block" href="#cc"><span class="minusorplus">(+)</span> Mail Notification Carbon-Copy List</a>'); Mail Notification Carbon-Copy List

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.

document.write('<a onclick="document.getElementById(\'hidsubpartcontenthistory\').style.display=\'none\'; document.getElementById(\'hidsubpartlinkhidehistory\').style.display=\'none\'; document.getElementById(\'hidsubpartlinkshowhistory\').style.display=\'block\';" id="hidsubpartlinkhidehistory" style="display: none" href="#history"><span class="minusorplus">(-)</span> History</a>'); document.write('<a onclick="document.getElementById(\'hidsubpartcontenthistory\').style.display=\'inline\'; document.getElementById(\'hidsubpartlinkhidehistory\').style.display=\'block\'; document.getElementById(\'hidsubpartlinkshowhistory\').style.display=\'none\';" id="hidsubpartlinkshowhistory" style="display: block" href="#history"><span class="minusorplus">(+)</span> History</a>'); History

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