Example #1
0
 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)
Example #2
0
 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))
Example #3
0
 def __rtruediv__(self, other):
     x, variance = err1d.pow(self.x, self.variance, -1)
     return Uncertainty(x * other, variance * other**2)
Example #4
0
 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)
Example #5
0
 def __rtruediv__(self, other):
     x,variance = err1d.pow(self.x,self.variance,-1)
     return Uncertainty(x*other,variance*other**2)
Example #6
0
 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))
Example #7
0
 def __rtruediv__(self, other):
     x,variance = err1d.pow(self.x,self.variance,-1)
     return Measurement(x*other,variance*other**2)
Example #8
0
 def __rtruediv__(self, other):
     x, variance = err1d.pow(self.x, self.variance, -1)
     return Measurement(x * other, variance * other**2)