Hi guys im trying to make my own pseudo-random number generator from the algorithm below using the kent chaotic map.
Code:
{ x(n)/m, 0 < x(n) <=m
x(n+1)= {
{(1-x(n))/1-m, m<x(n) <1
where 0<m<1 (m could be 0.7 for example and all other variables could be anything)
I've tried playing around with loops for example but cant get it working:
Code:
#include <iostream>
int main (int argc, char * const argv[])
{
double m = 0.7;
double x[10];
double k = 10;
int n, Chaotic_map;
{
for (n=0;n<k;n++)
x[n]+1=x[n]/m;
for (m<x[n]<1)
Chaotic_map= x[n]+1=(1-x[n])/(1-m);
printf("%d", Chaotic_map);
return 0;
}
But im still lost, Any ideas??