README.md
1# NAME
2
3Data::IEEE754 - Pack and unpack big-endian IEEE754 floats and doubles
4
5# VERSION
6
7version 0.02
8
9# SYNOPSIS
10
11 use Data::IEEE754 qw( pack_double_be unpack_double_be );
12
13 my $packed = pack_double_be(3.14);
14 my $double = unpack_double_be($packed);
15
16# DESCRIPTION
17
18This module provides some simple convenience functions for packing and
19unpacking IEEE 754 floats and doubles.
20
21If you can require Perl 5.10 or greater then this module is pointless. Just
22use the `d>` and `f>` pack formats instead!
23
24Currently this module only implements big-endian order. Patches to add
25little-endian order subroutines are welcome.
26
27# EXPORTS
28
29This module optionally exports the following four functions:
30
31- pack\_float\_be($number)
32- pack\_double\_be($number)
33- unpack\_float\_be($binary)
34- unpack\_double\_be($binary)
35
36# CREDITS
37
38The code in this module is more or less copied and pasted from
39[Data::MessagePack](https://metacpan.org/pod/Data::MessagePack)'s `Data::MessagePack::PP` module. That module was
40written by Makamaka Hannyaharamitu. The code was then tweaked by Dave Rolsky,
41so blame him for the bugs.
42
43# SUPPORT
44
45Please submit bugs to the CPAN RT system at
46http://rt.cpan.org/NoAuth/Bugs.html?Dist=Data-IEEE754 or via email at
47bug-data-ieee754@rt.cpan.org.
48
49Bugs may be submitted through [https://github.com/maxmind/Data-IEEE754/issues](https://github.com/maxmind/Data-IEEE754/issues).
50
51# AUTHOR
52
53Dave Rolsky <autarch@urth.org>
54
55# CONTRIBUTORS
56
57- Dave Rolsky <drolsky@maxmind.com>
58- Greg Oschwald <goschwald@maxmind.com>
59
60# COPYRIGHT AND LICENSE
61
62This software is Copyright (c) 2017 by MaxMind, Inc.
63
64This is free software, licensed under:
65
66 The Artistic License 2.0 (GPL Compatible)
67