[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #62094] log1p returns wrong result for complex
From: |
anonymous |
Subject: |
[Octave-bug-tracker] [bug #62094] log1p returns wrong result for complex input |
Date: |
Mon, 21 Feb 2022 16:28:12 -0500 (EST) |
URL:
<https://savannah.gnu.org/bugs/?62094>
Summary: log1p returns wrong result for complex input
Project: GNU Octave
Submitted by: None
Submitted on: Mon 21 Feb 2022 09:28:10 PM UTC
Category: Octave Function
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Incorrect Result
Status: None
Assigned to: None
Originator Name: Vincent
Originator Email: vmagnoux20@gmail.com
Open/Closed: Open
Release: 6.4.0
Discussion Lock: Any
Operating System: GNU/Linux
_______________________________________________________
Details:
When using a complex number as input, the log1p function seems to give the
wrong result. For example:
octave:37> log1p(0.1i)
ans = 4.9752e-03 + 1.4711e+00i
but the result should actually be something like 4.975e-3 + 9.97e-2i
(according to numpy).
This is more obvious on smaller inputs "x", where the output of log1p seems to
converge on 1.5708i rather than a value close to x.
octave:40> log1p(0.0001i)
ans = 5.0000e-09 + 1.5707e+00i
I have also seen this in version 4.2.2
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?62094>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #62094] log1p returns wrong result for complex input,
anonymous <=