‹ BackHN Continuity

Thread

Show HN: Make math automatic with Mathy

102 points · 37 comments · gmays

  1. v9v · · focus · HN ↗
    When testing I got a question asking what -3² is, with the intended answer being -9 instead of 9.
    1. gmays · · focus · HN ↗
      Thanks. You might be thinking of the order of operations wrong. Example:

      −3² = −(3 × 3) = −9 (−3)² = (−3) × (−3) = 9

      If there are no parentheses, you first square 3 and then negate the result. But if there are, then you square -3 first as you explained.

      I took a look and Mathy correctly accounts for these. But if you're sure your problem had parentheses instead of what you shared, please let me know!

      Either way, thank you for the feedback, this was a good thing for me to double check.

      1. v9v · · focus · HN ↗
        Sorry, I really was thinking of the order of operations wrong!
Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.