I am trying to write a fnct that will do the following :confused:
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
Printable View
I am trying to write a fnct that will do the following :confused:
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
there is a log2() fxn in math.h
edit: takes a double, returns a double
New Headers:
#include <cmath>