HI,
Am Mittwoch, den 18.01.2006, 08:19 -0800 schrieb yperez_riverol (sent by
Nabble.com):
> I want calculate logarithms base 2 of x.
> for this my code is:
>
> result = (gsl_sf_log(x)/gsl_sf_log(2));
First guess: result is an integer (which explains why you get 6 and not
6.6439)
> when x=100 the logic result=2, but the program show me 6.
Huh? The log2 of 100 is the number y, which fulfills
2^y = 100.
So y=2 is quite obviously not the correct solution (unless you have a
very special logic).
Regards
Thomas
_______________________________________________
Help-gsl mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-gsl