Retrieves the Double value of key from the preferences.
The preference value, or defaultValue if it does not exist.