A method of oscillator temperature compensation in a temperature compensation block of an integrated circuit for at least one AT-cut crystal oscillator , said integrated circuit comprising several voltage- and/or current-controlled differential pairs for implementing temperature compensation in the oscillator , which method comprises: setting local compensation basis functions φ j ,j = 0, ... , k as logistic functions L ( x ) = − 1 + 2 1 + e b 1 + b 2 x , where b 1 and b 2 are observation parameters and the inflection point of the function is − b 1 b 2 , 0 , wherein k is the number of local temperature measuring ranges, and calibrating said temperature compensation block in the temperature range to be used, wherein: the measurements of a performed series of measurements are divided into at least three local temperature measuring ranges: a sum function f ( T ) of the oscillator temperature error compensation is f ( T ) = α 0 φ 0 ( x ) + α 1 φ 1 ( x ) + ··· + α k φ k ( x ) , where φ 0 ≡ 1 and where the local compensation basis functions φ j ,j = 0, ... , k are linearly independent and form a subspace M base, an initial value for the sum function f ( T ) of temperature error compensation is established by setting local basis functions and their observation parameter initial values for each of the at least three local measuring ranges, and said initial value of the temperature error compensation sum function f(T) is iterated at least three times one local basis function at a time, after which the temperature error compensation sum function f ( T ) is obtained. setting local compensation basis functions φ j ,j = 0, ... , k as logistic functions L ( x ) = − 1 + 2 1 + e b 1 + b 2 x , where b 1 and b 2 are observation parameters and the inflection point of the function is − b 1 b 2 , 0 , wherein k is the number of local temperature measuring ranges, and calibrating said temperature compensation block in the temperature range to be used, wherein: the measurements of a performed series of measurements are divided into at least three local temperature measuring ranges: a sum function f ( T ) of the oscillator temperature error compensation is f ( T ) = α 0 φ 0 ( x ) + α 1 φ 1 ( x ) + ··· + α k φ k ( x ) , where φ 0 ≡ 1 and where the local compensation basis functions φ j ,j = 0, ... , k are linearly independent and form a subspace M base, an initial value for the sum function f ( T ) of temperature error compensation is established by setting local basis functions and their observation parameter initial values for each of the at least three local measuring ranges, and said initial value of the temperature error compensation sum function f(T) is iterated at least three times one local basis function at a time, after which the temperature error compensation sum function f ( T ) is obtained. the measurements of a performed series of measurements are divided into at least three local temperature measuring ranges: a sum function f ( T ) of the oscillator temperature error compensation is f ( T ) = α 0 φ 0 ( x ) + α 1 φ 1 ( x ) + ··· + α k φ k ( x ) , where φ 0 ≡ 1 and where the local compensation basis functions φ j ,j = 0, ... , k are linearly independent and form a subspace M base, an initial value for the sum function f ( T ) of temperature error compensation is established by setting local basis functions and their observation parameter initial values for each of the at least three local measuring ranges, and said initial value of the temperature error compensation sum function f(T) is iterated at least three times one local basis function at a time, after which the temperature error compensation sum function f ( T ) is obtained. <EOS>