diff --git a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/DPQ.java b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/DPQ.java
index 24e3dfb71a5fcc398c73a54ba570045501f9ae2b..35a19b7a93b62001827c828b49d9b444d85f9d3c 100644
--- a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/DPQ.java
+++ b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/DPQ.java
@@ -43,7 +43,7 @@ public final class DPQ {
     // R >= 3.1.0: # define R_nonint(x) (fabs((x) - R_forceint(x)) > 1e-7)
     // Note: if true should be followed by "return d0(logP)", consider using nointCheck instead
     public static boolean nonint(double x) {
-        return Math.abs(x - Math.round(x)) > 1e-7 * Math.max(1., Math.abs(x));
+        return Math.abs(x - RMath.forceint(x)) > 1e-7 * Math.max(1., Math.abs(x));
     }
 
     // R_D__0
@@ -156,7 +156,7 @@ public final class DPQ {
     // R_P_bounds_Inf_01
     public static void rpboundsinf01(double x, boolean lowerTail, boolean logP) throws EarlyReturn {
         if (!Double.isFinite(x)) {
-            throw new EarlyReturn(x > 0 ? rdt0(lowerTail, logP) : rdt0(lowerTail, logP));
+            throw new EarlyReturn(x > 0 ? rdt1(lowerTail, logP) : rdt0(lowerTail, logP));
         }
     }
 
diff --git a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/DPois.java b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/DPois.java
index b01d2a4d75603a4b862849e498ef24a41ce0e167..c60b2f0bd5a45c0635872a019a956b6b54763e2e 100644
--- a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/DPois.java
+++ b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/DPois.java
@@ -13,7 +13,7 @@
 package com.oracle.truffle.r.library.stats;
 
 import static com.oracle.truffle.r.library.stats.GammaFunctions.dpoisRaw;
-import static com.oracle.truffle.r.library.stats.MathConstants.forceint;
+import static com.oracle.truffle.r.library.stats.RMath.forceint;
 
 import com.oracle.truffle.r.library.stats.DPQ.EarlyReturn;
 import com.oracle.truffle.r.library.stats.StatsFunctions.Function2_1;
diff --git a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/Dbinom.java b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/Dbinom.java
index 509f543c81aeb163e1eb86ccf6725ea40a88f95d..0486d311a7cce855fd617c28224dae4a39454e27 100644
--- a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/Dbinom.java
+++ b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/Dbinom.java
@@ -88,6 +88,6 @@ public final class Dbinom implements StatsFunctions.Function3_1 {
             return DPQ.rd0(giveLog);
         }
 
-        return dbinomRaw(MathConstants.forceint(x), MathConstants.forceint(n), p, 1 - p, giveLog);
+        return dbinomRaw(RMath.forceint(x), RMath.forceint(n), p, 1 - p, giveLog);
     }
 }
diff --git a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/Geom.java b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/Geom.java
index 05443e198bffdfd8b79857b67b4ffbd56d6c5949..29390fe21162fdb557584439c284c88402a1f74c 100644
--- a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/Geom.java
+++ b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/Geom.java
@@ -27,7 +27,7 @@
  */
 package com.oracle.truffle.r.library.stats;
 
-import static com.oracle.truffle.r.library.stats.MathConstants.forceint;
+import static com.oracle.truffle.r.library.stats.RMath.forceint;
 
 import com.oracle.truffle.r.library.stats.DPQ.EarlyReturn;
 import com.oracle.truffle.r.library.stats.RandGenerationFunctions.RandFunction1_Double;
diff --git a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/Logis.java b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/Logis.java
new file mode 100644
index 0000000000000000000000000000000000000000..45328c469331798c9b31b771a18ccb2fa49c477d
--- /dev/null
+++ b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/Logis.java
@@ -0,0 +1,137 @@
+/*
+ * This material is distributed under the GNU General Public License
+ * Version 2. You may review the terms of this license at
+ * http://www.gnu.org/licenses/gpl-2.0.html
+ *
+ * Copyright (C) 1998 Ross Ihaka
+ * Copyright (c) 1998--2008, The R Core Team
+ * Copyright (c) 2016, 2016, Oracle and/or its affiliates
+ *
+ * All rights reserved.
+ */
+/*
+ *  Copyright (C) 1995, 1996    Robert Gentleman and Ross Ihaka
+ *  Copyright (C) 2000          The R Core Team
+ */
+package com.oracle.truffle.r.library.stats;
+
+import com.oracle.truffle.r.library.stats.DPQ.EarlyReturn;
+import com.oracle.truffle.r.library.stats.RandGenerationFunctions.RandFunction2_Double;
+import com.oracle.truffle.r.library.stats.RandGenerationFunctions.RandomNumberProvider;
+import com.oracle.truffle.r.library.stats.StatsFunctions.Function3_1;
+import com.oracle.truffle.r.library.stats.StatsFunctions.Function3_2;
+
+public final class Logis {
+    private Logis() {
+        // only static members
+    }
+
+    public static final class DLogis implements Function3_1 {
+        @Override
+        public double evaluate(double x, double location, double scale, boolean giveLog) {
+            if (Double.isNaN(x) || Double.isNaN(location) || Double.isNaN(scale)) {
+                return x + location + scale;
+            }
+            if (scale <= 0.0) {
+                return RMath.mlError();
+            }
+
+            x = TOMS708.fabs((x - location) / scale);
+            double e = Math.exp(-x);
+            double f = 1.0 + e;
+            return giveLog ? -(x + Math.log(scale * f * f)) : e / (scale * f * f);
+        }
+    }
+
+    public static final class QLogis implements Function3_2 {
+        @Override
+        public double evaluate(double p, double location, double scale, boolean lowerTail, boolean logP) {
+            if (Double.isNaN(p) || Double.isNaN(location) || Double.isNaN(scale)) {
+                return p + location + scale;
+            }
+
+            try {
+                DPQ.rqp01boundaries(p, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, lowerTail, logP);
+            } catch (EarlyReturn e) {
+                return e.result;
+            }
+
+            if (scale < 0.) {
+                return RMath.mlError();
+            }
+            if (scale == 0.) {
+                return location;
+            }
+
+            /* p := logit(p) = Math.log( p / (1-p) ) : */
+            if (logP) {
+                if (lowerTail) {
+                    p = p - DPQ.rlog1exp(p);
+                } else {
+                    p = DPQ.rlog1exp(p) - p;
+                }
+            } else {
+                p = Math.log(lowerTail ? (p / (1. - p)) : ((1. - p) / p));
+            }
+
+            return location + scale * p;
+        }
+    }
+
+    public static final class PLogis implements Function3_2 {
+        @Override
+        public double evaluate(double x, double location, double scale, boolean lowerTail, boolean logP) {
+            if (Double.isNaN(x) || Double.isNaN(location) || Double.isNaN(scale)) {
+                return x + location + scale;
+            }
+            if (scale <= 0.0) {
+                return RMath.mlError();
+            }
+
+            x = (x - location) / scale;
+            if (Double.isNaN(x)) {
+                return RMath.mlError();
+            }
+
+            try {
+                DPQ.rpboundsinf01(x, lowerTail, logP);
+            } catch (EarlyReturn earlyReturn) {
+                return earlyReturn.result;
+            }
+
+            if (logP) {
+                // Math.log(1 / (1 + Math.exp( +- x ))) = -Math.log(1 + Math.exp( +- x))
+                return -log1pexp(lowerTail ? -x : x);
+            } else {
+                return 1 / (1 + Math.exp(lowerTail ? -x : x));
+            }
+        }
+
+        private static double log1pexp(double x) {
+            if (x <= 18.) {
+                return RMath.log1p(Math.exp(x));
+            }
+            if (x > 33.3) {
+                return x;
+            }
+            // else: 18.0 < x <= 33.3 :
+            return x + Math.exp(-x);
+        }
+    }
+
+    public static final class RLogis extends RandFunction2_Double {
+        @Override
+        public double execute(double location, double scale, RandomNumberProvider rand) {
+            if (Double.isNaN(location) || !Double.isFinite(scale)) {
+                return RMath.mlError();
+            }
+
+            if (scale == 0. || !Double.isFinite(location)) {
+                return location;
+            } else {
+                double u = rand.unifRand();
+                return location + scale * Math.log(u / (1. - u));
+            }
+        }
+    }
+}
diff --git a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/MathConstants.java b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/MathConstants.java
index 0885fbeecf503bb056f1c289b3c2096f5ef3e5a3..61bc036c42e836445108ea3208bfecf9089332f2 100644
--- a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/MathConstants.java
+++ b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/MathConstants.java
@@ -97,11 +97,4 @@ public final class MathConstants {
     public static double logspaceAdd(double logx, double logy) {
         return Math.max(logx, logy) + Math.log1p(Math.exp(-Math.abs(logx - logy)));
     }
-
-    // R_forceint
-    public static double forceint(double x) {
-        // Note: in GnuR this is alias for nearbyint, which may not behave exactly like Math.round,
-        // especially Math.round(-0.5) == 0.0, instead of -0.0, does it matter a lot?
-        return Double.isFinite(x) ? Math.round(x) : x;
-    }
 }
