posted 10 years ago

What do you mean? Does it work all the time you've tested it? or only most of the time? if just "most" then does that mean it does not work always?

If it fails just once, there is no proof, you have a counter example.

Assuming it has always worked in your tests, how many tests did you do?

What kind of proof do you expect? I'd probably do it by induction, but only once I was confident it held.

Originally posted by Pho Tek:

It seems to work most of the time.

What do you mean? Does it work all the time you've tested it? or only most of the time? if just "most" then does that mean it does not work always?

If it fails just once, there is no proof, you have a counter example.

Assuming it has always worked in your tests, how many tests did you do?

What kind of proof do you expect? I'd probably do it by induction, but only once I was confident it held.

posted 10 years ago

Way too much meaning for a post in the Meaningless Drivel forum.

Moving this to the Java In General (Intermediate) forum.

Mark

Moving this to the Java In General (Intermediate) forum.

Mark

posted 10 years ago

There isn't a "mathematical" proof because you aren't asking about a mathematical concept, you're asking about how Java implements things.

However there's a logical proof which would parallel the mathematical proof of that question. Assuming your "x" is an integer, there are four possibilities: x can be odd or even, and it can be negative or non-negative. Consider each of them and show that your equation is true when Java executes it.

However there's a logical proof which would parallel the mathematical proof of that question. Assuming your "x" is an integer, there are four possibilities: x can be odd or even, and it can be negative or non-negative. Consider each of them and show that your equation is true when Java executes it.

posted 10 years ago

Paul,

I finally found an axiom stating that it is true;

from wikipedia's entry on Floor function.

Pho

I finally found an axiom stating that it is true;

from wikipedia's entry on Floor function.

Pho