Question5Replies1881Views×Close popoverViswanath Samudrala (Viswa_CG) Capgemini Capgemini IN View Profile Viswa_CG Member since 2017 12 posts Capgemini Posted: June 15, 2017Last activity: July 27, 2017Posted: 15 Jun 2017 10:51 EDTLast activity: 27 Jul 2017 15:14 EDT Closed Decimal divided-by Integer and Decimal divided-by Decimal for the exact same values return different results!Example: (1) 84.5/100 = 0.85 Whereas (2) 84.5/100.0 = 0.845To add to that, when we set BOTH the numbers to Decimal properties the result is (1).Any clue why?***Edited by Moderator: Marissa to update categories*** Low-Code App Development Data Integration ×Close popoverFacebookTwitterLinkedinEmail Copy Link Copied! Moderation Team has archived post This thread is closed to future replies. Content and links will no longer be updated. If you have the same/similar Question, please write a new Question. Posted: 3 years agoPosted: 20 Jun 2017 2:28 EDT×Close popoverRaviteja Chatakondu (Raviteja_CH) PEGA Senior Cloud Development Engineer Pegasystems Inc. IN View ProfileRaviteja_CH PEGA replied to Viswa_CGHi Viswa, If you give 85.0/100 we are considering them as bigdecimal values and thus returning the value round to two decimal points. Whereas if we give 85.0/100.0, it is treating them as both normal decimals and hence no rounding. You can play with the values and check view Java in activity to get some clarity on what's happening why. Hope this helps. --Ravi. Posted: 3 years agoPosted: 4 Jul 2017 12:05 EDT×Close popoverViswanath Samudrala (Viswa_CG) Capgemini Capgemini IN View ProfileViswa_CG Capgemini replied to Raviteja_CHHi Ravi, Thanks for your reply. There is no clarity on why this is happening but I figured a workaround. Instead of doing 85.0/100.0, I am doing 85.0/100.0000000000000001.This solves my problem at hand. Regard, Viswa Posted: 3 years agoPosted: 4 Jul 2017 22:40 EDT×Close popoverRaviteja Chatakondu (Raviteja_CH) PEGA Senior Cloud Development Engineer Pegasystems Inc. IN View ProfileRaviteja_CH PEGA replied to Viswa_CGHi Viswa, Both those would give us the same result right? --Ravi Posted: 3 years agoPosted: 8 Jul 2017 14:30 EDT×Close popoverViswanath Samudrala (Viswa_CG) Capgemini Capgemini IN View ProfileViswa_CG Capgemini replied to Raviteja_CHThey somehow don't. Try out the exact example I put in the beginning of the thread and the workaround I mentioned. The results are interesting (they shouldn't be interesting!). Posted: 3 years agoPosted: 27 Jul 2017 15:14 EDT×Close popoverPete Gousios (PeterGousios_GCS) PEGA Sr. Software Solutions Engineer Pegasystems Inc. US View ProfilePeterGousios_GCS PEGA replied to Viswa_CGWhere are you adding this code ? In an activity java step or somewhere else?