I am looking for a way to do a plus/minus operation in python 2 or 3. I do not know the command or operator, and I cannot find a command or operator to do this.
Am I
Instead of computing expressions like
s1 = sqrt((125.0 + 10.0*sqrt(19)) / 366.0) s2 = sqrt((125.0 - 10.0*sqrt(19)) / 366.0)
you could use
r = 10.0*sqrt(19) s1, s2 = (sqrt((125.0 + i) / 366.0) for i in (r, -r))
This is based on Nico's answer, but using a generator expression instead of NumPy