Data::FloatData::Float is a Perl module with details of the floating point data type. | |
Download |
Data::Float Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Price:
- FREE
- Publisher Name:
- Andrew Main
- Publisher web site:
- http://search.cpan.org/~zefram/
Data::Float Tags
Data::Float Description
Data::Float is a Perl module with details of the floating point data type. Data::Float is a Perl module with details of the floating point data type.SYNOPSIS use Data::Float qw(have_signed_zero); if(have_signed_zero) { ... # and many other constants; see text use Data::Float qw( float_class float_is_normal float_is_subnormal float_is_nzfinite float_is_zero float_is_finite float_is_infinite float_is_nan ); $class = float_class($value); if(float_is_normal($value)) { ... if(float_is_subnormal($value)) { ... if(float_is_nzfinite($value)) { ... if(float_is_zero($value)) { ... if(float_is_finite($value)) { ... if(float_is_infinite($value)) { ... if(float_is_nan($value)) { ... use Data::Float qw(float_sign signbit float_parts); $sign = float_sign($value); $sign_bit = signbit($value); ($sign, $exponent, $significand) = float_parts($value); use Data::Float qw(float_hex hex_float); print float_hex($value); $value = hex_float($string); use Data::Float qw(float_id_cmp totalorder); @sorted_floats = sort { float_id_cmp($a, $b) } @floats; if(totalorder($a, $b)) { ... use Data::Float qw( pow2 mult_pow2 copysign nextup nextdown nextafter ); $x = pow2($exp); $x = mult_pow2($value, $exp); $x = copysign($magnitude, $sign_from); $x = nextup($x); $x = nextdown($x); $x = nextafter($x, $direction); Requirements: · Perl
Data::Float Related Software