开发者

Manipulate not working with large numbers

Why isn't Manipulate[] working with large numbers? For instance this works

开发者_JAVA技巧
Manipulate[k, {k, 0, 1000000000, 1}]

and this doesn't

Manipulate[k, {k, 0, 10000000000, 1}]

I believe that there should be some Mathematica variable which affects this but I cannot find one.


This is a known bug with Manipulate and Slider, specifically when there are more than 2^31 discrete "steps" for the slider.

As a workaround, you could do the following, for example:

Manipulate[Round[k], {k, 0, 10^100}]

By not specifying the step size (fourth argument), you allow the slider to set non-integer values for the variable, but you can get around this by using Round (or IntegerPart).

Hope that helps!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