[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #62330] [octave forge] (mapping) degrees2dm fa
From: |
Nicholas Jankowski |
Subject: |
[Octave-bug-tracker] [bug #62330] [octave forge] (mapping) degrees2dm fails on NaN input |
Date: |
Tue, 17 May 2022 16:26:16 -0400 (EDT) |
Follow-up Comment #2, bug #62330 (project octave):
unreviewed, but after converting line endings I saved his degrees2dm against
the latest mapping pkg source and produced the attached hg patch which amounts
to:
@@ -87,7 +87,9 @@
## leads to some precision errors.
## remove sign from any minute where its degree part is non-zero
- nnzd = logical (dm(:,1));
+ nn = ! isnan (dm(:,1));
+ nnzd = false (rows (dm), 1);
+ nnzd(nn) = logical (dm(nn, 1));
dm(nnzd, 2) = abs (dm(nnzd, 2));
endif
if this does the job it should probably have some self tests added to the end
to verify.
(file #53220)
_______________________________________________________
Additional Item Attachment:
File name: mapping_degrees2dmNaNfix_bug62330.diff Size:0 KB
<https://file.savannah.gnu.org/file/mapping_degrees2dmNaNfix_bug62330.diff?file_id=53220>
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?62330>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #62330] [octave forge] (mapping) degrees2dm fails on NaN input,
Nicholas Jankowski <=