def cosfromsin(x, sinx):
    cosx = absolute((1 - sinx ** 2) ** 0.5)
signx = sign((x - pi / 2) % (2 * pi) - pi)
return cosx * signx
a = sin(x)
b = cosfromsin(x, a)
Is there a fast Way to return Sin and Cos of the same value in Python?