help-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-gsl] logic error logarithms


From: HelioSoft de Hélio Guilherme
Subject: Re: [Help-gsl] logic error logarithms
Date: Thu, 19 Jan 2006 09:58:32 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)

-----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-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]