fixed out of bounds error.
call divide with roundingmode to prevent exception being thrown
implemented expand polynomial

seems to not work even before i implmented expand/fixes, need to bugfix.