Administrators Jon Posted December 12, 2003 Administrators Share Posted December 12, 2003 Can anyone think of a simple way to determine if any given double data type is a whole number or not?e.g.double dTest = 4294967306.22452How can I test if dTest is a whole number or a floating point given that dTest is bigger than the long integer data type so you can't just convert double to long and back then compare.I also don't want to use __int64 because it's freaky on MinGWThere's probably a simple solution I'm completely missing. Or maybe _int64 is the only way to go. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
MattNis Posted December 12, 2003 Share Posted December 12, 2003 Convert the double to a string and search for a "."look herehttp://www.eng-tips.com/gviewthread.cfm/le...d/536/qid/53657 [quote]I was busy waiting all night for the Columbus Day Bunny to come down my chimney and light fireworks in my pumpkin.There's so much wrong with that.Oh, I'm sorry, i forgot you were Jewish.[/quote] Link to comment Share on other sites More sharing options...
Valik Posted December 15, 2003 Share Posted December 15, 2003 Did you find a solution to this problem, Jon, or did you just use __int64 anyway? Link to comment Share on other sites More sharing options...
Administrators Jon Posted December 15, 2003 Author Administrators Share Posted December 15, 2003 The current version of mingw seems to support __int64 so I just used that Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now