code: public static double getDouble(final String key) {
          return Double.longBitsToDouble(getPreferences().getLong(key, Double.doubleToLongBits(0.0d)));
      }
docs: Returns the double that has been saved as a long raw bits value in the long preferences.
  Returns 0 if the preference does not exist.
  
  @param key      The name of the preference to retrieve.
  @return Returns the preference value if it exists, or 0.
  @throws ClassCastException if there is a preference with this name that is not a long.
  @see android.content.SharedPreferences#getLong(String, long)