hi
  I don't know what does the arithmetic say!
  The result from a is 1000, then the result from b is 6.
I have optimized a system for a long time, but i find out i must optimize all aspects, just a aspect isn't work.
  I want to know arithmetic's theory.


  a.
       long endPoints = (1000 + 1000 + 1000 + 1000 + 1000) / 5;
       if(endPoints > 6208L)
           endPoints = 6208L;
       long halfEndPoints = endPoints / 2L;
       long l2 = endPoints - halfEndPoints;
       long l3 = 1L;
       l3 = 1000L*1000L*1000L*1000L*1000L;
f(l3 != 0L)
           while(halfEndPoints > 0L)
           {
               if(l2 * l2 * l2 * l2 * l2 > l3)
                   endPoints = l2;
               else
                   halfEndPoints /= 2L;
               l2 = endPoints - halfEndPoints;
           }
       else
           endPoints = 0L;
System.out.println("endPoints: " + endPoints); result : 1000 b.

              long endPoints = (6000 + 1 + 1 + 1 + 1) / 5;
       if(endPoints > 6208L)
           endPoints = 6208L;
       long halfEndPoints = endPoints / 2L;
       long l2 = endPoints - halfEndPoints;
       long l3 = 1L;
       l3 = 6000L*1L*1L*1L*1L;
f(l3 != 0L)
           while(halfEndPoints > 0L)
           {
               if(l2 * l2 * l2 * l2 * l2 > l3)
                   endPoints = l2;
               else
                   halfEndPoints /= 2L;
               l2 = endPoints - halfEndPoints;
           }
       else
           endPoints = 0L;
System.out.println("endPoints: " + endPoints); result : 6

Thanks and Regards,
Do chuan

_______________________________________________
kaffe mailing list
kaffe@kaffe.org
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe

Reply via email to