I am trying to write a fnct that will do the following![]()
Z = X * log2 Y
but dont know how I can use log() for this or if I should be using something else for it Any feedback will be greatly appreciated.
Thanx
This is a discussion on math.h within the C++ Programming forums, part of the General Programming Boards category; I am trying to write a fnct that will do the following Z = X * log 2 Y but ...
I am trying to write a fnct that will do the following![]()
Z = X * log2 Y
but dont know how I can use log() for this or if I should be using something else for it Any feedback will be greatly appreciated.
Thanx
simple is always an understatement.....
there is a log2() fxn in math.h
edit: takes a double, returns a double
Last edited by alpha; 05-04-2003 at 10:44 PM.
New Headers:
#include <cmath>