octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #65291] [octave forge] (mapping) degrees2dms p


From: Nicholas Jankowski
Subject: [Octave-bug-tracker] [bug #65291] [octave forge] (mapping) degrees2dms produces incorrect results
Date: Tue, 13 Feb 2024 13:38:40 -0500 (EST)

Follow-up Comment #7, bug#65291 (group octave):


a = single(0:(2 .^ 23 - 1)) .';
b = 1 + a .* eps('single');
positive_normal_mismatches = 0;
positive_normal_total = 0;
for p = (-126):127
d = pow2(p) .* b;
positive_normal_mismatches = positive_normal_mismatches + sum(any(d2dms(d) ~=
degrees2dms(d), 2));
positive_normal_total = positive_normal_total + numel(d);
end
positive_normal_mismatches
positive_normal_mismatches =
     0
positive_normal_matches = positive_normal_total - positive_normal_mismatches
positive_normal_matches =
     2.130706432000000e+09
d = pow2(-149) .* a;
positive_zero_and_subnormal_mismatches = sum(any(d2dms(d) ~=
degrees2dms(d),2))
positive_zero_and_subnormal_mismatches =
     0
positive_zero_and_subnormal_matches = numel(d) -
positive_zero_and_subnormal_mismatches
positive_zero_and_subnormal_matches =
     8388608




    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?65291>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]