Can you use double or float on Blackberry?
If so, in which OS version or hardware model?
Edit: I believe the answers I get here, but then something else must be the problem.
Can you use double or float on Blackberry?
If so, in which OS version or hardware model?
Edit: I believe the answers I get here, but then something else must be the problem.
I put a post together a while back that shows a timing comparison with the different data types and different arithmetic processing on the BlackBerry. You might not be looking for this type of information, but it's interesting to see how your options compare.
http://www.blurrywords.com/2009/05/02/blackberry-java-arithmetic-comparisons.html
You can use
double
orfloat
on any Blackberry OS and hardware model.The only Java version that does not support floating-point types is the CLDC configuration of Java ME in Version 1.0 (they were re-added in Version 1.1). I'm not sure whether there are any Blackberry devices that only support CLDC 1.0, but I doubt it.
Apparently floating point doesn't work on some versions of Blackberry; see the comments.
Bow, if a J2ME device implements the CLDC 1.0 profile, the manufacturer is not required to include support for floating point arithmetic in the platform: see
In CLDC 1.1, floating point support is mandatory.
In comments on other questions, you say that Blackberry is CLDC 1.1.
If your Blackberry's floating point support doesn't work and it really claims to implement CLDC 1.1, then that's either a bug in the execution platform or the build tool-chain, or a problem with the way you are using the tool-chain. (I don't develop J2ME stuff, so I can't be more specific.)