Search:

Type: Posts; User: helloworld922

Search: Search took 0.16 seconds.

  1. [SOLVED] Re: Logic error in Math.pow(a,b) using JOptionPane

    No, sqrt(8) != 4. sqrt(8) ~= 2.8284

    You can verify this easily because 4*4 = 16, and likewise 2.8284*2.8284 ~= 8
  2. [SOLVED] Re: Logic error in Math.pow(a,b) using JOptionPane

    Yes, those are integer literals and Java will use integer math. 1/2 = 0 in integer land.

    Are you sure your hand-calculated answer is correct?

    Try graphing your triangle and see if you can...
Results 1 to 2 of 2