bugGNU Octave - Bugs: bug #62342, inf becomes nan

 
 

bug #62342: inf becomes nan

Submitter:  None
Submitted:  Thu 21 Apr 2022 11:33:06 AM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Duplicate Assigned to:  None
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 6.4.0
Operating System:  * Any Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 21 Apr 2022 12:49:10 PM UTC, comment #1: 

This is a known issue and also happens with any other real number added to Inf*i. See bug #31974.

A possible workaround is to create the complex number like this:

>> complex(Inf, Inf)
ans =  Inf + Infi


IIUC, the underlying issue is that `inf * i` is evaluated as:

>> Inf * complex(0, 1)
ans =  NaN + Infi


The multiplication of Inf*0 for the real part results in NaN.

Closing as duplicate of the older bug.

Markus Mützel <mmuetzel>
Group administrator
Thu 21 Apr 2022 11:33:06 AM UTC, original submission:  


>> inf+inf*i
ans =  NaN + Infi


Anonymous

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Digest:
   bug dependencies.

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mmuetzel (Posted a comment)
  •  

    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 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-04-21 mmuetzel CategoryNone Interpreter
        StatusNone Duplicate
        Open/ClosedOpen Closed
        Operating SystemGNU/Linux Any
        Dependencies- Depends on bugs #31974

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code