use strict; use warnings; use Math::MPFR qw(:mpfr); my $x = Rmpfr_init2(328); Rmpfr_set_d($x, 1.0, MPFR_RNDN); $x /= 526; print $x; # Outputs: # 1.901140684410646387832699619771863117870722433460076045627376425855513307984790874524714828897338403e-3 # which is the same as the figure you've provided