Linked by Christopher W. Cowell-Shah on Thu 8th Jan 2004 19:33 UTC
General Development This article discusses a small-scale benchmark test run on nine modern computer languages or variants: Java 1.3.1, Java 1.4.2, C compiled with gcc 3.3.1, Python 2.3.2, Python compiled with Psyco 1.1.1, and the four languages supported by Microsoft's Visual Studio .NET 2003 development environment: Visual Basic, Visual C#, Visual C++, and Visual J#. The benchmark tests arithmetic and trigonometric functions using a variety of data types, and also tests simple file I/O. All tests took place on a Pentium 4-based computer running Windows XP. Update: Delphi version of the benchmark here.
Permalink for comment
To read all comments associated with this story, please click here.
Java and the log method
by S Javeed on Fri 9th Jan 2004 21:58 UTC

Christopher raised the question of why Java only provides a method to calculate the natural log and not one to calculate the log base 10. The only reason I can think of is that calculating log base 10 from the natural log is easily done using a routine of the form:

public double log10 (double number) {
return Math.log(number) / Math.log(10);

This routine is based on the standard mathematical formula log base a (x) = log base b (x) / log base b (a). It is applied in the following form here: log(x) = ln(x) / ln(10).

While this doesn't justify not putting it in there, it's possible that the minimalistic but complete provision of the natural log method is what was desired.

Just my $0.02.