[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #62342] inf becomes nan
From: |
Markus Mützel |
Subject: |
[Octave-bug-tracker] [bug #62342] inf becomes nan |
Date: |
Thu, 21 Apr 2022 08:49:10 -0400 (EDT) |
Update of bug #62342 (project octave):
Category: None => Interpreter
Status: None => Duplicate
Open/Closed: Open => Closed
Operating System: GNU/Linux => Any
Depends on: => bugs #31974
_______________________________________________________
Follow-up 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.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?62342>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/