diff --git a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/Cauchy.java b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/Cauchy.java
new file mode 100644
index 0000000000000000000000000000000000000000..3ab4aaf4548915fe6de78d90ce103a82f522d559
--- /dev/null
+++ b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/Cauchy.java
@@ -0,0 +1,157 @@
+/*
+ * 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 static com.oracle.truffle.r.library.stats.MathConstants.M_PI;
+import static com.oracle.truffle.r.library.stats.TOMS708.fabs;
+
+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 Cauchy {
+    private Cauchy() {
+        // contains only static classes
+    }
+
+    public static final class RCauchy implements RandFunction2_Double {
+        @Override
+        public double evaluate(double location, double scale, RandomNumberProvider rand) {
+            if (Double.isNaN(location) || !Double.isFinite(scale) || scale < 0) {
+                return RMath.mlError();
+            }
+            if (scale == 0. || !Double.isFinite(location)) {
+                return location;
+            } else {
+                return location + scale * Math.tan(M_PI * rand.unifRand());
+            }
+        }
+    }
+
+    public static final class DCauchy implements Function3_1 {
+        @Override
+        public double evaluate(double x, double location, double scale, boolean giveLog) {
+            double y;
+            /* NaNs propagated correctly */
+            if (Double.isNaN(x) || Double.isNaN(location) || Double.isNaN(scale)) {
+                return x + location + scale;
+            }
+            if (scale <= 0) {
+                return RMath.mlError();
+            }
+
+            y = (x - location) / scale;
+            return giveLog ? -Math.log(M_PI * scale * (1. + y * y)) : 1. / (M_PI * scale * (1. + y * y));
+        }
+    }
+
+    public static final class PCauchy 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) {
+                return RMath.mlError();
+            }
+
+            x = (x - location) / scale;
+            if (Double.isNaN(x)) {
+                return RMath.mlError();
+            }
+
+            if (!Double.isFinite(x)) {
+                if (x < 0) {
+                    return DPQ.rdt0(lowerTail, logP);
+                } else {
+                    return DPQ.rdt1(lowerTail, logP);
+                }
+            }
+
+            if (!lowerTail) {
+                x = -x;
+            }
+
+            /*
+             * for large x, the standard formula suffers from cancellation. This is from Morten
+             * Welinder thanks to Ian Smith's atan(1/x) :
+             */
+
+            // GnuR has #ifdef HAVE_ATANPI where it uses atanpi function, here we only implement the
+            // case when atanpi is not available for the moment
+            if (fabs(x) > 1) {
+                double y = Math.atan(1 / x) / M_PI;
+                return (x > 0) ? DPQ.rdclog(y, logP) : DPQ.rdval(-y, logP);
+            } else {
+                return DPQ.rdval(0.5 + Math.atan(x) / M_PI, logP);
+            }
+        }
+    }
+
+    public static final class QCauchy 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.rqp01check(p, logP);
+            } catch (EarlyReturn e) {
+                return e.result;
+            }
+            if (scale <= 0 || !Double.isFinite(scale)) {
+                if (scale == 0) {
+                    return location;
+                }
+                return RMath.mlError();
+            }
+
+            if (logP) {
+                if (p > -1) {
+                    /*
+                     * when ep := Math.exp(p), tan(pi*ep)= -tan(pi*(-ep))= -tan(pi*(-ep)+pi) =
+                     * -tan(pi*(1-ep)) = = -tan(pi*(-Math.expm1(p)) for p ~ 0, Math.exp(p) ~ 1,
+                     * tan(~0) may be better than tan(~pi).
+                     */
+                    if (p == 0.) {
+                        /* needed, since 1/tan(-0) = -Inf for some arch. */
+                        return location + (lowerTail ? scale : -scale) * Double.POSITIVE_INFINITY;
+                    }
+                    lowerTail = !lowerTail;
+                    p = -Math.expm1(p);
+                } else {
+                    p = Math.exp(p);
+                }
+            } else {
+                if (p > 0.5) {
+                    if (p == 1.) {
+                        return location + (lowerTail ? scale : -scale) * Double.POSITIVE_INFINITY;
+                    }
+                    p = 1 - p;
+                    lowerTail = !lowerTail;
+                }
+            }
+
+            if (p == 0.5) {
+                return location;
+            } // avoid 1/Inf below
+            if (p == 0.) {
+                return location + (lowerTail ? scale : -scale) * Double.NEGATIVE_INFINITY;
+            } // p = 1. is handled above
+            return location + (lowerTail ? -scale : scale) / RMath.tanpi(p);
+            /* -1/tan(pi * p) = -cot(pi * p) = tan(pi * (p - 1/2)) */
+        }
+    }
+}
diff --git a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/DBeta.java b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/DBeta.java
new file mode 100644
index 0000000000000000000000000000000000000000..a6a5a767d9e71e9bf4b8f8baa772bdaaf1124178
--- /dev/null
+++ b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/DBeta.java
@@ -0,0 +1,95 @@
+/*
+ * 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) 2000--2014, The R Core Team
+ * Copyright (c) 2016, Oracle and/or its affiliates
+ *
+ * All rights reserved.
+ */
+// Acknowledgement from GnuR header:
+// Author: Catherine Loader, catherine@research.bell-labs.com, October 23, 2000.
+package com.oracle.truffle.r.library.stats;
+
+import static com.oracle.truffle.r.library.stats.LBeta.lbeta;
+
+import com.oracle.truffle.r.library.stats.StatsFunctions.Function3_1;
+
+public class DBeta implements Function3_1 {
+    @Override
+    public double evaluate(double x, double a, double b, boolean log) {
+        /* NaNs propagated correctly */
+        if (Double.isNaN(x) || Double.isNaN(a) || Double.isNaN(b)) {
+            return x + a + b;
+        }
+
+        if (a < 0 || b < 0) {
+            return RMath.mlError();
+        }
+        if (x < 0 || x > 1) {
+            return (DPQ.rd0(log));
+        }
+
+        // limit cases for (a,b), leading to point masses
+        if (a == 0 || b == 0 || !Double.isFinite(a) || !Double.isFinite(b)) {
+            if (a == 0 && b == 0) { // point mass 1/2 at each of {0,1} :
+                if (x == 0 || x == 1) {
+                    return Double.POSITIVE_INFINITY;
+                } else {
+                    return DPQ.rd0(log);
+                }
+            }
+            if (a == 0 || a / b == 0) { // point mass 1 at 0
+                if (x == 0) {
+                    return Double.POSITIVE_INFINITY;
+                } else {
+                    return DPQ.rd0(log);
+                }
+            }
+            if (b == 0 || b / a == 0) { // point mass 1 at 1
+                if (x == 1) {
+                    return Double.POSITIVE_INFINITY;
+                } else {
+                    return DPQ.rd0(log);
+                }
+            }
+            // else, remaining case: a = b = Inf : point mass 1 at 1/2
+            if (x == 0.5) {
+                return Double.POSITIVE_INFINITY;
+            } else {
+                return DPQ.rd0(log);
+            }
+        }
+
+        if (x == 0) {
+            if (a > 1) {
+                return DPQ.rd0(log);
+            }
+            if (a < 1) {
+                return Double.POSITIVE_INFINITY;
+            }
+            /* a == 1 : */
+            return DPQ.rdval(b, log);
+        }
+        if (x == 1) {
+            if (b > 1) {
+                return DPQ.rd0(log);
+            }
+            if (b < 1) {
+                return Double.POSITIVE_INFINITY;
+            }
+            /* b == 1 : */
+            return (DPQ.rdval(a, log));
+        }
+
+        double lval;
+        if (a <= 2 || b <= 2) {
+            lval = (a - 1) * Math.log(x) + (b - 1) * Math.log1p(-x) - lbeta(a, b);
+        } else {
+            lval = Math.log(a + b - 1) + Dbinom.dbinomRaw(a - 1, a + b - 2, x, 1 - x, true);
+        }
+
+        return DPQ.rdexp(lval, log);
+    }
+}
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 f3286dd935c434ed1e9e09711e3d5b0350fce863..4925be2e7668b809c858a9ab8357bf45df62bcdb 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
@@ -79,7 +79,8 @@ public final class DPQ {
         return lowerTail ? 0.5 - p + 0.5 : p; /* 1 - p */
     }
 
