Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Manipulate not working with large numbers

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

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.

like image 760
Max Avatar asked Nov 02 '10 21:11

Max


1 Answers

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!

like image 185
Michael Pilat Avatar answered Sep 28 '22 14:09

Michael Pilat