The GNU MP Library is free software; you can redistribute it and/or modify it under the terms of either:
* the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
or
* the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
or both in parallel, as here.
The GNU MP Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received copies of the GNU General Public License and the GNU Lesser General Public License along with the GNU MP Library. If not,
see https://www.gnu.org/licenses/. */
/* need canonical signs to get right result */
ASSERT (den1_size > 0);
ASSERT (den2_size > 0);
if (num1_size == 0) return -num2_size; if (num2_size == 0) return num1_size; if ((num1_size ^ num2_size) < 0) /* I.e. are the signs different? */ return num1_size;
/* 1. Check to see if we can tell which operand is larger by just looking at
the number of limbs. */
/* NUM1 x DEN2 is either TMP1_SIZE limbs or TMP1_SIZE-1 limbs.
Same for NUM1 x DEN1 with respect to TMP2_SIZE. */ if (tmp1_size > tmp2_size + 1) /* NUM1 x DEN2 is surely larger in magnitude than NUM2 x DEN1. */ return num1_sign; if (tmp2_size + op2_is_int > tmp1_size + 1) /* NUM1 x DEN2 is surely smaller in magnitude than NUM2 x DEN1. */ return -num1_sign;
/* 2. Same, but compare the number of significant bits. */
{ int cnt1, cnt2;
mp_bitcnt_t bits1, bits2;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.