bugGNU Octave - Bugs: bug #65872, [octave forge] (mapping) angl2str...

 
 

bug #65872: [octave forge] (mapping) angl2str inaccuracy

Submitter:  None
Submitted:  Tue 11 Jun 2024 01:26:14 PM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Confirmed Assigned to:  None
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  * Open Release:  * other
Operating System:  * Any Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 11 Jun 2024 08:28:15 PM UTC, comment #1: 

(mapping pkg maintainer here)
Confirmed (checked with Matlab r2020b).
For discussions about similar issues see bug #65291 and bug #65508. It may be that the actual bug here is actually in one of those bug reports .

BTW this isn't my code (nor are degrees2dm and degrees2dms mentioned above in the other bug reports); angl2str.m was contributed by a friendly Octave user (see patch #9953) although IIRC I added a few tweaks. I won't "bug" him as that was so long ago.

Just for some background: taking care of proper rounding of, and carry-over from seconds -> minutes and minutes -> degrees isn't quite as easy as it looks at first sight. I gave it a try in bug #65291 but soon got trapped in some rabbit holes.
It looks like only by the end of the summer holiday period I might have time for a closer look. Hopefully for you someone might beat me to it.


Philip Nienhuis <philipnienhuis>
Group Member
Tue 11 Jun 2024 01:26:14 PM UTC, original submission:  

There is a bug in angl2str from mapping-1.4.2 which can be demonstrated as follows:

octave:3> angl2str(1 - eps(0.9), 'pm', 'degrees2dm')
ans =  +1° 60.00'

Cursory investigation indicates the problem is that m is not set to zero after d is incremented on line 119.  See lines 129 through 132 for the corresponding logic for the "degrees2dms" case which doesn't seem to have the same problem.

Anonymous

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

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.

 

Follows 1 latest change.

Date Changed by Updated Field Previous Value => Replaced by
2024-06-11 philipnienhuis StatusNone Confirmed

Back to the top

Powered by Savane 3.13-d453.
Corresponding source code