On Wed 28 Jun 2006, Kongbin Kang wrote:
> I am planning to add log2 support into vcl. log2 is a C99 standard
> function defined in cmath. However, both msvc 6.0 and 7.0 don't support it.
In a strict sense, log2 is not C++, and so cannot be in cmath. You
probably meant math.h. Since it is C99, I'm sure it'll make it into
C++0x.
> Currently, vxl support borland, egcs, gcc, sgi, sun, etc.,
> compilers. Does anybody know any compilers other than gcc support it?
I think the way to do this is to check for log2 at configure time,
setting a variable such as VCL_COMPILER_SUPPORTS_LOG2, and add the
appropriate magic in vcl_cmath.h.
Note that you'd need to implement it for other platforms if the
platform doesn't support it.
An alternative is to provide log2 it in vnl_math.
Amitha.
|