diff options
Diffstat (limited to 'dist/Math-BigInt/lib')
-rw-r--r-- | dist/Math-BigInt/lib/Math/BigFloat.pm | 10 | ||||
-rw-r--r-- | dist/Math-BigInt/lib/Math/BigInt.pm | 18 | ||||
-rw-r--r-- | dist/Math-BigInt/lib/Math/BigInt/Calc.pm | 10 |
3 files changed, 19 insertions, 19 deletions
diff --git a/dist/Math-BigInt/lib/Math/BigFloat.pm b/dist/Math-BigInt/lib/Math/BigFloat.pm index 668fca75c5..dcfe9385eb 100644 --- a/dist/Math-BigInt/lib/Math/BigFloat.pm +++ b/dist/Math-BigInt/lib/Math/BigFloat.pm @@ -149,7 +149,7 @@ sub new $self->{sign} = $wanted->sign(); return $self->bnorm(); } - # else: got a string or something maskerading as number (with overload) + # else: got a string or something masquerading as number (with overload) # handle '+inf', '-inf' first if ($wanted =~ /^[+-]?inf\z/) @@ -353,7 +353,7 @@ sub config } ############################################################################## -# string conversation +# string conversion sub bstr { @@ -1141,7 +1141,7 @@ sub _log # in case of $x == 1, result is 0 return $x->bzero() if $x->is_one(); - # XXX TODO: rewrite this in a similiar manner to bexp() + # XXX TODO: rewrite this in a similar manner to bexp() # http://www.efunda.com/math/taylor_series/logarithmic.cfm?search_string=log @@ -2128,7 +2128,7 @@ sub bsqrt } # sqrt(2) = 1.4 because sqrt(2*100) = 1.4*10; so we can increase the accuracy - # of the result by multipyling the input by 100 and then divide the integer + # of the result by multiplying the input by 100 and then divide the integer # result of sqrt(input) by 10. Rounding afterwards returns the real result. # The following steps will transform 123.456 (in $x) into 123456 (in $y1) @@ -3946,7 +3946,7 @@ Since things like C<sqrt(2)> or C<1 / 3> must presented with a limited accuracy lest a operation consumes all resources, each operation produces no more than the requested number of digits. -If there is no gloabl precision or accuracy set, B<and> the operation in +If there is no global precision or accuracy set, B<and> the operation in question was not called with a requested precision or accuracy, B<and> the input $x has no accuracy or precision set, then a fallback parameter will be used. For historical reasons, it is called C<div_scale> and can be accessed diff --git a/dist/Math-BigInt/lib/Math/BigInt.pm b/dist/Math-BigInt/lib/Math/BigInt.pm index cbb5091793..ed6e8100ab 100644 --- a/dist/Math-BigInt/lib/Math/BigInt.pm +++ b/dist/Math-BigInt/lib/Math/BigInt.pm @@ -6,7 +6,7 @@ package Math::BigInt; # # The following hash values are used: -# value: unsigned int with actual value (as a Math::BigInt::Calc or similiar) +# value: unsigned int with actual value (as a Math::BigInt::Calc or similar) # sign : +,-,NaN,+inf,-inf # _a : accuracy # _p : precision @@ -799,7 +799,7 @@ sub bone } ############################################################################## -# string conversation +# string conversion sub bsstr { @@ -1787,7 +1787,7 @@ sub bmodinv { # Modular inverse. given a number which is (hopefully) relatively # prime to the modulus, calculate its inverse using Euclid's - # alogrithm. If the number is not relatively prime to the modulus + # algorithm. If the number is not relatively prime to the modulus # (i.e. their gcd is not one) then NaN is returned. # set up parameters @@ -3099,7 +3099,7 @@ Math::BigInt - Arbitrary size integer/float math package # will warn if Math::BigInt::GMP cannot be found use Math::BigInt lib => 'GMP'; - # to supress the warning use this: + # to suppress the warning use this: # use Math::BigInt try => 'GMP'; # dies if GMP cannot be loaded: @@ -3230,7 +3230,7 @@ Math::BigInt - Arbitrary size integer/float math package $x->as_int(); # return as BigInt (in BigInt: same as copy()) $x->numify(); # return as scalar (might overflow!) - # conversation to string (do not modify their argument) + # conversion to string (do not modify their argument) $x->bstr(); # normalized string (e.g. '3') $x->bsstr(); # norm. string in scientific notation (e.g. '3E0') $x->as_hex(); # as signed hexadecimal string with prefixed 0x @@ -3269,7 +3269,7 @@ Input values to these routines may be any string, that looks like a number and results in an integer, including hexadecimal and binary numbers. Scalars holding numbers may also be passed, but note that non-integer numbers -may already have lost precision due to the conversation to float. Quote +may already have lost precision due to the conversion to float. Quote your input if you want BigInt to see all the digits: $x = Math::BigInt->new(12345678890123456789); # bad @@ -3988,7 +3988,7 @@ This loses precision, to avoid this use L<as_int()> instead. $x->modify('bpowd'); This method returns 0 if the object can be modified with the given -peration, or 1 if not. +operation, or 1 if not. This is used for instance by L<Math::BigInt::Constant>. @@ -4715,7 +4715,7 @@ As a shortcut, you can use the module C<bignum>: use bignum; -Also good for oneliners: +Also good for one-liners: perl -Mbignum -le 'print 2 ** 255' @@ -4877,7 +4877,7 @@ instead. The quotient is always the greatest integer less than or equal to the real-valued quotient of the two operands, and the remainder (when it is -nonzero) always has the same sign as the second operand; so, for +non-zero) always has the same sign as the second operand; so, for example, 1 / 4 => ( 0, 1) diff --git a/dist/Math-BigInt/lib/Math/BigInt/Calc.pm b/dist/Math-BigInt/lib/Math/BigInt/Calc.pm index 1fc03d481f..f5f4ff1350 100644 --- a/dist/Math-BigInt/lib/Math/BigInt/Calc.pm +++ b/dist/Math-BigInt/lib/Math/BigInt/Calc.pm @@ -189,7 +189,7 @@ BEGIN $XOR_MASK = __PACKAGE__->_new( ( 2 ** $XOR_BITS )); $OR_MASK = __PACKAGE__->_new( ( 2 ** $OR_BITS )); - # We can compute the approximate lenght no faster than the real length: + # We can compute the approximate length no faster than the real length: *_alen = \&_len; } @@ -595,7 +595,7 @@ sub _div_use_mul my ($c,$x,$yorg) = @_; - # the general div algorithmn here is about O(N*N) and thus quite slow, so + # the general div algorithm here is about O(N*N) and thus quite slow, so # we first check for some special cases and use shortcuts to handle them. # This works, because we store the numbers in a chunked format where each @@ -785,7 +785,7 @@ sub _div_use_div_64 my ($c,$x,$yorg) = @_; use integer; - # the general div algorithmn here is about O(N*N) and thus quite slow, so + # the general div algorithm here is about O(N*N) and thus quite slow, so # we first check for some special cases and use shortcuts to handle them. # This works, because we store the numbers in a chunked format where each @@ -976,7 +976,7 @@ sub _div_use_div # in list context my ($c,$x,$yorg) = @_; - # the general div algorithmn here is about O(N*N) and thus quite slow, so + # the general div algorithm here is about O(N*N) and thus quite slow, so # we first check for some special cases and use shortcuts to handle them. # This works, because we store the numbers in a chunked format where each @@ -2028,7 +2028,7 @@ sub _root # reset step to 2 $step = _two(); # add two, because $trial cannot be exactly the result (otherwise we would - # alrady have found it) + # already have found it) _add($c, $trial, $step); # and now add more and more (2,4,6,8,10 etc) |