add function to apply polynom to doubles