finish num

This commit is contained in:
2020-05-08 11:56:45 +02:00
parent 23491ce785
commit 2f7f5df64e
4 changed files with 272 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
#include<iostream>
float f(float x) {
if(x >= 0 && x < 0.5) return 2*x;
else return 2 * (1 - x);
}
float f_chaos(float x) {
if(x >= 0 && x < 0.5) return 1.999999*x;
else return 1.999999 * (1 - x);
}
int main() {
float x = 0.01401;
std::cout << x << std::endl;
for (int i = 1; i <= 100; i++) {
x = f(x);
std::cout << x << std::endl;
}
}