ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » CASTing Float to Decimal resulting in large number

Post new topic  Reply to topic
 CASTing Float to Decimal resulting in large number « View previous topic :: View next topic » 
Author Message
rajasri
PostPosted: Thu Apr 29, 2010 9:37 pm    Post subject: CASTing Float to Decimal resulting in large number Reply with quote

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.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » CASTing Float to Decimal resulting in large number
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.