does the datatype float also have a over-/underflow like an integer?

If yes, how can I create a float-underflow?

thanks
dave

Recommended Answers

All 3 Replies

float.MIN_VALUE-1

I think.

float.MIN_VALUE-1

I think.

I also thought that. But that doesn't work, because java rounds the value!

You're right. I forget about that! The values are suppose to wrap around. Hmm, that makes it even harder.

The only other thing I can think of is some kind of conversion that causes an underflow.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.