Lines Matching refs:sign
106 static void _settriple(mpd_t *result, uint8_t sign, mpd_uint_t a,
623 /* Set sign */
625 mpd_set_sign(mpd_t *result, uint8_t sign)
628 result->flags |= sign;
631 /* Copy sign from another decimal */
635 uint8_t sign = a->flags&MPD_NEG;
638 result->flags |= sign;
768 /* Flip the sign of a decimal */
1054 _ssettriple(mpd_t *result, uint8_t sign, mpd_uint_t a, mpd_ssize_t exp)
1056 mpd_set_flags(result, sign);
1065 _settriple(mpd_t *result, uint8_t sign, mpd_uint_t a, mpd_ssize_t exp)
1068 mpd_set_flags(result, sign);
1077 mpd_setspecial(mpd_t *result, uint8_t sign, uint8_t type)
1081 result->flags |= (sign|type);
1102 uint8_t sign = MPD_POS;
1112 sign = MPD_NEG;
1117 _ssettriple(result, sign, u, 0);
1201 _c32setu64(mpd_t *result, uint64_t u, uint8_t sign, uint32_t *status)
1221 mpd_set_flags(result, sign);
1241 uint8_t sign = MPD_POS;
1250 sign = MPD_NEG;
1255 _c32setu64(result, u, sign, status);
1402 /* Same as above, but gets the absolute value, i.e. the sign is ignored. */
2075 * Copy a decimal and set the sign to positive. In case of an error, the
2089 * Copy a decimal and negate the sign. In case of an error, the
2103 * Copy a decimal, setting the sign of the first operand to the sign of the
4095 uint8_t sign = mpd_sign(a)^mpd_sign(b);
4107 mpd_setspecial(q, sign, MPD_INF);
4119 _settriple(q, sign, 0, 0);
4132 mpd_setspecial(q, sign, MPD_INF);
4149 uint8_t sign = mpd_sign(a)^mpd_sign(b);
4160 mpd_setspecial(q, sign, MPD_INF);
4164 _settriple(q, sign, 0, 0);
4175 mpd_setspecial(q, sign, MPD_INF);
5183 uint8_t sign = 0;
5186 sign = 1;
5189 _settriple(result, sign, adjexp, 0);
5306 * sign ignored.
5379 * sign ignored.
6603 uint8_t sign;
6614 sign = (mpd_adjexp(&abs_x) < 0) ^ mpd_sign(y);
6615 if (sign == 0) {
6843 uint8_t sign;
6868 sign = (mpd_isnegative(base)) && (mpd_isodd(exp));
6875 _settriple(result, sign, r, 0);
6883 _settriple(result, sign, 0, 0);
6945 mpd_set_sign(result, sign);
7171 /* sign(r) == sign(b) */
7175 /* sign(r) != sign(b) */
7470 uint8_t sign = mpd_sign(a);
7521 mpd_set_flags(z, sign);
8784 const uint8_t sign = triple->sign;
8798 if (sign > 1 || exp != 0) {
8803 mpd_setspecial(result, sign, flags);
8817 if (sign > 1 || hi != 0 || lo != 0 || exp != 0) {
8821 mpd_setspecial(result, sign, MPD_INF);
8827 if (sign > 1) {
8831 const uint8_t flags = sign ? MPD_NEG : MPD_POS;
9003 triple.sign = !!mpd_isnegative(a);