From what I understand reading the documentation of Math::BigFloat
, the following should be the code to round a number up, but it doesn't seem to work.
#!/usr/bin/perl
use strict;
use warnings;
use Math::BigFloat;
my $x = Math::BigFloat->new('2.3');
$x->ffround(0, '+inf');
print "$x\n"; # -> 2
What should I do in order to always round the number up and, e.g., in this example get the number 3
as output.