Hi.
I'm trying to generate random numbers with a Cellular Automata. For this, I implement a Genetic Algorithm which find the best rule for the Automata's cells. The Genetic Algorithm evaluate the rules, but it needs to use the two-base logarithm, and the lybrary math.h don't implement this function.
Does exist any library that implement n-base logarithm?
Thanks.
How to Implement n-base logarithm
Page 1 of 13 Replies - 28250 Views - Last Post: 19 April 2010 - 02:53 AM
#5
Re: How to Implement n-base logarithm
Posted 30 May 2006 - 09:46 AM
you could use the dirty math hack to do change of log bases
its
logb (x) = (loga(x)) / (loga(B))
example
log base 2 (5) = (log base 10 (5) ) / (log base 10 (2) )
its
logb (x) = (loga(x)) / (loga(B))
example
log base 2 (5) = (log base 10 (5) ) / (log base 10 (2) )
#6
Re: How to Implement n-base logarithm
Posted 30 May 2006 - 10:36 AM
I don't think there is a library to do such a thing as the formula is not all that complex. There is a function in the math/h library to handle log and that is considered sufficient.
#7 Guest_SAMEER*
Re: How to Implement n-base logarithm
Posted 19 April 2010 - 02:53 AM
Page 1 of 1
|
|

New Topic/Question
Reply




MultiQuote






|