Open derivitaandrew opened 4 years ago
It's preserving the expression and not computing it. A somewhat hacky way that I found to make it work is if you run 'ln(2) + ln(3) - ln(2*3) +0.0' it should correctly return 0 (well rather 0.0 ). I'm guessing this forces it to look at it as floats and not just integers.
I've run into similar problems regarding constants like pi, e when I want their numeric values up to a certain precision. Like 'pi+0.0' would return its numeric value but for some reason the same doesn't happen with 'e + 0.0'. However, if you do (e^(2.0)/e), it returns the numeric value of e. A cursory glance at the docs didn't help me figure out the proper way of doing this.
Edit: float( ln(2) + ln(3) - ln(2*3)) is probably the right way to get the numeric value.
Similar to #119.
Algebrite knows that
ln(a) + ln(b) = ln(a*b)
, but if you plug in most numbers fora
andb
, it no longer recognizes the rule On Algebrite.org:It's very weird that it knows a general principal, but can't use it in specific cases. It will only work when
a
orb
is1
.In another twist, it knows abstractly that
ln(a) - ln(b) = ln(a/b)
, but will only work on specific numbersa
andb
when they are the same or coprime: