diff options
author | steve <steve@FreeBSD.org> | 1998-12-24 15:04:38 +0800 |
---|---|---|
committer | steve <steve@FreeBSD.org> | 1998-12-24 15:04:38 +0800 |
commit | fd9f2c70b74c669ee15264518fc8fcfe7fa537b1 (patch) | |
tree | 94ff81aed64ecc471929f5c8c70886af8acd49ae /math | |
parent | ea127aa798f3ae063594a9e73374332fa9a37ec1 (diff) | |
download | freebsd-ports-gnome-fd9f2c70b74c669ee15264518fc8fcfe7fa537b1.tar.gz freebsd-ports-gnome-fd9f2c70b74c669ee15264518fc8fcfe7fa537b1.tar.zst freebsd-ports-gnome-fd9f2c70b74c669ee15264518fc8fcfe7fa537b1.zip |
Initial import of dcdflib version 1.1.
A library of C routines for cumulative distribution functions.
PR: 7865
Submitted by: Anton Berezin <tobez@plab.ku.dk>
Diffstat (limited to 'math')
-rw-r--r-- | math/dcdflib/Makefile | 34 | ||||
-rw-r--r-- | math/dcdflib/distinfo | 1 | ||||
-rw-r--r-- | math/dcdflib/files/Makefile.lib | 16 | ||||
-rw-r--r-- | math/dcdflib/files/patch-aa | 451 | ||||
-rw-r--r-- | math/dcdflib/pkg-comment | 1 | ||||
-rw-r--r-- | math/dcdflib/pkg-descr | 16 | ||||
-rw-r--r-- | math/dcdflib/pkg-plist | 11 |
7 files changed, 530 insertions, 0 deletions
diff --git a/math/dcdflib/Makefile b/math/dcdflib/Makefile new file mode 100644 index 000000000000..1ea8a650b76e --- /dev/null +++ b/math/dcdflib/Makefile @@ -0,0 +1,34 @@ +# New ports collection makefile for: dcdflib +# Version required: 1.1 +# Date created: 08 September 1998 +# Whom: Anton Berezin <tobez@plab.ku.dk> +# +# $Id$ +# + +DISTNAME= dcdflib.c-1.1 +CATEGORIES= math +MASTER_SITES= ftp://odin.mda.uth.tmc.edu/pub/source/ + +MAINTAINER= tobez@plab.ku.dk + +WRKSRC= ${WRKDIR}/dcdflib.c/src + +.include <bsd.port.pre.mk> + +post-extract: + @${CP} ${FILESDIR}/Makefile.lib ${WRKSRC}/Makefile + +post-install: +.if !defined(NOPORTDOCS) + @${MKDIR} ${PREFIX}/share/doc/dcdflib + @${INSTALL_DATA} ${WRKSRC}/../doc/dcdflib.chs ${PREFIX}/share/doc/dcdflib + @${INSTALL_DATA} ${WRKSRC}/../doc/dcdflib.fdoc ${PREFIX}/share/doc/dcdflib + @${INSTALL_DATA} ${WRKSRC}/../README ${PREFIX}/share/doc/dcdflib +.endif +.if ${PORTOBJFORMAT} == "aout" + @${LN} -sf libdcdflib.so.1.1 ${PREFIX}/lib/libdcdflib.so +.endif + @${SETENV} OBJFORMAT=${PORTOBJFORMAT} ${LDCONFIG} -m ${PREFIX}/lib + +.include <bsd.port.post.mk> diff --git a/math/dcdflib/distinfo b/math/dcdflib/distinfo new file mode 100644 index 000000000000..b77c7c8735f9 --- /dev/null +++ b/math/dcdflib/distinfo @@ -0,0 +1 @@ +MD5 (dcdflib.c-1.1.tar.gz) = 98dea6ecdce280ab6c85697f516c3ec4 diff --git a/math/dcdflib/files/Makefile.lib b/math/dcdflib/files/Makefile.lib new file mode 100644 index 000000000000..0c25a8b5b423 --- /dev/null +++ b/math/dcdflib/files/Makefile.lib @@ -0,0 +1,16 @@ +# makefile for dcdflib sources + +LIBDIR = ${PREFIX}/lib + +SHLIB_MAJOR= 1 +SHLIB_MINOR= 1 +LIB= dcdflib + +SRCS= dcdflib.c ipmpar.c +CFLAGS?= -O2 + +beforeinstall: + ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 ${.CURDIR}/../doc/dcdflib.h \ + ${PREFIX}/include + +.include <bsd.lib.mk> diff --git a/math/dcdflib/files/patch-aa b/math/dcdflib/files/patch-aa new file mode 100644 index 000000000000..6c2fcd402e1a --- /dev/null +++ b/math/dcdflib/files/patch-aa @@ -0,0 +1,451 @@ +--- ipmpar.c.orig Tue Sep 8 14:19:45 1998 ++++ ipmpar.c Tue Sep 8 14:11:24 1998 +@@ -1,426 +1,24 @@ +-int ipmpar(int*); +-/* +------------------------------------------------------------------------ +- +- IPMPAR PROVIDES THE INTEGER MACHINE CONSTANTS FOR THE COMPUTER +- THAT IS USED. IT IS ASSUMED THAT THE ARGUMENT I IS AN INTEGER +- HAVING ONE OF THE VALUES 1-10. IPMPAR(I) HAS THE VALUE ... +- +- INTEGERS. +- +- ASSUME INTEGERS ARE REPRESENTED IN THE N-DIGIT, BASE-A FORM +- +- SIGN ( X(N-1)*A**(N-1) + ... + X(1)*A + X(0) ) +- +- WHERE 0 .LE. X(I) .LT. A FOR I=0,...,N-1. +- +- IPMPAR(1) = A, THE BASE. +- +- IPMPAR(2) = N, THE NUMBER OF BASE-A DIGITS. +- +- IPMPAR(3) = A**N - 1, THE LARGEST MAGNITUDE. +- +- FLOATING-POINT NUMBERS. +- +- IT IS ASSUMED THAT THE SINGLE AND DOUBLE PRECISION FLOATING +- POINT ARITHMETICS HAVE THE SAME BASE, SAY B, AND THAT THE +- NONZERO NUMBERS ARE REPRESENTED IN THE FORM +- +- SIGN (B**E) * (X(1)/B + ... + X(M)/B**M) +- +- WHERE X(I) = 0,1,...,B-1 FOR I=1,...,M, +- X(1) .GE. 1, AND EMIN .LE. E .LE. EMAX. +- +- IPMPAR(4) = B, THE BASE. +- +- SINGLE-PRECISION +- +- IPMPAR(5) = M, THE NUMBER OF BASE-B DIGITS. +- +- IPMPAR(6) = EMIN, THE SMALLEST EXPONENT E. +- +- IPMPAR(7) = EMAX, THE LARGEST EXPONENT E. +- +- DOUBLE-PRECISION +- +- IPMPAR(8) = M, THE NUMBER OF BASE-B DIGITS. +- +- IPMPAR(9) = EMIN, THE SMALLEST EXPONENT E. +- +- IPMPAR(10) = EMAX, THE LARGEST EXPONENT E. +- +------------------------------------------------------------------------ +- +- TO DEFINE THIS FUNCTION FOR THE COMPUTER BEING USED REMOVE +- THE COMMENT DELIMITORS FROM THE DEFINITIONS DIRECTLY BELOW THE NAME +- OF THE MACHINE +- +------------------------------------------------------------------------ +- +- IPMPAR IS AN ADAPTATION OF THE FUNCTION I1MACH, WRITTEN BY +- P.A. FOX, A.D. HALL, AND N.L. SCHRYER (BELL LABORATORIES). +- IPMPAR WAS FORMED BY A.H. MORRIS (NSWC). THE CONSTANTS ARE +- FROM BELL LABORATORIES, NSWC, AND OTHER SOURCES. +- +------------------------------------------------------------------------ +- .. Scalar Arguments .. +-*/ +-int ipmpar(int *i) +-{ +-static int imach[11]; +-static int ipmpar; +-/* MACHINE CONSTANTS FOR AMDAHL MACHINES. */ +-/* +- imach[1] = 2; +- imach[2] = 31; +- imach[3] = 2147483647; +- imach[4] = 16; +- imach[5] = 6; +- imach[6] = -64; +- imach[7] = 63; +- imach[8] = 14; +- imach[9] = -64; +- imach[10] = 63; +-*/ +-/* MACHINE CONSTANTS FOR THE AT&T 3B SERIES, AT&T +- PC 7300, AND AT&T 6300. */ +-/* +- imach[1] = 2; +- imach[2] = 31; +- imach[3] = 2147483647; +- imach[4] = 2; +- imach[5] = 24; +- imach[6] = -125; +- imach[7] = 128; +- imach[8] = 53; +- imach[9] = -1021; +- imach[10] = 1024; +-*/ +-/* MACHINE CONSTANTS FOR THE BURROUGHS 1700 SYSTEM. */ +-/* +- imach[1] = 2; +- imach[2] = 33; +- imach[3] = 8589934591; +- imach[4] = 2; +- imach[5] = 24; +- imach[6] = -256; +- imach[7] = 255; +- imach[8] = 60; +- imach[9] = -256; +- imach[10] = 255; +-*/ +-/* MACHINE CONSTANTS FOR THE BURROUGHS 5700 SYSTEM. */ +-/* +- imach[1] = 2; +- imach[2] = 39; +- imach[3] = 549755813887; +- imach[4] = 8; +- imach[5] = 13; +- imach[6] = -50; +- imach[7] = 76; +- imach[8] = 26; +- imach[9] = -50; +- imach[10] = 76; +-*/ +-/* MACHINE CONSTANTS FOR THE BURROUGHS 6700/7700 SYSTEMS. */ +-/* +- imach[1] = 2; +- imach[2] = 39; +- imach[3] = 549755813887; +- imach[4] = 8; +- imach[5] = 13; +- imach[6] = -50; +- imach[7] = 76; +- imach[8] = 26; +- imach[9] = -32754; +- imach[10] = 32780; +-*/ +-/* MACHINE CONSTANTS FOR THE CDC 6000/7000 SERIES +- 60 BIT ARITHMETIC, AND THE CDC CYBER 995 64 BIT +- ARITHMETIC (NOS OPERATING SYSTEM). */ +-/* +- imach[1] = 2; +- imach[2] = 48; +- imach[3] = 281474976710655; +- imach[4] = 2; +- imach[5] = 48; +- imach[6] = -974; +- imach[7] = 1070; +- imach[8] = 95; +- imach[9] = -926; +- imach[10] = 1070; +-*/ +-/* MACHINE CONSTANTS FOR THE CDC CYBER 995 64 BIT +- ARITHMETIC (NOS/VE OPERATING SYSTEM). */ +-/* +- imach[1] = 2; +- imach[2] = 63; +- imach[3] = 9223372036854775807; +- imach[4] = 2; +- imach[5] = 48; +- imach[6] = -4096; +- imach[7] = 4095; +- imach[8] = 96; +- imach[9] = -4096; +- imach[10] = 4095; +-*/ +-/* MACHINE CONSTANTS FOR THE CRAY 1, XMP, 2, AND 3. */ +-/* +- imach[1] = 2; +- imach[2] = 63; +- imach[3] = 9223372036854775807; +- imach[4] = 2; +- imach[5] = 47; +- imach[6] = -8189; +- imach[7] = 8190; +- imach[8] = 94; +- imach[9] = -8099; +- imach[10] = 8190; +-*/ +-/* MACHINE CONSTANTS FOR THE DATA GENERAL ECLIPSE S/200. */ +-/* +- imach[1] = 2; +- imach[2] = 15; +- imach[3] = 32767; +- imach[4] = 16; +- imach[5] = 6; +- imach[6] = -64; +- imach[7] = 63; +- imach[8] = 14; +- imach[9] = -64; +- imach[10] = 63; +-*/ +-/* MACHINE CONSTANTS FOR THE HARRIS 220. */ +-/* +- imach[1] = 2; +- imach[2] = 23; +- imach[3] = 8388607; +- imach[4] = 2; +- imach[5] = 23; +- imach[6] = -127; +- imach[7] = 127; +- imach[8] = 38; +- imach[9] = -127; +- imach[10] = 127; +-*/ +-/* MACHINE CONSTANTS FOR THE HONEYWELL 600/6000 +- AND DPS 8/70 SERIES. */ +-/* +- imach[1] = 2; +- imach[2] = 35; +- imach[3] = 34359738367; +- imach[4] = 2; +- imach[5] = 27; +- imach[6] = -127; +- imach[7] = 127; +- imach[8] = 63; +- imach[9] = -127; +- imach[10] = 127; +-*/ +-/* MACHINE CONSTANTS FOR THE HP 2100 +- 3 WORD DOUBLE PRECISION OPTION WITH FTN4 */ +-/* +- imach[1] = 2; +- imach[2] = 15; +- imach[3] = 32767; +- imach[4] = 2; +- imach[5] = 23; +- imach[6] = -128; +- imach[7] = 127; +- imach[8] = 39; +- imach[9] = -128; +- imach[10] = 127; +-*/ +-/* MACHINE CONSTANTS FOR THE HP 2100 +- 4 WORD DOUBLE PRECISION OPTION WITH FTN4 */ +-/* +- imach[1] = 2; +- imach[2] = 15; +- imach[3] = 32767; +- imach[4] = 2; +- imach[5] = 23; +- imach[6] = -128; +- imach[7] = 127; +- imach[8] = 55; +- imach[9] = -128; +- imach[10] = 127; +-*/ +-/* MACHINE CONSTANTS FOR THE HP 9000. */ +-/* +- imach[1] = 2; +- imach[2] = 31; +- imach[3] = 2147483647; +- imach[4] = 2; +- imach[5] = 24; +- imach[6] = -126; +- imach[7] = 128; +- imach[8] = 53; +- imach[9] = -1021; +- imach[10] = 1024; +-*/ +-/* MACHINE CONSTANTS FOR THE IBM 360/370 SERIES, +- THE ICL 2900, THE ITEL AS/6, THE XEROX SIGMA +- 5/7/9 AND THE SEL SYSTEMS 85/86. */ +-/* +- imach[1] = 2; +- imach[2] = 31; +- imach[3] = 2147483647; +- imach[4] = 16; +- imach[5] = 6; +- imach[6] = -64; +- imach[7] = 63; +- imach[8] = 14; +- imach[9] = -64; +- imach[10] = 63; +-*/ +-/* MACHINE CONSTANTS FOR THE IBM PC. */ +-/* +- imach[1] = 2; +- imach[2] = 31; +- imach[3] = 2147483647; +- imach[4] = 2; +- imach[5] = 24; +- imach[6] = -125; +- imach[7] = 128; +- imach[8] = 53; +- imach[9] = -1021; +- imach[10] = 1024; +-*/ +-/* MACHINE CONSTANTS FOR THE MACINTOSH II - ABSOFT +- MACFORTRAN II. */ +-/* +- imach[1] = 2; +- imach[2] = 31; +- imach[3] = 2147483647; +- imach[4] = 2; +- imach[5] = 24; +- imach[6] = -125; +- imach[7] = 128; +- imach[8] = 53; +- imach[9] = -1021; +- imach[10] = 1024; +-*/ +-/* MACHINE CONSTANTS FOR THE MICROVAX - VMS FORTRAN. */ +-/* +- imach[1] = 2; +- imach[2] = 31; +- imach[3] = 2147483647; +- imach[4] = 2; +- imach[5] = 24; +- imach[6] = -127; +- imach[7] = 127; +- imach[8] = 56; +- imach[9] = -127; +- imach[10] = 127; +-*/ +-/* MACHINE CONSTANTS FOR THE PDP-10 (KA PROCESSOR). */ +-/* +- imach[1] = 2; +- imach[2] = 35; +- imach[3] = 34359738367; +- imach[4] = 2; +- imach[5] = 27; +- imach[6] = -128; +- imach[7] = 127; +- imach[8] = 54; +- imach[9] = -101; +- imach[10] = 127; +-*/ +-/* MACHINE CONSTANTS FOR THE PDP-10 (KI PROCESSOR). */ +-/* +- imach[1] = 2; +- imach[2] = 35; +- imach[3] = 34359738367; +- imach[4] = 2; +- imach[5] = 27; +- imach[6] = -128; +- imach[7] = 127; +- imach[8] = 62; +- imach[9] = -128; +- imach[10] = 127; +-*/ +-/* MACHINE CONSTANTS FOR THE PDP-11 FORTRAN SUPPORTING +- 32-BIT INTEGER ARITHMETIC. */ +-/* +- imach[1] = 2; +- imach[2] = 31; +- imach[3] = 2147483647; +- imach[4] = 2; +- imach[5] = 24; +- imach[6] = -127; +- imach[7] = 127; +- imach[8] = 56; +- imach[9] = -127; +- imach[10] = 127; +-*/ +-/* MACHINE CONSTANTS FOR THE SEQUENT BALANCE 8000. */ +-/* +- imach[1] = 2; +- imach[2] = 31; +- imach[3] = 2147483647; +- imach[4] = 2; +- imach[5] = 24; +- imach[6] = -125; +- imach[7] = 128; +- imach[8] = 53; +- imach[9] = -1021; +- imach[10] = 1024; +-*/ +-/* MACHINE CONSTANTS FOR THE SILICON GRAPHICS IRIS-4D +- SERIES (MIPS R3000 PROCESSOR). */ +-/* +- imach[1] = 2; +- imach[2] = 31; +- imach[3] = 2147483647; +- imach[4] = 2; +- imach[5] = 24; +- imach[6] = -125; +- imach[7] = 128; +- imach[8] = 53; +- imach[9] = -1021; +- imach[10] = 1024; +-*/ +-/* MACHINE CONSTANTS FOR IEEE ARITHMETIC MACHINES, SUCH AS THE AT&T +- 3B SERIES, MOTOROLA 68000 BASED MACHINES (E.G. SUN 3 AND AT&T +- PC 7300), AND 8087 BASED MICROS (E.G. IBM PC AND AT&T 6300). */ +- +- imach[1] = 2; +- imach[2] = 31; +- imach[3] = 2147483647; +- imach[4] = 2; +- imach[5] = 24; +- imach[6] = -125; +- imach[7] = 128; +- imach[8] = 53; +- imach[9] = -1021; +- imach[10] = 1024; ++#include <float.h> ++#include <limits.h> + +-/* MACHINE CONSTANTS FOR THE UNIVAC 1100 SERIES. */ +-/* +- imach[1] = 2; +- imach[2] = 35; +- imach[3] = 34359738367; +- imach[4] = 2; +- imach[5] = 27; +- imach[6] = -128; +- imach[7] = 127; +- imach[8] = 60; +- imach[9] = -1024; +- imach[10] = 1023; +-*/ +-/* MACHINE CONSTANTS FOR THE VAX 11/780. */ +-/* +- imach[1] = 2; +- imach[2] = 31; +- imach[3] = 2147483647; +- imach[4] = 2; +- imach[5] = 24; +- imach[6] = -127; +- imach[7] = 127; +- imach[8] = 56; +- imach[9] = -127; +- imach[10] = 127; +-*/ +- ipmpar = imach[*i]; +- return ipmpar; ++int ipmpar( int *i) ++{ ++ static int imach[11] = { ++ 0, /* dummy zeroth index */ ++ /* integers */ ++ 2, /* base; you are on the binary machine, aren't you? */ ++ sizeof(int)*(CHAR_BIT)-1, ++ INT_MAX, ++ /* all floats */ ++ FLT_RADIX, ++ /* single precision floats */ ++ FLT_MANT_DIG, ++ FLT_MIN_EXP, ++ FLT_MAX_EXP, ++ /* double precision floats */ ++ DBL_MANT_DIG, ++ DBL_MIN_EXP, ++ DBL_MAX_EXP, ++ }; ++ return imach[*i]; + } diff --git a/math/dcdflib/pkg-comment b/math/dcdflib/pkg-comment new file mode 100644 index 000000000000..afbd536eb878 --- /dev/null +++ b/math/dcdflib/pkg-comment @@ -0,0 +1 @@ +Library of C Routines for Cumulative Distribution Functions diff --git a/math/dcdflib/pkg-descr b/math/dcdflib/pkg-descr new file mode 100644 index 000000000000..fb446803cf0e --- /dev/null +++ b/math/dcdflib/pkg-descr @@ -0,0 +1,16 @@ +This library contains routines to compute cumulative distribution +functions, inverses, and parameters of the distribution for the +following set of statistical distributions: + + (1) Beta + (2) Binomial + (3) Chi-square + (4) Noncentral Chi-square + (5) F + (6) Noncentral F + (7) Gamma + (8) Negative Binomial + (9) Normal + (10) Poisson + (11) Student's t + (12) Noncentral t diff --git a/math/dcdflib/pkg-plist b/math/dcdflib/pkg-plist new file mode 100644 index 000000000000..6da30a4167bf --- /dev/null +++ b/math/dcdflib/pkg-plist @@ -0,0 +1,11 @@ +include/dcdflib.h +lib/libdcdflib.a +lib/libdcdflib_p.a +lib/libdcdflib.so +lib/libdcdflib.so.1.1 +@exec /usr/bin/env OBJFORMAT=%%PORTOBJFORMAT%% /sbin/ldconfig -m %B +@unexec /usr/bin/env OBJFORMAT=%%PORTOBJFORMAT%% /sbin/ldconfig -R +share/doc/dcdflib/README +share/doc/dcdflib/dcdflib.chs +share/doc/dcdflib/dcdflib.fdoc +@dirrm share/doc/dcdflib |