bugGNU Octave - Bugs: bug #48288, [octave forge] (quaternion)...

 
 

bug #48288: [octave forge] (quaternion) logarithm of a quaternion with only a positive real component

Submitter:  None
Submitted:  Tue 21 Jun 2016 07:09:50 PM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Patch Submitted Assigned to:  None
Originator Name:  David Wang Originator Email:  -email is unavailable-
Open/Closed:  * Open Release:  * dev
Operating System:  * Any Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 26 Jun 2016 06:42:02 PM UTC, comment #2: 

Please review the attached cs.
There's a fix of log and exp.

Adding package maintainer to CC list


(file #37586)

Avinoam Kalma <avinoam>
Group Member
Tue 21 Jun 2016 08:26:49 PM UTC, comment #1: 

Thanks for the bug report. Updating the bug metadata for the quaternion package, and example follows:


>> pkg load quaternion
>> log (quaternion (2, 0, 0, 0))
warning: division by zero
warning: called from
    log at line 36 column 7
warning: division by zero
warning: division by zero
ans = 0.6931 + NaNi + NaNj + NaNk

## for comparison
>> log (quaternion (2, eps, 0, 0))
ans = 0.6931 + 0i + 0j + 0k


Can you provide a patch against the quaternion package to fix this?

Mike Miller <mtmiller>
Group Member
Tue 21 Jun 2016 07:09:50 PM UTC, original submission:  

taking the logarithm of a quaternion with only a positive real component(ex. (2, 0i, 0j, 0k)) causes the built in logarithm function of the quaternion package to return the coefficients of the unreal components as NaN. Based on my understanding of complex numbers, the coefficients should be set to 0 since taking the logarithm of a complex number with 0 imaginary components is equivalents to taking the logarithm of a real number.

Anonymous

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #37586:  bug48288.cs added by avinoam (2KiB - text/plain)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jwe (Updated the item)
  • -email is unavailable- added by avinoam (Updated the item)
  • -email is unavailable- added by avinoam
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

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

    Date Changed by Updated Field Previous Value => Replaced by
    2018-07-02 jwe Summary[octave-forge] (quaternion) logarithm of a quaternion with only a positive real component [octave forge] (quaternion) logarithm of a quaternion with only a positive real component
    2017-08-11 jwe Summaryquaternion package: logarithm of a quaternion with only a positive real component [octave-forge] (quaternion) logarithm of a quaternion with only a positive real component
    2016-06-26 avinoam Attached File- Added bug48288.cs, #37586
        Severity1 - Wish 3 - Normal
        StatusConfirmed Patch Submitted
        Carbon-Copy- Added -email is unavailable-
    2016-06-21 mtmiller Severity3 - Normal 1 - Wish
        StatusNone Confirmed
        Operating SystemMicrosoft Windows Any
        SummaryLogarithm of a quaternion with only a positive real component quaternion package: logarithm of a quaternion with only a positive real component

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code