Well, looks like this was fixed may 2nd. https://github.com/gnuradio/gnuradio/commit/cd07e5e56647a9380ccd0f25960164d72b338e10#diff-960cadcf7ef5dc2327e5200893d43163
On Thu, Jun 16, 2016 at 6:26 PM, Dave NotTelling <dmp250...@gmail.com> wrote: > I recently ran across this "bug": > > > (running ipython) > [code] > In [18]: import pmt > > In [19]: > pmt.to_double(pmt.deserialize_str(pmt.serialize_str(pmt.from_double(1234567890.0)))) > Out[19]: 1234567936.0 > > In [20]: pmt.to_double(pmt.from_double(1234567890.0)) > Out[20]: 1234567890.0 > [/code] > > > Here is the C++ code: > > [code] > #include <stdio.h> > #include <stdlib.h> > #include <pmt/pmt.h> > > // compiled with "g++ doublesTest.cc -o doublesTest -lgnuradio-pmt" > > int main(){ > const double orig = 1234567890.0; > const double serdes = > pmt::to_double(pmt::deserialize_str(pmt::serialize_str(pmt::from_double(orig)))); > const double normal = pmt::to_double(pmt::from_double(orig)); > > printf("original:%0.3f, serdes:%0.3f, noserdes:%0.3f\n", orig, serdes, > normal); > > return 0; > } > [/code] > > [output from c++] > original:1234567890.000, serdes:1234567936.000, noserdes:1234567890.000 > [/output from c++] > > Is this an intended outcome? > > Thanks! > > -Dave >
_______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio