Lines Matching +full:power +full:- +full:efficient
55 ### Power subsection in Algorithms
64 Newton-Raphson Method, or the [Babylonian Method][5]) to perform the square root
75 x - x^3/3! + x^5/5! - x^7/7! + ...
124 (where `a` is equal to `(x - 1)/(x + 1)`) to calculate `ln(x)` when `x` is small
144 x - x^3/3 + x^5/5 - x^7/7 + ...
150 atan(x) = atan(c) + atan((x - c)/(1 + x * c))
164 x^n/(2^n * n!) * (1 - x^2 * 2 * 1! * (n + 1)) + x^4/(2^4 * 2! * (n + 1) * (n + 2)) - ...
172 j(-n,x) = (-1)^n * j(n,x)
183 This `dc` uses the [Memory-efficient method][8] to compute modular
188 ### Non-Integer Exponentiation (`bc` Math Library 2 Only)
216 if it was an integer). We also save the number in `z`; being non-zero is a flag
221 relationship `l(x) == -l(1/x)`; we negated the exponent, which is equivalent to
237 We then compute the integral portion of the power by computing the number to
238 power of the integral portion of the exponent.
240 Then we have the most clever trick: we add the length of that integer power (and
248 integer portion of the power again.
252 calculate `e((y - a) * l(x))`, where `a` is the integer portion of `y`. It's
253 easy to see that `y - a` will be just the fractional portion of `y` (the
256 But then we *multiply* it into the integer portion of the power. Why? Because
257 remember: we're dealing with an exponent and a power; the relationship is
260 So we multiply it into the integer portion of the power.
294 The algorithm is to use the formula `n!/(n-k)!`.
302 The algorithm is to use the formula `n!/r!*(n-r)!`.
394 [8]: https://en.wikipedia.org/wiki/Modular_exponentiation#Memory-efficient_method
395 [9]: https://en.wikipedia.org/wiki/Root-finding_algorithms#Newton's_method_(and_similar_derivative-…