sgn = 1 - (sgn << 1);
sgn = 1 - ((sgn & 1) << 1);
static void sncndnK(INTERNAL_PRECISION z, INTERNAL_PRECISION k,		    INTERNAL_PRECISION* sn, INTERNAL_PRECISION* cn,		    INTERNAL_PRECISION* dn, INTERNAL_PRECISION* K) {  INTERNAL_PRECISION agm;  int sgn;  *sn = arithgeom(z, ONE, sqrt(ONE - k*k), &agm);  *K = M_PI / (TWO * agm);  sgn = ((int) (fabs(z) / *K)) % 4; /* sgn = 0, 1, 2, 3 */  sgn ^= sgn >> 1;    /* sgn = 0, 1, 1, 0 */  sgn = 1 - (sgn << 1);	/* sgn = 1, -1, -1, 1 */  *cn = ((INTERNAL_PRECISION) sgn) * sqrt(ONE - *sn * *sn);  *dn = sqrt(ONE - k*k* *sn * *sn);}