Posted: Thu Apr 29, 2010 9:37 pm Post subject: CASTing Float to Decimal resulting in large number
Centurion
Joined: 11 Jun 2006 Posts: 114
Hi All, I think I have come across a CASTing bug in MB 5. When I try to cast a FLOAT to decimal, I found that it is adding a 1 at the end as below :
Cast(6.8E-1 to decimal) resulted to 0.680000000000000001
So when I divide teh above number with 68, it results in 0.010000000000000000014705882352941 and this could not be handled by MB and threw error. I was expecting that 6.8E-1 should be = 0.68. Has any one faced the same problem. Could any one provide a good solution for this. I should not be using precision while casting to decimal.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum