GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Data::IEEE754(3) User Contributed Perl Documentation Data::IEEE754(3)

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

version 0.02

  use Data::IEEE754 qw( pack_double_be unpack_double_be );

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

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.

This module optionally exports the following four functions:
  • pack_float_be($number)
  • pack_double_be($number)
  • unpack_float_be($binary)
  • unpack_double_be($binary)

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.

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

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

Dave Rolsky <autarch@urth.org>

  • Dave Rolsky <drolsky@maxmind.com>
  • Greg Oschwald <goschwald@maxmind.com>

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

This is free software, licensed under:

  The Artistic License 2.0 (GPL Compatible)
2017-04-25 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.