parseDouble for primitives