0

I'm trying to make an animation of Feigenbaum's chaos. I try to program 600 images where I dive into the chaos of the image and then make them animated with MakeAvi. I have an mpmath library from Python, but it still feels like the value of the 10 exponent mantissa is limited. I can't go beyond image 82, which is equivalent to 15 frames per second animation with only 82/15 = 6 second animation. How could I increase the magnitude of the floating point mantissa? I suspect the value of the mantissa is currently limited to about 300. So I'm trying to make an animation like this:

https://youtu.be/5cT0H4Xk7JE

Random Davis
  • 6,662
  • 4
  • 14
  • 24
  • Would [decimal](https://docs.python.org/3/library/decimal.html) work? – Random Davis Feb 01 '22 at 21:43
  • No. I even Import mpmath. Here is my code: [link](https://petke.info/Feigenbaum.txt) – Petri Keckman Feb 01 '22 at 21:47
  • You haven't explained what happens at image 82. Does your program fail? I tried to look at your code, and I was curious why the number of decimal precision has to go up at every iteration, and how you are casting integer literals to `int`. Finally, the `getcontext()` within the `decimal` module only pertains to operations relative to the `Decimal` data type, which you have never instantiated. I don't have much experience with the `mpmath` package, but I don't know well enough about its implementation to know whether you can mix and match `float` with `mpf` instances. – Ben Y Feb 01 '22 at 22:33
  • I do not get error message in Python, but the image starts to be same as backround color ie. yellow. In REBOL-language in same program I get error message: ** Math Error: Math or number overflow ** Where: do-body ** Near: x: x * ((1 - x) * k) >> An when I print the x I get: >> print x -8.04656270944002E+237 >> – Petri Keckman Feb 02 '22 at 00:16
  • I think the overflow you're encountering is not an issue with the mantissa, but with the exponent. I looked at the decimal Python package, and you can adjust the exponent to be at most 10^18 - 1. The default max exponent (`Emax`) for decimal was 999999. Large values of `prec` would cause the decimal module to run out of memory at some point. – Ben Y Feb 03 '22 at 19:12

0 Answers0