Lines Matching refs:it

5 # to do it." - Before and After
32 # it reversed (like $x = 2 * $y), then the third paramater is true.
34 # no difference, but in some cases it does.
82 # for sub it is a bit tricky to keep b: b-a => -a+b
115 # use $_[0]->bone(), it would modify $_[0] to be 1!
165 # the old code had $rnd_mode, so we need to support it, too
266 # have numify(), then hopefully it will have overloading for int() and
322 # have numify(), then hopefully it will have overloading for int() and
469 # the argument could be an object, so avoid ||, && etc on it, this would
491 # remove sign without touching wanted to make it work with constants
555 # adjust fraction and add it to value
601 # create a bigint 'NaN', if given a BigInt, set it to 'NaN'
633 # create a bigint '+-inf', if given a BigInt, set it to '+-inf'
668 # create a bigint '+0', if given a BigInt, set it to 0
711 # if given a BigInt, set it to +1 or -1, respecively
819 # This procedure finds the round parameters, but it is for speed reasons
820 # duplicated in round. Otherwise, it is tested by the testsuite and used
861 # A == 0 is useless, so undef it to signal no rounding
921 # A == 0 is useless, so undef it to signal no rounding
989 # objectify is costly, so avoid it
1013 # because it's actually slower than testin in Calc (especially w/ Pari et al)
1034 # objectify is costly, so avoid it
1061 # objectify is costly, so avoid it
1126 # objectify is costly, so avoid it
1209 # objectify is costly, so avoid it
1280 # we don't need $self, so undef instead of ref($_[0]) make it slightly faster
1289 # we don't need $self, so undef instead of ref($_[0]) make it slightly faster
1385 # objectify is costly, so avoid it
1473 # objectify is costly, so avoid it
1531 # objectify is costly, so avoid it
1576 # objectify is costly, so avoid it
1590 # put least residue into $x if $x was negative, and thus make it positive
1618 # i.e., if it's NaN, +inf, or -inf...
1657 # objectify is costly, so avoid it
1698 # objectify is costly, so avoid it
1721 # objectify is costly, so avoid it
1740 # although this is O(N*N) in calc (as_bin!) it is O(N) in Pari et al
1742 # if $y != 1, we must simulate it by doing:
1753 # that 1, attached '-' makes it '-1'
1768 $x->bdec(); # n == 2, but $y == 1: this fixes it
1782 # objectify is costly, so avoid it
1820 # objectify is costly, so avoid it
1843 # if lib can do negative values, let it handle this
1861 # objectify is costly, so avoid it
1882 # if lib can do negative values, let it handle this
1946 # objectify is costly, so avoid it
2073 # convert $scale to a scalar in case it is an object (put's a limit on the
2075 # it faster
2090 # do not use digit(), it is costly for binary => decimal
2135 # adding it, since that is faster (we already have the string)
2159 # return integer less or equal then number; no-op since it's already integer
2167 # return integer greater or equal then number; no-op since it's already int
2177 # it or override with their own integer conversion routine.
2211 # the first argument is number of args objectify() should look at it will
2217 # If the second arg is a ref, use it as class.
2218 # If not, try to use it as classname, unless undef, then use $class
2226 # In the last case we check number of arguments to turn it silently into
2228 # badd($class,1) is not supported (it should, eventually, try to add undef)
2229 # currently it tries 'Math::BigInt' + 1, which will not work.
2337 # even if @_ is empty, to give it a chance
2338 $self->SUPER::import(@a); # need it for subclasses
2339 $self->export_to_level(1,$self,@a); # need it for MBF
2367 # loaded it ok, see if the api_version() is high enough
2371 # api_version matches, check if it really provides anything we need
2552 # may override it with special code (f.i. Math::BigInt::Constant does so)
2567 # or make it faster: install (optional) Math::BigInt::GMP
2568 # and always use (it will fall back to pure Perl if the
2814 Value must be greater than zero. Pass an undef value to disable it:
2819 Returns the current accuracy. For C<$x->accuracy()> it will return either the
2833 Note: Works also for subclasses like Math::BigFloat. Each class has it's own
2834 globals separated from Math::BigInt, but it is possible to subclass
2848 after the dot (or where to round it when passing a positive number). In
2854 Value must be greater than zero. Pass an undef value to disable it:
2859 Returns the current precision. For C<$x->precision()> it will return either the
2867 Note: Works also for subclasses like Math::BigFloat. Each class has it's own
2868 globals separated from Math::BigInt, but it is possible to subclass
2894 This will print -3, not -2 (as it would if you divide -5 by 2 and truncate the
2912 If used on an object, it will set it to NaN:
2921 If used on an object, it will set it to zero:
2931 If used on an object, it will set it to infinity:
2942 If used on an object, it will set it to one:
3026 Set the number to it's absolute value, e.g. change the sign from '-' to '+'
3092 because it is much faster - it reduces internal variables into
3093 the modulus whenever possible, so it operates on smaller numbers.
3241 This section describes the accuracy/precision handling in Math::Big* as it
3242 used to be and as it is now, complete with an explanation of all terms and
3283 when there are zeros in it or trailing zeros. For example, 123.456 has
3334 if it is not already. E.g., when rounding to the first sigdig, 0.45
3340 it is not already. E.g., when rounding to the first sigdig, 0.45
3384 on how fdiv() determines the maximum number of digits it should calculate,
3396 by looking at the length of the mantissa. Which is wrong, since it includes
3402 wether it must round up or down.
3404 ? simple scheme and tweaked the few failing testcases to match it.
3408 This is how it works now:
3437 * When you create a number, you can give it's desired A or P via:
3446 suffering rounding in the parent. Thus a subclass is able to have it's own
3479 as many digits as it can (with an exception for fdiv/fsqrt) and will not
3490 or P of 5, but this can not be helped - or can it?)
3497 Note: Once you have rounded a number, the settings will 'stick' on it
3498 and 'infect' all other numbers engaged in math operations with it, since
3535 * fsqrt() will hand its arguments to fdiv(), as it used to, only now for two
3561 and then normalize it.
3591 You should neither care about nor depend on the internal representation; it
3612 cases involving really big numbers, where it is B<much> faster), and there is
3613 no penalty if Math::BigInt::GMP is not installed, it is a good idea to always
3646 where it is C<NaN>; and for C<$x == 0>, where it is C<1> (to be compatible
3764 operations, like C<new()>, C<bstr()> and C<numify()>. The reason are that it
3812 this is that Math::BigInt itself has a pluggable interface which permits it
3824 At the very minimum, any subclass will need to provide it's own C<new()> and can
3871 This makes it possible to mix arguments of different classes (as in 2.5 + 2)
3935 because it's C<ok()> uses 'eq' internally.
3981 Alternatively, simple use C<< <=> >> for comparisations, this will get it
3983 as a string that matches exactly the way Perl represents it.
4032 real-valued quotient of the two operands, and the remainder (when it is
4058 the author to implement it ;)
4108 It will not do what you think, e.g. making a copy of $x. Instead it just makes
4109 a second reference to the B<same> object and stores it in $y. Thus anything
4112 overloaded math. As soon as you use a method call it breaks:
4122 multiply it by 2:
4131 returns it, unlike the old code which left it alone and only returned the
4153 needs to preserve $x since it does not know that it later will get overwritten.
4157 since it is slower for all other things.
4244 This program is free software; you may redistribute it and/or modify it under
4264 and still at it in 2004.