oppiliappan / eva

a calculator REPL, similar to bc(1)
MIT License
823 stars 29 forks source link

`sqrt(...)` seems to misbehave #71

Open tushar-deepsource opened 1 year ago

tushar-deepsource commented 1 year ago
> log(sqrt(10),2)
1.6609640474
> log(sqrt(10,2))   # even though sqrt only takes 1 argument
6.6438561898
> log(sqrt(10,2     # this has the same behaviour
6.6438561898
> log(sqrt(sqrt(10,2)))
13.2877123795

log(sqrt(10, 2)) behaves like log(100, 2), log(sqrt(sqrt(10, 2))) behaves like log(1000, 2) etc.