You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- #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;
- }
- }
|