UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Calculator: 49,8-2,1=

    Scheduled Pinned Locked Moved App Development
    7 Posts 5 Posters 1.7k Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
      Reply
      • Reply as topic
      Log in to reply
      This topic has been deleted. Only users with topic management privileges can see it.
      • H Offline
        htc_tattoo
        last edited by

        I was astonished when i calculated
        49.8-2.1=47.699999999999996
        I learned different in school. Yes, it's true, i could have calculated in my head. But i was lazy...
        Calculator Version 2.3.4 i used.

        1 Reply Last reply Reply Quote 0
        • G Offline
          guru
          last edited by

          Same error with OTA3.

          1 Reply Last reply Reply Quote 0
          • dobeyD Offline
            dobey
            last edited by

            Please open an issue at https://github.com/ubports/ubuntu-touch/issues about the problem. The forum is not an issue tracker, so reporting problems here is not especially helpful.

            G 1 Reply Last reply Reply Quote 0
            • G Offline
              guru @dobey
              last edited by

              https://github.com/ubports/ubuntu-touch/issues/940

              1 Reply Last reply Reply Quote 0
              • D Offline
                dtarrant
                last edited by

                Seems to be fixed now: 49.8-2.1=47.7! πŸ‘

                1 Reply Last reply Reply Quote 1
                • flohackF Offline
                  flohack
                  last edited by flohack

                  When you would read a bit about this problem, it would be more clear to you: In contrast to integer numbers floating point numbers can almost never calculated precisely on any CPU / computer on the market.

                  If you are interested please read e.g. https://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html - Its a bit inclined but explains a lot.

                  Bottom line, what you learned in school is right, and the CPU lied to you. Unfortunately it did not round the number so to hide the lie πŸ˜‰

                  We fixed it by updating math.js from a 2015 version to 2018. 3 years pass and the lie seems to be perfect now πŸ˜‰

                  BR

                  My languages: πŸ‡¦πŸ‡Ή πŸ‡©πŸ‡ͺ πŸ‡¬πŸ‡§ πŸ‡ΊπŸ‡Έ

                  1 Reply Last reply Reply Quote 3
                  • H Offline
                    htc_tattoo
                    last edited by

                    Thanks a lot for fixing this! Although it's just a funny small problem, fixing this tiny bugs also lead to a better system.
                    If i compare UT today with 1 or 2 years ago it improved really a lot! Stability, features and speed!

                    1 Reply Last reply Reply Quote 2

                    Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                    Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                    With your input, this post could be even better πŸ’—

                    Register Login
                    • First post
                      Last post