This may come down to float rounding error, which is a byproduct of how computers work. with floats. I'm not sure if rounding works with scientific notation but you can try "set text to round(variable)"
If that doesn't work you might have to employ some custom logic to extract the fraction, round it and put it back together, something like that (off the top of my head, I didn't test this)
set text to round(int(tokenat(str(variable),0,"e"))) & "e" & tokenat(str(variable),1,"e")