About Site Map Submit Contact Us Log in | Create an account
Create an account Log In
Average Rating
User Rating:
Visitors Rating:
My rating:

Write review
  • License: Freeware
  • Last update: 7 years ago
  • Total downloads: 58
  • Price: Free |
  • Operating system: Linux
  • Publisher: Sisyphus (5 other programs)
See full specifications

linux default iconMath::MPFR Publisher's description

Perl interface to the MPFR (floating point) library

Math::MPFR is a bigfloat module utilising the MPFR library. Basically this module simply wraps the 'mpfr' floating point functions provided by that library.


use Math::MPFR qw(:mpfr);

# '@' can be used to separate mantissa from exponent. For bases
# that are new($str);

# Create another Math::MPFR object with precision
# of 100 bits and an initial value of NaN.
my $bn2 = Rmpfr_init2(100);

# Assign the value -2314.451 to $bn1.
Rmpfr_set_d($bn2, -2314.451, GMP_RNDN);

# Create another Math::MPFR object that holds
# an initial value of NaN and has the default precision.
my $bn3 = Rmpfr_init();

# Or using instead the new() constructor:
# my $bn3 = Math::MPFR->new();

# Perform some operations ... see 'FUNCTIONS' below.
# see 'OPERATOR OVERLOADING' below for docs re
# operator overloading


# print out the value held by $bn1 (in octal):
print Rmpfr_get_str($bn1, 8, 0, $rnd), "

# print out the value held by $bn1 (in decimal):
print Rmpfr_get_str($bn1, 10, 0, $rnd), "
# or just make use of overloading :
print $bn1, "
"; # is base 10, and uses 'e' rather than '@'.

# print out the value held by $bn1 (in base 16) using the
# 'TRmpfr_out_str' function. (No newline is printed - unless
# it's supplied as the optional fifth arg. See the
# 'TRmpfr_out_str' documentation below.)
TRmpfr_out_str(*stdout, 16, 0, $bn1, $rnd);

System Requirements:

В· Perl
В· MPFR and GMP C libraries
Program Release Status:
Program Install Support: Install and Uninstall

Math::MPFR Tags:

Click on a tag to find related softwares

Is Math::MPFR your software?

Manage your software

Most Popular

linux default icon GDB 7.4
GDB, the GNU Project debugger, allows you to see what is going on `inside' another program while it... Read more
linux default icon Coral 0.9.1
Coral is a tool and a development platform to create and transform models and modeling languages.
linux default icon Forum Paid Plus Script 6.1
Forum Paid Pay Per Post Exchange is targeted at forum owners who wish to...
linux default icon sdo 0.6.5
Converts oracle SDO_GEOMETRY objects to WKT and GeoJSON.
linux default icon Get Paid Plus Script 6.1
Get Paid Plus Script

Related Category

» Other (877)
» Tools & Editors (359)
» Web Development (146)