Skip to content

Commit 64d8805

Browse files
Clarify logarithm discussion
[no important files changed]
1 parent 5f1bb80 commit 64d8805

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

exercises/practice/rational-numbers/.docs/instructions.append.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ The exponentiation of rational numbers with a real number requires calculating n
44

55
However, you can also express `x ^ y` as `x ^ y = exp(y * log(x))`.
66

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.
88

99
## Exponential function
1010

@@ -28,7 +28,7 @@ There is also another Taylor Series to calculate the natural logarithm:
2828
log(x) = (x - 1) - (x - 1) ^ 2 / 2 + (x - 1) ^ 3 / 3 - (x - 1) ^ 4 / 4 ... + (x - 1) ^ n / n
2929
```
3030

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)`
3232

3333
## Integer exponentiation
3434

0 commit comments

Comments
 (0)