diff --git a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/Pbinom.java b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/Pbinom.java
index 70fcce282db80d30395effba2881a35c155aafcb..e61ab3cb1f1be4c0c18a91c878191db9aebc6382 100644
--- a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/Pbinom.java
+++ b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/Pbinom.java
@@ -34,9 +34,9 @@ public final class Pbinom implements StatsFunctions.Function3_2 {
         if (DPQ.nonint(size)) {
             nanProfile.enter();
             DPQ.nointCheckWarning(size, "n");
-            return DPQ.rd0(logP);
+            return RMath.mlError();
         }
-        size = Math.round(size);
+        size = RMath.forceint(size);
         /* PR#8560: n=0 is a valid value */
         if (size < 0 || prob < 0 || prob > 1) {
             nanProfile.enter();
diff --git a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/QHyper.java b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/QHyper.java
index 9a54383f82decd95101bb995de5f6fe776e444f4..e0641de73b8281b181aae6490a781256c1a96b47 100644
--- a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/QHyper.java
+++ b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/QHyper.java
@@ -12,9 +12,9 @@
 package com.oracle.truffle.r.library.stats;
 
 import static com.oracle.truffle.r.library.stats.MathConstants.DBL_EPSILON;
-import static com.oracle.truffle.r.library.stats.MathConstants.forceint;
 import static com.oracle.truffle.r.library.stats.RMath.fmax2;
 import static com.oracle.truffle.r.library.stats.RMath.fmin2;
+import static com.oracle.truffle.r.library.stats.RMath.forceint;
 import static com.oracle.truffle.r.library.stats.RMath.lfastchoose;
 
 import com.oracle.truffle.r.library.stats.DPQ.EarlyReturn;
diff --git a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/RHyper.java b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/RHyper.java
index 4cd77bcd0f57d21cd29bf67ae35f76dffd84e88a..197316d6df83b9e9bd01f6287742e33a742ad5cd 100644
--- a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/RHyper.java
+++ b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/RHyper.java
@@ -13,7 +13,7 @@
 package com.oracle.truffle.r.library.stats;
 
 import static com.oracle.truffle.r.library.stats.MathConstants.M_LN_SQRT_2PI;
-import static com.oracle.truffle.r.library.stats.MathConstants.forceint;
+import static com.oracle.truffle.r.library.stats.RMath.forceint;
 
 import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
 import com.oracle.truffle.r.library.stats.RandGenerationFunctions.RandFunction3_Double;
diff --git a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/RLogis.java b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/RLogis.java
deleted file mode 100644
index f21be8e24cffbacfc8038804da8c2027be0cbf4a..0000000000000000000000000000000000000000
--- a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/RLogis.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * This material is distributed under the GNU General Public License
- * Version 2. You may review the terms of this license at
- * http://www.gnu.org/licenses/gpl-2.0.html
- *
- * Copyright (C) 1998 Ross Ihaka
- * Copyright (c) 1998--2008, The R Core Team
- * Copyright (c) 2016, 2016, Oracle and/or its affiliates
- *
- * All rights reserved.
- */
-package com.oracle.truffle.r.library.stats;
-
-import com.oracle.truffle.r.library.stats.RandGenerationFunctions.RandFunction2_Double;
-import com.oracle.truffle.r.library.stats.RandGenerationFunctions.RandomNumberProvider;
-
-public final class RLogis extends RandFunction2_Double {
-    @Override
-    public double execute(double location, double scale, RandomNumberProvider rand) {
-        if (Double.isNaN(location) || !Double.isFinite(scale)) {
-            return RMath.mlError();
-        }
-
-        if (scale == 0. || !Double.isFinite(location)) {
-            return location;
-        } else {
-            double u = rand.unifRand();
-            return location + scale * Math.log(u / (1. - u));
-        }
-    }
-}
diff --git a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/RMath.java b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/RMath.java
index 02c61643311c94b45c6edeba1b1555115af402b4..49fc18d2d6df471eb0afffc46633af0776b25037 100644
--- a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/RMath.java
+++ b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/RMath.java
@@ -37,6 +37,18 @@ public class RMath {
         return -Math.log(n + 1.) - lbeta(n - k + 1., k + 1.);
     }
 
+    /**
+     * Implementation of {@code R_forceint}, which is not equal to {@code Math.round}, because it
+     * returns {@code double} and so it can handle values that do not fit into long.
+     */
+    public static double forceint(double x) {
+        // Note: in GnuR this is alias for nearbyint
+        if (Double.isNaN(x)) {
+            return 0;
+        }
+        return Math.floor(x + 0.5);
+    }
+
     public static double fsign(double x, double y) {
         if (Double.isNaN(x) || Double.isNaN(y)) {
             return x + y;
diff --git a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/Rbinom.java b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/Rbinom.java
index edd2864e79a007ee03e027004f64e8298c44f509..37964392e6762bbac3cebd294e474e15b73c57cc 100644
--- a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/Rbinom.java
+++ b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/Rbinom.java
@@ -30,7 +30,7 @@ public final class Rbinom extends RandFunction2_Double {
         if (!Double.isFinite(nin)) {
             return RRuntime.INT_NA;
         }
-        double r = MathConstants.forceint(nin);
+        double r = RMath.forceint(nin);
         if (r != nin) {
             return RRuntime.INT_NA;
         }
diff --git a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/Signrank.java b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/Signrank.java
index 9a976a351a50fa1ce7b5e8c1a92374859afa329a..f13e125ea9afa203be520a6b20d3622e74612d13 100644
--- a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/Signrank.java
+++ b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/Signrank.java
@@ -11,7 +11,7 @@
 
 package com.oracle.truffle.r.library.stats;
 
-import static com.oracle.truffle.r.library.stats.MathConstants.forceint;
+import static com.oracle.truffle.r.library.stats.RMath.forceint;
 
 import com.oracle.truffle.r.library.stats.RandGenerationFunctions.RandFunction1_Double;
 import com.oracle.truffle.r.library.stats.RandGenerationFunctions.RandomNumberProvider;
diff --git a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/TOMS708.java b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/TOMS708.java
index 65056493bd7f7358f33beff9b9ef16afa8141c67..b9f92d9cb1fc14b314a0f88d0a71f6468d94292b 100644
--- a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/TOMS708.java
+++ b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/TOMS708.java
@@ -40,7 +40,7 @@ public class TOMS708 {
 
     // R_Log1_Exp
     public static double log1Exp(double x) {
-        return ((x) > -M_LN2 ? log(-rexpm1(x)) : log1p(-exp(x)));
+        return ((x) > -M_LN2 ? log(-rexpm1(x)) : RMath.log1p(-exp(x)));
     }
 
     private static double sin(double v) {
@@ -59,10 +59,6 @@ public class TOMS708 {
         return Math.sqrt(v);
     }
 
-    private static double log1p(double v) {
-        return Math.log1p(v);
-    }
-
     private static double exp(double v) {
         return Math.exp(v);
     }
@@ -357,7 +353,7 @@ public class TOMS708 {
                                         w1 = Double.NEGATIVE_INFINITY; // = 0 on log-scale
                                     }
                                     bgrat.w = w1;
-                                    bgrat.bgrat(b0, a0, y0, x0, 15 * eps, false);
+                                    bgrat.bgrat(b0, a0, y0, x0, 15 * eps, true);
                                     w1 = bgrat.w;
                                     if (bgrat.ierr != 0) {
                                         ierr = 8;
@@ -594,7 +590,7 @@ public class TOMS708 {
             // exp(a*lnx) underflows for large (a * lnx); e.g. large a ==> using log_r := log(r):
             // r = r1 * exp(a * lnx) * exp(bm1 * 0.5 * lnx);
             // log(r)=log(b) + log1p(gam1(b)) + b * log(z) + (a * lnx) + (bm1 * 0.5 * lnx),
-            double logR = Math.log(b) + log1p(gam1(b)) + b * Math.log(z) + nu * lnx;
+            double logR = Math.log(b) + RMath.log1p(gam1(b)) + b * Math.log(z) + nu * lnx;
             // FIXME work with log_u = log(u) also when log_p=FALSE (??)
             // u is 'factored out' from the expansion {and multiplied back, at the end}:
             double logU = logR - (algdiv(b, a) + b * Math.log(nu)); // algdiv(b,a) =
@@ -613,7 +609,7 @@ public class TOMS708 {
             double l = // := *w/u .. but with care: such that it also works when u underflows to 0:
                             logW ? ((w == Double.NEGATIVE_INFINITY) ? 0. : Math.exp(w - logU)) : ((w == 0.) ? 0. : Math.exp(Math.log(w) - logU));
 
-            debugPrintf(" bgrat(a=%f, b=%f, x=%f, *)\n -> u=%f, l='w/u'=%f, ", a, b, x, u, l);
+            debugPrintf(" bgrat(a=%f, b=%f, x=%f, *)\n -> u=%f, l='w/u'=%f, \n", a, b, x, u, l);
 
             double qR = gratR(b, z, logR, eps); // = q/r of former grat1(b,z, r, &p, &q)
             double v = 0.25 / (nu * nu);
@@ -713,7 +709,7 @@ public class TOMS708 {
         } while (fabs(c) > tol);
 
         if (logP) {
-            ans += log1p(a * s);
+            ans += RMath.log1p(a * s);
         } else {
             ans *= a * s + 1.0;
         }
@@ -831,7 +827,7 @@ public class TOMS708 {
 
                     if (logP) {
                         /* FIXME? potential for improving log(t) */
-                        ans = z + log(a0 / a) + log1p(gam1(b0)) - log(t);
+                        ans = z + log(a0 / a) + RMath.log1p(gam1(b0)) - log(t);
                     } else {
                         ans = exp(z) * (a0 / a) * (gam1(b0) + 1.0) / t;
                     }
@@ -871,14 +867,14 @@ public class TOMS708 {
         } while (n < 1e7 && fabs(w) > tol);
         if (fabs(w) > tol) { // the series did not converge (in time)
             // warn only when the result seems to matter:
-            if ((logP && !(a * sum > -1. && fabs(log1p(a * sum)) < eps * fabs(ans))) || (!logP && fabs(a * sum + 1) != 1.)) {
+            if ((logP && !(a * sum > -1. && fabs(RMath.log1p(a * sum)) < eps * fabs(ans))) || (!logP && fabs(a * sum + 1) != 1.)) {
                 emitWarning(" bpser(a=%f, b=%f, x=%f,...) did not converge (n=1e7, |w|/tol=%f > 1; A=%f)", a, b, x, fabs(w) / tol, ans);
             }
         }
         debugPrintf("  -> n=%d iterations, |w|=%f %s %f=tol:=eps/a ==> a*sum=%f\n", (int) n, fabs(w), (fabs(w) > tol) ? ">!!>" : "<=", tol, a * sum);
         if (logP) {
             if (a * sum > -1.0) {
-                ans += log1p(a * sum);
+                ans += RMath.log1p(a * sum);
             } else {
                 ans = ML_NEGINF;
             }
@@ -1115,7 +1111,7 @@ public class TOMS708 {
 
                 double c = (gam1(a) + 1.0) * (gam1(b) + 1.0) / z;
                 /* FIXME? log(a0*c)= log(a0)+ log(c) and that is improvable */
-                return (logP ? eZ + log(a0 * c) - log1p(a0 / b0) : eZ * (a0 * c) / (a0 / b0 + 1.0));
+                return (logP ? eZ + log(a0 * c) - RMath.log1p(a0 / b0) : eZ * (a0 * c) / (a0 / b0 + 1.0));
             }
 
             /* else : ALGORITHM FOR 1 < b0 < 8 */
@@ -1141,7 +1137,7 @@ public class TOMS708 {
                 t = gam1(apb) + 1.0;
             }
 
-            return (logP ? log(a0) + z + log1p(gam1(b0)) - log(t) : a0 * exp(z) * (gam1(b0) + 1.0) / t);
+            return (logP ? log(a0) + z + RMath.log1p(gam1(b0)) - log(t) : a0 * exp(z) * (gam1(b0) + 1.0) / t);
 
         } else {
             /* ----------------------------------------------------------------------- */
@@ -1248,9 +1244,9 @@ public class TOMS708 {
                     z = gam1(apb) + 1.0;
                 }
                 // L50:
-                double c = giveLog ? log1p(gam1(a)) + log1p(gam1(b)) - log(z) : (gam1(a) + 1.0) * (gam1(b) + 1.0) / z;
+                double c = giveLog ? RMath.log1p(gam1(a)) + RMath.log1p(gam1(b)) - log(z) : (gam1(a) + 1.0) * (gam1(b) + 1.0) / z;
                 debugPrintf(" brcmp1(mu,a,b,*): a0 < 1, b0 <= 1;  c=%.15f\n", c);
-                return giveLog ? ans + log(a0) + c - log1p(a0 / b0) : ans * (a0 * c) / (a0 / b0 + 1.0);
+                return giveLog ? ans + log(a0) + c - RMath.log1p(a0 / b0) : ans * (a0 * c) / (a0 / b0 + 1.0);
             }
             // else: algorithm for a0 < 1 < b0 < 8
             // L60:
@@ -1278,7 +1274,7 @@ public class TOMS708 {
             }
             debugPrintf(" brcmp1(mu,a,b,*): a0 < 1 < b0 < 8;  t=%.15f\n", t);
             // L72:
-            return giveLog ? log(a0) + esum(mu, z, true) + log1p(gam1(b0)) - log(t) : a0 * esum(mu, z, false) * (gam1(b0) + 1.0) / t;
+            return giveLog ? log(a0) + esum(mu, z, true) + RMath.log1p(gam1(b0)) - log(t) : a0 * esum(mu, z, false) * (gam1(b0) + 1.0) / t;
 
         } else {
 
@@ -1302,7 +1298,7 @@ public class TOMS708 {
                 y0 = 1.0 / (h + 1.0);
                 lambda = a - (a + b) * x;
             }
-            double lx0 = -log1p(b / a); // in both cases
+            double lx0 = -RMath.log1p(b / a); // in both cases
 
             debugPrintf(" brcmp1(mu,a,b,*): a,b >= 8;  x0=%.15f, lx0=log(x0)=%.15f\n", x0, lx0);
             // L110:
diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/foreign/CallAndExternalFunctions.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/foreign/CallAndExternalFunctions.java
index 2c2f2c79834c75d9fd5ed6fdf84c491fd066a0ee..001e0440002ff3c513dbe4e066a3ec45cfaa76e5 100644
--- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/foreign/CallAndExternalFunctions.java
+++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/foreign/CallAndExternalFunctions.java
@@ -68,6 +68,9 @@ import com.oracle.truffle.r.library.stats.LogNormal;
 import com.oracle.truffle.r.library.stats.LogNormal.DLNorm;
 import com.oracle.truffle.r.library.stats.LogNormal.PLNorm;
 import com.oracle.truffle.r.library.stats.LogNormal.QLNorm;
+import com.oracle.truffle.r.library.stats.Logis;
+import com.oracle.truffle.r.library.stats.Logis.DLogis;
+import com.oracle.truffle.r.library.stats.Logis.RLogis;
 import com.oracle.truffle.r.library.stats.Pbeta;
 import com.oracle.truffle.r.library.stats.Pbinom;
 import com.oracle.truffle.r.library.stats.Pf;
@@ -78,7 +81,6 @@ import com.oracle.truffle.r.library.stats.RBeta;
 import com.oracle.truffle.r.library.stats.RChisq;
 import com.oracle.truffle.r.library.stats.RGamma;
 import com.oracle.truffle.r.library.stats.RHyper;
-import com.oracle.truffle.r.library.stats.RLogis;
 import com.oracle.truffle.r.library.stats.RMultinomNodeGen;
 import com.oracle.truffle.r.library.stats.RNbinomMu;
 import com.oracle.truffle.r.library.stats.RNchisq;
@@ -338,6 +340,12 @@ public class CallAndExternalFunctions {
                     return StatsFunctionsFactory.Function3_2NodeGen.create(new QLNorm());
                 case "plnorm":
                     return StatsFunctionsFactory.Function3_2NodeGen.create(new PLNorm());
+                case "dlogis":
+                    return StatsFunctionsFactory.Function3_1NodeGen.create(new DLogis());
+                case "qlogis":
+                    return StatsFunctionsFactory.Function3_2NodeGen.create(new Logis.QLogis());
+                case "plogis":
+                    return StatsFunctionsFactory.Function3_2NodeGen.create(new Logis.PLogis());
                 case "rmultinom":
                     return RMultinomNodeGen.create();
                 case "Approx":
diff --git a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/ExpectedTestOutput.test b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/ExpectedTestOutput.test
index 4d63a3d7ee0eb570565479b75d249c0fd73c9d94..8191e482278b2673d2ed8c0291d57969c952ca8a 100644
--- a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/ExpectedTestOutput.test
+++ b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/ExpectedTestOutput.test
@@ -115227,6 +115227,69 @@ In dlnorm(c(-1, 0, 1), c(-1, 0, 0.2, 2:5), rep(c(-1, 0, 0.1, 0.9,  :
 #set.seed(1); dlnorm(c(NA, NaN, 1/0, -1/0), 2, 2, log=FALSE)
 [1]  NA NaN   0   0
 
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions31#Output.IgnoreWhitespace#
+#set.seed(1); dlogis(0, c(0.0653, 0.000123, 32e-80, 8833, 79e70), c(0.0653, 0.000123, 32e-80, 8833, 79e70, 0, -1), log=FALSE)
+[1] 3.010902e+00 1.598471e+03 6.144123e+77 2.225879e-05 2.488759e-73
+[6]          NaN          NaN
+Warning message:
+In dlogis(0, c(0.0653, 0.000123, 3.2e-79, 8833, 7.9e+71), c(0.0653,  :
+  NaNs produced
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions31#Output.IgnoreWhitespace#
+#set.seed(1); dlogis(0, c(NA, 0, NaN, 1/0, -1/0), c(NaN, NaN, NA, 0, 1/0, -1/0), log=FALSE)
+[1]  NA NaN  NA NaN NaN  NA
+Warning message:
+In dlogis(0, c(NA, 0, NaN, 1/0, -1/0), c(NaN, NaN, NA, 0, 1/0, -1/0),  :
+  NaNs produced
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions31#Output.IgnoreWhitespace#
+#set.seed(1); dlogis(10, 10, 10, log=TRUE)
+[1] -3.688879
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions31#Output.IgnoreWhitespace#
+#set.seed(1); dlogis(3, 3, 3, log=FALSE)
+[1] 0.08333333
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions31#Output.IgnoreWhitespace#
+#set.seed(1); dlogis(c(-1, 0, 1), c(-1, 0, 0.2, 2:5), rep(c(-1, 0, 0.1, 0.9, 3), 12), log=FALSE)
+ [1]          NaN          NaN 3.352377e-03 3.695414e-02 6.553731e-02
+ [6]          NaN          NaN 4.539581e-04 2.070294e-01 8.008692e-02
+[11]          NaN          NaN 1.928750e-21 4.262447e-03 7.471913e-02
+[16]          NaN          NaN 4.539581e-04 1.274732e-02 5.503034e-02
+[21]          NaN          NaN 2.500000e+00 2.294007e-01 6.553731e-02
+[26]          NaN          NaN 8.756511e-26 2.070294e-01 8.106072e-02
+[31]          NaN          NaN 2.061154e-08 4.262447e-03 4.454324e-02
+[36]          NaN          NaN 1.049936e+00 2.070294e-01 5.503034e-02
+[41]          NaN          NaN 2.500000e+00 2.777778e-01 8.186923e-02
+[46]          NaN          NaN 9.357623e-13 1.410445e-03 8.106072e-02
+[51]          NaN          NaN 2.061154e-08 9.801458e-02 4.454324e-02
+[56]          NaN          NaN 4.539581e-04 2.743765e-01 8.106072e-02
+Warning message:
+In dlogis(c(-1, 0, 1), c(-1, 0, 0.2, 2:5), rep(c(-1, 0, 0.1, 0.9,  :
+  NaNs produced
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions31#Output.IgnoreWhitespace#
+#set.seed(1); dlogis(c(-1, 0, 1), c(-1, 0, 0.2, 2:5), rep(c(-1, 0, 0.1, 0.9, 3), 12), log=TRUE)
+ [1]          NaN          NaN  -5.69808572  -3.29807765  -2.72513566
+ [6]          NaN          NaN  -7.69750570  -1.57489456  -2.52464279
+[11]          NaN          NaN -47.69741491  -5.45791197  -2.59401913
+[16]          NaN          NaN  -7.69750570  -4.36243434  -2.89987067
+[21]          NaN          NaN   0.91629073  -1.47228488  -2.72513566
+[26]          NaN          NaN -57.69741491  -1.57489456  -2.51255677
+[31]          NaN          NaN -17.69741491  -5.45791197  -3.11129493
+[36]          NaN          NaN   0.04872907  -1.57489456  -2.89987067
+[41]          NaN          NaN   0.91629073  -1.28093385  -2.50263200
+[46]          NaN          NaN -27.69741491  -6.56384980  -2.51255677
+[51]          NaN          NaN -17.69741491  -2.32263907  -3.11129493
+[56]          NaN          NaN  -7.69750570  -1.29325421  -2.51255677
+Warning message:
+In dlogis(c(-1, 0, 1), c(-1, 0, 0.2, 2:5), rep(c(-1, 0, 0.1, 0.9,  :
+  NaNs produced
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions31#Output.IgnoreWhitespace#
+#set.seed(1); dlogis(c(NA, NaN, 1/0, -1/0), 2, 2, log=FALSE)
+[1]  NA NaN   0   0
+
 ##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
 #set.seed(1); pbeta(0, 10, 10, lower.tail=FALSE, log.p=FALSE)
 [1] 1
@@ -115398,6 +115461,195 @@ Warning message:
 In pbeta(rep(c(1, 0, 0.1), 5), rep(c(1, 0, 0.1), 5), c(NA, 0, NaN,  :
   NaNs produced
 
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); pbinom(0, 10, 10, lower.tail=FALSE, log.p=FALSE)
+[1] NaN
+Warning message:
+In pbinom(0, 10, 10, lower.tail = FALSE, log.p = FALSE) : NaNs produced
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); pbinom(0, 10, 10, lower.tail=FALSE, log.p=TRUE)
+[1] NaN
+Warning message:
+In pbinom(0, 10, 10, lower.tail = FALSE, log.p = TRUE) : NaNs produced
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); pbinom(0, 10, 10, lower.tail=TRUE, log.p=FALSE)
+[1] NaN
+Warning message:
+In pbinom(0, 10, 10, lower.tail = TRUE, log.p = FALSE) : NaNs produced
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); pbinom(0, 10, 10, lower.tail=TRUE, log.p=TRUE)
+[1] NaN
+Warning message:
+In pbinom(0, 10, 10, lower.tail = TRUE, log.p = TRUE) : NaNs produced
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); pbinom(0, c(0.0653, 0.000123, 32e-80, 8833, 79e70, 0, -1), rep(c(0.0653, 0.000123, 32e-80, 8833, 79e70), 7), lower.tail=FALSE, log.p=FALSE)
+ [1]          NaN          NaN 0.000000e+00          NaN          NaN
+ [6] 0.000000e+00          NaN          NaN          NaN          NaN
+[11] 1.000000e+00 1.000000e+00 0.000000e+00          NaN          NaN
+[16]          NaN 0.000000e+00 2.826560e-75          NaN          NaN
+[21]          NaN          NaN          NaN          NaN          NaN
+[26] 1.000000e+00 0.000000e+00          NaN          NaN          NaN
+[31] 0.000000e+00 6.626134e-01 2.528000e-07          NaN          NaN
+There were 11 warnings (use warnings() to see them)
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); pbinom(0, c(0.0653, 0.000123, 32e-80, 8833, 79e70, 0, -1), rep(c(0.0653, 0.000123, 32e-80, 8833, 79e70), 7), lower.tail=FALSE, log.p=TRUE)
+ [1]            NaN            NaN           -Inf            NaN            NaN
+ [6]           -Inf            NaN            NaN            NaN            NaN
+[11] -8.869919e-260   0.000000e+00           -Inf            NaN            NaN
+[16]            NaN           -Inf  -1.716548e+02            NaN            NaN
+[21]            NaN            NaN            NaN            NaN            NaN
+[26]   0.000000e+00           -Inf            NaN            NaN            NaN
+[31]           -Inf  -4.115636e-01  -1.519067e+01            NaN            NaN
+There were 11 warnings (use warnings() to see them)
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); pbinom(0, c(0.0653, 0.000123, 32e-80, 8833, 79e70, 0, -1), rep(c(0.0653, 0.000123, 32e-80, 8833, 79e70), 7), lower.tail=TRUE, log.p=FALSE)
+ [1]           NaN           NaN  1.000000e+00           NaN           NaN
+ [6]  1.000000e+00           NaN           NaN           NaN           NaN
+[11] 8.869919e-260  0.000000e+00  1.000000e+00           NaN           NaN
+[16]           NaN  1.000000e+00  1.000000e+00           NaN           NaN
+[21]           NaN           NaN           NaN           NaN           NaN
+[26]  0.000000e+00  1.000000e+00           NaN           NaN           NaN
+[31]  1.000000e+00  3.373866e-01  9.999997e-01           NaN           NaN
+There were 11 warnings (use warnings() to see them)
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); pbinom(0, c(0.0653, 0.000123, 32e-80, 8833, 79e70, 0, -1), rep(c(0.0653, 0.000123, 32e-80, 8833, 79e70), 7), lower.tail=TRUE, log.p=TRUE)
+ [1]           NaN           NaN  0.000000e+00           NaN           NaN
+ [6]  0.000000e+00           NaN           NaN           NaN           NaN
+[11] -5.964895e+02 -9.717598e+67  0.000000e+00           NaN           NaN
+[16]           NaN  0.000000e+00 -2.826560e-75           NaN           NaN
+[21]           NaN           NaN           NaN           NaN           NaN
+[26] -5.334843e+70  0.000000e+00           NaN           NaN           NaN
+[31]  0.000000e+00 -1.086526e+00 -2.528000e-07           NaN           NaN
+There were 11 warnings (use warnings() to see them)
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); pbinom(c(-1, 0, 0.2, 2), c(-1, 0, 0.1, 0.9, 3), rep(c(-1, 0, 1, 0.1, -0.1, 0.0001), 20), lower.tail=FALSE, log.p=FALSE)
+  [1]        NaN 0.0000e+00        NaN        NaN        NaN        NaN
+  [7]        NaN        NaN        NaN 2.7100e-01        NaN 0.0000e+00
+ [13]        NaN        NaN 1.0000e+00        NaN        NaN        NaN
+ [19]        NaN 0.0000e+00        NaN 0.0000e+00        NaN        NaN
+ [25]        NaN        NaN 0.0000e+00        NaN        NaN 2.9997e-04
+ [31]        NaN 0.0000e+00        NaN        NaN        NaN        NaN
+ [37]        NaN        NaN        NaN 1.0000e-03        NaN 0.0000e+00
+ [43]        NaN        NaN 1.0000e+00        NaN        NaN        NaN
+ [49]        NaN 0.0000e+00        NaN 0.0000e+00        NaN        NaN
+ [55]        NaN        NaN 1.0000e+00        NaN        NaN 1.0000e-12
+ [61]        NaN 0.0000e+00        NaN        NaN        NaN        NaN
+ [67]        NaN        NaN        NaN 2.7100e-01        NaN 0.0000e+00
+ [73]        NaN        NaN 1.0000e+00        NaN        NaN        NaN
+ [79]        NaN 0.0000e+00        NaN 0.0000e+00        NaN        NaN
+ [85]        NaN        NaN 0.0000e+00        NaN        NaN 2.9997e-04
+ [91]        NaN 0.0000e+00        NaN        NaN        NaN        NaN
+ [97]        NaN        NaN        NaN 1.0000e-03        NaN 0.0000e+00
+[103]        NaN        NaN 1.0000e+00        NaN        NaN        NaN
+[109]        NaN 0.0000e+00        NaN 0.0000e+00        NaN        NaN
+[115]        NaN        NaN 1.0000e+00        NaN        NaN 1.0000e-12
+There were 49 warnings (use warnings() to see them)
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); pbinom(c(-1, 0, 0.2, 2), c(-1, 0, 0.1, 0.9, 3), rep(c(-1, 0, 1, 0.1, -0.1, 0.0001), 20), lower.tail=FALSE, log.p=TRUE)
+  [1]        NaN       -Inf        NaN        NaN        NaN        NaN
+  [7]        NaN        NaN        NaN  -1.305636        NaN       -Inf
+ [13]        NaN        NaN   0.000000        NaN        NaN        NaN
+ [19]        NaN       -Inf        NaN       -Inf        NaN        NaN
+ [25]        NaN        NaN       -Inf        NaN        NaN  -8.111828
+ [31]        NaN       -Inf        NaN        NaN        NaN        NaN
+ [37]        NaN        NaN        NaN  -6.907755        NaN       -Inf
+ [43]        NaN        NaN   0.000000        NaN        NaN        NaN
+ [49]        NaN       -Inf        NaN       -Inf        NaN        NaN
+ [55]        NaN        NaN   0.000000        NaN        NaN -27.631021
+ [61]        NaN       -Inf        NaN        NaN        NaN        NaN
+ [67]        NaN        NaN        NaN  -1.305636        NaN       -Inf
+ [73]        NaN        NaN   0.000000        NaN        NaN        NaN
+ [79]        NaN       -Inf        NaN       -Inf        NaN        NaN
+ [85]        NaN        NaN       -Inf        NaN        NaN  -8.111828
+ [91]        NaN       -Inf        NaN        NaN        NaN        NaN
+ [97]        NaN        NaN        NaN  -6.907755        NaN       -Inf
+[103]        NaN        NaN   0.000000        NaN        NaN        NaN
+[109]        NaN       -Inf        NaN       -Inf        NaN        NaN
+[115]        NaN        NaN   0.000000        NaN        NaN -27.631021
+There were 49 warnings (use warnings() to see them)
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); pbinom(c(-1, 0, 0.2, 2), c(-1, 0, 0.1, 0.9, 3), rep(c(-1, 0, 1, 0.1, -0.1, 0.0001), 20), lower.tail=TRUE, log.p=FALSE)
+  [1]    NaN 1.0000    NaN    NaN    NaN    NaN    NaN    NaN    NaN 0.7290
+ [11]    NaN 1.0000    NaN    NaN 0.0000    NaN    NaN    NaN    NaN 1.0000
+ [21]    NaN 1.0000    NaN    NaN    NaN    NaN 1.0000    NaN    NaN 0.9997
+ [31]    NaN 1.0000    NaN    NaN    NaN    NaN    NaN    NaN    NaN 0.9990
+ [41]    NaN 1.0000    NaN    NaN 0.0000    NaN    NaN    NaN    NaN 1.0000
+ [51]    NaN 1.0000    NaN    NaN    NaN    NaN 0.0000    NaN    NaN 1.0000
+ [61]    NaN 1.0000    NaN    NaN    NaN    NaN    NaN    NaN    NaN 0.7290
+ [71]    NaN 1.0000    NaN    NaN 0.0000    NaN    NaN    NaN    NaN 1.0000
+ [81]    NaN 1.0000    NaN    NaN    NaN    NaN 1.0000    NaN    NaN 0.9997
+ [91]    NaN 1.0000    NaN    NaN    NaN    NaN    NaN    NaN    NaN 0.9990
+[101]    NaN 1.0000    NaN    NaN 0.0000    NaN    NaN    NaN    NaN 1.0000
+[111]    NaN 1.0000    NaN    NaN    NaN    NaN 0.0000    NaN    NaN 1.0000
+There were 49 warnings (use warnings() to see them)
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); pbinom(c(-1, 0, 0.2, 2), c(-1, 0, 0.1, 0.9, 3), rep(c(-1, 0, 1, 0.1, -0.1, 0.0001), 20), lower.tail=TRUE, log.p=TRUE)
+  [1]           NaN  0.000000e+00           NaN           NaN           NaN
+  [6]           NaN           NaN           NaN           NaN -3.160815e-01
+ [11]           NaN  0.000000e+00           NaN           NaN          -Inf
+ [16]           NaN           NaN           NaN           NaN  0.000000e+00
+ [21]           NaN  0.000000e+00           NaN           NaN           NaN
+ [26]           NaN  0.000000e+00           NaN           NaN -3.000150e-04
+ [31]           NaN  0.000000e+00           NaN           NaN           NaN
+ [36]           NaN           NaN           NaN           NaN -1.000500e-03
+ [41]           NaN  0.000000e+00           NaN           NaN          -Inf
+ [46]           NaN           NaN           NaN           NaN  0.000000e+00
+ [51]           NaN  0.000000e+00           NaN           NaN           NaN
+ [56]           NaN          -Inf           NaN           NaN -1.000000e-12
+ [61]           NaN  0.000000e+00           NaN           NaN           NaN
+ [66]           NaN           NaN           NaN           NaN -3.160815e-01
+ [71]           NaN  0.000000e+00           NaN           NaN          -Inf
+ [76]           NaN           NaN           NaN           NaN  0.000000e+00
+ [81]           NaN  0.000000e+00           NaN           NaN           NaN
+ [86]           NaN  0.000000e+00           NaN           NaN -3.000150e-04
+ [91]           NaN  0.000000e+00           NaN           NaN           NaN
+ [96]           NaN           NaN           NaN           NaN -1.000500e-03
+[101]           NaN  0.000000e+00           NaN           NaN          -Inf
+[106]           NaN           NaN           NaN           NaN  0.000000e+00
+[111]           NaN  0.000000e+00           NaN           NaN           NaN
+[116]           NaN          -Inf           NaN           NaN -1.000000e-12
+There were 49 warnings (use warnings() to see them)
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWarningContext#
+#set.seed(1); pbinom(c(NA, 0, NaN, 1/0, -1/0), rep(c(1, 0, 0.1), 5), rep(c(1, 0, 0.1), 5))
+ [1]  NA   1 NaN   1   0  NA   0 NaN NaN   0  NA NaN NaN   1 NaN
+Warning messages:
+1: In pbinom(c(NA, 0, NaN, 1/0, -1/0), rep(c(1, 0, 0.1), 5), rep(c(1,  :
+  non-integer n = 0.100000
+2: In pbinom(c(NA, 0, NaN, 1/0, -1/0), rep(c(1, 0, 0.1), 5), rep(c(1,  :
+  non-integer n = 0.100000
+3: In pbinom(c(NA, 0, NaN, 1/0, -1/0), rep(c(1, 0, 0.1), 5), rep(c(1,  :
+  non-integer n = 0.100000
+4: In pbinom(c(NA, 0, NaN, 1/0, -1/0), rep(c(1, 0, 0.1), 5), rep(c(1,  :
+  NaNs produced
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWarningContext#
+#set.seed(1); pbinom(rep(c(1, 0, 0.1), 5), c(NA, 0, NaN, 1/0, -1/0), rep(c(1, 0, 0.1), 5))
+ [1]  NA   1 NaN NaN NaN  NA   1 NaN NaN NaN  NA   1 NaN NaN NaN
+Warning message:
+In pbinom(rep(c(1, 0, 0.1), 5), c(NA, 0, NaN, 1/0, -1/0), rep(c(1,  :
+  NaNs produced
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); pbinom(rep(c(1, 0, 0.1), 5), rep(c(1, 0, 0.1), 5), c(NA, 0, NaN, 1/0, -1/0))
+ [1]  NA   1 NaN NaN NaN  NA   1 NaN NaN NaN  NA NaN NaN NaN NaN
+Warning messages:
+1: In pbinom(rep(c(1, 0, 0.1), 5), rep(c(1, 0, 0.1), 5), c(NA, 0, NaN,  :
+  non-integer n = 0.100000
+2: In pbinom(rep(c(1, 0, 0.1), 5), rep(c(1, 0, 0.1), 5), c(NA, 0, NaN,  :
+  NaNs produced
+
 ##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
 #set.seed(1); pcauchy(0, 10, 10, lower.tail=FALSE, log.p=FALSE)
 [1] 0.75
@@ -115595,6 +115847,190 @@ Warning message:
 In pcauchy(rep(c(1, 0, 0.1), 5), rep(c(1, 0, 0.1), 5), c(NA, 0,  :
   NaNs produced
 
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); pf(0, 10, 10, lower.tail=FALSE, log.p=FALSE)
+[1] 1
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); pf(0, 10, 10, lower.tail=FALSE, log.p=TRUE)
+[1] 0
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); pf(0, 10, 10, lower.tail=TRUE, log.p=FALSE)
+[1] 0
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); pf(0, 10, 10, lower.tail=TRUE, log.p=TRUE)
+[1] -Inf
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); pf(0, c(0.0653, 0.000123, 32e-80, 8833, 79e70, 0, -1), rep(c(0.0653, 0.000123, 32e-80, 8833, 79e70), 7), lower.tail=FALSE, log.p=FALSE)
+ [1]   1   1   1   1   1 NaN NaN   1   1   1   1   1 NaN NaN   1   1   1   1   1
+[20] NaN NaN   1   1   1   1   1 NaN NaN   1   1   1   1   1 NaN NaN
+Warning message:
+In pf(0, c(0.0653, 0.000123, 3.2e-79, 8833, 7.9e+71, 0, -1), rep(c(0.0653,  :
+  NaNs produced
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); pf(0, c(0.0653, 0.000123, 32e-80, 8833, 79e70, 0, -1), rep(c(0.0653, 0.000123, 32e-80, 8833, 79e70), 7), lower.tail=FALSE, log.p=TRUE)
+ [1]   0   0   0   0   0 NaN NaN   0   0   0   0   0 NaN NaN   0   0   0   0   0
+[20] NaN NaN   0   0   0   0   0 NaN NaN   0   0   0   0   0 NaN NaN
+Warning message:
+In pf(0, c(0.0653, 0.000123, 3.2e-79, 8833, 7.9e+71, 0, -1), rep(c(0.0653,  :
+  NaNs produced
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); pf(0, c(0.0653, 0.000123, 32e-80, 8833, 79e70, 0, -1), rep(c(0.0653, 0.000123, 32e-80, 8833, 79e70), 7), lower.tail=TRUE, log.p=FALSE)
+ [1]   0   0   0   0   0 NaN NaN   0   0   0   0   0 NaN NaN   0   0   0   0   0
+[20] NaN NaN   0   0   0   0   0 NaN NaN   0   0   0   0   0 NaN NaN
+Warning message:
+In pf(0, c(0.0653, 0.000123, 3.2e-79, 8833, 7.9e+71, 0, -1), rep(c(0.0653,  :
+  NaNs produced
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); pf(0, c(0.0653, 0.000123, 32e-80, 8833, 79e70, 0, -1), rep(c(0.0653, 0.000123, 32e-80, 8833, 79e70), 7), lower.tail=TRUE, log.p=TRUE)
+ [1] -Inf -Inf -Inf -Inf -Inf  NaN  NaN -Inf -Inf -Inf -Inf -Inf  NaN  NaN -Inf
+[16] -Inf -Inf -Inf -Inf  NaN  NaN -Inf -Inf -Inf -Inf -Inf  NaN  NaN -Inf -Inf
+[31] -Inf -Inf -Inf  NaN  NaN
+Warning message:
+In pf(0, c(0.0653, 0.000123, 3.2e-79, 8833, 7.9e+71, 0, -1), rep(c(0.0653,  :
+  NaNs produced
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); pf(c(-1, 0, 0.2, 2), c(-1, 0, 0.1, 0.9, 3), rep(c(-1, 0, 1, 0.1, -0.1, 0.0001), 20), lower.tail=FALSE, log.p=FALSE)
+  [1]       NaN       NaN 0.2301826 0.7995678       NaN       NaN       NaN
+  [8]       NaN 1.0000000 1.0000000       NaN       NaN       NaN       NaN
+ [15] 0.8886328       NaN       NaN 1.0000000       NaN       NaN       NaN
+ [22]       NaN       NaN 0.9994274       NaN       NaN       NaN 0.4838017
+ [29]       NaN 1.0000000       NaN       NaN 1.0000000 1.0000000       NaN
+ [36]       NaN       NaN       NaN 0.7109050 0.8385293       NaN       NaN
+ [43]       NaN       NaN 1.0000000       NaN       NaN 0.9986254       NaN
+ [50]       NaN       NaN       NaN       NaN 1.0000000       NaN       NaN
+ [57]       NaN 1.0000000       NaN 0.9994807       NaN       NaN 0.2301826
+ [64] 0.7995678       NaN       NaN       NaN       NaN 1.0000000 1.0000000
+ [71]       NaN       NaN       NaN       NaN 0.8886328       NaN       NaN
+ [78] 1.0000000       NaN       NaN       NaN       NaN       NaN 0.9994274
+ [85]       NaN       NaN       NaN 0.4838017       NaN 1.0000000       NaN
+ [92]       NaN 1.0000000 1.0000000       NaN       NaN       NaN       NaN
+ [99] 0.7109050 0.8385293       NaN       NaN       NaN       NaN 1.0000000
+[106]       NaN       NaN 0.9986254       NaN       NaN       NaN       NaN
+[113]       NaN 1.0000000       NaN       NaN       NaN 1.0000000       NaN
+[120] 0.9994807
+Warning message:
+In pf(c(-1, 0, 0.2, 2), c(-1, 0, 0.1, 0.9, 3), rep(c(-1, 0, 1, 0.1,  :
+  NaNs produced
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); pf(c(-1, 0, 0.2, 2), c(-1, 0, 0.1, 0.9, 3), rep(c(-1, 0, 1, 0.1, -0.1, 0.0001), 20), lower.tail=FALSE, log.p=TRUE)
+  [1]           NaN           NaN -1.4688821632 -0.2236838870           NaN
+  [6]           NaN           NaN           NaN  0.0000000000  0.0000000000
+ [11]           NaN           NaN           NaN           NaN -0.1180711262
+ [16]           NaN           NaN  0.0000000000           NaN           NaN
+ [21]           NaN           NaN           NaN -0.0005727184           NaN
+ [26]           NaN           NaN -0.7260801256           NaN  0.0000000000
+ [31]           NaN           NaN  0.0000000000  0.0000000000           NaN
+ [36]           NaN           NaN           NaN -0.3412165338 -0.1761057482
+ [41]           NaN           NaN           NaN           NaN  0.0000000000
+ [46]           NaN           NaN -0.0013755783           NaN           NaN
+ [51]           NaN           NaN           NaN  0.0000000000           NaN
+ [56]           NaN           NaN  0.0000000000           NaN -0.0005194218
+ [61]           NaN           NaN -1.4688821632 -0.2236838870           NaN
+ [66]           NaN           NaN           NaN  0.0000000000  0.0000000000
+ [71]           NaN           NaN           NaN           NaN -0.1180711262
+ [76]           NaN           NaN  0.0000000000           NaN           NaN
+ [81]           NaN           NaN           NaN -0.0005727184           NaN
+ [86]           NaN           NaN -0.7260801256           NaN  0.0000000000
+ [91]           NaN           NaN  0.0000000000  0.0000000000           NaN
+ [96]           NaN           NaN           NaN -0.3412165338 -0.1761057482
+[101]           NaN           NaN           NaN           NaN  0.0000000000
+[106]           NaN           NaN -0.0013755783           NaN           NaN
+[111]           NaN           NaN           NaN  0.0000000000           NaN
+[116]           NaN           NaN  0.0000000000           NaN -0.0005194218
+Warning message:
+In pf(c(-1, 0, 0.2, 2), c(-1, 0, 0.1, 0.9, 3), rep(c(-1, 0, 1, 0.1,  :
+  NaNs produced
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); pf(c(-1, 0, 0.2, 2), c(-1, 0, 0.1, 0.9, 3), rep(c(-1, 0, 1, 0.1, -0.1, 0.0001), 20), lower.tail=TRUE, log.p=FALSE)
+  [1]          NaN          NaN 0.7698173519 0.2004321518          NaN
+  [6]          NaN          NaN          NaN 0.0000000000 0.0000000000
+ [11]          NaN          NaN          NaN          NaN 0.1113671547
+ [16]          NaN          NaN 0.0000000000          NaN          NaN
+ [21]          NaN          NaN          NaN 0.0005725544          NaN
+ [26]          NaN          NaN 0.5161982800          NaN 0.0000000000
+ [31]          NaN          NaN 0.0000000000 0.0000000000          NaN
+ [36]          NaN          NaN          NaN 0.2890950434 0.1614706943
+ [41]          NaN          NaN          NaN          NaN 0.0000000000
+ [46]          NaN          NaN 0.0013746326          NaN          NaN
+ [51]          NaN          NaN          NaN 0.0000000000          NaN
+ [56]          NaN          NaN 0.0000000000          NaN 0.0005192870
+ [61]          NaN          NaN 0.7698173519 0.2004321518          NaN
+ [66]          NaN          NaN          NaN 0.0000000000 0.0000000000
+ [71]          NaN          NaN          NaN          NaN 0.1113671547
+ [76]          NaN          NaN 0.0000000000          NaN          NaN
+ [81]          NaN          NaN          NaN 0.0005725544          NaN
+ [86]          NaN          NaN 0.5161982800          NaN 0.0000000000
+ [91]          NaN          NaN 0.0000000000 0.0000000000          NaN
+ [96]          NaN          NaN          NaN 0.2890950434 0.1614706943
+[101]          NaN          NaN          NaN          NaN 0.0000000000
+[106]          NaN          NaN 0.0013746326          NaN          NaN
+[111]          NaN          NaN          NaN 0.0000000000          NaN
+[116]          NaN          NaN 0.0000000000          NaN 0.0005192870
+Warning message:
+In pf(c(-1, 0, 0.2, 2), c(-1, 0, 0.1, 0.9, 3), rep(c(-1, 0, 1, 0.1,  :
+  NaNs produced
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); pf(c(-1, 0, 0.2, 2), c(-1, 0, 0.1, 0.9, 3), rep(c(-1, 0, 1, 0.1, -0.1, 0.0001), 20), lower.tail=TRUE, log.p=TRUE)
+  [1]        NaN        NaN -0.2616020 -1.6072795        NaN        NaN
+  [7]        NaN        NaN       -Inf       -Inf        NaN        NaN
+ [13]        NaN        NaN -2.1949228        NaN        NaN       -Inf
+ [19]        NaN        NaN        NaN        NaN        NaN -7.4654027
+ [25]        NaN        NaN        NaN -0.6612643        NaN       -Inf
+ [31]        NaN        NaN       -Inf       -Inf        NaN        NaN
+ [37]        NaN        NaN -1.2409998 -1.8234316        NaN        NaN
+ [43]        NaN        NaN       -Inf        NaN        NaN -6.5895688
+ [49]        NaN        NaN        NaN        NaN        NaN       -Inf
+ [55]        NaN        NaN        NaN       -Inf        NaN -7.5630539
+ [61]        NaN        NaN -0.2616020 -1.6072795        NaN        NaN
+ [67]        NaN        NaN       -Inf       -Inf        NaN        NaN
+ [73]        NaN        NaN -2.1949228        NaN        NaN       -Inf
+ [79]        NaN        NaN        NaN        NaN        NaN -7.4654027
+ [85]        NaN        NaN        NaN -0.6612643        NaN       -Inf
+ [91]        NaN        NaN       -Inf       -Inf        NaN        NaN
+ [97]        NaN        NaN -1.2409998 -1.8234316        NaN        NaN
+[103]        NaN        NaN       -Inf        NaN        NaN -6.5895688
+[109]        NaN        NaN        NaN        NaN        NaN       -Inf
+[115]        NaN        NaN        NaN       -Inf        NaN -7.5630539
+Warning message:
+In pf(c(-1, 0, 0.2, 2), c(-1, 0, 0.1, 0.9, 3), rep(c(-1, 0, 1, 0.1,  :
+  NaNs produced
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWarningContext#
+#set.seed(1); pf(c(NA, 0, NaN, 1/0, -1/0), rep(c(1, 0, 0.1), 5), rep(c(1, 0, 0.1), 5))
+ [1]  NA NaN NaN   1 NaN  NA   0 NaN   1   0  NA   0 NaN NaN   0
+Warning message:
+In pf(c(NA, 0, NaN, 1/0, -1/0), rep(c(1, 0, 0.1), 5), rep(c(1, 0,  :
+  NaNs produced
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWarningContext#
+#set.seed(1); pf(rep(c(1, 0, 0.1), 5), c(NA, 0, NaN, 1/0, -1/0), rep(c(1, 0, 0.1), 5))
+ [1]         NA        NaN        NaN 0.31731051        NaN         NA
+ [7]        NaN        NaN 0.02868263        NaN         NA        NaN
+[13]        NaN        NaN        NaN
+Warning message:
+In pf(rep(c(1, 0, 0.1), 5), c(NA, 0, NaN, 1/0, -1/0), rep(c(1, 0,  :
+  NaNs produced
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); pf(rep(c(1, 0, 0.1), 5), rep(c(1, 0, 0.1), 5), c(NA, 0, NaN, 1/0, -1/0))
+ [1]        NA       NaN       NaN 0.6826895       NaN        NA       NaN
+ [8]       NaN 0.7879658       NaN        NA       NaN       NaN       NaN
+[15]       NaN
+Warning message:
+In pf(rep(c(1, 0, 0.1), 5), rep(c(1, 0, 0.1), 5), c(NA, 0, NaN,  :
+  NaNs produced
+
 ##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
 #set.seed(1); plnorm(0, 10, 10, lower.tail=FALSE, log.p=FALSE)
 [1] 1
@@ -115766,6 +116202,535 @@ Warning message:
 In plnorm(rep(c(1, 0, 0.1), 5), rep(c(1, 0, 0.1), 5), c(NA, 0, NaN,  :
   NaNs produced
 
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); plogis(0, 10, 10, lower.tail=FALSE, log.p=FALSE)
+[1] 0.7310586
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); plogis(0, 10, 10, lower.tail=FALSE, log.p=TRUE)
+[1] -0.3132617
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); plogis(0, 10, 10, lower.tail=TRUE, log.p=FALSE)
+[1] 0.2689414
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); plogis(0, 10, 10, lower.tail=TRUE, log.p=TRUE)
+[1] -1.313262
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); plogis(0, c(0.0653, 0.000123, 32e-80, 8833, 79e70, 0, -1), rep(c(0.0653, 0.000123, 32e-80, 8833, 79e70), 7), lower.tail=FALSE, log.p=FALSE)
+ [1] 7.310586e-01 7.310586e-01 7.310586e-01 7.310586e-01 7.310586e-01
+ [6] 5.000000e-01 0.000000e+00 1.000000e+00 5.000000e-01 5.000000e-01
+[11] 1.000000e+00 1.000000e+00 5.000000e-01 4.999717e-01 5.000000e-01
+[16] 5.004709e-01 5.000000e-01 1.000000e+00 1.000000e+00 5.000000e-01
+[21] 2.234818e-07 1.000000e+00 1.000000e+00 5.000000e-01 5.000000e-01
+[26] 1.000000e+00 5.000000e-01 0.000000e+00 5.000018e-01 5.000000e-01
+[31] 5.000000e-01 1.000000e+00 1.000000e+00 5.000000e-01 5.000000e-01
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); plogis(0, c(0.0653, 0.000123, 32e-80, 8833, 79e70, 0, -1), rep(c(0.0653, 0.000123, 32e-80, 8833, 79e70), 7), lower.tail=FALSE, log.p=TRUE)
+ [1]  -3.132617e-01  -3.132617e-01  -3.132617e-01  -3.132617e-01  -3.132617e-01
+ [6]  -6.931472e-01  -8.130081e+03   0.000000e+00  -6.931472e-01  -6.931472e-01
+[11]   0.000000e+00   0.000000e+00  -6.931472e-01  -6.932038e-01  -6.931472e-01
+[16]  -6.922058e-01  -6.931472e-01   0.000000e+00   0.000000e+00  -6.931472e-01
+[21]  -1.531394e+01 -2.726033e-231   0.000000e+00  -6.931472e-01  -6.931472e-01
+[26]   0.000000e+00  -6.931472e-01  -3.125000e+78  -6.931435e-01  -6.931472e-01
+[31]  -6.931472e-01   0.000000e+00   0.000000e+00  -6.931472e-01  -6.931472e-01
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); plogis(0, c(0.0653, 0.000123, 32e-80, 8833, 79e70, 0, -1), rep(c(0.0653, 0.000123, 32e-80, 8833, 79e70), 7), lower.tail=TRUE, log.p=FALSE)
+ [1]  2.689414e-01  2.689414e-01  2.689414e-01  2.689414e-01  2.689414e-01
+ [6]  5.000000e-01  1.000000e+00  0.000000e+00  5.000000e-01  5.000000e-01
+[11]  0.000000e+00  0.000000e+00  5.000000e-01  5.000283e-01  5.000000e-01
+[16]  4.995291e-01  5.000000e-01  0.000000e+00  0.000000e+00  5.000000e-01
+[21]  9.999998e-01 2.726033e-231  0.000000e+00  5.000000e-01  5.000000e-01
+[26]  0.000000e+00  5.000000e-01  1.000000e+00  4.999982e-01  5.000000e-01
+[31]  5.000000e-01  0.000000e+00  0.000000e+00  5.000000e-01  5.000000e-01
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); plogis(0, c(0.0653, 0.000123, 32e-80, 8833, 79e70, 0, -1), rep(c(0.0653, 0.000123, 32e-80, 8833, 79e70), 7), lower.tail=TRUE, log.p=TRUE)
+ [1]  -1.313262e+00  -1.313262e+00  -1.313262e+00  -1.313262e+00  -1.313262e+00
+ [6]  -6.931472e-01   0.000000e+00  -2.040625e+77  -6.931472e-01  -6.931472e-01
+[11]  -1.352680e+05  -6.422764e+75  -6.931472e-01  -6.930906e-01  -6.931472e-01
+[16]  -6.940894e-01  -6.931472e-01  -2.760313e+82  -8.943734e+67  -6.931472e-01
+[21]  -2.234818e-07  -5.308943e+02  -3.843750e+74  -6.931472e-01  -6.931472e-01
+[26]  -1.209801e+73  -6.931472e-01   0.000000e+00  -6.931509e-01  -6.931472e-01
+[31]  -6.931472e-01  -7.181301e+07 -2.468750e+150  -6.931472e-01  -6.931472e-01
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); plogis(c(-1, 0, 0.2, 2), c(-1, 0, 0.1, 0.9, 3), rep(c(-1, 0, 1, 0.1, -0.1, 0.0001), 20), lower.tail=FALSE, log.p=FALSE)
+  [1]          NaN          NaN 4.750208e-01 1.670142e-05          NaN
+  [6] 0.000000e+00          NaN          NaN 8.698915e-01 1.000000e+00
+ [11]          NaN 0.000000e+00          NaN          NaN 9.426758e-01
+ [16] 9.357623e-14          NaN 1.000000e+00          NaN          NaN
+ [21] 5.000000e-01 5.000000e-01          NaN 0.000000e+00          NaN
+ [26]          NaN 4.501660e-01 5.602796e-09          NaN 1.000000e+00
+ [31]          NaN          NaN 7.502601e-01 9.998766e-01          NaN
+ [36] 0.000000e+00          NaN          NaN 6.681878e-01 9.999546e-01
+ [41]          NaN 5.000000e-01          NaN          NaN 9.820138e-01
+ [46] 4.539787e-05          NaN 0.000000e+00          NaN          NaN
+ [51] 2.314752e-01 2.061154e-09          NaN 1.000000e+00          NaN
+ [56]          NaN 7.310586e-01 7.310586e-01          NaN 1.000000e+00
+ [61]          NaN          NaN 4.750208e-01 1.670142e-05          NaN
+ [66] 0.000000e+00          NaN          NaN 8.698915e-01 1.000000e+00
+ [71]          NaN 0.000000e+00          NaN          NaN 9.426758e-01
+ [76] 9.357623e-14          NaN 1.000000e+00          NaN          NaN
+ [81] 5.000000e-01 5.000000e-01          NaN 0.000000e+00          NaN
+ [86]          NaN 4.501660e-01 5.602796e-09          NaN 1.000000e+00
+ [91]          NaN          NaN 7.502601e-01 9.998766e-01          NaN
+ [96] 0.000000e+00          NaN          NaN 6.681878e-01 9.999546e-01
+[101]          NaN 5.000000e-01          NaN          NaN 9.820138e-01
+[106] 4.539787e-05          NaN 0.000000e+00          NaN          NaN
+[111] 2.314752e-01 2.061154e-09          NaN 1.000000e+00          NaN
+[116]          NaN 7.310586e-01 7.310586e-01          NaN 1.000000e+00
+Warning message:
+In plogis(c(-1, 0, 0.2, 2), c(-1, 0, 0.1, 0.9, 3), rep(c(-1, 0,  :
+  NaNs produced
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); plogis(c(-1, 0, 0.2, 2), c(-1, 0, 0.1, 0.9, 3), rep(c(-1, 0, 1, 0.1, -0.1, 0.0001), 20), lower.tail=FALSE, log.p=TRUE)
+  [1]           NaN           NaN -7.443967e-01 -1.100002e+01           NaN
+  [6] -1.000000e+04           NaN           NaN -1.393868e-01 -9.357623e-14
+ [11]           NaN -2.000000e+04           NaN           NaN -5.903283e-02
+ [16] -3.000000e+01           NaN  0.000000e+00           NaN           NaN
+ [21] -6.931472e-01 -6.931472e-01           NaN -1.100000e+04           NaN
+ [26]           NaN -7.981389e-01 -1.900000e+01           NaN  0.000000e+00
+ [31]           NaN           NaN -2.873353e-01 -1.234022e-04           NaN
+ [36] -3.000000e+04           NaN           NaN -4.031860e-01 -4.539890e-05
+ [41]           NaN -6.931472e-01           NaN           NaN -1.814993e-02
+ [46] -1.000005e+01           NaN -1.900000e+04           NaN           NaN
+ [51] -1.463282e+00 -2.000000e+01           NaN  0.000000e+00           NaN
+ [56]           NaN -3.132617e-01 -3.132617e-01           NaN  0.000000e+00
+ [61]           NaN           NaN -7.443967e-01 -1.100002e+01           NaN
+ [66] -1.000000e+04           NaN           NaN -1.393868e-01 -9.357623e-14
+ [71]           NaN -2.000000e+04           NaN           NaN -5.903283e-02
+ [76] -3.000000e+01           NaN  0.000000e+00           NaN           NaN
+ [81] -6.931472e-01 -6.931472e-01           NaN -1.100000e+04           NaN
+ [86]           NaN -7.981389e-01 -1.900000e+01           NaN  0.000000e+00
+ [91]           NaN           NaN -2.873353e-01 -1.234022e-04           NaN
+ [96] -3.000000e+04           NaN           NaN -4.031860e-01 -4.539890e-05
+[101]           NaN -6.931472e-01           NaN           NaN -1.814993e-02
+[106] -1.000005e+01           NaN -1.900000e+04           NaN           NaN
+[111] -1.463282e+00 -2.000000e+01           NaN  0.000000e+00           NaN
+[116]           NaN -3.132617e-01 -3.132617e-01           NaN  0.000000e+00
+Warning message:
+In plogis(c(-1, 0, 0.2, 2), c(-1, 0, 0.1, 0.9, 3), rep(c(-1, 0,  :
+  NaNs produced
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); plogis(c(-1, 0, 0.2, 2), c(-1, 0, 0.1, 0.9, 3), rep(c(-1, 0, 1, 0.1, -0.1, 0.0001), 20), lower.tail=TRUE, log.p=FALSE)
+  [1]          NaN          NaN 5.249792e-01 9.999833e-01          NaN
+  [6] 1.000000e+00          NaN          NaN 1.301085e-01 9.357623e-14
+ [11]          NaN 1.000000e+00          NaN          NaN 5.732418e-02
+ [16] 1.000000e+00          NaN 0.000000e+00          NaN          NaN
+ [21] 5.000000e-01 5.000000e-01          NaN 1.000000e+00          NaN
+ [26]          NaN 5.498340e-01 1.000000e+00          NaN 0.000000e+00
+ [31]          NaN          NaN 2.497399e-01 1.233946e-04          NaN
+ [36] 1.000000e+00          NaN          NaN 3.318122e-01 4.539787e-05
+ [41]          NaN 5.000000e-01          NaN          NaN 1.798621e-02
+ [46] 9.999546e-01          NaN 1.000000e+00          NaN          NaN
+ [51] 7.685248e-01 1.000000e+00          NaN 0.000000e+00          NaN
+ [56]          NaN 2.689414e-01 2.689414e-01          NaN 0.000000e+00
+ [61]          NaN          NaN 5.249792e-01 9.999833e-01          NaN
+ [66] 1.000000e+00          NaN          NaN 1.301085e-01 9.357623e-14
+ [71]          NaN 1.000000e+00          NaN          NaN 5.732418e-02
+ [76] 1.000000e+00          NaN 0.000000e+00          NaN          NaN
+ [81] 5.000000e-01 5.000000e-01          NaN 1.000000e+00          NaN
+ [86]          NaN 5.498340e-01 1.000000e+00          NaN 0.000000e+00
+ [91]          NaN          NaN 2.497399e-01 1.233946e-04          NaN
+ [96] 1.000000e+00          NaN          NaN 3.318122e-01 4.539787e-05
+[101]          NaN 5.000000e-01          NaN          NaN 1.798621e-02
+[106] 9.999546e-01          NaN 1.000000e+00          NaN          NaN
+[111] 7.685248e-01 1.000000e+00          NaN 0.000000e+00          NaN
+[116]          NaN 2.689414e-01 2.689414e-01          NaN 0.000000e+00
+Warning message:
+In plogis(c(-1, 0, 0.2, 2), c(-1, 0, 0.1, 0.9, 3), rep(c(-1, 0,  :
+  NaNs produced
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); plogis(c(-1, 0, 0.2, 2), c(-1, 0, 0.1, 0.9, 3), rep(c(-1, 0, 1, 0.1, -0.1, 0.0001), 20), lower.tail=TRUE, log.p=TRUE)
+  [1]           NaN           NaN -6.443967e-01 -1.670156e-05           NaN
+  [6]  0.000000e+00           NaN           NaN -2.039387e+00 -3.000000e+01
+ [11]           NaN  0.000000e+00           NaN           NaN -2.859033e+00
+ [16] -9.357623e-14           NaN -1.000000e+03           NaN           NaN
+ [21] -6.931472e-01 -6.931472e-01           NaN  0.000000e+00           NaN
+ [26]           NaN -5.981389e-01 -5.602796e-09           NaN -3.000000e+04
+ [31]           NaN           NaN -1.387335e+00 -9.000123e+00           NaN
+ [36]  0.000000e+00           NaN           NaN -1.103186e+00 -1.000005e+01
+ [41]           NaN -6.931472e-01           NaN           NaN -4.018150e+00
+ [46] -4.539890e-05           NaN  0.000000e+00           NaN           NaN
+ [51] -2.632825e-01 -2.061154e-09           NaN -9.000000e+03           NaN
+ [56]           NaN -1.313262e+00 -1.313262e+00           NaN -1.000000e+04
+ [61]           NaN           NaN -6.443967e-01 -1.670156e-05           NaN
+ [66]  0.000000e+00           NaN           NaN -2.039387e+00 -3.000000e+01
+ [71]           NaN  0.000000e+00           NaN           NaN -2.859033e+00
+ [76] -9.357623e-14           NaN -1.000000e+03           NaN           NaN
+ [81] -6.931472e-01 -6.931472e-01           NaN  0.000000e+00           NaN
+ [86]           NaN -5.981389e-01 -5.602796e-09           NaN -3.000000e+04
+ [91]           NaN           NaN -1.387335e+00 -9.000123e+00           NaN
+ [96]  0.000000e+00           NaN           NaN -1.103186e+00 -1.000005e+01
+[101]           NaN -6.931472e-01           NaN           NaN -4.018150e+00
+[106] -4.539890e-05           NaN  0.000000e+00           NaN           NaN
+[111] -2.632825e-01 -2.061154e-09           NaN -9.000000e+03           NaN
+[116]           NaN -1.313262e+00 -1.313262e+00           NaN -1.000000e+04
+Warning message:
+In plogis(c(-1, 0, 0.2, 2), c(-1, 0, 0.1, 0.9, 3), rep(c(-1, 0,  :
+  NaNs produced
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWarningContext#
+#set.seed(1); plogis(c(NA, 0, NaN, 1/0, -1/0), rep(c(1, 0, 0.1), 5), rep(c(1, 0, 0.1), 5))
+ [1]        NA       NaN       NaN 1.0000000       NaN        NA 0.2689414
+ [8]       NaN 1.0000000 0.0000000        NA 0.2689414       NaN       NaN
+[15] 0.0000000
+Warning message:
+In plogis(c(NA, 0, NaN, 1/0, -1/0), rep(c(1, 0, 0.1), 5), rep(c(1,  :
+  NaNs produced
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWarningContext#
+#set.seed(1); plogis(rep(c(1, 0, 0.1), 5), c(NA, 0, NaN, 1/0, -1/0), rep(c(1, 0, 0.1), 5))
+ [1]        NA       NaN       NaN 0.0000000       NaN        NA 0.7310586
+ [8]       NaN 0.0000000 1.0000000        NA 0.7310586       NaN       NaN
+[15] 1.0000000
+Warning message:
+In plogis(rep(c(1, 0, 0.1), 5), c(NA, 0, NaN, 1/0, -1/0), rep(c(1,  :
+  NaNs produced
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); plogis(rep(c(1, 0, 0.1), 5), rep(c(1, 0, 0.1), 5), c(NA, 0, NaN, 1/0, -1/0))
+ [1]  NA NaN NaN 0.5 NaN  NA NaN NaN 0.5 NaN  NA NaN NaN 0.5 NaN
+Warning message:
+In plogis(rep(c(1, 0, 0.1), 5), rep(c(1, 0, 0.1), 5), c(NA, 0, NaN,  :
+  NaNs produced
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); pnorm(0, 10, 10, lower.tail=FALSE, log.p=FALSE)
+[1] 0.8413447
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); pnorm(0, 10, 10, lower.tail=FALSE, log.p=TRUE)
+[1] -0.1727538
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); pnorm(0, 10, 10, lower.tail=TRUE, log.p=FALSE)
+[1] 0.1586553
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); pnorm(0, 10, 10, lower.tail=TRUE, log.p=TRUE)
+[1] -1.841022
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); pnorm(0, c(0.0653, 0.000123, 32e-80, 8833, 79e70, 0, -1), rep(c(0.0653, 0.000123, 32e-80, 8833, 79e70), 7), lower.tail=FALSE, log.p=FALSE)
+ [1] 8.413447e-01 8.413447e-01 8.413447e-01 8.413447e-01 8.413447e-01
+ [6] 5.000000e-01 0.000000e+00 1.000000e+00 5.000000e-01 5.000000e-01
+[11] 1.000000e+00 1.000000e+00 5.000000e-01 4.999548e-01 5.000000e-01
+[16] 5.007515e-01 5.000000e-01 1.000000e+00 1.000000e+00 5.000000e-01
+[21] 3.085691e-53 1.000000e+00 1.000000e+00 5.000000e-01 5.000000e-01
+[26] 1.000000e+00 5.000000e-01 0.000000e+00 5.000029e-01 5.000000e-01
+[31] 5.000000e-01 1.000000e+00 1.000000e+00 5.000000e-01 5.000000e-01
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); pnorm(0, c(0.0653, 0.000123, 32e-80, 8833, 79e70, 0, -1), rep(c(0.0653, 0.000123, 32e-80, 8833, 79e70), 7), lower.tail=FALSE, log.p=TRUE)
+ [1]  -1.727538e-01  -1.727538e-01  -1.727538e-01  -1.727538e-01  -1.727538e-01
+ [6]  -6.931472e-01  -3.304912e+07   0.000000e+00  -6.931472e-01  -6.931472e-01
+[11]   0.000000e+00   0.000000e+00  -6.931472e-01  -6.932375e-01  -6.931472e-01
+[16]  -6.916454e-01  -6.931472e-01   0.000000e+00   0.000000e+00  -6.931472e-01
+[21]  -1.209102e+02   0.000000e+00   0.000000e+00  -6.931472e-01  -6.931472e-01
+[26]   0.000000e+00  -6.931472e-01 -4.882813e+156  -6.931413e-01  -6.931472e-01
+[31]  -6.931472e-01   0.000000e+00   0.000000e+00  -6.931472e-01  -6.931472e-01
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); pnorm(0, c(0.0653, 0.000123, 32e-80, 8833, 79e70, 0, -1), rep(c(0.0653, 0.000123, 32e-80, 8833, 79e70), 7), lower.tail=TRUE, log.p=FALSE)
+ [1] 0.1586553 0.1586553 0.1586553 0.1586553 0.1586553 0.5000000 1.0000000
+ [8] 0.0000000 0.5000000 0.5000000 0.0000000 0.0000000 0.5000000 0.5000452
+[15] 0.5000000 0.4992485 0.5000000 0.0000000 0.0000000 0.5000000 1.0000000
+[22] 0.0000000 0.0000000 0.5000000 0.5000000 0.0000000 0.5000000 1.0000000
+[29] 0.4999971 0.5000000 0.5000000 0.0000000 0.0000000 0.5000000 0.5000000
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); pnorm(0, c(0.0653, 0.000123, 32e-80, 8833, 79e70, 0, -1), rep(c(0.0653, 0.000123, 32e-80, 8833, 79e70), 7), lower.tail=TRUE, log.p=TRUE)
+ [1]  -1.841022e+00  -1.841022e+00  -1.841022e+00  -1.841022e+00  -1.841022e+00
+ [6]  -6.931472e-01   0.000000e+00 -2.082075e+154  -6.931472e-01  -6.931472e-01
+[11]  -9.148715e+09 -2.062595e+151  -6.931472e-01  -6.930569e-01  -6.931472e-01
+[16]  -6.946512e-01  -6.931472e-01 -3.809663e+164 -3.999519e+135  -6.931472e-01
+[21]  -3.085691e-53  -1.409316e+05 -7.387207e+148  -6.931472e-01  -6.931472e-01
+[26] -7.318091e+145  -6.931472e-01   0.000000e+00  -6.931531e-01  -6.931472e-01
+[31]  -6.931472e-01  -2.578554e+15 -3.047363e+300  -6.931472e-01  -6.931472e-01
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); pnorm(c(-1, 0, 0.2, 2), c(-1, 0, 0.1, 0.9, 3), rep(c(-1, 0, 1, 0.1, -0.1, 0.0001), 20), lower.tail=FALSE, log.p=FALSE)
+  [1]           NaN  0.000000e+00  4.601722e-01  1.910660e-28           NaN
+  [6]  0.000000e+00           NaN  0.000000e+00  9.712834e-01  1.000000e+00
+ [11]           NaN  0.000000e+00           NaN  1.000000e+00  9.974449e-01
+ [16] 4.906714e-198           NaN  1.000000e+00           NaN  1.000000e+00
+ [21]  5.000000e-01  5.000000e-01           NaN  0.000000e+00           NaN
+ [26]  0.000000e+00  4.207403e-01  8.527224e-81           NaN  1.000000e+00
+ [31]           NaN  0.000000e+00  8.643339e-01  1.000000e+00           NaN
+ [36]  0.000000e+00           NaN  1.000000e+00  7.580363e-01  1.000000e+00
+ [41]           NaN  5.000000e-01           NaN  0.000000e+00  9.999683e-01
+ [46]  7.619853e-24           NaN  0.000000e+00           NaN  1.000000e+00
+ [51]  1.150697e-01  2.753624e-89           NaN  1.000000e+00           NaN
+ [56]  0.000000e+00  8.413447e-01  8.413447e-01           NaN  1.000000e+00
+ [61]           NaN  0.000000e+00  4.601722e-01  1.910660e-28           NaN
+ [66]  0.000000e+00           NaN  0.000000e+00  9.712834e-01  1.000000e+00
+ [71]           NaN  0.000000e+00           NaN  1.000000e+00  9.974449e-01
+ [76] 4.906714e-198           NaN  1.000000e+00           NaN  1.000000e+00
+ [81]  5.000000e-01  5.000000e-01           NaN  0.000000e+00           NaN
+ [86]  0.000000e+00  4.207403e-01  8.527224e-81           NaN  1.000000e+00
+ [91]           NaN  0.000000e+00  8.643339e-01  1.000000e+00           NaN
+ [96]  0.000000e+00           NaN  1.000000e+00  7.580363e-01  1.000000e+00
+[101]           NaN  5.000000e-01           NaN  0.000000e+00  9.999683e-01
+[106]  7.619853e-24           NaN  0.000000e+00           NaN  1.000000e+00
+[111]  1.150697e-01  2.753624e-89           NaN  1.000000e+00           NaN
+[116]  0.000000e+00  8.413447e-01  8.413447e-01           NaN  1.000000e+00
+Warning message:
+In pnorm(c(-1, 0, 0.2, 2), c(-1, 0, 0.1, 0.9, 3), rep(c(-1, 0, 1,  :
+  NaNs produced
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); pnorm(c(-1, 0, 0.2, 2), c(-1, 0, 0.1, 0.9, 3), rep(c(-1, 0, 1, 0.1, -0.1, 0.0001), 20), lower.tail=FALSE, log.p=TRUE)
+  [1]            NaN           -Inf  -7.761546e-01  -6.382493e+01            NaN
+  [6]  -5.000001e+07            NaN           -Inf  -2.913695e-02 -4.906714e-198
+ [11]            NaN  -2.000000e+08            NaN   0.000000e+00  -2.558400e-03
+ [16]  -4.543212e+02            NaN   0.000000e+00            NaN   0.000000e+00
+ [21]  -6.931472e-01  -6.931472e-01            NaN  -6.050001e+07            NaN
+ [26]           -Inf  -8.657395e-01  -1.843661e+02            NaN   0.000000e+00
+ [31]            NaN           -Inf  -1.457961e-01  -1.128588e-19            NaN
+ [36]  -4.500000e+08            NaN   0.000000e+00  -2.770239e-01  -7.619853e-24
+ [41]            NaN  -6.931472e-01            NaN           -Inf  -3.167174e-05
+ [46]  -5.323129e+01            NaN  -1.805000e+08            NaN   0.000000e+00
+ [51]  -2.162218e+00  -2.039172e+02            NaN   0.000000e+00            NaN
+ [56]           -Inf  -1.727538e-01  -1.727538e-01            NaN   0.000000e+00
+ [61]            NaN           -Inf  -7.761546e-01  -6.382493e+01            NaN
+ [66]  -5.000001e+07            NaN           -Inf  -2.913695e-02 -4.906714e-198
+ [71]            NaN  -2.000000e+08            NaN   0.000000e+00  -2.558400e-03
+ [76]  -4.543212e+02            NaN   0.000000e+00            NaN   0.000000e+00
+ [81]  -6.931472e-01  -6.931472e-01            NaN  -6.050001e+07            NaN
+ [86]           -Inf  -8.657395e-01  -1.843661e+02            NaN   0.000000e+00
+ [91]            NaN           -Inf  -1.457961e-01  -1.128588e-19            NaN
+ [96]  -4.500000e+08            NaN   0.000000e+00  -2.770239e-01  -7.619853e-24
+[101]            NaN  -6.931472e-01            NaN           -Inf  -3.167174e-05
+[106]  -5.323129e+01            NaN  -1.805000e+08            NaN   0.000000e+00
+[111]  -2.162218e+00  -2.039172e+02            NaN   0.000000e+00            NaN
+[116]           -Inf  -1.727538e-01  -1.727538e-01            NaN   0.000000e+00
+Warning message:
+In pnorm(c(-1, 0, 0.2, 2), c(-1, 0, 0.1, 0.9, 3), rep(c(-1, 0, 1,  :
+  NaNs produced
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); pnorm(c(-1, 0, 0.2, 2), c(-1, 0, 0.1, 0.9, 3), rep(c(-1, 0, 1, 0.1, -0.1, 0.0001), 20), lower.tail=TRUE, log.p=FALSE)
+  [1]           NaN  1.000000e+00  5.398278e-01  1.000000e+00           NaN
+  [6]  1.000000e+00           NaN  1.000000e+00  2.871656e-02 4.906714e-198
+ [11]           NaN  1.000000e+00           NaN  0.000000e+00  2.555130e-03
+ [16]  1.000000e+00           NaN  0.000000e+00           NaN  0.000000e+00
+ [21]  5.000000e-01  5.000000e-01           NaN  1.000000e+00           NaN
+ [26]  1.000000e+00  5.792597e-01  1.000000e+00           NaN  0.000000e+00
+ [31]           NaN  1.000000e+00  1.356661e-01  1.128588e-19           NaN
+ [36]  1.000000e+00           NaN  0.000000e+00  2.419637e-01  7.619853e-24
+ [41]           NaN  5.000000e-01           NaN  1.000000e+00  3.167124e-05
+ [46]  1.000000e+00           NaN  1.000000e+00           NaN  0.000000e+00
+ [51]  8.849303e-01  1.000000e+00           NaN  0.000000e+00           NaN
+ [56]  1.000000e+00  1.586553e-01  1.586553e-01           NaN  0.000000e+00
+ [61]           NaN  1.000000e+00  5.398278e-01  1.000000e+00           NaN
+ [66]  1.000000e+00           NaN  1.000000e+00  2.871656e-02 4.906714e-198
+ [71]           NaN  1.000000e+00           NaN  0.000000e+00  2.555130e-03
+ [76]  1.000000e+00           NaN  0.000000e+00           NaN  0.000000e+00
+ [81]  5.000000e-01  5.000000e-01           NaN  1.000000e+00           NaN
+ [86]  1.000000e+00  5.792597e-01  1.000000e+00           NaN  0.000000e+00
+ [91]           NaN  1.000000e+00  1.356661e-01  1.128588e-19           NaN
+ [96]  1.000000e+00           NaN  0.000000e+00  2.419637e-01  7.619853e-24
+[101]           NaN  5.000000e-01           NaN  1.000000e+00  3.167124e-05
+[106]  1.000000e+00           NaN  1.000000e+00           NaN  0.000000e+00
+[111]  8.849303e-01  1.000000e+00           NaN  0.000000e+00           NaN
+[116]  1.000000e+00  1.586553e-01  1.586553e-01           NaN  0.000000e+00
+Warning message:
+In pnorm(c(-1, 0, 0.2, 2), c(-1, 0, 0.1, 0.9, 3), rep(c(-1, 0, 1,  :
+  NaNs produced
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); pnorm(c(-1, 0, 0.2, 2), c(-1, 0, 0.1, 0.9, 3), rep(c(-1, 0, 1, 0.1, -0.1, 0.0001), 20), lower.tail=TRUE, log.p=TRUE)
+  [1]            NaN   0.000000e+00  -6.165050e-01  -1.910660e-28            NaN
+  [6]   0.000000e+00            NaN   0.000000e+00  -3.550281e+00  -4.543212e+02
+ [11]            NaN   0.000000e+00            NaN           -Inf  -5.969652e+00
+ [16] -4.906714e-198            NaN  -5.000078e+05            NaN           -Inf
+ [21]  -6.931472e-01  -6.931472e-01            NaN   0.000000e+00            NaN
+ [26]   0.000000e+00  -5.460044e-01  -8.527224e-81            NaN  -4.500000e+08
+ [31]            NaN   0.000000e+00  -1.997559e+00  -4.362815e+01            NaN
+ [36]   0.000000e+00            NaN           -Inf  -1.418968e+00  -5.323129e+01
+ [41]            NaN  -6.931472e-01            NaN   0.000000e+00  -1.036010e+01
+ [46]  -7.619853e-24            NaN   0.000000e+00            NaN           -Inf
+ [51]  -1.222464e-01  -2.753624e-89            NaN  -4.050001e+07            NaN
+ [56]   0.000000e+00  -1.841022e+00  -1.841022e+00            NaN  -5.000001e+07
+ [61]            NaN   0.000000e+00  -6.165050e-01  -1.910660e-28            NaN
+ [66]   0.000000e+00            NaN   0.000000e+00  -3.550281e+00  -4.543212e+02
+ [71]            NaN   0.000000e+00            NaN           -Inf  -5.969652e+00
+ [76] -4.906714e-198            NaN  -5.000078e+05            NaN           -Inf
+ [81]  -6.931472e-01  -6.931472e-01            NaN   0.000000e+00            NaN
+ [86]   0.000000e+00  -5.460044e-01  -8.527224e-81            NaN  -4.500000e+08
+ [91]            NaN   0.000000e+00  -1.997559e+00  -4.362815e+01            NaN
+ [96]   0.000000e+00            NaN           -Inf  -1.418968e+00  -5.323129e+01
+[101]            NaN  -6.931472e-01            NaN   0.000000e+00  -1.036010e+01
+[106]  -7.619853e-24            NaN   0.000000e+00            NaN           -Inf
+[111]  -1.222464e-01  -2.753624e-89            NaN  -4.050001e+07            NaN
+[116]   0.000000e+00  -1.841022e+00  -1.841022e+00            NaN  -5.000001e+07
+Warning message:
+In pnorm(c(-1, 0, 0.2, 2), c(-1, 0, 0.1, 0.9, 3), rep(c(-1, 0, 1,  :
+  NaNs produced
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWarningContext#
+#set.seed(1); pnorm(c(NA, 0, NaN, 1/0, -1/0), rep(c(1, 0, 0.1), 5), rep(c(1, 0, 0.1), 5))
+ [1]        NA 1.0000000       NaN 1.0000000 0.0000000        NA 0.1586553
+ [8]       NaN 1.0000000 0.0000000        NA 0.1586553       NaN 1.0000000
+[15] 0.0000000
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWarningContext#
+#set.seed(1); pnorm(rep(c(1, 0, 0.1), 5), c(NA, 0, NaN, 1/0, -1/0), rep(c(1, 0, 0.1), 5))
+ [1]        NA 1.0000000       NaN 0.0000000 1.0000000        NA 0.8413447
+ [8]       NaN 0.0000000 1.0000000        NA 0.8413447       NaN 0.0000000
+[15] 1.0000000
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); pnorm(rep(c(1, 0, 0.1), 5), rep(c(1, 0, 0.1), 5), c(NA, 0, NaN, 1/0, -1/0))
+ [1]  NA 1.0 NaN 0.5 NaN  NA 1.0 NaN 0.5 NaN  NA 1.0 NaN 0.5 NaN
+Warning message:
+In pnorm(rep(c(1, 0, 0.1), 5), rep(c(1, 0, 0.1), 5), c(NA, 0, NaN,  :
+  NaNs produced
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); qbinom(0, 10, 10, lower.tail=FALSE, log.p=FALSE)
+[1] NaN
+Warning message:
+In qbinom(0, 10, 10, lower.tail = FALSE, log.p = FALSE) : NaNs produced
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); qbinom(0, 10, 10, lower.tail=FALSE, log.p=TRUE)
+[1] NaN
+Warning message:
+In qbinom(0, 10, 10, lower.tail = FALSE, log.p = TRUE) : NaNs produced
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); qbinom(0, 10, 10, lower.tail=TRUE, log.p=FALSE)
+[1] NaN
+Warning message:
+In qbinom(0, 10, 10, lower.tail = TRUE, log.p = FALSE) : NaNs produced
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); qbinom(0, 10, 10, lower.tail=TRUE, log.p=TRUE)
+[1] NaN
+Warning message:
+In qbinom(0, 10, 10, lower.tail = TRUE, log.p = TRUE) : NaNs produced
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); qbinom(0, c(0.0653, 0.000123, 32e-80, 8833, 79e70, 0, -1), rep(c(0.0653, 0.000123, 32e-80, 8833, 79e70), 7), lower.tail=FALSE, log.p=FALSE)
+ [1]       NaN       NaN       NaN       NaN       NaN 0.000e+00       NaN
+ [8]       NaN       NaN       NaN 8.833e+03 7.900e+71 0.000e+00       NaN
+[15]       NaN       NaN       NaN 8.833e+03       NaN       NaN       NaN
+[22]       NaN       NaN       NaN       NaN 7.900e+71 0.000e+00       NaN
+[29]       NaN       NaN       NaN 8.833e+03 7.900e+71       NaN       NaN
+Warning message:
+In qbinom(0, c(0.0653, 0.000123, 3.2e-79, 8833, 7.9e+71, 0, -1),  :
+  NaNs produced
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); qbinom(0, c(0.0653, 0.000123, 32e-80, 8833, 79e70, 0, -1), rep(c(0.0653, 0.000123, 32e-80, 8833, 79e70), 7), lower.tail=FALSE, log.p=TRUE)
+ [1] NaN NaN NaN NaN NaN   0 NaN NaN NaN NaN   0   0   0 NaN NaN NaN NaN   0 NaN
+[20] NaN NaN NaN NaN NaN NaN   0   0 NaN NaN NaN NaN   0   0 NaN NaN
+Warning message:
+In qbinom(0, c(0.0653, 0.000123, 3.2e-79, 8833, 7.9e+71, 0, -1),  :
+  NaNs produced
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); qbinom(0, c(0.0653, 0.000123, 32e-80, 8833, 79e70, 0, -1), rep(c(0.0653, 0.000123, 32e-80, 8833, 79e70), 7), lower.tail=TRUE, log.p=FALSE)
+ [1] NaN NaN NaN NaN NaN   0 NaN NaN NaN NaN   0   0   0 NaN NaN NaN NaN   0 NaN
+[20] NaN NaN NaN NaN NaN NaN   0   0 NaN NaN NaN NaN   0   0 NaN NaN
+Warning message:
+In qbinom(0, c(0.0653, 0.000123, 3.2e-79, 8833, 7.9e+71, 0, -1),  :
+  NaNs produced
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); qbinom(0, c(0.0653, 0.000123, 32e-80, 8833, 79e70, 0, -1), rep(c(0.0653, 0.000123, 32e-80, 8833, 79e70), 7), lower.tail=TRUE, log.p=TRUE)
+ [1]       NaN       NaN       NaN       NaN       NaN 0.000e+00       NaN
+ [8]       NaN       NaN       NaN 8.833e+03 7.900e+71 0.000e+00       NaN
+[15]       NaN       NaN       NaN 8.833e+03       NaN       NaN       NaN
+[22]       NaN       NaN       NaN       NaN 7.900e+71 0.000e+00       NaN
+[29]       NaN       NaN       NaN 8.833e+03 7.900e+71       NaN       NaN
+Warning message:
+In qbinom(0, c(0.0653, 0.000123, 3.2e-79, 8833, 7.9e+71, 0, -1),  :
+  NaNs produced
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); qbinom(c(-1, 0, 0.2, 2), c(-1, 0, 0.1, 0.9, 3), rep(c(-1, 0, 1, 0.1, -0.1, 0.0001), 20), lower.tail=FALSE, log.p=FALSE)
+  [1] NaN   0 NaN NaN NaN NaN NaN NaN NaN   3 NaN NaN NaN NaN   3 NaN NaN NaN
+ [19] NaN NaN NaN   0 NaN NaN NaN NaN   0 NaN NaN   3 NaN NaN NaN NaN NaN NaN
+ [37] NaN NaN NaN NaN NaN   0 NaN NaN NaN NaN NaN NaN NaN   3 NaN NaN NaN NaN
+ [55] NaN NaN NaN NaN NaN NaN NaN   0 NaN NaN NaN NaN NaN NaN NaN   3 NaN NaN
+ [73] NaN NaN   3 NaN NaN NaN NaN NaN NaN   0 NaN NaN NaN NaN   0 NaN NaN   3
+ [91] NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN   0 NaN NaN NaN NaN NaN NaN
+[109] NaN   3 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
+Warning message:
+In qbinom(c(-1, 0, 0.2, 2), c(-1, 0, 0.1, 0.9, 3), rep(c(-1, 0,  :
+  NaNs produced
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); qbinom(c(-1, 0, 0.2, 2), c(-1, 0, 0.1, 0.9, 3), rep(c(-1, 0, 1, 0.1, -0.1, 0.0001), 20), lower.tail=FALSE, log.p=TRUE)
+  [1] NaN   0 NaN NaN NaN NaN NaN NaN NaN   0 NaN NaN NaN NaN NaN NaN NaN NaN
+ [19] NaN NaN NaN   0 NaN NaN NaN NaN NaN NaN NaN   0 NaN NaN NaN NaN NaN NaN
+ [37] NaN NaN NaN NaN NaN   0 NaN NaN   3 NaN NaN NaN NaN   0 NaN NaN NaN NaN
+ [55] NaN NaN   0 NaN NaN NaN NaN   0 NaN NaN NaN NaN NaN NaN NaN   0 NaN NaN
+ [73] NaN NaN NaN NaN NaN NaN NaN NaN NaN   0 NaN NaN NaN NaN NaN NaN NaN   0
+ [91] NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN   0 NaN NaN   3 NaN NaN NaN
+[109] NaN   0 NaN NaN NaN NaN NaN NaN   0 NaN NaN NaN
+Warning message:
+In qbinom(c(-1, 0, 0.2, 2), c(-1, 0, 0.1, 0.9, 3), rep(c(-1, 0,  :
+  NaNs produced
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); qbinom(c(-1, 0, 0.2, 2), c(-1, 0, 0.1, 0.9, 3), rep(c(-1, 0, 1, 0.1, -0.1, 0.0001), 20), lower.tail=TRUE, log.p=FALSE)
+  [1] NaN   0 NaN NaN NaN NaN NaN NaN NaN   0 NaN NaN NaN NaN   3 NaN NaN NaN
+ [19] NaN NaN NaN   0 NaN NaN NaN NaN   0 NaN NaN   0 NaN NaN NaN NaN NaN NaN
+ [37] NaN NaN NaN NaN NaN   0 NaN NaN NaN NaN NaN NaN NaN   0 NaN NaN NaN NaN
+ [55] NaN NaN NaN NaN NaN NaN NaN   0 NaN NaN NaN NaN NaN NaN NaN   0 NaN NaN
+ [73] NaN NaN   3 NaN NaN NaN NaN NaN NaN   0 NaN NaN NaN NaN   0 NaN NaN   0
+ [91] NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN   0 NaN NaN NaN NaN NaN NaN
+[109] NaN   0 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
+Warning message:
+In qbinom(c(-1, 0, 0.2, 2), c(-1, 0, 0.1, 0.9, 3), rep(c(-1, 0,  :
+  NaNs produced
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); qbinom(c(-1, 0, 0.2, 2), c(-1, 0, 0.1, 0.9, 3), rep(c(-1, 0, 1, 0.1, -0.1, 0.0001), 20), lower.tail=TRUE, log.p=TRUE)
+  [1] NaN   0 NaN NaN NaN NaN NaN NaN NaN   3 NaN NaN NaN NaN NaN NaN NaN NaN
+ [19] NaN NaN NaN   0 NaN NaN NaN NaN NaN NaN NaN   3 NaN NaN NaN NaN NaN NaN
+ [37] NaN NaN NaN NaN NaN   0 NaN NaN   3 NaN NaN NaN NaN   3 NaN NaN NaN NaN
+ [55] NaN NaN   0 NaN NaN NaN NaN   0 NaN NaN NaN NaN NaN NaN NaN   3 NaN NaN
+ [73] NaN NaN NaN NaN NaN NaN NaN NaN NaN   0 NaN NaN NaN NaN NaN NaN NaN   3
+ [91] NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN   0 NaN NaN   3 NaN NaN NaN
+[109] NaN   3 NaN NaN NaN NaN NaN NaN   0 NaN NaN NaN
+Warning message:
+In qbinom(c(-1, 0, 0.2, 2), c(-1, 0, 0.1, 0.9, 3), rep(c(-1, 0,  :
+  NaNs produced
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWarningContext#
+#set.seed(1); qbinom(c(NA, 0, NaN, 1/0, -1/0), rep(c(1, 0, 0.1), 5), rep(c(1, 0, 0.1), 5))
+ [1]  NA   0 NaN NaN NaN  NA   0 NaN NaN NaN  NA NaN NaN NaN NaN
+Warning message:
+In qbinom(c(NA, 0, NaN, 1/0, -1/0), rep(c(1, 0, 0.1), 5), rep(c(1,  :
+  NaNs produced
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWarningContext#
+#set.seed(1); qbinom(rep(c(1, 0, 0.1), 5), c(NA, 0, NaN, 1/0, -1/0), rep(c(1, 0, 0.1), 5))
+ [1]  NA   0 NaN NaN NaN  NA   0 NaN NaN NaN  NA   0 NaN NaN NaN
+Warning message:
+In qbinom(rep(c(1, 0, 0.1), 5), c(NA, 0, NaN, 1/0, -1/0), rep(c(1,  :
+  NaNs produced
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); qbinom(rep(c(1, 0, 0.1), 5), rep(c(1, 0, 0.1), 5), c(NA, 0, NaN, 1/0, -1/0))
+ [1]  NA   0 NaN NaN NaN  NA   1 NaN NaN NaN  NA NaN NaN NaN NaN
+Warning message:
+In qbinom(rep(c(1, 0, 0.1), 5), rep(c(1, 0, 0.1), 5), c(NA, 0, NaN,  :
+  NaNs produced
+
 ##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
 #set.seed(1); qcauchy(0, 10, 10, lower.tail=FALSE, log.p=FALSE)
 [1] Inf
@@ -116088,6 +117053,324 @@ Warning message:
 In qlnorm(rep(c(1, 0, 0.1), 5), rep(c(1, 0, 0.1), 5), c(NA, 0, NaN,  :
   NaNs produced
 
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); qlogis(0, 10, 10, lower.tail=FALSE, log.p=FALSE)
+[1] Inf
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); qlogis(0, 10, 10, lower.tail=FALSE, log.p=TRUE)
+[1] -Inf
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); qlogis(0, 10, 10, lower.tail=TRUE, log.p=FALSE)
+[1] -Inf
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); qlogis(0, 10, 10, lower.tail=TRUE, log.p=TRUE)
+[1] Inf
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); qlogis(0, c(0.0653, 0.000123, 32e-80, 8833, 79e70, 0, -1), rep(c(0.0653, 0.000123, 32e-80, 8833, 79e70), 7), lower.tail=FALSE, log.p=FALSE)
+ [1] Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf
+[20] Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); qlogis(0, c(0.0653, 0.000123, 32e-80, 8833, 79e70, 0, -1), rep(c(0.0653, 0.000123, 32e-80, 8833, 79e70), 7), lower.tail=FALSE, log.p=TRUE)
+ [1] -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf
+[16] -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf
+[31] -Inf -Inf -Inf -Inf -Inf
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); qlogis(0, c(0.0653, 0.000123, 32e-80, 8833, 79e70, 0, -1), rep(c(0.0653, 0.000123, 32e-80, 8833, 79e70), 7), lower.tail=TRUE, log.p=FALSE)
+ [1] -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf
+[16] -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf
+[31] -Inf -Inf -Inf -Inf -Inf
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); qlogis(0, c(0.0653, 0.000123, 32e-80, 8833, 79e70, 0, -1), rep(c(0.0653, 0.000123, 32e-80, 8833, 79e70), 7), lower.tail=TRUE, log.p=TRUE)
+ [1] Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf
+[20] Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); qlogis(c(-1, 0, 0.2, 2), c(-1, 0, 0.1, 0.9, 3), rep(c(-1, 0, 1, 0.1, -0.1, 0.0001), 20), lower.tail=FALSE, log.p=FALSE)
+  [1]       NaN       Inf 1.4862944       NaN       NaN       Inf       NaN
+  [8]       NaN       NaN       Inf       NaN       NaN       NaN       Inf
+ [15] 4.3862944       NaN       NaN       Inf       NaN       NaN       NaN
+ [22]       Inf       NaN       NaN       NaN       Inf 1.3862944       NaN
+ [29]       NaN       Inf       NaN       NaN       NaN       Inf       NaN
+ [36]       NaN       NaN       Inf 2.2862944       NaN       NaN       Inf
+ [43]       NaN       NaN       NaN       Inf       NaN       NaN       NaN
+ [50]       Inf 0.3862944       NaN       NaN       Inf       NaN       NaN
+ [57]       NaN       Inf       NaN       NaN       NaN       Inf 1.4862944
+ [64]       NaN       NaN       Inf       NaN       NaN       NaN       Inf
+ [71]       NaN       NaN       NaN       Inf 4.3862944       NaN       NaN
+ [78]       Inf       NaN       NaN       NaN       Inf       NaN       NaN
+ [85]       NaN       Inf 1.3862944       NaN       NaN       Inf       NaN
+ [92]       NaN       NaN       Inf       NaN       NaN       NaN       Inf
+ [99] 2.2862944       NaN       NaN       Inf       NaN       NaN       NaN
+[106]       Inf       NaN       NaN       NaN       Inf 0.3862944       NaN
+[113]       NaN       Inf       NaN       NaN       NaN       Inf       NaN
+[120]       NaN
+Warning message:
+In qlogis(c(-1, 0, 0.2, 2), c(-1, 0, 0.1, 0.9, 3), rep(c(-1, 0,  :
+  NaNs produced
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); qlogis(c(-1, 0, 0.2, 2), c(-1, 0, 0.1, 0.9, 3), rep(c(-1, 0, 1, 0.1, -0.1, 0.0001), 20), lower.tail=FALSE, log.p=TRUE)
+  [1]        NaN       -Inf        NaN        NaN        NaN       -Inf
+  [7]        NaN        NaN  1.4413249       -Inf        NaN        NaN
+ [13]        NaN       -Inf        NaN        NaN        NaN       -Inf
+ [19]        NaN        NaN -0.4586751       -Inf        NaN        NaN
+ [25]        NaN       -Inf        NaN        NaN        NaN       -Inf
+ [31]        NaN        NaN  0.6413249       -Inf        NaN        NaN
+ [37]        NaN       -Inf        NaN        NaN        NaN       -Inf
+ [43]        NaN        NaN  3.5413249       -Inf        NaN        NaN
+ [49]        NaN       -Inf        NaN        NaN        NaN       -Inf
+ [55]        NaN        NaN  0.5413249       -Inf        NaN        NaN
+ [61]        NaN       -Inf        NaN        NaN        NaN       -Inf
+ [67]        NaN        NaN  1.4413249       -Inf        NaN        NaN
+ [73]        NaN       -Inf        NaN        NaN        NaN       -Inf
+ [79]        NaN        NaN -0.4586751       -Inf        NaN        NaN
+ [85]        NaN       -Inf        NaN        NaN        NaN       -Inf
+ [91]        NaN        NaN  0.6413249       -Inf        NaN        NaN
+ [97]        NaN       -Inf        NaN        NaN        NaN       -Inf
+[103]        NaN        NaN  3.5413249       -Inf        NaN        NaN
+[109]        NaN       -Inf        NaN        NaN        NaN       -Inf
+[115]        NaN        NaN  0.5413249       -Inf        NaN        NaN
+Warning message:
+In qlogis(c(-1, 0, 0.2, 2), c(-1, 0, 0.1, 0.9, 3), rep(c(-1, 0,  :
+  NaNs produced
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); qlogis(c(-1, 0, 0.2, 2), c(-1, 0, 0.1, 0.9, 3), rep(c(-1, 0, 1, 0.1, -0.1, 0.0001), 20), lower.tail=TRUE, log.p=FALSE)
+  [1]        NaN       -Inf -1.2862944        NaN        NaN       -Inf
+  [7]        NaN        NaN        NaN       -Inf        NaN        NaN
+ [13]        NaN       -Inf  1.6137056        NaN        NaN       -Inf
+ [19]        NaN        NaN        NaN       -Inf        NaN        NaN
+ [25]        NaN       -Inf -1.3862944        NaN        NaN       -Inf
+ [31]        NaN        NaN        NaN       -Inf        NaN        NaN
+ [37]        NaN       -Inf -0.4862944        NaN        NaN       -Inf
+ [43]        NaN        NaN        NaN       -Inf        NaN        NaN
+ [49]        NaN       -Inf -2.3862944        NaN        NaN       -Inf
+ [55]        NaN        NaN        NaN       -Inf        NaN        NaN
+ [61]        NaN       -Inf -1.2862944        NaN        NaN       -Inf
+ [67]        NaN        NaN        NaN       -Inf        NaN        NaN
+ [73]        NaN       -Inf  1.6137056        NaN        NaN       -Inf
+ [79]        NaN        NaN        NaN       -Inf        NaN        NaN
+ [85]        NaN       -Inf -1.3862944        NaN        NaN       -Inf
+ [91]        NaN        NaN        NaN       -Inf        NaN        NaN
+ [97]        NaN       -Inf -0.4862944        NaN        NaN       -Inf
+[103]        NaN        NaN        NaN       -Inf        NaN        NaN
+[109]        NaN       -Inf -2.3862944        NaN        NaN       -Inf
+[115]        NaN        NaN        NaN       -Inf        NaN        NaN
+Warning message:
+In qlogis(c(-1, 0, 0.2, 2), c(-1, 0, 0.1, 0.9, 3), rep(c(-1, 0,  :
+  NaNs produced
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); qlogis(c(-1, 0, 0.2, 2), c(-1, 0, 0.1, 0.9, 3), rep(c(-1, 0, 1, 0.1, -0.1, 0.0001), 20), lower.tail=TRUE, log.p=TRUE)
+  [1]        NaN        Inf        NaN        NaN        NaN        Inf
+  [7]        NaN        NaN  0.3586751        Inf        NaN        NaN
+ [13]        NaN        Inf        NaN        NaN        NaN        Inf
+ [19]        NaN        NaN -1.5413249        Inf        NaN        NaN
+ [25]        NaN        Inf        NaN        NaN        NaN        Inf
+ [31]        NaN        NaN -0.4413249        Inf        NaN        NaN
+ [37]        NaN        Inf        NaN        NaN        NaN        Inf
+ [43]        NaN        NaN  2.4586751        Inf        NaN        NaN
+ [49]        NaN        Inf        NaN        NaN        NaN        Inf
+ [55]        NaN        NaN -0.5413249        Inf        NaN        NaN
+ [61]        NaN        Inf        NaN        NaN        NaN        Inf
+ [67]        NaN        NaN  0.3586751        Inf        NaN        NaN
+ [73]        NaN        Inf        NaN        NaN        NaN        Inf
+ [79]        NaN        NaN -1.5413249        Inf        NaN        NaN
+ [85]        NaN        Inf        NaN        NaN        NaN        Inf
+ [91]        NaN        NaN -0.4413249        Inf        NaN        NaN
+ [97]        NaN        Inf        NaN        NaN        NaN        Inf
+[103]        NaN        NaN  2.4586751        Inf        NaN        NaN
+[109]        NaN        Inf        NaN        NaN        NaN        Inf
+[115]        NaN        NaN -0.5413249        Inf        NaN        NaN
+Warning message:
+In qlogis(c(-1, 0, 0.2, 2), c(-1, 0, 0.1, 0.9, 3), rep(c(-1, 0,  :
+  NaNs produced
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWarningContext#
+#set.seed(1); qlogis(c(NA, 0, NaN, 1/0, -1/0), rep(c(1, 0, 0.1), 5), rep(c(1, 0, 0.1), 5))
+ [1]   NA -Inf  NaN  NaN  NaN   NA -Inf  NaN  NaN  NaN   NA -Inf  NaN  NaN  NaN
+Warning message:
+In qlogis(c(NA, 0, NaN, 1/0, -1/0), rep(c(1, 0, 0.1), 5), rep(c(1,  :
+  NaNs produced
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWarningContext#
+#set.seed(1); qlogis(rep(c(1, 0, 0.1), 5), c(NA, 0, NaN, 1/0, -1/0), rep(c(1, 0, 0.1), 5))
+ [1]         NA       -Inf        NaN        Inf       -Inf         NA
+ [7]        Inf        NaN        Inf        Inf         NA -0.2197225
+[13]        NaN       -Inf       -Inf
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); qlogis(rep(c(1, 0, 0.1), 5), rep(c(1, 0, 0.1), 5), c(NA, 0, NaN, 1/0, -1/0))
+ [1]   NA -Inf  NaN  Inf -Inf   NA  Inf  NaN -Inf  Inf   NA  0.1  NaN -Inf  NaN
+Warning message:
+In qlogis(rep(c(1, 0, 0.1), 5), rep(c(1, 0, 0.1), 5), c(NA, 0, NaN,  :
+  NaNs produced
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); qnorm(0, 10, 10, lower.tail=FALSE, log.p=FALSE)
+[1] Inf
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); qnorm(0, 10, 10, lower.tail=FALSE, log.p=TRUE)
+[1] -Inf
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); qnorm(0, 10, 10, lower.tail=TRUE, log.p=FALSE)
+[1] -Inf
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); qnorm(0, 10, 10, lower.tail=TRUE, log.p=TRUE)
+[1] Inf
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); qnorm(0, c(0.0653, 0.000123, 32e-80, 8833, 79e70, 0, -1), rep(c(0.0653, 0.000123, 32e-80, 8833, 79e70), 7), lower.tail=FALSE, log.p=FALSE)
+ [1] Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf
+[20] Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); qnorm(0, c(0.0653, 0.000123, 32e-80, 8833, 79e70, 0, -1), rep(c(0.0653, 0.000123, 32e-80, 8833, 79e70), 7), lower.tail=FALSE, log.p=TRUE)
+ [1] -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf
+[16] -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf
+[31] -Inf -Inf -Inf -Inf -Inf
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); qnorm(0, c(0.0653, 0.000123, 32e-80, 8833, 79e70, 0, -1), rep(c(0.0653, 0.000123, 32e-80, 8833, 79e70), 7), lower.tail=TRUE, log.p=FALSE)
+ [1] -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf
+[16] -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf
+[31] -Inf -Inf -Inf -Inf -Inf
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); qnorm(0, c(0.0653, 0.000123, 32e-80, 8833, 79e70, 0, -1), rep(c(0.0653, 0.000123, 32e-80, 8833, 79e70), 7), lower.tail=TRUE, log.p=TRUE)
+ [1] Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf
+[20] Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); qnorm(c(-1, 0, 0.2, 2), c(-1, 0, 0.1, 0.9, 3), rep(c(-1, 0, 1, 0.1, -0.1, 0.0001), 20), lower.tail=FALSE, log.p=FALSE)
+  [1]        NaN        Inf  0.9416212        NaN        NaN        Inf
+  [7]        NaN        NaN        NaN        Inf        NaN        NaN
+ [13]        NaN        Inf  3.8416212        NaN        NaN        Inf
+ [19]        NaN        NaN        NaN        Inf        NaN        NaN
+ [25]        NaN        Inf  0.8416212        NaN        NaN        Inf
+ [31]        NaN        NaN        NaN        Inf        NaN        NaN
+ [37]        NaN        Inf  1.7416212        NaN        NaN        Inf
+ [43]        NaN        NaN        NaN        Inf        NaN        NaN
+ [49]        NaN        Inf -0.1583788        NaN        NaN        Inf
+ [55]        NaN        NaN        NaN        Inf        NaN        NaN
+ [61]        NaN        Inf  0.9416212        NaN        NaN        Inf
+ [67]        NaN        NaN        NaN        Inf        NaN        NaN
+ [73]        NaN        Inf  3.8416212        NaN        NaN        Inf
+ [79]        NaN        NaN        NaN        Inf        NaN        NaN
+ [85]        NaN        Inf  0.8416212        NaN        NaN        Inf
+ [91]        NaN        NaN        NaN        Inf        NaN        NaN
+ [97]        NaN        Inf  1.7416212        NaN        NaN        Inf
+[103]        NaN        NaN        NaN        Inf        NaN        NaN
+[109]        NaN        Inf -0.1583788        NaN        NaN        Inf
+[115]        NaN        NaN        NaN        Inf        NaN        NaN
+Warning message:
+In qnorm(c(-1, 0, 0.2, 2), c(-1, 0, 0.1, 0.9, 3), rep(c(-1, 0, 1,  :
+  NaNs produced
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); qnorm(c(-1, 0, 0.2, 2), c(-1, 0, 0.1, 0.9, 3), rep(c(-1, 0, 1, 0.1, -0.1, 0.0001), 20), lower.tail=FALSE, log.p=TRUE)
+  [1]       NaN      -Inf       NaN       NaN       NaN      -Inf       NaN
+  [8]       NaN  1.237475      -Inf       NaN       NaN       NaN      -Inf
+ [15]       NaN       NaN       NaN      -Inf       NaN       NaN -0.662525
+ [22]      -Inf       NaN       NaN       NaN      -Inf       NaN       NaN
+ [29]       NaN      -Inf       NaN       NaN  0.437475      -Inf       NaN
+ [36]       NaN       NaN      -Inf       NaN       NaN       NaN      -Inf
+ [43]       NaN       NaN  3.337475      -Inf       NaN       NaN       NaN
+ [50]      -Inf       NaN       NaN       NaN      -Inf       NaN       NaN
+ [57]  0.337475      -Inf       NaN       NaN       NaN      -Inf       NaN
+ [64]       NaN       NaN      -Inf       NaN       NaN  1.237475      -Inf
+ [71]       NaN       NaN       NaN      -Inf       NaN       NaN       NaN
+ [78]      -Inf       NaN       NaN -0.662525      -Inf       NaN       NaN
+ [85]       NaN      -Inf       NaN       NaN       NaN      -Inf       NaN
+ [92]       NaN  0.437475      -Inf       NaN       NaN       NaN      -Inf
+ [99]       NaN       NaN       NaN      -Inf       NaN       NaN  3.337475
+[106]      -Inf       NaN       NaN       NaN      -Inf       NaN       NaN
+[113]       NaN      -Inf       NaN       NaN  0.337475      -Inf       NaN
+[120]       NaN
+Warning message:
+In qnorm(c(-1, 0, 0.2, 2), c(-1, 0, 0.1, 0.9, 3), rep(c(-1, 0, 1,  :
+  NaNs produced
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); qnorm(c(-1, 0, 0.2, 2), c(-1, 0, 0.1, 0.9, 3), rep(c(-1, 0, 1, 0.1, -0.1, 0.0001), 20), lower.tail=TRUE, log.p=FALSE)
+  [1]         NaN        -Inf -0.74162123         NaN         NaN        -Inf
+  [7]         NaN         NaN         NaN        -Inf         NaN         NaN
+ [13]         NaN        -Inf  2.15837877         NaN         NaN        -Inf
+ [19]         NaN         NaN         NaN        -Inf         NaN         NaN
+ [25]         NaN        -Inf -0.84162123         NaN         NaN        -Inf
+ [31]         NaN         NaN         NaN        -Inf         NaN         NaN
+ [37]         NaN        -Inf  0.05837877         NaN         NaN        -Inf
+ [43]         NaN         NaN         NaN        -Inf         NaN         NaN
+ [49]         NaN        -Inf -1.84162123         NaN         NaN        -Inf
+ [55]         NaN         NaN         NaN        -Inf         NaN         NaN
+ [61]         NaN        -Inf -0.74162123         NaN         NaN        -Inf
+ [67]         NaN         NaN         NaN        -Inf         NaN         NaN
+ [73]         NaN        -Inf  2.15837877         NaN         NaN        -Inf
+ [79]         NaN         NaN         NaN        -Inf         NaN         NaN
+ [85]         NaN        -Inf -0.84162123         NaN         NaN        -Inf
+ [91]         NaN         NaN         NaN        -Inf         NaN         NaN
+ [97]         NaN        -Inf  0.05837877         NaN         NaN        -Inf
+[103]         NaN         NaN         NaN        -Inf         NaN         NaN
+[109]         NaN        -Inf -1.84162123         NaN         NaN        -Inf
+[115]         NaN         NaN         NaN        -Inf         NaN         NaN
+Warning message:
+In qnorm(c(-1, 0, 0.2, 2), c(-1, 0, 0.1, 0.9, 3), rep(c(-1, 0, 1,  :
+  NaNs produced
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); qnorm(c(-1, 0, 0.2, 2), c(-1, 0, 0.1, 0.9, 3), rep(c(-1, 0, 1, 0.1, -0.1, 0.0001), 20), lower.tail=TRUE, log.p=TRUE)
+  [1]       NaN       Inf       NaN       NaN       NaN       Inf       NaN
+  [8]       NaN  0.562525       Inf       NaN       NaN       NaN       Inf
+ [15]       NaN       NaN       NaN       Inf       NaN       NaN -1.337475
+ [22]       Inf       NaN       NaN       NaN       Inf       NaN       NaN
+ [29]       NaN       Inf       NaN       NaN -0.237475       Inf       NaN
+ [36]       NaN       NaN       Inf       NaN       NaN       NaN       Inf
+ [43]       NaN       NaN  2.662525       Inf       NaN       NaN       NaN
+ [50]       Inf       NaN       NaN       NaN       Inf       NaN       NaN
+ [57] -0.337475       Inf       NaN       NaN       NaN       Inf       NaN
+ [64]       NaN       NaN       Inf       NaN       NaN  0.562525       Inf
+ [71]       NaN       NaN       NaN       Inf       NaN       NaN       NaN
+ [78]       Inf       NaN       NaN -1.337475       Inf       NaN       NaN
+ [85]       NaN       Inf       NaN       NaN       NaN       Inf       NaN
+ [92]       NaN -0.237475       Inf       NaN       NaN       NaN       Inf
+ [99]       NaN       NaN       NaN       Inf       NaN       NaN  2.662525
+[106]       Inf       NaN       NaN       NaN       Inf       NaN       NaN
+[113]       NaN       Inf       NaN       NaN -0.337475       Inf       NaN
+[120]       NaN
+Warning message:
+In qnorm(c(-1, 0, 0.2, 2), c(-1, 0, 0.1, 0.9, 3), rep(c(-1, 0, 1,  :
+  NaNs produced
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWarningContext#
+#set.seed(1); qnorm(c(NA, 0, NaN, 1/0, -1/0), rep(c(1, 0, 0.1), 5), rep(c(1, 0, 0.1), 5))
+ [1]   NA -Inf  NaN  NaN  NaN   NA -Inf  NaN  NaN  NaN   NA -Inf  NaN  NaN  NaN
+Warning message:
+In qnorm(c(NA, 0, NaN, 1/0, -1/0), rep(c(1, 0, 0.1), 5), rep(c(1,  :
+  NaNs produced
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWarningContext#
+#set.seed(1); qnorm(rep(c(1, 0, 0.1), 5), c(NA, 0, NaN, 1/0, -1/0), rep(c(1, 0, 0.1), 5))
+ [1]         NA       -Inf        NaN        Inf       -Inf         NA
+ [7]        Inf        NaN        Inf        Inf         NA -0.1281552
+[13]        NaN       -Inf       -Inf
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); qnorm(rep(c(1, 0, 0.1), 5), rep(c(1, 0, 0.1), 5), c(NA, 0, NaN, 1/0, -1/0))
+ [1]   NA -Inf  NaN  Inf -Inf   NA  Inf  NaN -Inf  Inf   NA  0.1  NaN -Inf  NaN
+Warning message:
+In qnorm(rep(c(1, 0, 0.1), 5), rep(c(1, 0, 0.1), 5), c(NA, 0, NaN,  :
+  NaNs produced
+
 ##com.oracle.truffle.r.test.library.stats.TestStats.testCor#
 #{ as.integer(cor(c(1,2,3),c(1,2,5))*10000000) }
 [1] 9607689
diff --git a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/library/stats/TestStatFunctions.java b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/library/stats/TestStatFunctions.java
index d15b49dd4f2a0250212fd7abd5e035e24cb85ffc..ffb14be2324ee9ec21996cf87158224635f0a134 100644
--- a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/library/stats/TestStatFunctions.java
+++ b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/library/stats/TestStatFunctions.java
@@ -30,7 +30,7 @@ import com.oracle.truffle.r.test.TestBase;
  * Common tests for functions implemented using {@code StatsFunctions} infrastructure.
  */
 public class TestStatFunctions extends TestBase {
-    private static final String[] FUNCTION3_1_NAMES = {"dgamma", "dbeta", "dcauchy", "dlnorm"};
+    private static final String[] FUNCTION3_1_NAMES = {"dgamma", "dbeta", "dcauchy", "dlnorm", "dlogis"};
     private static final String[] FUNCTION3_1_PARAMS = {
                     "10, 10, 10, log=TRUE",
                     "3, 3, 3, log=FALSE",
@@ -80,7 +80,7 @@ public class TestStatFunctions extends TestBase {
         assertEval(Output.IgnoreWhitespace, template("set.seed(1); %0(%1)", FUNCTION2_2_NAMES, new String[]{"rep(c(1, 0, 0.1), 5), c(NA, 0, NaN, 1/0, -1/0)"}));
     }
 
-    private static final String[] FUNCTION3_2_NAMES = {"pbeta", "pcauchy", "qcauchy", "qlnorm", "plnorm"};
+    private static final String[] FUNCTION3_2_NAMES = {"pbeta", "pcauchy", "qcauchy", "qlnorm", "plnorm", "qbinom", "pnorm", "qnorm", "qlogis", "pf", "pbinom", "plogis"};
     private static final String[] FUNCTION3_2_PARAMS = {
                     "0, 10, 10",
                     "c(-1, 0, 0.2, 2), c(-1, 0, 0.1, 0.9, 3), rep(c(-1, 0, 1, 0.1, -0.1, 0.0001), 20)",
@@ -90,16 +90,17 @@ public class TestStatFunctions extends TestBase {
     @Test
     public void testFunctions32() {
         // first: the "normal params" with all the combinations of log.p and lower.tail
-        assertEval(Output.IgnoreWhitespace, template("set.seed(1); %0(%1, %2, %3)",
+        assertEval(Output.MayIgnoreWarningContext, template("set.seed(1); %0(%1, %2, %3)",
                         FUNCTION3_2_NAMES, FUNCTION3_2_PARAMS, new String[]{"lower.tail=TRUE", "lower.tail=FALSE"}, new String[]{"log.p=TRUE", "log.p=FALSE"}));
         // the error cases (where log.p nor lower.tail should make no difference)
         // first parameter wrong
-        assertEval(Output.IgnoreWarningContext,
+        assertEval(Output.MayIgnoreWarningContext,
                         template("set.seed(1); %0(%1)", FUNCTION3_2_NAMES, new String[]{"c(NA, 0, NaN, 1/0, -1/0), rep(c(1, 0, 0.1), 5), rep(c(1, 0, 0.1), 5)"}));
         // second parameter wrong
-        assertEval(Output.IgnoreWarningContext,
+        assertEval(Output.MayIgnoreWarningContext,
                         template("set.seed(1); %0(%1)", FUNCTION3_2_NAMES, new String[]{"rep(c(1, 0, 0.1), 5), c(NA, 0, NaN, 1/0, -1/0), rep(c(1, 0, 0.1), 5)"}));
         // third parameter wrong
-        assertEval(Output.IgnoreWhitespace, template("set.seed(1); %0(%1)", FUNCTION3_2_NAMES, new String[]{"rep(c(1, 0, 0.1), 5), rep(c(1, 0, 0.1), 5), c(NA, 0, NaN, 1/0, -1/0)"}));
+        assertEval(Output.MayIgnoreWarningContext,
+                        template("set.seed(1); %0(%1)", FUNCTION3_2_NAMES, new String[]{"rep(c(1, 0, 0.1), 5), rep(c(1, 0, 0.1), 5), c(NA, 0, NaN, 1/0, -1/0)"}));
     }
 }
diff --git a/mx.fastr/copyrights/overrides b/mx.fastr/copyrights/overrides
index 0467373d319614885a7468b7ad3c4ddd3c190853..1c597c2f2f1ae8c7bb469cf56adab4d268d55181 100644
--- a/mx.fastr/copyrights/overrides
+++ b/mx.fastr/copyrights/overrides
@@ -68,7 +68,7 @@ com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/SNorm.java,g
 com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/SExp.java,gnu_r_ihaka_core.copyright
 com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/RGamma.java,gnu_r_ihaka_core.copyright
 com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/RNbinomMu.java,gnu_r_ihaka_core.copyright
-com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/RLogis.java,gnu_r_ihaka_core.copyright
+com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/Logis.java,gnu_r_ihaka_core.copyright
 com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/Rf.java,gnu_r_ihaka_core.copyright
 com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/RChisq.java,gnu_r_ihaka_core.copyright
 com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/Exp.java,gnu_r_ihaka_core.copyright