Prof. Falken
Prof. Falken

Reputation: 24927

Float or double on Blackberry?

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.

Upvotes: 1

Views: 315

Answers (4)

Stephen C
Stephen C

Reputation: 719336

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

http://cmer.cis.uoguelph.ca/cs1cs3/slides.ppt

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.)

Upvotes: 3

Fostah
Fostah

Reputation: 11796

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

Upvotes: 3

Michael Borgwardt
Michael Borgwardt

Reputation: 346457

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.

Upvotes: 2

MusiGenesis
MusiGenesis

Reputation: 75366

You can use double or float on any Blackberry OS and hardware model.

Upvotes: 1

Related Questions