Manipulate work with large numbers

Why Manipulate[]does it work with large numbers? For example, this works.

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

and it is not

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

I believe that there should be some Mathematica variable that affects this, but I cannot find it.

+5
source share
1 answer

This is a known mistake with Manipulateand Slider, especially if there are more 2^31discrete "steps" for the slider .

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

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

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

Hope this helps!

+7

All Articles