←back to thread

50 points fagnerbrack | 1 comments | | HN request time: 0.199s | source
1. joeframbach ◴[] No.42205338[source]
1. Floor operator is `⌊n⌋`.

2. Exponentiation implementation depends on the size of the power. For very small powers normally they are represented as their reciprocal, then operated on within the exponent.

    y = b ** (1/x)

for very large x is rewritten as

    y = Math.exp(Math.log(b) / x)