python - Gaussian fit returning negative sigma - Stack Overflow Well, as sigma only enters the argument of the exponential as squared value, I don't see a problem with using the absolute value On the other hand, if you use sigma also to normalise your normal distribution, i e multiplying it with 1 (sqrt (2*pi)*sigma), you probably get around the 'problem' altogether
Multiplying square roots of negative numbers $3i$ is a positive number, so there is no expectation that the square root should distribute There is no notion for (non-real) complex numbers to be "positive" or "negative": indeed whenever someone writes "z> 0 z 0
sqrt is only defined when argument is nonnegative Side note: An odd-ball is that sqrt (-0 0) will return -0 0 on many systems (IEEE 754) Square root of negative zero So a pseudo exception to "sqrt is only defined when argument is nonnegative"
Can someone explain how the square root of two negative numbers . . . One issue is to choose consistently the sign of the square root ("branch cut" and "Riemann Surface" are two different approaches) But even these approaches don't guarantee to preserve intuitive arithmetic If you want to take square (or other) roots of negative (and also complex) numbers you simply have to take care and be aware that it can't be done in a way which preserves every property