Dave Rolsky > Data-IEEE754-0.01 > Data::IEEE754

Download:
Data-IEEE754-0.01.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Module Version: 0.01   Source  

NAME ^

Data::IEEE754 - Pack and unpack big-endian IEEE754 floats and doubles

VERSION ^

version 0.01

SYNOPSIS ^

  use Data::IEEE754 qw( pack_double_be unpack_double_be );

  my $packed = pack_double_be(3.14);
  my $double = unpack_double_be($packed);

DESCRIPTION ^

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:

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.

AUTHOR ^

Dave Rolsky <autarch@urth.org>

COPYRIGHT AND LICENSE ^

This software is Copyright (c) 2013 by MaxMind, Inc..

This is free software, licensed under:

  The Artistic License 2.0 (GPL Compatible)
syntax highlighting: