Post History
Stax, 5 bytes òP^↓Φ Run and debug it Same idea as Quintec's answer. Input as a floating point number. Explanation 1gpun+ 1 start with 1 gp apply the following till a fixpoint...
Answer
#2: Post edited
- # [Stax](https://github.com/tomtheisen/stax), 5 [bytes](https://github.com/tomtheisen/stax/blob/master/docs/packed.md#packed-stax)
- òP^↓Φ
- [Run and debug it](https://staxlang.xyz/#p=95505e19e8&i=1.0%0A2.0%0A3.0%0A4.0%0A5.0&m=2)
- Same idea as Quintec's answer.
- ## Explanation
- ```
- 1gpun+
- 1 start with 1
- gp apply the following till a fixpoint:
- u reciprocal
- n+ add the input
- # [Stax](https://github.com/tomtheisen/stax), 5 [bytes](https://github.com/tomtheisen/stax/blob/master/docs/packed.md#packed-stax)
- òP^↓Φ
- [Run and debug it](https://staxlang.xyz/#p=95505e19e8&i=1.0%0A2.0%0A3.0%0A4.0%0A5.0&m=2)
- Same idea as Quintec's answer.
- Input as a floating point number.
- ## Explanation
- ```
- 1gpun+
- 1 start with 1
- gp apply the following till a fixpoint:
- u reciprocal
- n+ add the input
#1: Initial revision
# [Stax](https://github.com/tomtheisen/stax), 5 [bytes](https://github.com/tomtheisen/stax/blob/master/docs/packed.md#packed-stax) òP^↓Φ [Run and debug it](https://staxlang.xyz/#p=95505e19e8&i=1.0%0A2.0%0A3.0%0A4.0%0A5.0&m=2) Same idea as Quintec's answer. ## Explanation ``` 1gpun+ 1 start with 1 gp apply the following till a fixpoint: u reciprocal n+ add the input