[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #63940] `format native-bit` gives wrong result
From: |
Arun Giridhar |
Subject: |
[Octave-bug-tracker] [bug #63940] `format native-bit` gives wrong results |
Date: |
Sat, 18 Mar 2023 08:43:27 -0400 (EDT) |
Update of bug #63940 (project octave):
Status: None => Patch Submitted
_______________________________________________________
Follow-up Comment #1:
The fix turns out to be very simple:
diff -r 48eaf9df5a5b libinterp/corefcn/pr-output.cc
--- a/libinterp/corefcn/pr-output.cc Mon Mar 13 14:10:11 2023 -0400
+++ b/libinterp/corefcn/pr-output.cc Sat Mar 18 08:41:33 2023 -0400
@@ -1452,7 +1452,7 @@ pr_any_float (std::ostream& os, const fl
if (bit_format > 1)
{
for (std::size_t i = 0; i < sizeof (T); i++)
- PRINT_CHAR_BITS_SWAPPED (os, tmp.i[i]);
+ PRINT_CHAR_BITS (os, tmp.i[i]);
}
else
{
Will wait for confirmation against Matlab.
Incidentally, `format hex` and `format native-hex` do the right thing, but
`native-bit` is not consistent with `native-hex` without this patch.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?63940>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #63940] `format native-bit` gives wrong results, Arun Giridhar, 2023/03/17
- [Octave-bug-tracker] [bug #63940] `format native-bit` gives wrong results,
Arun Giridhar <=
- [Octave-bug-tracker] [bug #63940] `format native-bit` gives wrong results, Nicholas Jankowski, 2023/03/18
- [Octave-bug-tracker] [bug #63940] `format native-bit` gives wrong results, Arun Giridhar, 2023/03/18
- [Octave-bug-tracker] [bug #63940] `format native-bit` gives wrong results, Nicholas Jankowski, 2023/03/18
- [Octave-bug-tracker] [bug #63940] `format native-bit` gives wrong results, Rik, 2023/03/19
- [Octave-bug-tracker] [bug #63940] `format native-bit` gives wrong results, Arun Giridhar, 2023/03/19
- [Octave-bug-tracker] [bug #63940] `format native-bit` gives wrong results, Arun Giridhar, 2023/03/23