Lines Matching refs:round

286         croak("Unknown round mode '$m'")
727 $self = $self->round(@r)
747 $self = $self->round(@r);
827 $self = $self->round(@r)
874 return $self -> round(@r);
914 return $self -> round(@r);
954 return $self -> round(@r);
994 return $self -> round(@r);
1031 return $self -> round(@r);
1127 return $self -> round(@r);
1422 $self = $self -> round(@r);
1791 $x -> round(@r);
1810 $x -> round(@r);
1829 $x -> round(@r);
1852 return $x->round(@r) if $x -> is_inf() || $x -> is_nan();
1864 return $x->round(@r);
1873 return $x->round(@r) if $x -> is_inf() || $x -> is_nan();
1889 return $x->round(@r);
2005 return $x->round(@r) if $x->{sign} eq $y->{sign};
2013 return $x -> round(@r);
2018 $x->round(@r);
2035 return $x -> round(@r) if $y -> is_zero();
2088 $x->round(@r);
2127 return $x->round(@r);
2278 $rem = $x -> copy() -> round(@r);
2330 $rem = $x -> copy() -> round(@r) if $wantarray;
2389 $x = $x -> round(@r);
2400 $rem = $rem -> round(@r);
2502 $rem = $x -> copy() -> round(@r) if $wantarray;
2536 $x = $x -> round(@r);
2544 $rem = $rem -> round(@r);
2572 return $x -> round(@r);
2585 return $x -> round(@r);
2606 $x -> round(@r);
2628 return $x -> round(@r);
2640 return $x -> round(@r);
2655 $x -> round(@r);
2737 $x -> round(@r);
2843 return $num -> round(@r);
2865 return $x -> round(@r) if $y -> is_odd();
2870 return $x -> round(@r);
2886 return $x -> round(@r);
2890 return $x -> round(@r);
2894 return $x -> round(@r) if $y -> is_odd();
2912 $x -> round(@r);
2923 return $x -> round(@r) if $x -> is_one("+") || $x -> is_one("-");
3016 return $x -> round(@r);
3022 $x = $x -> round(@r);
3035 return $x -> round(@r) if $x->{sign} eq '+inf';
3043 return $x -> round(@r);
3062 return $x -> round(@r);
3081 return $x -> round(@r);
3100 return $x -> round(@r);
3119 return $x -> round(@r);
3216 $n -> round(@r);
3460 $x->round(@r);
3470 return $x -> round(@r) if $x -> is_zero() || $x -> is_inf("+");
3481 return $x -> round(@r);
3500 return $x->round(@r)
3506 $x->round(@r);
3522 $x->round(@r);
3541 $x->round(@r);
3565 $x->round(@r);
3587 $x->round(@r);
3640 @y = map { $_ -> round(@r) } @y;
3652 return $x -> round(@r);
3706 @y = map { $_ -> round(@r) } @y;
3718 return $x -> round(@r);
3771 return $x -> round(@r);
3796 return $x -> round(@r) if $y -> is_zero();
3805 return $x -> round(@r);
3811 return $x -> round(@r);
3817 return $x -> round(@r);
3824 return $x -> round(@r) if $x -> is_zero() || $y -> is_zero()
3847 $x -> round(@r);
3917 return $x -> round(@r) if $y -> is_zero();
3927 return $x -> round(@r);
3939 return $x -> round(@r);
3945 return $x -> round(@r);
3951 return $x -> round(@r);
3958 return $x -> round(@r) if $x -> is_zero() || $y -> is_zero()
3971 return $x -> round(@r) if $x -> is_one('-'); # -1 => -1
3988 return $x -> round(@r);
4003 return $x -> round(@r);
4056 return $x -> round(@r) if $x -> is_zero() || $x -> is_inf() ||
4060 $x -> round(@r);
4109 return $x -> round(@r) if $x -> is_zero() || $x -> is_inf() ||
4124 $x -> round(@r);
4150 return $x->round(@r);
4176 return $x->round(@r);
4202 return $x->round(@r);
4222 sub round {
4230 # $x->round(undef)
4231 # $x->round(undef, undef, ...)
4296 croak("Unknown round mode '$r'");
4299 # now round, by calling either bround or bfround:
4362 # in case of 01234 we round down, for 6789 up, and only in case 5 we look
4364 my $round_up = 1; # default round up
4366 ($mode eq 'trunc') || # trunc by round down
4367 ($digit_after =~ /[01234]/) || # round down anyway,
4368 # 6789 => round up
4376 ($mode eq 'zero') # round down if zero, sign adjusted below
4385 $x = $x->bzero(); # round to '0'
4416 # precision: round to the $Nth digit left (+$n) or right (-$n) from the '.'
4417 # $n == 0 || $n == 1 => round to integer
4442 # round towards minus infinity; no-op since it's already integer
4448 $x->round(@r);
4452 # round towards plus infinity; no-op since it's already int
4458 $x->round(@r);
4462 # round towards zero; no-op since it's already integer
4468 $x->round(@r);
4615 $y -> round(@r);
4671 $m -> round(@r);
4851 my $int = $x -> copy() -> round(@r);
4889 my $numer = $x -> copy() -> round(@r);
4903 return $x -> copy() -> round(@r);
5724 # After any operation or when calling round(), the result is rounded by
5727 # !!!!!!! If you change this, remember to change round(), too! !!!!!!!!!!
5729 # This procedure finds the round parameters, but it is for speed reasons
5730 # duplicated in round. Otherwise, it is tested by the testsuite and used
5781 croak("Unknown round mode '$r'");
6525 Math::BigInt->round_mode($m); # set global round mode, must be one of
6648 $x->round($A,$P,$mode); # round to accuracy or precision using
6651 $x->bfround($n); # $n > 0: round to $nth digit left of dec. point
6652 # $n < 0: round to $nth digit right of dec. point
6653 $x->bfloor(); # round towards minus infinity
6654 $x->bceil(); # round towards plus infinity
6655 $x->bint(); # round towards zero
6841 Alternatively, one can round the results explicitly using one of L</round()>,
6879 Set or get the precision, i.e., the place to round relative to the decimal
6887 place where to round.
6979 round_mode RW Global round mode
7924 =item round()
7926 $x->round($A,$P,$round_mode);
7928 Round $x to accuracy C<$A> or precision C<$P> using the round mode
8445 These round modes always round in the same direction.
8461 These rounding modes round to the nearest digit. They differ in how they
8462 determine which way to round in the ambiguous case when there is a tie.
8480 Round towards plus infinity, i.e., always round up. E.g., when rounding to the
8486 Round towards minus infinity, i.e., always round down. E.g., when rounding to
8492 Round towards zero, i.e., round positive numbers down and negative numbers up.
8499 Round away from zero, i.e., round to the number with the largest absolute
8513 * bfround($p) is able to round to $p number of digits after the decimal
8548 remainder and $y to determine whether it must round up or down.
8570 * If P is negative, this means round to the P'th place to the right of the
8572 P of 0 means round to integer.
8608 * If A or P are enabled/defined, they are used to round the result of each
8614 A flag is used to mark all Math::BigFloat numbers as 'never round'.
8634 A, P or F), and, if F is not used, round the result
8638 + never round (this is the default):
8640 will round the result, with bdiv() and bsqrt() as exceptions to guard
8642 round() (the latter with parameters).
8655 + round after each op:
8657 method round() is called and the result is rounded appropriately. By
8701 * after each operation, $result->round() is called, and the result may
8704 * to manually round a number, call $x->round($A,$P,$round_mode);
8705 this will round the number by using the appropriate rounding function
8729 + round() is thus a no-op, unless given extra parameters A and P
8884 Math::BigFloat->round_mode('odd'); # round to odd
8887 Math::BigFloat->round_mode('odd'); # round to odd
9043 our $accuracy = 2; # round to 2 decimal places