summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--asin.c5
-rw-r--r--atan.c5
2 files changed, 4 insertions, 6 deletions
diff --git a/asin.c b/asin.c
index 88208e7bf..2165e4d1b 100644
--- a/asin.c
+++ b/asin.c
@@ -19,7 +19,6 @@ along with the MPFR Library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
MA 02111-1307, USA. */
-
#include "mpfr-impl.h"
int
@@ -63,14 +62,14 @@ mpfr_asin (mpfr_ptr asin, mpfr_srcptr x, mp_rnd_t rnd_mode)
compared = mpfr_cmp_ui (xp, 1);
- if (compared > 0) /* asin(x) = NaN for |x| > 1 */
+ if (MPFR_UNLIKELY(compared > 0)) /* asin(x) = NaN for |x| > 1 */
{
MPFR_SET_NAN(asin);
mpfr_clear (xp);
MPFR_RET_NAN;
}
- if (compared == 0) /* x = 1 or x = -1 */
+ if (MPFR_UNLIKELY(compared == 0)) /* x = 1 or x = -1 */
{
if (MPFR_IS_POS_SIGN(sign)) /* asin(+1) = Pi/2 */
inexact = mpfr_const_pi (asin, rnd_mode);
diff --git a/atan.c b/atan.c
index ecb2bdf71..62e3c98c8 100644
--- a/atan.c
+++ b/atan.c
@@ -19,7 +19,6 @@ along with the MPFR Library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
MA 02111-1307, USA. */
-
#include "mpfr-impl.h"
#define CST 2.27 /* CST=1+ln(2.4)/ln(2) */
@@ -123,7 +122,7 @@ mpfr_atan (mpfr_ptr arctangent, mpfr_srcptr x, mp_rnd_t rnd_mode)
/* Other simple case arctang(-+1)=-+pi/4 */
comparaison = mpfr_cmp_ui (xp, 1);
- if (comparaison == 0)
+ if (MPFR_UNLIKELY(comparaison == 0))
{
inexact = mpfr_const_pi (arctangent, MPFR_IS_POS_SIGN(sign) ? rnd_mode
: MPFR_INVERT_RND(rnd_mode));
@@ -145,7 +144,7 @@ mpfr_atan (mpfr_ptr arctangent, mpfr_srcptr x, mp_rnd_t rnd_mode)
mpfr_save_emin_emax ();
prec_x = __gmpfr_ceil_log2 ((double) MPFR_PREC(x) / BITS_PER_MP_LIMB);
- logn = __gmpfr_ceil_log2 ((double) prec_x);
+ logn = __gmpfr_ceil_log2 ((double) prec_x);
if (logn < 2)
logn = 2;
realprec = prec_arctan + __gmpfr_ceil_log2((double) prec_arctan) + 4;