sharkdp / insect

High precision scientific calculator with support for physical units
https://numbat.dev/
MIT License
3.17k stars 126 forks source link

Use insectrc in non-interactive operation #377

Closed sternj closed 1 year ago

sternj commented 1 year ago

Defining a single function in .insectrc as:

logb(n,b) = log(n) / log(b)

and attempting to run

insect "logb(4,2)"

what I get is Parse error at position 7: Expected ")". When I do so inside the interactive shell, I get

$ insect
>>> logb(4,2)

  logb(4, 2)

   = 2
sharkdp commented 1 year ago

Thank you for reporting this.