+1 for changing the language to match the actual mechanics.
> "the sign of the imaginary part of x is used [...]"
I'm trying to see where this happens. Is this part of cmath_sqrt?
if (z.real >= 0.) {
r.real = s;
r.imag = copysign(d, z.imag);
} else {
r.real = d;
r.imag = copysign(s, z.imag);
}
> "continuous from below" and "continuous from above"
> language is misleading;
I'm curious, is that language incorrect? My mental image of a branch cut is a helical graph with the edge cases being continuous from above and below. Likewise, my mental model for branch cut logic is it resolves multiple possible output values in a way preserves continuity from one side or the other.
In other words, I think about branch cuts in terms of continuity rather than sign preservation. Is that incorrect?