Sliders don't move when values are small

Can you see what is wrong if anything with the attached code? I have 4 sliders and three work perfectly. The top one, which has smaller values, will not move.

import streamlit as st
import win32com.client as w32c
import pythoncom
import numpy as np
import plotly.express as px
import plotly.graph_objects as go
import pandas as pd
import os

pythoncom.CoInitialize()
nruns=0

st.title(' web app')

nsliders=4

params=[]
factor_names=[]
    
for islider in range(0, nsliders):
    params.append(islider)
    name='slider'+str(islider)
    factor_names.append(name)
    
st.sidebar.markdown('**Drag the sliders:**')

for islider in range(0, nsliders):
        midval=float(params[islider]+5.0e-4)
        if midval>0:
            minval=float(midval/2)
            maxval=float(midval*2)
        elif midval<0:
            maxval=float(midval/2)
            minval=float(midval*2)
        else:
            maxval=float(midval)+0.001
            minval=float(midval)
        if abs(midval)<0.01 or abs(midval)>10000:
            params[islider] = st.sidebar.slider(factor_names[islider], minval, maxval, midval, format="%.2e")
        else:
            params[islider] = st.sidebar.slider(factor_names[islider], minval, maxval, midval, format="%.2f")

My mistake. Thought of it this morning… I just needed to to use the step variable. Works great with:

    if abs(midval)<0.01 or abs(midval)>10000:
        params[islider] = st.sidebar.slider(factor_names[islider], minval, maxval, midval, format="%.2e", step=(maxval-minval)/20)
    else:
        params[islider] = st.sidebar.slider(factor_names[islider], minval, maxval, midval, format="%.2f", step=(maxval-minval)/20)
1 Like