HenryWilder / amitygxmod-calculator

A browser extension designed for Opera GX, made for helping with algebra
1 stars 0 forks source link

Log operation produces decimal #18

Open HenryWilder opened 11 months ago

HenryWilder commented 11 months ago

The binary log operation returns its non-integral results in the form of an irrational decimal. image

I'm not sure how to display an irrational number better, but the program should always produce exact values.

HenryWilder commented 11 months ago

This appears to be a non-trivial issue as most sources state that the only way to find the exact value of a log result by using logs. $$\log_5{7} = \frac{\log{7}}{\log{5}}$$ This is likely not particularly helpful.

One possibility could be to show both the exact value with logs, an approximate fraction, and a decimal. $$\log_5{7} = \frac{\log{7}}{\log{5}} \approx 1\frac{1}{5} \approx 1.2090619551221675$$ While making exact fractional answers cleaner. $$\log_4{8} = 1\frac{1}{2}$$