bugGNU Octave - Bugs: bug #58536, [octave forge] (symbolic) adding...


bug #58536: [octave forge] (symbolic) adding exponential functions returns wrong results

Submitted by:  miro <miro>
Submitted on:  Tue 09 Jun 2020 06:29:27 PM UTC  
Category:  Octave Forge Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  None Assigned to:  None
Originator Name:  Open/Closed:  Open
Release:  5.2.0 Operating System:  GNU/Linux

Add a New Comment (Rich Markup)

You are not logged in

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


Tue 09 Jun 2020 06:29:27 PM UTC, original submission:  

In symbolic mode:

1) exponential function with imaginary exponent is not well supported, adding opposite numbers never return zero, such as in this case

2) The worse result is coming when adding numbers of vertexes of symmetric polygon on unit circle. The expected result is 0, but simplify(sum(exp(sym(2)*pi*[0:4]*1i/5))) returns
1 - \left(-1\right)^{\frac{3}{5}} - \sqrt[5]{-1} + e^{\frac{4 i \pi}{5}} + e^{\frac{2 i \pi}{5}}

3) in the result of 2) there is also wrong that sqrt(-1) is not replaced by "i" and there are expressions like (-1)**(3/5), they shouldn't appear at all during symbolic counting, or at least they should be replaced by complex number if the counting method is not so good

4) working with something more complex based on exponential function with complex coefficient, such as circulant matrices should provide wrong results for eigenvectors, eigenvalues and determinant in symbolic mode


The simplest fix should be defining Euler's formula into symbolic identities and enabling following identity response:


Anyway the strange form of result in using (-1)**(3/5) as the most simplified expression should have negative impact on other results than only our trigonometric case mentioned here.

miro <miro>


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

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by miro (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.




    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-06-09 mtmiller SummaryAdding exponential functions is returning wrong results in symbolic mode => [octave forge] (symbolic) adding exponential functions returns wrong results

    Back to the top

    Powered by Savane 3.5