-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 yperez_riverol (sent by Nabble.com) wrote:
>I have a big quetions. > >I want calculate logarithms base 2 of x. >for this my code is: > >result = (gsl_sf_log(x)/gsl_sf_log(2)); > >when x=100 the logic result=2, but the program show me 6. > >Please aswer... > > I believe that your logic result=2 is not what you want! You have log_base_10(100)=2 and log_base_10(100)/log_base_10(2) = 6 = log_any_base(100)/log_any_base(2) = ln(100)/ln(2). Nothing to deal with gsl on my view. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (MingW32) Comment: Using GnuPG with Netscape - http://enigmail.mozdev.org iD8DBQFDz2LHHvesJJ5UqvkRAizxAKDBfmXmmz95pTCKGfqPhe333iWbZACg2Pvs +A+o24hUX5vcf14Rp1ToXLM= =awDc -----END PGP SIGNATURE----- _______________________________________________ Help-gsl mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-gsl
