If you need an exact zero you could do: slider(-7/10, 7/10, 1/100, 0)
...unless I misunderstood the question. -M. Hampton On Sep 28, 12:09 pm, pong <[EMAIL PROTECTED]> wrote: > Hi, > > I have the same problem as John did. When I try > > slider(-0.7, 0.7, 0.01, 0) > > the slider start with a very small number but not exactly 0. Can that > be fixed somehow? In fact, for my purpose I want it to start at a > nonzero value but can hit exact 0 by sliding, how can that be done? > > Also it said in slider? step_size is an integer. Looks like that has > been changed in the implementation and maybe the documentation should > be catching up soon. > > On Aug 25, 1:31 pm, john_perry_usm <[EMAIL PROTECTED]> wrote: > > > On Aug 25, 2:12 pm, "William Stein" <[EMAIL PROTECTED]> wrote: > > > > On Mon, Aug 25, 2008 at 11:18 AM, Igor Tolkov <[EMAIL PROTECTED]> wrote: > > > > >> Just upgraded to SAGE 3.1.1. The sliders have suddenly started > > > >> producing floating-point values; that is, > > > > >> num_approx=slider(1,5,default=2,label="Number of steps") > > > > >> gives me asliderwhose initial value is 2.00200400802, and that when > > > >> I slide from left to right can give me values such as 1.3 etc. I think > > > >> this is due to a recent bugfix. > > > > > Yes. Actually the change corrected seemingly arbitrary behavior with > > > > sliders when two different forms ofsliderinput produced different > > > > results. > > > > >> Typing step_size=1 produces the old, desired behavior, but according > > > >> to the documentation step_size=1 is the default. > > > > >> What is the expected future behavior? > > > > > In the future, sliders should be "continuous" by default, that is, > > > > having as many possible values as the width of thesliderallows. This > > > > is a documentation bug and thank you for pointing it out. > > > > Don't you think asliderbetween 1 and 5 should at least start > > > at 1 and end at 5? > > > > William > > > That doesn't happen with either of the constructions I gave; how does > > this arise? > > > john perry --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---
