title: Benford's Law in Java - how to make a math function into Java
body: <p>I have a quick question. I am trying to make a fraud detection app in java, the app will be primarily based on Benford's law. Benford's law is super cool, it basically can be interpreted to say that in a real financial transaction the first digit is commonly a 1, 2, or 3 and very rarely an 8, 9. I haven't been able to get the Benford formula translated into code that can be run in Java. </p>
  
  <p><a href="http://www.mathpages.com/home/kmath302/kmath302.htm" rel="nofollow">http://www.mathpages.com/home/kmath302/kmath302.htm</a> This link has more information about what the Benford law is and how it can be used. </p>
  
  <p>I know that I will have to use the java math class to be able to use a natural log function, but I am not sure how to do that. Any help would be greatly appreciated. </p>
  
  <p>Thanks so much!!</p>