Your code is throwing away the fractional part of every step.
if (a2 != oldas)
{
b = oldas - a2; // If the result is below 1 this will truncate it to 0
stepper.rotate(b);
oldas = a2;
}
You should keep the fractional parts:
b = oldas - a2;
if (b != 0) // Any full steps to be done?
{
stepper.rotate(b);
oldas += b; // Keep track of the fractional part not included in this movement.
}