Qalculate / libqalculate

Qalculate! library and CLI
https://qalculate.github.io/
GNU General Public License v2.0
1.73k stars 142 forks source link

Suboptimal approximation? #298

Open vvs- opened 3 years ago

vvs- commented 3 years ago

I'd consider these exact:

base(.01,sqrt 5)
.2 to base sqrt 5

Is it just because base conversions are approximate by default? These calculations can be optimized, IMHO.

hanna-kn commented 3 years ago

base(.01,sqrt 5) is easy to fix, .2 to base sqrt 5 is less so (non-numerical values and unconverted irrational numbers are currently not supported as radices for output).

vvs- commented 3 years ago

I wonder if caching expression tree up to some limit and falling back to approximation would work in latter case. Isn't try exact implemented like this?