2023-10-05 22:01 UTC
Replies (3)
-
@SmartmanApps@dotnet.social 2023-10-05 22:04
@dm319@fosstodon.org P.S. if you're working on something public-facing, and you fix it, do let me know! Currently the ONLY e-calculator I know of which handles brackets correctly is MathGPT - would love for there to be more! At a high level you need to do something like if you hit a ( which isn't preceded by an operator, then postfix a * to the coefficient and push that onto the stack, and then when you get to the ) you pop the stack and do the multiplication.
-
@dm319@fosstodon.org 2023-10-06 14:53
@SmartmanApps@dotnet.social Yes, get that you're turning a single term into two - I was asking about that specific 90s Sharp calculator!
-
@dm319@fosstodon.org 2023-10-06 14:56
@SmartmanApps@dotnet.social I think I've read through most of your thread, and I do see now the distinction around terms. You mention that you don't need there to be pronumerals within the brackets. But do you need to do the multiplication first and then add, or does it not matter? Any cases where it does matter?