Subject: | Bug in float conversion |
Error in float packing :
#!/usr/bin/env perl
use 5.10.0;
use Data::MessagePack;
my $mp = Data::MessagePack->new();
my $float = 0.123;
say $mp->unpack($mp->pack($float));
# prints 0.123 (ok)
if ( $float > 0 ) {
say $mp->unpack($mp->pack($float));
}
# prints 0 (WRONG !)