File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
exercises/practice/rational-numbers/.docs Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ The exponentiation of rational numbers with a real number requires calculating n
4
4
5
5
However, you can also express ` x ^ y ` as ` x ^ y = exp(y * log(x)) ` .
6
6
7
- And fortunately, one can use different series to calculate the exponential and the logarithm.
7
+ And fortunately, one can use different series to calculate the exponential and the natural logarithm.
8
8
9
9
## Exponential function
10
10
@@ -28,7 +28,7 @@ There is also another Taylor Series to calculate the natural logarithm:
28
28
log(x) = (x - 1) - (x - 1) ^ 2 / 2 + (x - 1) ^ 3 / 3 - (x - 1) ^ 4 / 4 ... + (x - 1) ^ n / n
29
29
```
30
30
31
- It is only accurate between +/-1. However, ` ln(x * 10 ^ n) = ln(x) + n * ln10 ` , with ` ln10 ` being approximately ` 2.30258509 ` .
31
+ It is only accurate for ` x ` between 0 and 2. However we can also use ` log(x) = - log(1 / x) `
32
32
33
33
## Integer exponentiation
34
34
You can’t perform that action at this time.
0 commit comments