曼德尔布罗特麻烦 [英] Mandelbrot trouble

查看:76
本文介绍了曼德尔布罗特麻烦的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



前段时间我为一个非常简单的Mandelbrot资源管理器编写了这段代码。我遇到的主要问题是,在放大到一定深度后,我使用的双数据类型无法进一步发展。有没有办法解决这个问题?谢谢。

Hi,
I wrote this little piece of code for a very simple Mandelbrot explorer some time ago. The main problem I came across was that after zooming in to a certain depth, the double data type I used couldn''t go further. Is there a way to solve this problem? Thank you.

推荐答案




我写了这段小代码很久以前,一个非常简单的Mandelbrot探险家。我遇到的主要问题是,在放大到一定深度后,我使用的双数据类型无法进一步发展。有没有办法解决这个问题?谢谢。
Hi,
I wrote this little piece of code for a very simple Mandelbrot explorer some time ago. The main problem I came across was that after zooming in to a certain depth, the double data type I used couldn''t go further. Is there a way to solve this problem? Thank you.



你可以做两件事之一。当你到达那里时,使用一个长的双,或找到重复的模式然后回到那个位置。


长双倍肯定更容易。



Adrian

You can do one of two things. Use a long double, or find the repeating pattern and back off to that position when you get there.

The long double is definitely easier.


Adrian



你可以做两件事之一。使用长双,或找到重复的模式,并在到达那里时返回到该位置。
You can do one of two things. Use a long double, or find the repeating pattern and back off to that position when you get there.



一定要做一个sizeof(long double)。在Windows上,double和long double是相同的。

Be sure to do a sizeof(long double). On Windows, double and long double are the same.



确保执行sizeof(long double)。在Windows上,double和long double是相同的。
Be sure to do a sizeof(long double). On Windows, double and long double are the same.



是的。你是对的。实际上我在我的代码中使用了long double,但后来我发现double和long double只有8个字节长。我说双,因为没关系。但是,有另一种解决方法吗?

Yep. You are right. Actually I used long double in my code, but later I found out that both double and long double are only 8 bytes long. I said double because it doesn''t matter. However, is there a way around this problem in another way?


这篇关于曼德尔布罗特麻烦的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