Data::IEEE754(3pm)

Data::IEEE7543pm

Pack and unpack big-endian ieee754 floats and doubles

Usage

  use Data::IEEE754 qw( pack_double_be unpack_double_be );
  my $packed = pack_double_be(3.14);
  my $double = unpack_double_be($packed);

Version

version 0.02

Overview

This module provides some simple convenience functions for packing and unpacking IEEE 754 floats and doubles.

If you can require Perl 5.10 or greater then this module is pointless. Just use the "d>" and "f>" pack formats instead!

Currently this module only implements big-endian order. Patches to add little-endian order subroutines are welcome.

Exports

This module optionally exports the following four functions:

•

pack_float_be($number)

•

pack_double_be($number)

•

unpack_float_be($binary)

•

unpack_double_be($binary)

Credits

The code in this module is more or less copied and pasted from Data::MessagePack's "Data::MessagePack::PP" module. That module was written by Makamaka Hannyaharamitu. The code was then tweaked by Dave Rolsky, so blame him for the bugs.

Support

Please submit bugs to the CPAN RT system at http://rt.cpan.org/NoAuth/Bugs.html?Dist=Data-IEEE754 or via email at [email protected].

Bugs may be submitted through <https://github.com/maxmind/Data-IEEE754/issues>.

Contributors

•

Dave Rolsky <[email protected]>

•

Greg Oschwald <[email protected]>

Releases

4 releases since Debian 10 (Buster); the text changed 2 times.

  1. 10
  2. 11
  3. 12–13

Author

Dave Rolsky <[email protected]>

From libdata-ieee754-perl 0.02-2 in Debian 13 (Trixie). Parsed by carta from the page's man source.