update and fix functions API
equals(Object o) and hashCode() for double functions