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

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

[Octave-bug-tracker] [bug #64960] jsonencode produces different results


From: Rik
Subject: [Octave-bug-tracker] [bug #64960] jsonencode produces different results for single inputs than Matlab
Date: Tue, 5 Dec 2023 00:26:52 -0500 (EST)

Follow-up Comment #2, bug #64960 (project octave):

I think there may be easier ways to handle this within Octave, rather than
have to hope for an extension of the RapidJSON API.

One way would be to convert the single to a string within Octave, and then
write out just a string.  The code for saving ASCII files would probably
work.

Another way would be to convert from single to double, and then truncate the
double to 9 digits of precision.  There may be an option in the C++ library
for this, or Octave has some display code that can do this. 


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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