The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Float::Util - Utilities related to floating point numbers

VERSION

This document describes version 0.002 of Float::Util (from Perl distribution Float-Util), released on 2018-03-09.

SYNOPSIS

use Float::Util qw(is_exact);

is_exact("1.5"); # => true
is_exact("0.1"); # => false

DESCRIPTION

FUNCTIONS

None exported by default, but they are exportable.

is_exact

Usage: is_exact($strdec) => bool

Test that a decimal number (a string) can be represented exactly as a floating point number.

HOMEPAGE

Please visit the project's homepage at https://metacpan.org/release/Float-Util.

SOURCE

Source repository is at https://github.com/perlancar/perl-Float-Util.

BUGS

Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=Float-Util

When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.

SEE ALSO

https://en.wikipedia.org/wiki/Double-precision_floating-point_format

https://en.wikipedia.org/wiki/Quadruple-precision_floating-point_format

https://stackoverflow.com/questions/21146203/checking-if-floating-point-number-is-completely-convertibal-to-binary

AUTHOR

perlancar <perlancar@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2018 by perlancar@cpan.org.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.