Bug mit ceil und floor im Algebra-Modus?!

mire2 shared this problem 2 years ago
Not a Problem

f0bb4dc23be15fed5ed3558b6438c39148e3344742affbe6371080eed82621f9366efeeca143b31142daef9ee8dff0f3f7fbaca2218a4efb9c746d649da9fd939370980721f5a74429de7fe84d7bc089


System: Windows 10 Pro und GeoGebra 5.0629


Gruß

mire2

Comments (7)

photo
1

Not a bug, just a consequence of how floating point numbers work. Try in JavaScript:/945Fw+OIgvrLuIy0i5yYItC4ePttw4vCFQbRAYMgItC4ewIqvp4dMmahNCBQRj5xHHwgMGYEQz5B3N2orikCIpyi84XzICIR4hry7UVtRBEI8ReEN50NGIMQz5N2N2ooiEOIpCm84HzICIZ4h727UVhSBEE9ReMP5kBEI8Qx5d6O2ogiEeIrCG86HjECIZ8i7G7UVRSDEUxTecD5kBEI8Q97dqK0oAiGeovCG8yEjEOIZ8u5GbUURCPEUhTecDxmBEM+QdzdqK4pAiKcovOF8yAj8H1ijCfTDSQVoAAAAAElFTkSuQmCC

photo
1

Hi Michael,


1. Danke für die schnelle Antwort


2. Ich schätze Dich und GeoGebra wirklich sehr, aber ich merke, wie ich anfange mich aufzuregen.


Es kann doch nicht wirklich der Anspruch sein zu behaupten, dass GeoGebra bedauerlicherweise nicht in der Lage ist, die Differenz von zwei endlichen Dezimalzahlen korrekt auszurechnen und deshalb als "Lösung des Problems" auf JavaScript zu verweisen.

Das ist doch ... öhm ... hochnotpeinlich.


Immerhin berechnet ja GeoGebra doch noch korrekt:

12345.6789 - 12345 = 0.6789

Also ist es gewiss kein überbordener Anspruch zu erwarten, dass das Problem in irgendeiner Weise gefixt oder wenigstens etwas mehr als ein Schulterzucken gezeigt wird.

Zumal die Ursache irgendwo anders zu liegen scheint, denn wenn ich das erneut versuche, dann rechnet GeoGebra Gott sei Dank korrekt.

Wo liegt also das Problem bzw. der Fehler in der obigen Datei und wie lässt sich das beheben?


7545307ac7514773bf304c85e460db41


Gruß

mire2

photo
1

JavaScript is just an example - you can try in Python, C++, Java etc


See here if you really want to understand: https://docs.oracle.com/cd/...


If you need an exact answer then you can use the CAS View of course.

photo
1

GeoGebra is unfortunately not able to calculate the difference of two finite decimals correctly
Therein lies the problem - computers store numbers in binary

photo
1

Funny, but the reality is: https://xkcd.com/386/ 😎


Everyone should count on that the solution of 12345.6789 - 12345 is correct calculated.

So please, investigate what's the difference between the first and the second posted file is and what caused that mistake in the first one! 🙏

I guess, that's a question to a developer.

Greetings

mire2

photo
1

Sorry, I still don't see a problem. Please say

* what you typed

* what you got

* what you'd like

© 2023 International GeoGebra Institute