[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #63961] interpreter incorrectly displays integ
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #63961] interpreter incorrectly displays integer imaginary value when real part is Inf |
Date: |
Sat, 25 Mar 2023 20:53:00 -0400 (EDT) |
URL:
<https://savannah.gnu.org/bugs/?63961>
Summary: interpreter incorrectly displays integer imaginary
value when real part is Inf
Group: GNU Octave
Submitter: rik5
Submitted: Sat 25 Mar 2023 05:52:58 PM PDT
Category: Interpreter
Severity: 4 - Important
Priority: 5 - Normal
Item Group: Incorrect Result
Status: Confirmed
Assigned to: None
Originator Name: rik5
Originator Email:
Open/Closed: Open
Release: stable
Discussion Lock: Any
Operating System: Any
Fixed Release: None
Planned Release: 8.2.0 (current stable)
_______________________________________________________
Follow-up Comments:
-------------------------------------------------------
Date: Sat 25 Mar 2023 05:52:58 PM PDT By: Rik <rik5>
This bug has been present for quite a while, and is quite serious as Octave
incorrectly communicates the wrong value of an internal variable.
Sample Code
octave:1> z = complex (Inf, 1.5)
z = Inf + 2i
octave:2> z2 = [z, z]
z2 =
Inf + 1.5000i Inf + 1.5000i
octave:3> z2(1)
ans = Inf + 2i
octave:4> z3 = complex (1.5, Inf)
z3 = 2 + Infi
z4 = complex (realmax, 1.5)
z4 = 1.7977e+308 + 1.5000e+00i
>From the code above, Octave displays arrays correctly. It is only a problem
with scalars and it doesn't matter whether the Inf is located in the imaginary
or the real part of the complex number.
My guess is that the scalar display routine is not checking with isinf()
before calculating number of digits.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?63961>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Octave-bug-tracker] [bug #63961] interpreter incorrectly displays integer imaginary value when real part is Inf,
Rik <=