variable « float « Java Data Type Q&A





1. Problem on getting digits in a double variable    stackoverflow.com

I got a little problem with a function I need in my java progam. I want to check the total amount of digits, a 'double' variable has. (e.g.: 5 should return ...

2. Why is my Float Variable Holding Whole Numbers?    stackoverflow.com

I've been glancing at this code for a while now, and I can't seem to figure out what the probably simple error is... In short, I have a float variable in ...

3. Reasoning behind having to specify L for long, F,D for float, double    stackoverflow.com

A few related questions here. As per the title, why is it a requirement if we are specifying the variable type as long or float, double? Doesn't the compiler evaluate a variables ...

4. float variable    coderanch.com

5. Trouble inputting float variables    coderanch.com

A quick check of the Javadocs shows that Double.parseDouble() was introduced in JDK 1.2 -- looks like you're working with a very old version of Java. You could instead use new Double("123.213").doubleValue() ; this ought to work in JDK 1.0 and up. Or you could upgrade to use a more recent Java 2 platform.

6. Floating point variables    coderanch.com

Hi there, I have this program that I am supposed to write but I have restrictions as listed here: Write a program that takes a hexadecimal number which it interprets to be a IEEE single precision floating point value and prints it out as 2 to the exponent times the sum of powers of 2. The input value should be a ...

7. float variable value    coderanch.com

Sorry for not replying earlier; have been busy. You will have to find a book about computer hardware to find how the IEEE754 numbers are stored. They are quite complicated to explain, but once you have got the hang of it quite easy to understand. There is 1 bit which determines sign (1 = -, 0 = +). There are 8 ...

8. Would like to use a float variable.    forums.oracle.com





10. Controlling precision in java float variable    forums.oracle.com