summaryrefslogtreecommitdiff
path: root/mpz/root.c
diff options
context:
space:
mode:
authorMarco Bodrato <bodrato@mail.dm.unipi.it>2012-05-23 23:21:13 +0200
committerMarco Bodrato <bodrato@mail.dm.unipi.it>2012-05-23 23:21:13 +0200
commitae7cbcdb411f86c4e11e4c3da21a4968b97f2858 (patch)
treee34aba63c1746bf8e84c46f43ba3f16fc5f0cb5e /mpz/root.c
parent9a031234bde3abdee5de779604feab6e30abb0fb (diff)
downloadgmp-ae7cbcdb411f86c4e11e4c3da21a4968b97f2858.tar.gz
Mark failing branches with UNLIKELY.
Diffstat (limited to 'mpz/root.c')
-rw-r--r--mpz/root.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mpz/root.c b/mpz/root.c
index ece0a997b..3751a170a 100644
--- a/mpz/root.c
+++ b/mpz/root.c
@@ -32,12 +32,12 @@ mpz_root (mpz_ptr root, mpz_srcptr u, unsigned long int nth)
us = SIZ(u);
/* even roots of negatives provoke an exception */
- if (us < 0 && (nth & 1) == 0)
+ if (UNLIKELY (us < 0 && (nth & 1) == 0))
SQRT_OF_NEGATIVE;
/* root extraction interpreted as c^(1/nth) means a zeroth root should
provoke a divide by zero, do this even if c==0 */
- if (nth == 0)
+ if (UNLIKELY (nth == 0))
DIVIDE_BY_ZERO;
if (us == 0)