def calcDistance(self, freq1, freq2):
        """
            Calculates distance between frequencies taking into account that
            the frequencies of pitches increase logarithmically.
        """

        difference = abs(freq1 - freq2)
        log = math.log(2 / (freq1 + freq2))
        if log < 0.00001:               # TODO: Decide what to do if log is 0
            return freq1 + freq2
        return difference / log
dataset/ETHPy150Open Agerrr/Automated_Music_Transcription/least_squares_first_peaks_2.py/MIDI_Detector_Least_Squares_2.calcDistance/swapped operands of `/`