summaryrefslogtreecommitdiff
path: root/pow_si.c
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2007-02-09 13:30:57 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2007-02-09 13:30:57 +0000
commitb41d60dad9d13d33a2031bc34129b514185f15bf (patch)
tree19d34d24f77fd56ab0516c3f9da3518ae252ceba /pow_si.c
parent134d0b0997a0cabbca9742d8593eddbeaef5fda1 (diff)
downloadmpfr-b41d60dad9d13d33a2031bc34129b514185f15bf.tar.gz
pow_si.c: another comment about the overflow detection.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@4355 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'pow_si.c')
-rw-r--r--pow_si.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/pow_si.c b/pow_si.c
index 84a73ff55..87a8bc7cc 100644
--- a/pow_si.c
+++ b/pow_si.c
@@ -112,6 +112,11 @@ mpfr_pow_si (mpfr_ptr y, mpfr_srcptr x, long int n, mp_rnd_t rnd)
* overflow since 0 > expx >= (__gmpfr_emax - 1) / n and
* 0 < n * expx <= n * ((__gmpfr_emax - 1) / n)
* <= __gmpfr_emax - 1.
+ * Note: one could use expx bounds based on MPFR_EXP_MIN and
+ * MPFR_EXP_MAX instead of __gmpfr_emin and __gmpfr_emax. The
+ * current bounds do not lead to noticeably slower code and
+ * allow us to avoid a bug in Sun's compiler for Solaris/x86
+ * (when optimizations are enabled).
*/
expy =
n != -1 && expx > 0 && expx > (__gmpfr_emin - 1) / n ?