/* * R : A Computer Language for Statistical Data Analysis * Copyright (C) 1998--2023 The R Core Team * Copyright (C) 1995--1997 Robert Gentleman and Ross Ihaka * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, a copy is available at * https://www.R-project.org/Licenses/ * distn == [DIST]ributio[N]s, i.e. probability distributions * ----- notably R's [dpq]() functions * * Much is COPY'n'PASTE from ../../../main/arithmetic.c << KEEP IN SYNC! * ~~~~~~~~~~~~~~~~~~~~~~~~~~ */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include "statsR.h" #undef _ #ifdef ENABLE_NLS #include #define _(String) dgettext ("stats", String) #else #define _(String) (String) #endif /* interval at which to check interrupts */ //#define NINTERRUPT 1000000 #define R_MSG_NA _("NaNs produced") #define R_MSG_NONNUM_MATH _("Non-numeric argument to mathematical function") /* Mathematical Functions of Two Numeric Arguments (plus 1 int) */ #define mod_iterate(n1,n2,i1,i2) for (i=i1=i2=0; i