cancel
Showing results for 
Search instead for 
Did you mean: 

Runden auf ganzen Zahlen Bug

RobertRoginer
Level 6
Hallo zusammen,

ich hätte gerne eine Bestätigung vom Blue Prism Team dass das hier ein Bug ist:

5354.png
Wir konnten herausfinden wenn ungerade Zahlen vor dem Komma steht und wir auf Ganzen Zahlen runden wollen, dass das nicht funktioniert.
Heißt: Überall wo eine ganze Zahl vor dem Komma steht steht wird abgerundet, aus 20,5 wird 20, 24,5 wird 24.
Bei ungeraden Zahlen vor dem Komma wird aufgerundet 21,5 wird 22, 27,5 wird 28.

Sieht für mich sehr nach einem Bug aus. 
Der Workarround ist zwar überall 0,01 dazu zurechnen, sollte jetzt aber nicht die offizielle Lösung sein, hoffe ich? (Die Lösung haben wir selbst herausgefunden)

Das Problem besteht in jeder Blue Prism Version, von 6.42 - 6.10.3, in beiden Versionen besteht das gleiche Problem.

------------------------------
Robert Roginer
RPA Modeller
Mainova
Europe/Berlin
------------------------------
1 BEST ANSWER

Best Answers

Hallo Robert,

NOTE: Translated using Google Translate

Ich glaube nicht, dass es sich unbedingt um einen Fehler handelt, aber diese Berechnung erfolgt gemäß einem der weit verbreiteten Algorithmen, die als "Banker's Rounding" bezeichnet werden. Viele Programme verwenden oft diese Metrik, wobei jede gerade Zahl, wenn sie vor der Dezimalzahl auftritt, die von der Zahl 5 gefolgt wird, auf die nächste ungerade Zahl gerundet wird und umgekehrt. Vielleicht kann dies jemand aus dem Blue Prism-Team bestätigen.

Weitere Informationen dazu finden Sie unter der folgenden URL: Banker's Rounding


------------------------------
----------------------------------
Hope it helps you and if it resolves you query please mark it as the best answer so that others having the same problem can track the answer easily

Regards,
Devneet Mohanty
Intelligent Process Automation Consultant
Blue Prism 7x Certified Professional
Website: https://devneet.github.io/
Email: devneetmohanty07@gmail.com

----------------------------------
------------------------------
----------------------------------
Hope it helps you out and if my solution resolves your query, then please provide a big thumbs up so that the others members in the community having similar problem statement can track the answer easily in future.

Regards,
Devneet Mohanty
Intelligent Process Automation Consultant | Technical Business Analyst,
WonderBotz India Pvt. Ltd.
Blue Prism Community MVP | Blue Prism 7x Certified Professional
Website: https://devneet.github.io/
Email: devneetmohanty07@gmail.com

----------------------------------

View answer in original post

6 REPLIES 6

Hallo Robert,

NOTE: Translated using Google Translate

Ich glaube nicht, dass es sich unbedingt um einen Fehler handelt, aber diese Berechnung erfolgt gemäß einem der weit verbreiteten Algorithmen, die als "Banker's Rounding" bezeichnet werden. Viele Programme verwenden oft diese Metrik, wobei jede gerade Zahl, wenn sie vor der Dezimalzahl auftritt, die von der Zahl 5 gefolgt wird, auf die nächste ungerade Zahl gerundet wird und umgekehrt. Vielleicht kann dies jemand aus dem Blue Prism-Team bestätigen.

Weitere Informationen dazu finden Sie unter der folgenden URL: Banker's Rounding


------------------------------
----------------------------------
Hope it helps you and if it resolves you query please mark it as the best answer so that others having the same problem can track the answer easily

Regards,
Devneet Mohanty
Intelligent Process Automation Consultant
Blue Prism 7x Certified Professional
Website: https://devneet.github.io/
Email: devneetmohanty07@gmail.com

----------------------------------
------------------------------
----------------------------------
Hope it helps you out and if my solution resolves your query, then please provide a big thumbs up so that the others members in the community having similar problem statement can track the answer easily in future.

Regards,
Devneet Mohanty
Intelligent Process Automation Consultant | Technical Business Analyst,
WonderBotz India Pvt. Ltd.
Blue Prism Community MVP | Blue Prism 7x Certified Professional
Website: https://devneet.github.io/
Email: devneetmohanty07@gmail.com

----------------------------------

Hi,

I do not hope that you are right, that would be fatal. I've never heard of this rule. Maybe this is only a rule in english speaking countries, but definitely not in Germany. Especially since it should be mathematical rounding and not just any rule, as it is also listed under the mathematical rules.


------------------------------
Robert Roginer
RPA Modeller
Mainova
Europe/Berlin
------------------------------

Even I am not sure if it is being followed all across the English speaking countries or not but while working on a use case in SQL Server Stored Procedure, I once came across this issue once, in the end we had to go by a logic of deciding whether to use Floor or Ceil concept instead of Rounding Off. Might be it is being enforced here, though only the product team can confirm that I guess.

------------------------------
----------------------------------
Hope it helps you and if it resolves you query please mark it as the best answer so that others having the same problem can track the answer easily

Regards,
Devneet Mohanty
Intelligent Process Automation Consultant
Blue Prism 7x Certified Professional
Website: https://devneet.github.io/
Email: devneetmohanty07@gmail.com

----------------------------------
------------------------------
----------------------------------
Hope it helps you out and if my solution resolves your query, then please provide a big thumbs up so that the others members in the community having similar problem statement can track the answer easily in future.

Regards,
Devneet Mohanty
Intelligent Process Automation Consultant | Technical Business Analyst,
WonderBotz India Pvt. Ltd.
Blue Prism Community MVP | Blue Prism 7x Certified Professional
Website: https://devneet.github.io/
Email: devneetmohanty07@gmail.com

----------------------------------

As far as I know, normal rounding is used in programming languages (C #, Java) and not banking round. Was a bit shocked when I noticed that.

------------------------------
Robert Roginer
RPA Modeller
Mainova
Europe/Berlin
------------------------------

KanaIkeda
Staff
Staff
.NET (auf dem Blue Prism basiert) verwendet standardmäßig Banker's Rounding zur Ausführung von Rundungsfunktionen.
Ich verstehe die Situation, die Robert hat. Die einfachste Lösung wäre, z.B. "RndUp" zu verwenden, wenn "0,5" vorhanden ist.

------------------------------
Kana Ikeda
ROM Architect
Blue Prism
Europe/Berlin
------------------------------

ewilson
Staff
Staff
Hi @RobertRoginer,

Blue Prism uses the underlying conventions of the .NET framework to perform this action. If you review the Microsoft documentation for the Math.Round function (specifically with Decimal as input) what you'll find is that Microsoft default to using a ToEven strategy for rounding. You can find more details at the links below:

https://docs.microsoft.com/en-us/dotnet/api/system.math.round?view=net-6.0#System_Math_Round_System_Decimal_System_Int32_
https://docs.microsoft.com/en-us/dotnet/api/system.midpointrounding?view=net-6.0#System_MidpointRounding_ToEven

Cheers,


------------------------------
Eric Wilson
Director, Integrations and Enablement
Blue Prism Digital Exchange
------------------------------