-    public static double dval(double x, boolean logP) {
+    // R_D_val
+    public static double rdval(double x, boolean logP) {
         return logP ? Math.log(x) : x; /* x in pF(x,..) */
     }
 
@@ -106,6 +107,11 @@ public final class DPQ {
         return lowerTail ? rdlexp(p, logP) : rdlog(p, logP);
     }
 
+    // R_D_Clog(p) (log_p ? log1p(-(p)) : (0.5 - (p) + 0.5)) /* [log](1-p) */
+    public static double rdclog(double p, boolean logP) {
+        return logP ? RMath.log1p(-(p)) : (0.5 - (p) + 0.5);
+    }
+
     // R_DT_qIv
     public static double rdtqiv(double p, boolean lowerTail, boolean logP) {
         return logP ? lowerTail ? Math.exp(p) : -Math.expm1(p) : rdlval(p, lowerTail);
diff --git a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/Df.java b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/Df.java
new file mode 100644
index 0000000000000000000000000000000000000000..ded5ed50571f78b97300e4c76b7d0cdab74cb34c
--- /dev/null
+++ b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/Df.java
@@ -0,0 +1,70 @@
+/*
+ * 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) 2000--2014, The R Core Team
+ * Copyright (c) 2016, Oracle and/or its affiliates
+ *
+ * All rights reserved.
+ */
+// Acknowledgement from GnuR header:
+// Author: Catherine Loader, catherine@research.bell-labs.com, October 23, 2000.
+package com.oracle.truffle.r.library.stats;
+
+import static com.oracle.truffle.r.library.stats.Dbinom.dbinomRaw;
+import static com.oracle.truffle.r.library.stats.GammaFunctions.dgamma;
+
+import com.oracle.truffle.r.library.stats.StatsFunctions.Function3_1;
+
+public final class Df implements Function3_1 {
+    @Override
+    public double evaluate(double x, double m, double n, boolean giveLog) {
+        double p;
+        double q;
+        double f;
+        double dens;
+
+        if (Double.isNaN(x) || Double.isNaN(m) || Double.isNaN(n)) {
+            return x + m + n;
+        }
+
+        if (m <= 0 || n <= 0) {
+            return RMath.mlError();
+        }
+        if (x < 0.) {
+            return DPQ.rd0(giveLog);
+        }
+        if (x == 0.) {
+            return m > 2 ? DPQ.rd0(giveLog) : (m == 2 ? DPQ.rd1(giveLog) : Double.POSITIVE_INFINITY);
+        }
+        if (!Double.isFinite(m) && !Double.isFinite(n)) { /* both +Inf */
+            if (x == 1.) {
+                return Double.POSITIVE_INFINITY;
+            } else {
+                return DPQ.rd0(giveLog);
+            }
+        }
+        if (!Double.isFinite(n)) {
+            /* must be +Inf by now */
+            return dgamma(x, m / 2, 2. / m, giveLog);
+        }
+        if (m > 1e14) { /* includes +Inf: code below is inaccurate there */
+            dens = dgamma(1. / x, n / 2, 2. / n, giveLog);
+            return giveLog ? dens - 2 * Math.log(x) : dens / (x * x);
+        }
+
+        f = 1. / (n + x * m);
+        q = n * f;
+        p = x * m * f;
+
+        if (m >= 2) {
+            f = m * q / 2;
+            dens = dbinomRaw((m - 2) / 2, (m + n - 2) / 2, p, q, giveLog);
+        } else {
+            f = m * m * q / (2 * p * (m + n));
+            dens = dbinomRaw(m / 2, (m + n) / 2, p, q, giveLog);
+        }
+        return (giveLog ? Math.log(f) + dens : f * dens);
+    }
+}
diff --git a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/GammaFunctions.java b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/GammaFunctions.java
index a00d9241c07bd37df1dc9914a9ffa83f45c1878e..1638c38e2ce080d756db52c1c368bd0c9044230a 100644
--- a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/GammaFunctions.java
+++ b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/GammaFunctions.java
@@ -371,7 +371,7 @@ public abstract class GammaFunctions {
         }
 
         if (x <= 0 && x == (long) x) { /* Negative integer argument */
-            RError.warning(RError.SHOW_CALLER2, RError.Message.VALUE_OUT_OF_RANGE, "lgamma");
+            RError.warning(RError.SHOW_CALLER, RError.Message.VALUE_OUT_OF_RANGE, "lgamma");
             return Double.POSITIVE_INFINITY; /* +Inf, since lgamma(x) = log|gamma(x)| */
         }
 
@@ -388,7 +388,7 @@ public abstract class GammaFunctions {
          */
 
         if (y > gfn_sign_xmax) {
-            RError.warning(RError.SHOW_CALLER2, RError.Message.VALUE_OUT_OF_RANGE, "lgamma");
+            RError.warning(RError.SHOW_CALLER, RError.Message.VALUE_OUT_OF_RANGE, "lgamma");
             return Double.POSITIVE_INFINITY;
         }
 
diff --git a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/LogNormal.java b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/LogNormal.java
new file mode 100644
index 0000000000000000000000000000000000000000..824a4acef8f241ac6d5d34f358f970ce727e15a7
--- /dev/null
+++ b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/LogNormal.java
@@ -0,0 +1,95 @@
+/*
+ * 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) 2000--2014, The R Core Team
+ * Copyright (c) 2005, The R Foundation
+ * Copyright (c) 2016, Oracle and/or its affiliates
+ *
+ * All rights reserved.
+ */
+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 LogNormal {
+    private LogNormal() {
+        // only static members
+    }
+
+    public static final class RLNorm implements RandFunction2_Double {
+        private final Rnorm rnorm = new Rnorm();
+
+        @Override
+        public double evaluate(double meanlog, double sdlog, RandomNumberProvider rand) {
+            if (Double.isNaN(meanlog) || !Double.isFinite(sdlog) || sdlog < 0.) {
+                return RMath.mlError();
+            }
+            return Math.exp(rnorm.evaluate(meanlog, sdlog, rand));
+        }
+    }
+
+    public static final class DLNorm implements Function3_1 {
+        @Override
+        public double evaluate(double x, double meanlog, double sdlog, boolean giveLog) {
+            if (Double.isNaN(x) || Double.isNaN(meanlog) || Double.isNaN(sdlog)) {
+                return x + meanlog + sdlog;
+            }
+            if (sdlog <= 0) {
+                if (sdlog < 0) {
+                    return RMath.mlError();
+                }
+                // sdlog == 0 :
+                return (Math.log(x) == meanlog) ? Double.POSITIVE_INFINITY : DPQ.rd0(giveLog);
+            }
+            if (x <= 0) {
+                return DPQ.rd0(giveLog);
+            }
+
+            double y = (Math.log(x) - meanlog) / sdlog;
+            return (giveLog ? -(MathConstants.M_LN_SQRT_2PI + 0.5 * y * y + Math.log(x * sdlog)) : MathConstants.M_1_SQRT_2PI * Math.exp(-0.5 * y * y) / (x * sdlog));
+            /* M_1_SQRT_2PI = 1 / Math.sqrt(2 * pi) */
+        }
+    }
+
+    public static final class QLNorm implements Function3_2 {
+        private final Qnorm qnorm = new Qnorm();
+
+        @Override
+        public double evaluate(double p, double meanlog, double sdlog, boolean lowerTail, boolean logP) {
+            if (Double.isNaN(p) || Double.isNaN(meanlog) || Double.isNaN(sdlog)) {
+                return p + meanlog + sdlog;
+            }
+            try {
+                DPQ.rqp01boundaries(p, 0, Double.POSITIVE_INFINITY, lowerTail, logP);
+            } catch (EarlyReturn e) {
+                return e.result;
+            }
+            return Math.exp(qnorm.evaluate(p, meanlog, sdlog, lowerTail, logP));
+        }
+    }
+
+    public static final class PLNorm implements Function3_2 {
+        private final Pnorm pnorm = new Pnorm();
+
+        @Override
+        public double evaluate(double x, double meanlog, double sdlog, boolean lowerTail, boolean logP) {
+            if (Double.isNaN(x) || Double.isNaN(meanlog) || Double.isNaN(sdlog)) {
+                return x + meanlog + sdlog;
+            }
+            if (sdlog < 0) {
+                return RMath.mlError();
+            }
+            if (x > 0) {
+                return pnorm.evaluate(Math.log(x), meanlog, sdlog, lowerTail, logP);
+            }
+            return DPQ.rdt0(lowerTail, logP);
+        }
+    }
+}
diff --git a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/Pbeta.java b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/Pbeta.java
index d7bfc2f1a7c7e07017967aa46dfef307478a4375..02c713c68abadf8fe6755b5a2ead937269cc88bd 100644
--- a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/Pbeta.java
+++ b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/Pbeta.java
@@ -12,14 +12,21 @@ package com.oracle.truffle.r.library.stats;
 
 import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
 import com.oracle.truffle.api.profiles.BranchProfile;
+import com.oracle.truffle.r.library.stats.StatsFunctions.Function3_2;
 import com.oracle.truffle.r.library.stats.TOMS708.Bratio;
-import com.oracle.truffle.r.nodes.builtin.RExternalBuiltinNode;
 import com.oracle.truffle.r.runtime.RError;
 import com.oracle.truffle.r.runtime.RError.Message;
 
 // transcribed from pbeta.c
 
-public abstract class Pbeta extends RExternalBuiltinNode.Arg5 {
+public final class Pbeta implements Function3_2 {
+
+    private final BranchProfile naProfile = BranchProfile.create();
+
+    @Override
+    public double evaluate(double x, double a, double b, boolean lowerTail, boolean logP) {
+        return pbeta(x, a, b, lowerTail, logP, naProfile);
+    }
 
     @TruffleBoundary
     private static double pbetaRaw(double x, double a, double b, boolean lowerTail, boolean logProb) {
diff --git a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/Pnorm.java b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/Pnorm.java
index a8c29ddde26e7c17a1aba7d83c9d29887136e321..2d73851c472337e07e46861bed2700d4ccb9a2d2 100644
--- a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/Pnorm.java
+++ b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/Pnorm.java
@@ -41,11 +41,11 @@ public final class Pnorm implements StatsFunctions.Function3_2 {
                 return Double.NaN;
             }
             /* sigma = 0 : */
-            return (x < mu) ? DPQ.rd0(logP) : DPQ.rd1(logP);
+            return (x < mu) ? DPQ.rdt0(lowerTail, logP) : DPQ.rdt1(lowerTail, logP);
         }
         double p = (x - mu) / sigma;
         if (!Double.isFinite(p)) {
-            return (x < mu) ? DPQ.rd0(logP) : DPQ.rd1(logP);
+            return (x < mu) ? DPQ.rdt0(lowerTail, logP) : DPQ.rdt1(lowerTail, logP);
         }
 
         PnormBoth pnormBoth = new PnormBoth(p);
diff --git a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/RCauchy.java b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/RCauchy.java
deleted file mode 100644
index 6792699dccf791bc5636ed24cf401d6882ba782e..0000000000000000000000000000000000000000
--- a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/RCauchy.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 static com.oracle.truffle.r.library.stats.MathConstants.M_PI;
-
-import com.oracle.truffle.r.library.stats.RandGenerationFunctions.RandFunction2_Double;
-import com.oracle.truffle.r.library.stats.RandGenerationFunctions.RandomNumberProvider;
-
-public final class RCauchy implements RandFunction2_Double {
-    @Override
-    public double evaluate(double location, double scale, RandomNumberProvider rand) {
-        if (Double.isNaN(location) || !Double.isFinite(scale) || scale < 0) {
-            return RMath.mlError();
-        }
-        if (scale == 0. || !Double.isFinite(location)) {
-            return location;
-        } else {
-            return location + scale * Math.tan(M_PI * rand.unifRand());
-        }
-    }
-}
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 04e41edbf8cfb1e208b56f5ed48e6592256e29eb..7b0d2a4c0dc0e158da8cfad77148cfff9c3028fe 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
@@ -16,6 +16,7 @@ import static com.oracle.truffle.r.library.stats.LBeta.lbeta;
 
 import com.oracle.truffle.api.CompilerDirectives.CompilationFinal;
 import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
+import com.oracle.truffle.r.runtime.RRuntime;
 
 /**
  * Encapsulates functions to be found in Rmath.h or in nmath directory in GnuR except for random
@@ -43,6 +44,38 @@ public class RMath {
         return ((y >= 0) ? TOMS708.fabs(x) : -TOMS708.fabs(x));
     }
 
+    public static double fmod(double a, double b) {
+        double q = a / b;
+        if (b != 0) {
+            double tmp = a - Math.floor(q) * b;
+            if (RRuntime.isFinite(q) && Math.abs(q) > 1 / RRuntime.EPSILON) {
+                // TODO support warning here
+                throw new UnsupportedOperationException();
+            }
+            return tmp - Math.floor(tmp / b) * b;
+        } else {
+            return Double.NaN;
+        }
+    }
+
+    public static double tanpi(double x) {
+        if (Double.isNaN(x)) {
+            return x;
+        }
+        if (!Double.isFinite(x)) {
+            return mlError();
+        }
+
+        x = fmod(x, 1.); // tan(pi(x + k)) == tan(pi x) for all integer k
+        // map (-1,1) --> (-1/2, 1/2] :
+        if (x <= -0.5) {
+            x++;
+        } else if (x > 0.5) {
+            x--;
+        }
+        return (x == 0.) ? 0. : ((x == 0.5) ? Double.NaN : Math.tan(MathConstants.M_PI * x));
+    }
+
     //
     // GNUR from fmin2.c and fmax2
     //
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 6d1559d763aeafa49e50270dfe01f3a47718ce14..279790c9b7f5c15e33802be3b956aefe106a481d 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
@@ -40,13 +40,19 @@ import com.oracle.truffle.r.library.methods.SlotFactory.R_getSlotNodeGen;
 import com.oracle.truffle.r.library.methods.SlotFactory.R_setSlotNodeGen;
 import com.oracle.truffle.r.library.methods.SubstituteDirectNodeGen;
 import com.oracle.truffle.r.library.parallel.ParallelFunctionsFactory.MCIsChildNodeGen;
+import com.oracle.truffle.r.library.stats.Cauchy;
+import com.oracle.truffle.r.library.stats.Cauchy.DCauchy;
+import com.oracle.truffle.r.library.stats.Cauchy.PCauchy;
+import com.oracle.truffle.r.library.stats.Cauchy.RCauchy;
 import com.oracle.truffle.r.library.stats.CdistNodeGen;
 import com.oracle.truffle.r.library.stats.Chisq;
 import com.oracle.truffle.r.library.stats.CompleteCases;
 import com.oracle.truffle.r.library.stats.CovcorNodeGen;
 import com.oracle.truffle.r.library.stats.CutreeNodeGen;
+import com.oracle.truffle.r.library.stats.DBeta;
 import com.oracle.truffle.r.library.stats.DPois;
 import com.oracle.truffle.r.library.stats.Dbinom;
+import com.oracle.truffle.r.library.stats.Df;
 import com.oracle.truffle.r.library.stats.DoubleCentreNodeGen;
 import com.oracle.truffle.r.library.stats.Dt;
 import com.oracle.truffle.r.library.stats.Exp.DExp;
@@ -58,13 +64,17 @@ import com.oracle.truffle.r.library.stats.GammaFunctions.QgammaFunc;
 import com.oracle.truffle.r.library.stats.Geom;
 import com.oracle.truffle.r.library.stats.Geom.DGeom;
 import com.oracle.truffle.r.library.stats.Geom.RGeom;
+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.Pbeta;
 import com.oracle.truffle.r.library.stats.Pbinom;
 import com.oracle.truffle.r.library.stats.Pf;
 import com.oracle.truffle.r.library.stats.Pnorm;
 import com.oracle.truffle.r.library.stats.Qbinom;
 import com.oracle.truffle.r.library.stats.Qnorm;
 import com.oracle.truffle.r.library.stats.RBeta;
-import com.oracle.truffle.r.library.stats.RCauchy;
 import com.oracle.truffle.r.library.stats.RChisq;
 import com.oracle.truffle.r.library.stats.RGamma;
 import com.oracle.truffle.r.library.stats.RHyper;
@@ -284,8 +294,18 @@ public class CallAndExternalFunctions {
                     return RandGenerationFunctionsFactory.Function2_IntNodeGen.create(new Rbinom());
                 case "pbinom":
                     return StatsFunctionsFactory.Function3_2NodeGen.create(new Pbinom());
+                case "pbeta":
+                    return StatsFunctionsFactory.Function3_2NodeGen.create(new Pbeta());
+                case "dcauchy":
+                    return StatsFunctionsFactory.Function3_1NodeGen.create(new DCauchy());
+                case "pcauchy":
+                    return StatsFunctionsFactory.Function3_2NodeGen.create(new PCauchy());
+                case "qcauchy":
+                    return StatsFunctionsFactory.Function3_2NodeGen.create(new Cauchy.QCauchy());
                 case "pf":
                     return StatsFunctionsFactory.Function3_2NodeGen.create(new Pf());
+                case "df":
+                    return StatsFunctionsFactory.Function3_1NodeGen.create(new Df());
                 case "dgamma":
                     return StatsFunctionsFactory.Function3_1NodeGen.create(new DGamma());
                 case "dchisq":
@@ -304,8 +324,18 @@ public class CallAndExternalFunctions {
                     return StatsFunctionsFactory.Function2_1NodeGen.create(new DGeom());
                 case "dpois":
                     return StatsFunctionsFactory.Function2_1NodeGen.create(new DPois());
+                case "dbeta":
+                    return StatsFunctionsFactory.Function3_1NodeGen.create(new DBeta());
                 case "dt":
                     return StatsFunctionsFactory.Function2_1NodeGen.create(new Dt());
+                case "rlnorm":
+                    return RandGenerationFunctionsFactory.Function2_DoubleNodeGen.create(new LogNormal.RLNorm());
+                case "dlnorm":
+                    return StatsFunctionsFactory.Function3_1NodeGen.create(new DLNorm());
+                case "qlnorm":
+                    return StatsFunctionsFactory.Function3_2NodeGen.create(new QLNorm());
+                case "plnorm":
+                    return StatsFunctionsFactory.Function3_2NodeGen.create(new PLNorm());
                 case "rmultinom":
                     return RMultinomNodeGen.create();
                 case "Approx":
diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ops/BinaryArithmetic.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ops/BinaryArithmetic.java
index c3538fa9a79e69624a844b784275b7a3b2dd0d40..fa6e33017ba7329a1d9810df5051c8da746174dc 100644
--- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ops/BinaryArithmetic.java
+++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ops/BinaryArithmetic.java
@@ -110,7 +110,8 @@ public abstract class BinaryArithmetic extends Operation {
     public abstract String op(String left, String right);
 
     public static double fmod(double a, double b) {
-        // LICENSE: transcribed code from GNU R, which is licensed under GPL
+        // TODO: this is duplicated in RMath, once RMath is moved to runtime, this should be
+        // replaced
         double q = a / b;
         if (b != 0) {
             double tmp = a - Math.floor(q) * b;
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 82a4c02981fb51b1b459c1a4dd58a8341dd6d387..ca08ecfb6f6aab0c1e0ef5a998114127aaba55f3 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
@@ -113946,6 +113946,38 @@ Warning message:
 In rgamma(30, c(NA, 0, NaN, 1/0, -1/0), c(NaN, NaN, NA, 0, 1/0,  :
   NAs produced
 
+##com.oracle.truffle.r.test.library.stats.TestRandGenerationFunctions.testFunctions2#Output.IgnoreWhitespace#
+#set.seed(1); rlnorm(10, 10, 10)
+ [1] 4.190738e+01 1.381967e+05 5.174351e+00 1.867073e+11 5.942633e+05
+ [6] 6.021378e+00 2.882852e+06 3.543629e+07 6.974795e+06 1.039106e+03
+
+##com.oracle.truffle.r.test.library.stats.TestRandGenerationFunctions.testFunctions2#Output.IgnoreWhitespace#
+#set.seed(1); rlnorm(20, c(-1, 0, 0.2, 2:5), c(-1, 0, 0.1, 0.9, 3))
+ [1]         NaN   1.0000000   1.1472349   8.7170336   1.6374074         NaN
+ [7] 148.4131591   0.4315068   1.3452192   0.1042040         NaN  20.0855369
+[13]  57.3253483 288.4414833   2.0695766         NaN   1.2214028   7.1668137
+[19]  78.3043417 175.8321258
+Warning message:
+In rlnorm(20, c(-1, 0, 0.2, 2:5), c(-1, 0, 0.1, 0.9, 3)) : NAs produced
+
+##com.oracle.truffle.r.test.library.stats.TestRandGenerationFunctions.testFunctions2#Output.IgnoreWhitespace#
+#set.seed(1); rlnorm(24, c(0.0653, 0.000123, 32e-80, 8833, 79e70), c(0.0653, 0.000123, 32e-80, 8833, 79e70, 0, -1))
+ [1] 1.0246925 1.0001456 1.0000000       Inf       Inf 1.0674792       NaN
+ [8] 0.9478333       Inf       Inf       Inf 0.0000000 1.0000000       NaN
+[15]       Inf 1.0675304 1.0001230 0.0000000       Inf       Inf       NaN
+[22] 0.9971928 0.9999980       Inf
+Warning message:
+In rlnorm(24, c(0.0653, 0.000123, 3.2e-79, 8833, 7.9e+71), c(0.0653,  :
+  NAs produced
+
+##com.oracle.truffle.r.test.library.stats.TestRandGenerationFunctions.testFunctions2#Output.IgnoreWhitespace#
+#set.seed(1); rlnorm(30, c(NA, 0, NaN, 1/0, -1/0), c(NaN, NaN, NA, 0, 1/0, -1/0))
+ [1] NaN NaN NaN Inf NaN NaN NaN NaN NaN   0 NaN NaN NaN NaN NaN NaN NaN NaN NaN
+[20] NaN NaN   1 NaN NaN NaN NaN NaN NaN NaN NaN
+Warning message:
+In rlnorm(30, c(NA, 0, NaN, 1/0, -1/0), c(NaN, NaN, NA, 0, 1/0,  :
+  NAs produced
+
 ##com.oracle.truffle.r.test.library.stats.TestRandGenerationFunctions.testFunctions2#Output.IgnoreWhitespace#
 #set.seed(1); rlogis(10, 10, 10)
  [1]  -0.1753073   4.7688401  12.9350241  32.9194576  -3.7581524  31.7945887
@@ -114534,6 +114566,17 @@ In pchisq(c(-1, 0, 0.2, 2), rep(c(-1, 0, 0.1, 0.9, 3), 4), lower.tail = TRUE,  :
 #set.seed(1); pchisq(c(NA, 0, NaN, 1/0, -1/0), rep(c(1, 0, 0.1), 5))
  [1]  NA   0 NaN   1   0  NA   0 NaN   1   0  NA   0 NaN   1   0
 
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions22#Output.IgnoreWhitespace#
+#set.seed(1); pchisq(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   1 NaN   0 NaN
+Warning messages:
+1: In pchisq(rep(c(1, 0, 0.1), 5), c(NA, 0, NaN, 1/0, -1/0)) :
+  value out of range in 'lgamma'
+2: In pchisq(rep(c(1, 0, 0.1), 5), c(NA, 0, NaN, 1/0, -1/0)) :
+  value out of range in 'lgamma'
+3: In pchisq(rep(c(1, 0, 0.1), 5), c(NA, 0, NaN, 1/0, -1/0)) :
+  NaNs produced
+
 ##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions22#Output.IgnoreWhitespace#
 #set.seed(1); pexp(0, 10, lower.tail=FALSE, log.p=FALSE)
 [1] 1
@@ -114622,6 +114665,10 @@ In pexp(c(-1, 0, 0.2, 2), rep(c(-1, 0, 0.1, 0.9, 3), 4), lower.tail = TRUE,  :
 Warning message:
 In pexp(c(NA, 0, NaN, 1/0, -1/0), rep(c(1, 0, 0.1), 5)) : NaNs produced
 
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions22#Output.IgnoreWhitespace#
+#set.seed(1); pexp(rep(c(1, 0, 0.1), 5), c(NA, 0, NaN, 1/0, -1/0))
+ [1]   NA    0  NaN    1    0   NA    0  NaN    1 -Inf   NA    0  NaN    0 -Inf
+
 ##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions22#Output.IgnoreWhitespace#
 #set.seed(1); qexp(0, 10, lower.tail=FALSE, log.p=FALSE)
 [1] Inf
@@ -114711,6 +114758,12 @@ In qexp(c(-1, 0, 0.2, 2), rep(c(-1, 0, 0.1, 0.9, 3), 4), lower.tail = TRUE,  :
 Warning message:
 In qexp(c(NA, 0, NaN, 1/0, -1/0), rep(c(1, 0, 0.1), 5)) : NaNs produced
 
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions22#Output.IgnoreWhitespace#
+#set.seed(1); qexp(rep(c(1, 0, 0.1), 5), c(NA, 0, NaN, 1/0, -1/0))
+ [1]  NA   0 NaN NaN   0  NA Inf NaN   0 NaN  NA Inf NaN   0   0
+Warning message:
+In qexp(rep(c(1, 0, 0.1), 5), c(NA, 0, NaN, 1/0, -1/0)) : NaNs produced
+
 ##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions22#Output.IgnoreWhitespace#
 #set.seed(1); qgeom(0, 10, lower.tail=FALSE, log.p=FALSE)
 [1] NaN
@@ -114801,6 +114854,119 @@ In qgeom(c(-1, 0, 0.2, 2), rep(c(-1, 0, 0.1, 0.9, 3), 4), lower.tail = TRUE,  :
 Warning message:
 In qgeom(c(NA, 0, NaN, 1/0, -1/0), rep(c(1, 0, 0.1), 5)) : NaNs produced
 
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions22#Output.IgnoreWhitespace#
+#set.seed(1); qgeom(rep(c(1, 0, 0.1), 5), c(NA, 0, NaN, 1/0, -1/0))
+ [1]  NA NaN NaN NaN NaN  NA NaN NaN NaN NaN  NA NaN NaN NaN NaN
+Warning message:
+In qgeom(rep(c(1, 0, 0.1), 5), c(NA, 0, NaN, 1/0, -1/0)) : NaNs produced
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions31#Output.IgnoreWhitespace#
+#set.seed(1); dbeta(0, c(0.0653, 0.000123, 32e-80, 8833, 79e70), c(0.0653, 0.000123, 32e-80, 8833, 79e70, 0, -1), log=FALSE)
+[1] Inf Inf Inf   0   0   0 NaN
+Warning message:
+In dbeta(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); dbeta(0, c(NA, 0, NaN, 1/0, -1/0), c(NaN, NaN, NA, 0, 1/0, -1/0), log=FALSE)
+[1]  NA NaN  NA   0 NaN  NA
+Warning message:
+In dbeta(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); dbeta(10, 10, 10, log=TRUE)
+[1] -Inf
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions31#Output.IgnoreWhitespace#
+#set.seed(1); dbeta(3, 3, 3, log=FALSE)
+[1] 0
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions31#Output.IgnoreWhitespace#
+#set.seed(1); dbeta(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 Inf Inf   0   0 NaN   0 NaN   0   0 NaN Inf   0   0 NaN NaN   0 Inf   0
+[20]   0 NaN NaN Inf Inf   0 NaN Inf   0 NaN   0 NaN   0 Inf   0   0 NaN   0 Inf
+[39] Inf   0 NaN Inf NaN Inf   0 NaN   0 Inf   0 NaN NaN   0   0 Inf   0 NaN NaN
+[58]   0 Inf   0
+Warning message:
+In dbeta(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); dbeta(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  Inf  Inf -Inf -Inf  NaN -Inf  NaN -Inf -Inf  NaN  Inf -Inf -Inf  NaN
+[16]  NaN -Inf  Inf -Inf -Inf  NaN  NaN  Inf  Inf -Inf  NaN  Inf -Inf  NaN -Inf
+[31]  NaN -Inf  Inf -Inf -Inf  NaN -Inf  Inf  Inf -Inf  NaN  Inf  NaN  Inf -Inf
+[46]  NaN -Inf  Inf -Inf  NaN  NaN -Inf -Inf  Inf -Inf  NaN  NaN -Inf  Inf -Inf
+Warning message:
+In dbeta(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); dbeta(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); dcauchy(0, c(0.0653, 0.000123, 32e-80, 8833, 79e70), c(0.0653, 0.000123, 32e-80, 8833, 79e70, 0, -1), log=FALSE)
+[1] 2.437289e+00 1.293943e+03 4.973592e+77 1.801822e-05 2.014620e-73
+[6]          NaN          NaN
+Warning message:
+In dcauchy(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); dcauchy(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 dcauchy(0, c(NA, 0, NaN, 1/0, -1/0), c(NaN, NaN, NA, 0, 1/0,  :
+  NaNs produced
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions31#Output.IgnoreWhitespace#
+#set.seed(1); dcauchy(10, 10, 10, log=TRUE)
+[1] -3.447315
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions31#Output.IgnoreWhitespace#
+#set.seed(1); dcauchy(3, 3, 3, log=FALSE)
+[1] 0.1061033
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions31#Output.IgnoreWhitespace#
+#set.seed(1); dcauchy(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 0.0489707517 0.0292027419 0.0530516477
+ [6]          NaN          NaN 0.0315158303 0.1582756340 0.0914683581
+[11]          NaN          NaN 0.0012727305 0.0110995311 0.0734561276
+[16]          NaN          NaN 0.0315158303 0.0170421712 0.0381971863
+[21]          NaN          NaN 3.1830988618 0.1975716535 0.0530516477
+[26]          NaN          NaN 0.0008839486 0.1582756340 0.0954929659
+[31]          NaN          NaN 0.0079379024 0.0110995311 0.0280861664
+[36]          NaN          NaN 0.6366197724 0.1582756340 0.0381971863
+[41]          NaN          NaN 3.1830988618 0.3536776513 0.0990590932
+[46]          NaN          NaN 0.0035328511 0.0077826378 0.0954929659
+[51]          NaN          NaN 0.0079379024 0.0595590224 0.0280861664
+[56]          NaN          NaN 0.0315158303 0.3370339971 0.0954929659
+Warning message:
+In dcauchy(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); dcauchy(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 -3.0165321 -3.5334927 -2.9364894        NaN
+ [7]        NaN -3.4572653 -1.8434172 -2.3917622        NaN        NaN
+[13] -6.6665907 -4.5008524 -2.6110670        NaN        NaN -3.4572653
+[19] -4.0720643 -3.2649934        NaN        NaN  1.1578552 -1.6216540
+[25] -2.9364894        NaN        NaN -7.0311117 -1.8434172 -2.3487027
+[31]        NaN        NaN -4.8361062 -4.5008524 -3.5724781        NaN
+[37]        NaN -0.4515827 -1.8434172 -3.2649934        NaN        NaN
+[43]  1.1578552 -1.0393694 -2.3120387        NaN        NaN -5.6456501
+[49] -4.8558599 -2.3487027        NaN        NaN -4.8361062 -2.8207875
+[55] -3.5724781        NaN        NaN -3.4572653 -1.0875715 -2.3487027
+Warning message:
+In dcauchy(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); dcauchy(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); dgamma(0, c(0.0653, 0.000123, 32e-80, 8833, 79e70), c(0.0653, 0.000123, 32e-80, 8833, 79e70, 0, -1), log=FALSE)
 [1] Inf Inf Inf   0   0 Inf NaN
@@ -114861,6 +115027,926 @@ In dgamma(c(-1, 0, 1), c(-1, 0, 0.2, 2:5), rep(c(-1, 0, 0.1, 0.9,  :
 #set.seed(1); dgamma(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); dlnorm(0, c(0.0653, 0.000123, 32e-80, 8833, 79e70), c(0.0653, 0.000123, 32e-80, 8833, 79e70, 0, -1), log=FALSE)
+[1]   0   0   0   0   0   0 NaN
+Warning message:
+In dlnorm(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); dlnorm(0, c(NA, 0, NaN, 1/0, -1/0), c(NaN, NaN, NA, 0, 1/0, -1/0), log=FALSE)
+[1]  NA NaN  NA   0   0  NA
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions31#Output.IgnoreWhitespace#
+#set.seed(1); dlnorm(10, 10, 10, log=TRUE)
+[1] -5.82036
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions31#Output.IgnoreWhitespace#
+#set.seed(1); dlnorm(3, 3, 3, log=FALSE)
+[1] 0.03626103
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions31#Output.IgnoreWhitespace#
+#set.seed(1); dlnorm(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  0.000000e+00  5.399097e-01  0.000000e+00  0.000000e+00
+ [6]           NaN  0.000000e+00  0.000000e+00  4.432692e-01  0.000000e+00
+[11]           NaN  0.000000e+00  0.000000e+00  0.000000e+00  1.257944e-01
+[16]           NaN  0.000000e+00  5.520948e-87  0.000000e+00  0.000000e+00
+[21]           NaN  0.000000e+00  0.000000e+00  4.324583e-01  0.000000e+00
+[26]           NaN  0.000000e+00  0.000000e+00  0.000000e+00  1.329808e-01
+[31]           NaN  0.000000e+00 1.473646e-195  0.000000e+00  0.000000e+00
+[36]           NaN  0.000000e+00  0.000000e+00  3.752628e-02  0.000000e+00
+[41]           NaN  0.000000e+00  0.000000e+00  0.000000e+00  1.326856e-01
+[46]           NaN  0.000000e+00  0.000000e+00  0.000000e+00  0.000000e+00
+[51]           NaN  0.000000e+00  0.000000e+00  1.713643e-03  0.000000e+00
+[56]           NaN  0.000000e+00  0.000000e+00  0.000000e+00  1.064827e-01
+Warning message:
+In dlnorm(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); dlnorm(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         -Inf   -0.6163534         -Inf         -Inf
+ [6]          NaN         -Inf         -Inf   -0.8135780         -Inf
+[11]          NaN         -Inf         -Inf         -Inf   -2.0731064
+[16]          NaN         -Inf -198.6163534         -Inf         -Inf
+[21]          NaN         -Inf         -Inf   -0.8382694         -Inf
+[26]          NaN         -Inf         -Inf         -Inf   -2.0175508
+[31]          NaN         -Inf -448.6163534         -Inf         -Inf
+[36]          NaN         -Inf         -Inf   -3.2827138         -Inf
+[41]          NaN         -Inf         -Inf         -Inf   -2.0197730
+[46]          NaN         -Inf -798.6163534         -Inf         -Inf
+[51]          NaN         -Inf         -Inf   -6.3691336         -Inf
+[56]          NaN         -Inf         -Inf         -Inf   -2.2397730
+Warning message:
+In dlnorm(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); 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.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); pbeta(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); pbeta(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); pbeta(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); pbeta(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); pbeta(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   1 NaN   1   1   1   1   1   1 NaN   1   1   1   1   1
+[20]   1 NaN   1   1   1   1   1   1 NaN   1   1   1   1   1   1 NaN
+Warning message:
+In pbeta(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); pbeta(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   0 NaN   0   0   0   0   0   0 NaN   0   0   0   0   0
+[20]   0 NaN   0   0   0   0   0   0 NaN   0   0   0   0   0   0 NaN
+Warning message:
+In pbeta(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); pbeta(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   0 NaN   0   0   0   0   0   0 NaN   0   0   0   0   0
+[20]   0 NaN   0   0   0   0   0   0 NaN   0   0   0   0   0   0 NaN
+Warning message:
+In pbeta(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); pbeta(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  NaN -Inf -Inf -Inf -Inf -Inf -Inf  NaN -Inf
+[16] -Inf -Inf -Inf -Inf -Inf  NaN -Inf -Inf -Inf -Inf -Inf -Inf  NaN -Inf -Inf
+[31] -Inf -Inf -Inf -Inf  NaN
+Warning message:
+In pbeta(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); pbeta(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 1.0000000 0.1486601 0.0000000       NaN       NaN       NaN
+  [8] 0.0000000 1.0000000 1.0000000       NaN 0.0000000       NaN 1.0000000
+ [15] 0.9920000       NaN       NaN 1.0000000       NaN 0.0000000       NaN
+ [22] 1.0000000       NaN 0.0000000       NaN       NaN 0.0000000 0.0000000
+ [29]       NaN 1.0000000       NaN 0.0000000 1.0000000 1.0000000       NaN
+ [36]       NaN       NaN 1.0000000 0.7650762 0.0000000       NaN 1.0000000
+ [43]       NaN 0.0000000 1.0000000       NaN       NaN 0.0000000       NaN
+ [50] 1.0000000       NaN 0.0000000       NaN 1.0000000       NaN       NaN
+ [57] 1.0000000 1.0000000       NaN 0.0000000       NaN 1.0000000 0.1486601
+ [64] 0.0000000       NaN       NaN       NaN 0.0000000 1.0000000 1.0000000
+ [71]       NaN 0.0000000       NaN 1.0000000 0.9920000       NaN       NaN
+ [78] 1.0000000       NaN 0.0000000       NaN 1.0000000       NaN 0.0000000
+ [85]       NaN       NaN 0.0000000 0.0000000       NaN 1.0000000       NaN
+ [92] 0.0000000 1.0000000 1.0000000       NaN       NaN       NaN 1.0000000
+ [99] 0.7650762 0.0000000       NaN 1.0000000       NaN 0.0000000 1.0000000
+[106]       NaN       NaN 0.0000000       NaN 1.0000000       NaN 0.0000000
+[113]       NaN 1.0000000       NaN       NaN 1.0000000 1.0000000       NaN
+[120] 0.0000000
+Warning message:
+In pbeta(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); pbeta(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.000000000 -1.906092939         -Inf          NaN
+  [6]          NaN          NaN         -Inf  0.000000000  0.000000000
+ [11]          NaN         -Inf          NaN  0.000000000 -0.008032172
+ [16]          NaN          NaN  0.000000000          NaN         -Inf
+ [21]          NaN  0.000000000          NaN         -Inf          NaN
+ [26]          NaN         -Inf         -Inf          NaN  0.000000000
+ [31]          NaN         -Inf  0.000000000  0.000000000          NaN
+ [36]          NaN          NaN  0.000000000 -0.267779827         -Inf
+ [41]          NaN  0.000000000          NaN         -Inf  0.000000000
+ [46]          NaN          NaN         -Inf          NaN  0.000000000
+ [51]          NaN         -Inf          NaN  0.000000000          NaN
+ [56]          NaN  0.000000000  0.000000000          NaN         -Inf
+ [61]          NaN  0.000000000 -1.906092939         -Inf          NaN
+ [66]          NaN          NaN         -Inf  0.000000000  0.000000000
+ [71]          NaN         -Inf          NaN  0.000000000 -0.008032172
+ [76]          NaN          NaN  0.000000000          NaN         -Inf
+ [81]          NaN  0.000000000          NaN         -Inf          NaN
+ [86]          NaN         -Inf         -Inf          NaN  0.000000000
+ [91]          NaN         -Inf  0.000000000  0.000000000          NaN
+ [96]          NaN          NaN  0.000000000 -0.267779827         -Inf
+[101]          NaN  0.000000000          NaN         -Inf  0.000000000
+[106]          NaN          NaN         -Inf          NaN  0.000000000
+[111]          NaN         -Inf          NaN  0.000000000          NaN
+[116]          NaN  0.000000000  0.000000000          NaN         -Inf
+Warning message:
+In pbeta(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); pbeta(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.0000000 0.8513399 1.0000000       NaN       NaN       NaN
+  [8] 1.0000000 0.0000000 0.0000000       NaN 1.0000000       NaN 0.0000000
+ [15] 0.0080000       NaN       NaN 0.0000000       NaN 1.0000000       NaN
+ [22] 0.0000000       NaN 1.0000000       NaN       NaN 1.0000000 1.0000000
+ [29]       NaN 0.0000000       NaN 1.0000000 0.0000000 0.0000000       NaN
+ [36]       NaN       NaN 0.0000000 0.2349238 1.0000000       NaN 0.0000000
+ [43]       NaN 1.0000000 0.0000000       NaN       NaN 1.0000000       NaN
+ [50] 0.0000000       NaN 1.0000000       NaN 0.0000000       NaN       NaN
+ [57] 0.0000000 0.0000000       NaN 1.0000000       NaN 0.0000000 0.8513399
+ [64] 1.0000000       NaN       NaN       NaN 1.0000000 0.0000000 0.0000000
+ [71]       NaN 1.0000000       NaN 0.0000000 0.0080000       NaN       NaN
+ [78] 0.0000000       NaN 1.0000000       NaN 0.0000000       NaN 1.0000000
+ [85]       NaN       NaN 1.0000000 1.0000000       NaN 0.0000000       NaN
+ [92] 1.0000000 0.0000000 0.0000000       NaN       NaN       NaN 0.0000000
+ [99] 0.2349238 1.0000000       NaN 0.0000000       NaN 1.0000000 0.0000000
+[106]       NaN       NaN 1.0000000       NaN 0.0000000       NaN 1.0000000
+[113]       NaN 0.0000000       NaN       NaN 0.0000000 0.0000000       NaN
+[120] 1.0000000
+Warning message:
+In pbeta(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); pbeta(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 -0.1609438  0.0000000        NaN        NaN
+  [7]        NaN  0.0000000       -Inf       -Inf        NaN  0.0000000
+ [13]        NaN       -Inf -4.8283137        NaN        NaN       -Inf
+ [19]        NaN  0.0000000        NaN       -Inf        NaN  0.0000000
+ [25]        NaN        NaN  0.0000000  0.0000000        NaN       -Inf
+ [31]        NaN  0.0000000       -Inf       -Inf        NaN        NaN
+ [37]        NaN       -Inf -1.4484941  0.0000000        NaN       -Inf
+ [43]        NaN  0.0000000       -Inf        NaN        NaN  0.0000000
+ [49]        NaN       -Inf        NaN  0.0000000        NaN       -Inf
+ [55]        NaN        NaN       -Inf       -Inf        NaN  0.0000000
+ [61]        NaN       -Inf -0.1609438  0.0000000        NaN        NaN
+ [67]        NaN  0.0000000       -Inf       -Inf        NaN  0.0000000
+ [73]        NaN       -Inf -4.8283137        NaN        NaN       -Inf
+ [79]        NaN  0.0000000        NaN       -Inf        NaN  0.0000000
+ [85]        NaN        NaN  0.0000000  0.0000000        NaN       -Inf
+ [91]        NaN  0.0000000       -Inf       -Inf        NaN        NaN
+ [97]        NaN       -Inf -1.4484941  0.0000000        NaN       -Inf
+[103]        NaN  0.0000000       -Inf        NaN        NaN  0.0000000
+[109]        NaN       -Inf        NaN  0.0000000        NaN       -Inf
+[115]        NaN        NaN       -Inf       -Inf        NaN  0.0000000
+Warning message:
+In pbeta(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); pbeta(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   1   0  NA   0 NaN   1   0  NA   0 NaN   1   0
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWarningContext#
+#set.seed(1); pbeta(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   1 NaN  NA   1 NaN   0 NaN  NA   1 NaN   0 NaN
+Warning message:
+In pbeta(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); pbeta(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   1 NaN  NA   1 NaN   1 NaN  NA   0 NaN   0 NaN
+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); pcauchy(0, 10, 10, lower.tail=FALSE, log.p=FALSE)
+[1] 0.75
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); pcauchy(0, 10, 10, lower.tail=FALSE, log.p=TRUE)
+[1] -0.2876821
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); pcauchy(0, 10, 10, lower.tail=TRUE, log.p=FALSE)
+[1] 0.25
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); pcauchy(0, 10, 10, lower.tail=TRUE, log.p=TRUE)
+[1] -1.386294
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); pcauchy(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.500000e-01 7.500000e-01 7.500000e-01 7.500000e-01 7.500000e-01
+ [6] 5.000000e-01 3.915212e-05 1.000000e+00 5.000000e-01 5.000000e-01
+[11] 9.999976e-01 1.000000e+00 5.000000e-01 4.999640e-01 5.000000e-01
+[16] 5.005996e-01 5.000000e-01 1.000000e+00 1.000000e+00 5.000000e-01
+[21] 2.075617e-02 9.994004e-01 1.000000e+00 5.000000e-01 5.000000e-01
+[26] 1.000000e+00 5.000000e-01 1.018592e-79 5.000024e-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); pcauchy(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]  -2.876821e-01  -2.876821e-01  -2.876821e-01  -2.876821e-01  -2.876821e-01
+ [6]  -6.931472e-01  -1.014806e+01  -1.559865e-78  -6.931472e-01  -6.931472e-01
+[11]  -2.353182e-06  -4.955964e-77  -6.931472e-01  -6.932193e-01  -6.931472e-01
+[16]  -6.919488e-01  -6.931472e-01  -1.153166e-83  -3.559027e-69  -6.931472e-01
+[21]  -3.874912e+00  -5.997521e-04  -8.281233e-76  -6.931472e-01  -6.931472e-01
+[26]  -2.631093e-74  -6.931472e-01  -1.818858e+02  -6.931425e-01  -6.931472e-01
+[31]  -6.931472e-01  -4.432482e-09 -1.289357e-151  -6.931472e-01  -6.931472e-01
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); pcauchy(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.500000e-01  2.500000e-01  2.500000e-01  2.500000e-01  2.500000e-01
+ [6]  5.000000e-01  9.999608e-01  1.559865e-78  5.000000e-01  5.000000e-01
+[11]  2.353180e-06  4.955964e-77  5.000000e-01  5.000360e-01  5.000000e-01
+[16]  4.994004e-01  5.000000e-01  1.153166e-83  3.559027e-69  5.000000e-01
+[21]  9.792438e-01  5.995723e-04  8.281233e-76  5.000000e-01  5.000000e-01
+[26]  2.631093e-74  5.000000e-01  1.000000e+00  4.999976e-01  5.000000e-01
+[31]  5.000000e-01  4.432482e-09 1.289357e-151  5.000000e-01  5.000000e-01
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); pcauchy(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.386294e+00 -1.386294e+00 -1.386294e+00 -1.386294e+00 -1.386294e+00
+ [6] -6.931472e-01 -3.915288e-05 -1.791570e+02 -6.931472e-01 -6.931472e-01
+[11] -1.295974e+01 -1.756985e+02 -6.931472e-01 -6.930751e-01 -6.931472e-01
+[16] -6.943470e-01 -6.931472e-01 -1.909721e+02 -1.576089e+02 -6.931472e-01
+[21] -2.097460e-02 -7.419294e+00 -1.728825e+02 -6.931472e-01 -6.931472e-01
+[26] -1.694239e+02 -6.931472e-01 -1.018592e-79 -6.931519e-01 -6.931472e-01
+[31] -6.931472e-01 -1.923431e+01 -3.474362e+02 -6.931472e-01 -6.931472e-01
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); pcauchy(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.682745e-01 2.885794e-02          NaN
+  [6] 3.183099e-05          NaN          NaN 8.457859e-01 9.893936e-01
+ [11]          NaN 1.591549e-05          NaN          NaN 8.908121e-01
+ [16] 1.060640e-02          NaN 9.996817e-01          NaN          NaN
+ [21] 5.000000e-01 5.000000e-01          NaN 2.893726e-05          NaN
+ [26]          NaN 4.371670e-01 1.673771e-02          NaN 9.999894e-01
+ [31]          NaN          NaN 7.651462e-01 9.647767e-01          NaN
+ [36] 1.061033e-05          NaN          NaN 6.944001e-01 9.682745e-01
+ [41]          NaN 5.000000e-01          NaN          NaN 9.220209e-01
+ [46] 3.172552e-02          NaN 1.675315e-05          NaN          NaN
+ [51] 2.211421e-01 1.590225e-02          NaN 9.999646e-01          NaN
+ [56]          NaN 7.500000e-01 7.500000e-01          NaN 9.999682e-01
+ [61]          NaN          NaN 4.682745e-01 2.885794e-02          NaN
+ [66] 3.183099e-05          NaN          NaN 8.457859e-01 9.893936e-01
+ [71]          NaN 1.591549e-05          NaN          NaN 8.908121e-01
+ [76] 1.060640e-02          NaN 9.996817e-01          NaN          NaN
+ [81] 5.000000e-01 5.000000e-01          NaN 2.893726e-05          NaN
+ [86]          NaN 4.371670e-01 1.673771e-02          NaN 9.999894e-01
+ [91]          NaN          NaN 7.651462e-01 9.647767e-01          NaN
+ [96] 1.061033e-05          NaN          NaN 6.944001e-01 9.682745e-01
+[101]          NaN 5.000000e-01          NaN          NaN 9.220209e-01
+[106] 3.172552e-02          NaN 1.675315e-05          NaN          NaN
+[111] 2.211421e-01 1.590225e-02          NaN 9.999646e-01          NaN
+[116]          NaN 7.500000e-01 7.500000e-01          NaN 9.999682e-01
+Warning message:
+In pcauchy(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); pcauchy(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.587007e-01 -3.545370e+00           NaN
+  [6] -1.035507e+01           NaN           NaN -1.674890e-01 -1.066305e-02
+ [11]           NaN -1.104822e+01           NaN           NaN -1.156218e-01
+ [16] -4.546297e+00           NaN -3.183605e-04           NaN           NaN
+ [21] -6.931472e-01 -6.931472e-01           NaN -1.045038e+01           NaN
+ [26]           NaN -8.274399e-01 -4.090091e+00           NaN -1.061039e-05
+ [31]           NaN           NaN -2.676884e-01 -3.585859e-02           NaN
+ [36] -1.145368e+01           NaN           NaN -3.647070e-01 -3.223968e-02
+ [41]           NaN -6.931472e-01           NaN           NaN -8.118742e-02
+ [46] -3.450634e+00           NaN -1.099692e+01           NaN           NaN
+ [51] -1.508950e+00 -4.141295e+00           NaN -3.536839e-05           NaN
+ [56]           NaN -2.876821e-01 -2.876821e-01           NaN -3.183150e-05
+ [61]           NaN           NaN -7.587007e-01 -3.545370e+00           NaN
+ [66] -1.035507e+01           NaN           NaN -1.674890e-01 -1.066305e-02
+ [71]           NaN -1.104822e+01           NaN           NaN -1.156218e-01
+ [76] -4.546297e+00           NaN -3.183605e-04           NaN           NaN
+ [81] -6.931472e-01 -6.931472e-01           NaN -1.045038e+01           NaN
+ [86]           NaN -8.274399e-01 -4.090091e+00           NaN -1.061039e-05
+ [91]           NaN           NaN -2.676884e-01 -3.585859e-02           NaN
+ [96] -1.145368e+01           NaN           NaN -3.647070e-01 -3.223968e-02
+[101]           NaN -6.931472e-01           NaN           NaN -8.118742e-02
+[106] -3.450634e+00           NaN -1.099692e+01           NaN           NaN
+[111] -1.508950e+00 -4.141295e+00           NaN -3.536839e-05           NaN
+[116]           NaN -2.876821e-01 -2.876821e-01           NaN -3.183150e-05
+Warning message:
+In pcauchy(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); pcauchy(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.317255e-01 9.711421e-01          NaN
+  [6] 9.999682e-01          NaN          NaN 1.542141e-01 1.060640e-02
+ [11]          NaN 9.999841e-01          NaN          NaN 1.091879e-01
+ [16] 9.893936e-01          NaN 3.183098e-04          NaN          NaN
+ [21] 5.000000e-01 5.000000e-01          NaN 9.999711e-01          NaN
+ [26]          NaN 5.628330e-01 9.832623e-01          NaN 1.061033e-05
+ [31]          NaN          NaN 2.348538e-01 3.522329e-02          NaN
+ [36] 9.999894e-01          NaN          NaN 3.055999e-01 3.172552e-02
+ [41]          NaN 5.000000e-01          NaN          NaN 7.797913e-02
+ [46] 9.682745e-01          NaN 9.999832e-01          NaN          NaN
+ [51] 7.788579e-01 9.840977e-01          NaN 3.536776e-05          NaN
+ [56]          NaN 2.500000e-01 2.500000e-01          NaN 3.183099e-05
+ [61]          NaN          NaN 5.317255e-01 9.711421e-01          NaN
+ [66] 9.999682e-01          NaN          NaN 1.542141e-01 1.060640e-02
+ [71]          NaN 9.999841e-01          NaN          NaN 1.091879e-01
+ [76] 9.893936e-01          NaN 3.183098e-04          NaN          NaN
+ [81] 5.000000e-01 5.000000e-01          NaN 9.999711e-01          NaN
+ [86]          NaN 5.628330e-01 9.832623e-01          NaN 1.061033e-05
+ [91]          NaN          NaN 2.348538e-01 3.522329e-02          NaN
+ [96] 9.999894e-01          NaN          NaN 3.055999e-01 3.172552e-02
+[101]          NaN 5.000000e-01          NaN          NaN 7.797913e-02
+[106] 9.682745e-01          NaN 9.999832e-01          NaN          NaN
+[111] 7.788579e-01 9.840977e-01          NaN 3.536776e-05          NaN
+[116]          NaN 2.500000e-01 2.500000e-01          NaN 3.183099e-05
+Warning message:
+In pcauchy(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); pcauchy(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.316279e-01 -2.928252e-02           NaN
+  [6] -3.183150e-05           NaN           NaN -1.869413e+00 -4.546297e+00
+ [11]           NaN -1.591562e-05           NaN           NaN -2.214685e+00
+ [16] -1.066305e-02           NaN -8.052485e+00           NaN           NaN
+ [21] -6.931472e-01 -6.931472e-01           NaN -2.893768e-05           NaN
+ [26]           NaN -5.747724e-01 -1.687937e-02           NaN -1.145368e+01
+ [31]           NaN           NaN -1.448792e+00 -3.346048e+00           NaN
+ [36] -1.061039e-05           NaN           NaN -1.185479e+00 -3.450634e+00
+ [41]           NaN -6.931472e-01           NaN           NaN -2.551314e+00
+ [46] -3.223968e-02           NaN -1.675329e-05           NaN           NaN
+ [51] -2.499266e-01 -1.603005e-02           NaN -1.024971e+01           NaN
+ [56]           NaN -1.386294e+00 -1.386294e+00           NaN -1.035507e+01
+ [61]           NaN           NaN -6.316279e-01 -2.928252e-02           NaN
+ [66] -3.183150e-05           NaN           NaN -1.869413e+00 -4.546297e+00
+ [71]           NaN -1.591562e-05           NaN           NaN -2.214685e+00
+ [76] -1.066305e-02           NaN -8.052485e+00           NaN           NaN
+ [81] -6.931472e-01 -6.931472e-01           NaN -2.893768e-05           NaN
+ [86]           NaN -5.747724e-01 -1.687937e-02           NaN -1.145368e+01
+ [91]           NaN           NaN -1.448792e+00 -3.346048e+00           NaN
+ [96] -1.061039e-05           NaN           NaN -1.185479e+00 -3.450634e+00
+[101]           NaN -6.931472e-01           NaN           NaN -2.551314e+00
+[106] -3.223968e-02           NaN -1.675329e-05           NaN           NaN
+[111] -2.499266e-01 -1.603005e-02           NaN -1.024971e+01           NaN
+[116]           NaN -1.386294e+00 -1.386294e+00           NaN -1.035507e+01
+Warning message:
+In pcauchy(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); pcauchy(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.00  NaN   NA 0.25  NaN 1.00 0.00   NA 0.25  NaN  NaN 0.00
+Warning message:
+In pcauchy(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); pcauchy(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.00  NaN   NA 0.75  NaN 0.00 1.00   NA 0.75  NaN  NaN 1.00
+Warning message:
+In pcauchy(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); pcauchy(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 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); plnorm(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); plnorm(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); plnorm(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); plnorm(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); plnorm(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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); plnorm(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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); plnorm(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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); plnorm(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
+[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); plnorm(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 1.000000e+00 9.563151e-01 9.807048e-01          NaN
+  [6] 1.000000e+00          NaN 0.000000e+00 1.000000e+00 1.000000e+00
+ [11]          NaN 0.000000e+00          NaN 1.000000e+00 9.999980e-01
+ [16] 1.318515e-64          NaN 1.000000e+00          NaN 1.000000e+00
+ [21] 1.000000e+00 1.000000e+00          NaN 1.000000e+00          NaN
+ [26] 1.000000e+00 9.462397e-01 1.501156e-09          NaN 1.000000e+00
+ [31]          NaN 0.000000e+00 1.000000e+00 1.000000e+00          NaN
+ [36] 0.000000e+00          NaN 1.000000e+00 9.939538e-01 1.000000e+00
+ [41]          NaN 1.000000e+00          NaN 1.000000e+00 1.000000e+00
+ [46] 1.000000e+00          NaN 0.000000e+00          NaN 1.000000e+00
+ [51] 7.288829e-01 2.082422e-12          NaN 1.000000e+00          NaN
+ [56] 0.000000e+00 1.000000e+00 1.000000e+00          NaN 1.000000e+00
+ [61]          NaN 1.000000e+00 9.563151e-01 9.807048e-01          NaN
+ [66] 1.000000e+00          NaN 0.000000e+00 1.000000e+00 1.000000e+00
+ [71]          NaN 0.000000e+00          NaN 1.000000e+00 9.999980e-01
+ [76] 1.318515e-64          NaN 1.000000e+00          NaN 1.000000e+00
+ [81] 1.000000e+00 1.000000e+00          NaN 1.000000e+00          NaN
+ [86] 1.000000e+00 9.462397e-01 1.501156e-09          NaN 1.000000e+00
+ [91]          NaN 0.000000e+00 1.000000e+00 1.000000e+00          NaN
+ [96] 0.000000e+00          NaN 1.000000e+00 9.939538e-01 1.000000e+00
+[101]          NaN 1.000000e+00          NaN 1.000000e+00 1.000000e+00
+[106] 1.000000e+00          NaN 0.000000e+00          NaN 1.000000e+00
+[111] 7.288829e-01 2.082422e-12          NaN 1.000000e+00          NaN
+[116] 0.000000e+00 1.000000e+00 1.000000e+00          NaN 1.000000e+00
+Warning message:
+In plnorm(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); plnorm(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.000000e+00  -4.466785e-02  -1.948377e-02            NaN
+  [6]   0.000000e+00            NaN           -Inf   0.000000e+00   0.000000e+00
+ [11]            NaN  -2.402266e+07            NaN   0.000000e+00  -2.018797e-06
+ [16]  -1.470889e+02            NaN   0.000000e+00            NaN   0.000000e+00
+ [21]   0.000000e+00   0.000000e+00            NaN   0.000000e+00            NaN
+ [26]   0.000000e+00  -5.525937e-02  -2.031703e+01            NaN   0.000000e+00
+ [31]            NaN           -Inf   0.000000e+00   0.000000e+00            NaN
+ [36]  -1.433374e+08            NaN   0.000000e+00  -6.064526e-03 -4.793526e-118
+ [41]            NaN   0.000000e+00            NaN   0.000000e+00   0.000000e+00
+ [46]   0.000000e+00            NaN  -1.759119e+07            NaN   0.000000e+00
+ [51]  -3.162422e-01  -2.689749e+01            NaN   0.000000e+00            NaN
+ [56]           -Inf   0.000000e+00   0.000000e+00            NaN   0.000000e+00
+ [61]            NaN   0.000000e+00  -4.466785e-02  -1.948377e-02            NaN
+ [66]   0.000000e+00            NaN           -Inf   0.000000e+00   0.000000e+00
+ [71]            NaN  -2.402266e+07            NaN   0.000000e+00  -2.018797e-06
+ [76]  -1.470889e+02            NaN   0.000000e+00            NaN   0.000000e+00
+ [81]   0.000000e+00   0.000000e+00            NaN   0.000000e+00            NaN
+ [86]   0.000000e+00  -5.525937e-02  -2.031703e+01            NaN   0.000000e+00
+ [91]            NaN           -Inf   0.000000e+00   0.000000e+00            NaN
+ [96]  -1.433374e+08            NaN   0.000000e+00  -6.064526e-03 -4.793526e-118
+[101]            NaN   0.000000e+00            NaN   0.000000e+00   0.000000e+00
+[106]   0.000000e+00            NaN  -1.759119e+07            NaN   0.000000e+00
+[111]  -3.162422e-01  -2.689749e+01            NaN   0.000000e+00            NaN
+[116]           -Inf   0.000000e+00   0.000000e+00            NaN   0.000000e+00
+Warning message:
+In plnorm(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); plnorm(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.000000e+00  4.368493e-02  1.929519e-02           NaN
+  [6]  0.000000e+00           NaN  1.000000e+00  0.000000e+00  0.000000e+00
+ [11]           NaN  1.000000e+00           NaN  0.000000e+00  2.018795e-06
+ [16]  1.000000e+00           NaN  0.000000e+00           NaN  0.000000e+00
+ [21]  0.000000e+00  0.000000e+00           NaN  0.000000e+00           NaN
+ [26]  0.000000e+00  5.376031e-02  1.000000e+00           NaN  0.000000e+00
+ [31]           NaN  1.000000e+00  0.000000e+00  0.000000e+00           NaN
+ [36]  1.000000e+00           NaN  0.000000e+00  6.046174e-03 4.793526e-118
+ [41]           NaN  0.000000e+00           NaN  0.000000e+00  0.000000e+00
+ [46]  0.000000e+00           NaN  1.000000e+00           NaN  0.000000e+00
+ [51]  2.711171e-01  1.000000e+00           NaN  0.000000e+00           NaN
+ [56]  1.000000e+00  0.000000e+00  0.000000e+00           NaN  0.000000e+00
+ [61]           NaN  0.000000e+00  4.368493e-02  1.929519e-02           NaN
+ [66]  0.000000e+00           NaN  1.000000e+00  0.000000e+00  0.000000e+00
+ [71]           NaN  1.000000e+00           NaN  0.000000e+00  2.018795e-06
+ [76]  1.000000e+00           NaN  0.000000e+00           NaN  0.000000e+00
+ [81]  0.000000e+00  0.000000e+00           NaN  0.000000e+00           NaN
+ [86]  0.000000e+00  5.376031e-02  1.000000e+00           NaN  0.000000e+00
+ [91]           NaN  1.000000e+00  0.000000e+00  0.000000e+00           NaN
+ [96]  1.000000e+00           NaN  0.000000e+00  6.046174e-03 4.793526e-118
+[101]           NaN  0.000000e+00           NaN  0.000000e+00  0.000000e+00
+[106]  0.000000e+00           NaN  1.000000e+00           NaN  0.000000e+00
+[111]  2.711171e-01  1.000000e+00           NaN  0.000000e+00           NaN
+[116]  1.000000e+00  0.000000e+00  0.000000e+00           NaN  0.000000e+00
+Warning message:
+In plnorm(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); plnorm(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 -3.130752e+00 -3.947899e+00           NaN
+  [6]          -Inf           NaN  0.000000e+00          -Inf          -Inf
+ [11]           NaN  0.000000e+00           NaN          -Inf -1.311301e+01
+ [16] -1.318515e-64           NaN          -Inf           NaN          -Inf
+ [21]          -Inf          -Inf           NaN -2.139413e+06           NaN
+ [26]          -Inf -2.923220e+00 -1.501156e-09           NaN          -Inf
+ [31]           NaN  0.000000e+00          -Inf          -Inf           NaN
+ [36]  0.000000e+00           NaN          -Inf -5.108330e+00 -2.701378e+02
+ [41]           NaN          -Inf           NaN          -Inf          -Inf
+ [46]          -Inf           NaN  0.000000e+00           NaN          -Inf
+ [51] -1.305204e+00 -2.082422e-12           NaN          -Inf           NaN
+ [56]  0.000000e+00          -Inf          -Inf           NaN -2.660785e+08
+ [61]           NaN          -Inf -3.130752e+00 -3.947899e+00           NaN
+ [66]          -Inf           NaN  0.000000e+00          -Inf          -Inf
+ [71]           NaN  0.000000e+00           NaN          -Inf -1.311301e+01
+ [76] -1.318515e-64           NaN          -Inf           NaN          -Inf
+ [81]          -Inf          -Inf           NaN -2.139413e+06           NaN
+ [86]          -Inf -2.923220e+00 -1.501156e-09           NaN          -Inf
+ [91]           NaN  0.000000e+00          -Inf          -Inf           NaN
+ [96]  0.000000e+00           NaN          -Inf -5.108330e+00 -2.701378e+02
+[101]           NaN          -Inf           NaN          -Inf          -Inf
+[106]          -Inf           NaN  0.000000e+00           NaN          -Inf
+[111] -1.305204e+00 -2.082422e-12           NaN          -Inf           NaN
+[116]  0.000000e+00          -Inf          -Inf           NaN -2.660785e+08
+Warning message:
+In plnorm(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); plnorm(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   1   0  NA   0 NaN   1   0  NA   0 NaN   1   0
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWarningContext#
+#set.seed(1); plnorm(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.000000e+00           NaN  0.000000e+00  0.000000e+00
+ [6]            NA  5.000000e-01           NaN  0.000000e+00  1.000000e+00
+[11]            NA 1.284176e-117           NaN  0.000000e+00  1.000000e+00
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); plnorm(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.0 NaN 0.5 NaN  NA 0.0 NaN 0.5 NaN  NA 0.0 NaN 0.0 NaN
+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); qcauchy(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); qcauchy(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); qcauchy(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); qcauchy(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); qcauchy(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); qcauchy(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); qcauchy(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); qcauchy(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); qcauchy(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.0000000  1.4763819        NaN        NaN        Inf
+  [7]        NaN        NaN        NaN        Inf        NaN        NaN
+ [13]        NaN  0.9000000  4.3763819        NaN        NaN        Inf
+ [19]        NaN        NaN        NaN        Inf        NaN        NaN
+ [25]        NaN -1.0000000  1.3763819        NaN        NaN        Inf
+ [31]        NaN        NaN        NaN        Inf        NaN        NaN
+ [37]        NaN  0.1000000  2.2763819        NaN        NaN        Inf
+ [43]        NaN        NaN        NaN        Inf        NaN        NaN
+ [49]        NaN  3.0000000  0.3763819        NaN        NaN        Inf
+ [55]        NaN        NaN        NaN        Inf        NaN        NaN
+ [61]        NaN  0.0000000  1.4763819        NaN        NaN        Inf
+ [67]        NaN        NaN        NaN        Inf        NaN        NaN
+ [73]        NaN  0.9000000  4.3763819        NaN        NaN        Inf
+ [79]        NaN        NaN        NaN        Inf        NaN        NaN
+ [85]        NaN -1.0000000  1.3763819        NaN        NaN        Inf
+ [91]        NaN        NaN        NaN        Inf        NaN        NaN
+ [97]        NaN  0.1000000  2.2763819        NaN        NaN        Inf
+[103]        NaN        NaN        NaN        Inf        NaN        NaN
+[109]        NaN  3.0000000  0.3763819        NaN        NaN        Inf
+[115]        NaN        NaN        NaN        Inf        NaN        NaN
+Warning message:
+In qcauchy(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); qcauchy(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.0000000        NaN        NaN        NaN       -Inf
+  [7]        NaN        NaN  1.3406711       -Inf        NaN        NaN
+ [13]        NaN  0.9000000        NaN        NaN        NaN       -Inf
+ [19]        NaN        NaN -0.5593289       -Inf        NaN        NaN
+ [25]        NaN -1.0000000        NaN        NaN        NaN       -Inf
+ [31]        NaN        NaN  0.5406711       -Inf        NaN        NaN
+ [37]        NaN  0.1000000        NaN        NaN        NaN       -Inf
+ [43]        NaN        NaN  3.4406711       -Inf        NaN        NaN
+ [49]        NaN  3.0000000        NaN        NaN        NaN       -Inf
+ [55]        NaN        NaN  0.4406711       -Inf        NaN        NaN
+ [61]        NaN  0.0000000        NaN        NaN        NaN       -Inf
+ [67]        NaN        NaN  1.3406711       -Inf        NaN        NaN
+ [73]        NaN  0.9000000        NaN        NaN        NaN       -Inf
+ [79]        NaN        NaN -0.5593289       -Inf        NaN        NaN
+ [85]        NaN -1.0000000        NaN        NaN        NaN       -Inf
+ [91]        NaN        NaN  0.5406711       -Inf        NaN        NaN
+ [97]        NaN  0.1000000        NaN        NaN        NaN       -Inf
+[103]        NaN        NaN  3.4406711       -Inf        NaN        NaN
+[109]        NaN  3.0000000        NaN        NaN        NaN       -Inf
+[115]        NaN        NaN  0.4406711       -Inf        NaN        NaN
+Warning message:
+In qcauchy(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); qcauchy(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.0000000 -1.2763819        NaN        NaN       -Inf
+  [7]        NaN        NaN        NaN       -Inf        NaN        NaN
+ [13]        NaN  0.9000000  1.6236181        NaN        NaN       -Inf
+ [19]        NaN        NaN        NaN       -Inf        NaN        NaN
+ [25]        NaN -1.0000000 -1.3763819        NaN        NaN       -Inf
+ [31]        NaN        NaN        NaN       -Inf        NaN        NaN
+ [37]        NaN  0.1000000 -0.4763819        NaN        NaN       -Inf
+ [43]        NaN        NaN        NaN       -Inf        NaN        NaN
+ [49]        NaN  3.0000000 -2.3763819        NaN        NaN       -Inf
+ [55]        NaN        NaN        NaN       -Inf        NaN        NaN
+ [61]        NaN  0.0000000 -1.2763819        NaN        NaN       -Inf
+ [67]        NaN        NaN        NaN       -Inf        NaN        NaN
+ [73]        NaN  0.9000000  1.6236181        NaN        NaN       -Inf
+ [79]        NaN        NaN        NaN       -Inf        NaN        NaN
+ [85]        NaN -1.0000000 -1.3763819        NaN        NaN       -Inf
+ [91]        NaN        NaN        NaN       -Inf        NaN        NaN
+ [97]        NaN  0.1000000 -0.4763819        NaN        NaN       -Inf
+[103]        NaN        NaN        NaN       -Inf        NaN        NaN
+[109]        NaN  3.0000000 -2.3763819        NaN        NaN       -Inf
+[115]        NaN        NaN        NaN       -Inf        NaN        NaN
+Warning message:
+In qcauchy(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); qcauchy(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.0000000        NaN        NaN        NaN        Inf
+  [7]        NaN        NaN  0.4593289        Inf        NaN        NaN
+ [13]        NaN  0.9000000        NaN        NaN        NaN        Inf
+ [19]        NaN        NaN -1.4406711        Inf        NaN        NaN
+ [25]        NaN -1.0000000        NaN        NaN        NaN        Inf
+ [31]        NaN        NaN -0.3406711        Inf        NaN        NaN
+ [37]        NaN  0.1000000        NaN        NaN        NaN        Inf
+ [43]        NaN        NaN  2.5593289        Inf        NaN        NaN
+ [49]        NaN  3.0000000        NaN        NaN        NaN        Inf
+ [55]        NaN        NaN -0.4406711        Inf        NaN        NaN
+ [61]        NaN  0.0000000        NaN        NaN        NaN        Inf
+ [67]        NaN        NaN  0.4593289        Inf        NaN        NaN
+ [73]        NaN  0.9000000        NaN        NaN        NaN        Inf
+ [79]        NaN        NaN -1.4406711        Inf        NaN        NaN
+ [85]        NaN -1.0000000        NaN        NaN        NaN        Inf
+ [91]        NaN        NaN -0.3406711        Inf        NaN        NaN
+ [97]        NaN  0.1000000        NaN        NaN        NaN        Inf
+[103]        NaN        NaN  2.5593289        Inf        NaN        NaN
+[109]        NaN  3.0000000        NaN        NaN        NaN        Inf
+[115]        NaN        NaN -0.4406711        Inf        NaN        NaN
+Warning message:
+In qcauchy(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); qcauchy(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 -Inf  NaN  NaN  NaN   NA -Inf  NaN  NaN  NaN
+Warning message:
+In qcauchy(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); qcauchy(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.0000000        NaN        Inf       -Inf         NA
+ [7]        Inf        NaN        Inf        NaN         NA -0.3077684
+[13]        NaN        Inf       -Inf
+Warning message:
+In qcauchy(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); qcauchy(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.0 NaN NaN NaN  NA 1.0 NaN NaN NaN  NA 0.1 NaN NaN NaN
+Warning message:
+In qcauchy(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); qlnorm(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); qlnorm(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); qlnorm(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); qlnorm(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); qlnorm(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); qlnorm(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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); qlnorm(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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); qlnorm(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); qlnorm(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  2.5641351        NaN        NaN        Inf
+  [7]        NaN        NaN        NaN        Inf        NaN        NaN
+ [13]        NaN        Inf 46.6009643        NaN        NaN        Inf
+ [19]        NaN        NaN        NaN        Inf        NaN        NaN
+ [25]        NaN        Inf  2.3201254        NaN        NaN        Inf
+ [31]        NaN        NaN        NaN        Inf        NaN        NaN
+ [37]        NaN        Inf  5.7065876        NaN        NaN        Inf
+ [43]        NaN        NaN        NaN        Inf        NaN        NaN
+ [49]        NaN        Inf  0.8535264        NaN        NaN        Inf
+ [55]        NaN        NaN        NaN        Inf        NaN        NaN
+ [61]        NaN        Inf  2.5641351        NaN        NaN        Inf
+ [67]        NaN        NaN        NaN        Inf        NaN        NaN
+ [73]        NaN        Inf 46.6009643        NaN        NaN        Inf
+ [79]        NaN        NaN        NaN        Inf        NaN        NaN
+ [85]        NaN        Inf  2.3201254        NaN        NaN        Inf
+ [91]        NaN        NaN        NaN        Inf        NaN        NaN
+ [97]        NaN        Inf  5.7065876        NaN        NaN        Inf
+[103]        NaN        NaN        NaN        Inf        NaN        NaN
+[109]        NaN        Inf  0.8535264        NaN        NaN        Inf
+[115]        NaN        NaN        NaN        Inf        NaN        NaN
+Warning message:
+In qlnorm(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); qlnorm(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.0000000        NaN        NaN        NaN  0.0000000
+  [7]        NaN        NaN  3.4468989  0.0000000        NaN        NaN
+ [13]        NaN  0.0000000        NaN        NaN        NaN  0.0000000
+ [19]        NaN        NaN  0.5155479  0.0000000        NaN        NaN
+ [25]        NaN  0.0000000        NaN        NaN        NaN  0.0000000
+ [31]        NaN        NaN  1.5487915  0.0000000        NaN        NaN
+ [37]        NaN  0.0000000        NaN        NaN        NaN  0.0000000
+ [43]        NaN        NaN 28.1479623  0.0000000        NaN        NaN
+ [49]        NaN  0.0000000        NaN        NaN        NaN  0.0000000
+ [55]        NaN        NaN  1.4014045  0.0000000        NaN        NaN
+ [61]        NaN  0.0000000        NaN        NaN        NaN  0.0000000
+ [67]        NaN        NaN  3.4468989  0.0000000        NaN        NaN
+ [73]        NaN  0.0000000        NaN        NaN        NaN  0.0000000
+ [79]        NaN        NaN  0.5155479  0.0000000        NaN        NaN
+ [85]        NaN  0.0000000        NaN        NaN        NaN  0.0000000
+ [91]        NaN        NaN  1.5487915  0.0000000        NaN        NaN
+ [97]        NaN  0.0000000        NaN        NaN        NaN  0.0000000
+[103]        NaN        NaN 28.1479623  0.0000000        NaN        NaN
+[109]        NaN  0.0000000        NaN        NaN        NaN  0.0000000
+[115]        NaN        NaN  1.4014045  0.0000000        NaN        NaN
+Warning message:
+In qlnorm(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); qlnorm(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.0000000 0.4763410       NaN       NaN 0.0000000       NaN
+  [8]       NaN       NaN 0.0000000       NaN       NaN       NaN 0.0000000
+ [15] 8.6570911       NaN       NaN 0.0000000       NaN       NaN       NaN
+ [22] 0.0000000       NaN       NaN       NaN 0.0000000 0.4310112       NaN
+ [29]       NaN 0.0000000       NaN       NaN       NaN 0.0000000       NaN
+ [36]       NaN       NaN 0.0000000 1.0601165       NaN       NaN 0.0000000
+ [43]       NaN       NaN       NaN 0.0000000       NaN       NaN       NaN
+ [50] 0.0000000 0.1585602       NaN       NaN 0.0000000       NaN       NaN
+ [57]       NaN 0.0000000       NaN       NaN       NaN 0.0000000 0.4763410
+ [64]       NaN       NaN 0.0000000       NaN       NaN       NaN 0.0000000
+ [71]       NaN       NaN       NaN 0.0000000 8.6570911       NaN       NaN
+ [78] 0.0000000       NaN       NaN       NaN 0.0000000       NaN       NaN
+ [85]       NaN 0.0000000 0.4310112       NaN       NaN 0.0000000       NaN
+ [92]       NaN       NaN 0.0000000       NaN       NaN       NaN 0.0000000
+ [99] 1.0601165       NaN       NaN 0.0000000       NaN       NaN       NaN
+[106] 0.0000000       NaN       NaN       NaN 0.0000000 0.1585602       NaN
+[113]       NaN 0.0000000       NaN       NaN       NaN 0.0000000       NaN
+[120]       NaN
+Warning message:
+In qlnorm(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); qlnorm(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  1.7550986        Inf        NaN        NaN
+ [13]        NaN        Inf        NaN        NaN        NaN        Inf
+ [19]        NaN        NaN  0.2625077        Inf        NaN        NaN
+ [25]        NaN        Inf        NaN        NaN        NaN        Inf
+ [31]        NaN        NaN  0.7886166        Inf        NaN        NaN
+ [37]        NaN        Inf        NaN        NaN        NaN        Inf
+ [43]        NaN        NaN 14.3324334        Inf        NaN        NaN
+ [49]        NaN        Inf        NaN        NaN        NaN        Inf
+ [55]        NaN        NaN  0.7135698        Inf        NaN        NaN
+ [61]        NaN        Inf        NaN        NaN        NaN        Inf
+ [67]        NaN        NaN  1.7550986        Inf        NaN        NaN
+ [73]        NaN        Inf        NaN        NaN        NaN        Inf
+ [79]        NaN        NaN  0.2625077        Inf        NaN        NaN
+ [85]        NaN        Inf        NaN        NaN        NaN        Inf
+ [91]        NaN        NaN  0.7886166        Inf        NaN        NaN
+ [97]        NaN        Inf        NaN        NaN        NaN        Inf
+[103]        NaN        NaN 14.3324334        Inf        NaN        NaN
+[109]        NaN        Inf        NaN        NaN        NaN        Inf
+[115]        NaN        NaN  0.7135698        Inf        NaN        NaN
+Warning message:
+In qlnorm(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); qlnorm(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   0 NaN NaN NaN
+Warning message:
+In qlnorm(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); qlnorm(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.0000000       NaN       Inf 0.0000000        NA       Inf
+ [8]       NaN       Inf       Inf        NA 0.8797169       NaN 0.0000000
+[15] 0.0000000
+
+##com.oracle.truffle.r.test.library.stats.TestStatFunctions.testFunctions32#Output.IgnoreWhitespace#
+#set.seed(1); qlnorm(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.000000      NaN      Inf 0.000000       NA      Inf      NaN
+ [9] 0.000000      Inf       NA 1.105171      NaN 0.000000      NaN
+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.TestStats.testCor#
 #{ as.integer(cor(c(1,2,3),c(1,2,5))*10000000) }
 [1] 9607689
@@ -115491,6 +116577,14 @@ In qnorm(c(0.1, 0.9, 0.5, 1.00001, 0.99999), 100, c(20, 1)) : NaNs produced
 #{ set.seed(7); round( rgamma(3,1), digits = 5 ) }
 [1] 3.42520 0.95263 2.76594
 
+##com.oracle.truffle.r.test.library.stats.TestStats.testRandom#
+#{ set.seed(7); round( rlnorm(3), digits = 5 ) }
+[1] 9.84779 0.30217 0.49943
+
+##com.oracle.truffle.r.test.library.stats.TestStats.testRandom#
+#{ set.seed(7); round( rlnorm(3,sdlog=c(10,3,0.5)), digits = 5 ) }
+[1] 8.578043e+09 2.759000e-02 7.067000e-01
+
 ##com.oracle.truffle.r.test.library.stats.TestStats.testRandom#
 #{ set.seed(7); round( rnorm(3,c(1000,2,3),c(10,11)), digits = 5 ) }
 [1] 1022.87247  -11.16449   -3.94293
@@ -115644,14 +116738,6 @@ In qnorm(c(0.1, 0.9, 0.5, 1.00001, 0.99999), 100, c(20, 1)) : NaNs produced
 #{ set.seed(9567, "Marsaglia-Multicarry"); sum(runif(100)) }
 [1] 52.92218
 
-##com.oracle.truffle.r.test.library.stats.TestStats.testRandomIgnore#Ignored.Unknown#
-#{ set.seed(7); round( rlnorm(3), digits = 5 ) }
-[1] 9.84779 0.30217 0.49943
-
-##com.oracle.truffle.r.test.library.stats.TestStats.testRandomIgnore#Ignored.Unknown#
-#{ set.seed(7); round( rlnorm(3,sdlog=c(10,3,0.5)), digits = 5 ) }
-[1] 8.578043e+09 2.759000e-02 7.067000e-01
-
 ##com.oracle.truffle.r.test.library.stats.TestStats.testRbinom#
 #set.seed(123); rbinom(1,20,c(0.3,0.2))
 [1] 5
diff --git a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/library/stats/TestRandGenerationFunctions.java b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/library/stats/TestRandGenerationFunctions.java
index 11898e61ca3b04ff4c2f6eedc78dda28b32b5ab6..6a6b175ea891e7be107607c82849195514ea49d5 100644
--- a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/library/stats/TestRandGenerationFunctions.java
+++ b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/library/stats/TestRandGenerationFunctions.java
@@ -31,7 +31,7 @@ import com.oracle.truffle.r.test.TestBase;
  * tests for its specific corner cases if those are not covered here.
  */
 public class TestRandGenerationFunctions extends TestBase {
-    private static final String[] FUNCTION2_NAMES = {"rnorm", "runif", "rgamma", "rbeta", "rcauchy", "rf", "rlogis", "rweibull", "rchisq", "rwilcox"};
+    private static final String[] FUNCTION2_NAMES = {"rnorm", "runif", "rgamma", "rbeta", "rcauchy", "rf", "rlogis", "rweibull", "rchisq", "rwilcox", "rlnorm"};
     private static final String[] FUNCTION2_PARAMS = {
                     "10, 10, 10",
                     "20, c(-1, 0, 0.2, 2:5), c(-1, 0, 0.1, 0.9, 3)",
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 1dc8ca79cb1b90c90e1f86812335e8c24d085ea7..d15b49dd4f2a0250212fd7abd5e035e24cb85ffc 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"};
+    private static final String[] FUNCTION3_1_NAMES = {"dgamma", "dbeta", "dcauchy", "dlnorm"};
     private static final String[] FUNCTION3_1_PARAMS = {
                     "10, 10, 10, log=TRUE",
                     "3, 3, 3, log=FALSE",
@@ -74,6 +74,32 @@ public class TestStatFunctions extends TestBase {
         assertEval(Output.IgnoreWhitespace, template("set.seed(1); %0(%1, %2, %3)",
                         FUNCTION2_2_NAMES, FUNCTION2_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.IgnoreWhitespace, template("set.seed(1); %0(%1)", FUNCTION2_2_NAMES, new String[]{"c(NA, 0, NaN, 1/0, -1/0), rep(c(1, 0, 0.1), 5)"}));
+        // second parameter wrong
+        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_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)",
+                    "0, c(0.0653, 0.000123, 32e-80, 8833, 79e70, 0, -1), rep(c(0.0653, 0.000123, 32e-80, 8833, 79e70), 7)"
+    };
+
+    @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)",
+                        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,
+                        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,
+                        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)"}));
     }
 }
diff --git a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/library/stats/TestStats.java b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/library/stats/TestStats.java
index 6f4026193737e607d2b00be8b42d240769ab2f21..13121b775e0e31a4c03bf5a724f14a9283b2760a 100644
--- a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/library/stats/TestStats.java
+++ b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/library/stats/TestStats.java
@@ -155,12 +155,9 @@ public class TestStats extends TestBase {
 
         assertEval("{ set.seed(7); round( rcauchy(3), digits = 5 ) }");
         assertEval("{ set.seed(7); round( rcauchy(3, scale=4, location=1:3), digits = 5 ) }");
-    }
 
-    @Test
-    public void testRandomIgnore() {
-        assertEval(Ignored.Unknown, "{ set.seed(7); round( rlnorm(3), digits = 5 ) }");
-        assertEval(Ignored.Unknown, "{ set.seed(7); round( rlnorm(3,sdlog=c(10,3,0.5)), digits = 5 ) }");
+        assertEval("{ set.seed(7); round( rlnorm(3), digits = 5 ) }");
+        assertEval("{ set.seed(7); round( rlnorm(3,sdlog=c(10,3,0.5)), digits = 5 ) }");
     }
 
     @Test
diff --git a/mx.fastr/copyrights/overrides b/mx.fastr/copyrights/overrides
index 5749956835828799755859ea651baf09c2ec9fd8..0467373d319614885a7468b7ad3c4ddd3c190853 100644
--- a/mx.fastr/copyrights/overrides
+++ b/mx.fastr/copyrights/overrides
@@ -31,7 +31,7 @@ com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/methods/Slot.java,
 com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/Arithmetic.java,gnu_r_gentleman_ihaka.copyright
 com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/RBeta.java,gnu_r_gentleman_ihaka.copyright
 com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/RMultinom.java,gnu_r_gentleman_ihaka.copyright
-com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/RCauchy.java,gnu_r_ihaka_core.copyright
+com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/Cauchy.java,gnu_r_ihaka_core.copyright
 com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/Cdist.java,gnu_r_gentleman_ihaka.copyright
 com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/CompleteCases.java,gnu_r_gentleman_ihaka2.copyright
 com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/Covcor.java,gnu_r.copyright
@@ -61,6 +61,7 @@ com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/SplineFuncti
 com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/StatsFunctions.java,gnu_r_gentleman_ihaka.copyright
 com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/RandGenerationFunctions.java,gnu_r_gentleman_ihaka.copyright
 com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/RMath.java,gnu_r_ihaka.copyright
+com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/LogNormal.java,gnu_r_ihaka.copyright
 com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/MathConstants.java,gnu_r_ihaka.copyright
 com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/TOMS708.java,gnu_r.copyright
 com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/SNorm.java,gnu_r_ihaka_core.copyright
@@ -73,6 +74,8 @@ com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/RChisq.java,
 com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/Exp.java,gnu_r_ihaka_core.copyright
 com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/Geom.java,gnu_r_ihaka_core.copyright
 com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/Dt.java,gnu_r.core.copyright
+com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/Df.java,gnu_r.core.copyright
+com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/DBeta.java,gnu_r.core.copyright
 com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/DPois.java,gnu_r.core.copyright
 com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/RNchisq.java,gnu_r.copyright
 com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/Wilcox.java,gnu_r.core.copyright