def __pow__(self, other): if isinstance(other,Measurement): # Haven't calcuated variance in (a+/-da) ** (b+/-db) return NotImplemented else: if (not self.variance is None) and hasattr(other,'variance') and not other.variance is None: return Measurement(*err1d.pow(self.x,self.variance,other)) else: return Measurement(pow(self.x,other),None)
def __pow__(self, other): if isinstance(other, Uncertainty): # Haven't calcuated variance in (a+/-da) ** (b+/-db) return NotImplemented else: return Uncertainty(*err1d.pow(self.x, self.variance, other))
def __rtruediv__(self, other): x, variance = err1d.pow(self.x, self.variance, -1) return Uncertainty(x * other, variance * other**2)
def __rtruediv__(self, other): if (not self.variance is None) and hasattr(other,'variance') and not other.variance is None: x,variance = err1d.pow(self.x,self.variance,-1) return Measurement(other/self.x,variance*other**2) else: return Measurement(other/self.x,None)
def __rtruediv__(self, other): x,variance = err1d.pow(self.x,self.variance,-1) return Uncertainty(x*other,variance*other**2)
def __pow__(self, other): if isinstance(other,Uncertainty): # Haven't calcuated variance in (a+/-da) ** (b+/-db) return NotImplemented else: return Uncertainty(*err1d.pow(self.x,self.variance,other))
def __rtruediv__(self, other): x,variance = err1d.pow(self.x,self.variance,-1) return Measurement(x*other,variance*other**2)
def __rtruediv__(self, other): x, variance = err1d.pow(self.x, self.variance, -1) return Measurement(x * other, variance * other**2)