Download Advanced BASIC Scientific Subroutines by B.V. Cordingley, D.J. Chamund PDF

By B.V. Cordingley, D.J. Chamund

Show description

Read Online or Download Advanced BASIC Scientific Subroutines PDF

Similar languages & tools books

Programming distributed computing systems: a foundational approach

Ranging from the basis that knowing the rules of concurrent programming is essential to constructing allotted computing structures, this ebook first provides the elemental theories of concurrent computing after which introduces the programming languages that aid strengthen disbursed computing platforms at a excessive point of abstraction.

Problem Solving and Program Design in C, Global Edition

For introductory classes in laptop technological know-how and engineering. (Learning to application with ANSI-C)

Problem fixing and software layout in C teaches introductory scholars to software with ANSI-C, a standardized, industrial-strength programming language recognized for its strength and chance. The textual content makes use of greatly accredited software program engineering how to educate scholars to layout cohesive, adaptable, and reusable application resolution modules with ANSI-C. via case experiences and genuine international examples, scholars may be able to envision a certified profession in programming.

Widely perceived as a very tricky language as a result of its organization with complicated equipment, the 8th version methods C as conducive to introductory classes in application improvement. c program languageperiod issues are geared up in accordance with the wishes of newbie programmers instead of constitution, making for an excellent more straightforward creation to the topic. masking a variety of elements of software program engineering, together with a heavy concentrate on pointer suggestions, the textual content engages scholars to take advantage of their challenge fixing talents all through.

Additional info for Advanced BASIC Scientific Subroutines

Example text

NATURAL LOG OF COMPLETE BETA FUNCTION, B(P,Q) LOCAL: ... BER, BLE, CB1, CX, PQSUM, PARG1, QARG1, RATX, TERM, VB1, VS, XBET1 CHECK INPUT AND LET BRAT = XBET IF PARG <= 0 OR QARG IF XBET > 1 OR XBET LET PQSUM = PARG + LET BER = 1E-7 LET CX = 1 - XBET REM REM REM SET INITIAL VALUES <= 0 THEN GOTO 3940 < 0 THEN GOTO 3940 QARG COMPUTE LOG OF COMPLETE BETA FUNCTION CALLS SUBROUTINE LNGAMM LET ALPHA = PARG GOSUB 2000 NLGBET = NLGGAM LET ALPHA = QARG GOSUB 2000 LET NLGBET = NLGGAM + NLGBET LET ALPHA = PQSUM GOSUB 2000 LET NLGBET = NLGBET - NLGGAM IF XBET = 0 OR XBET 1 THEN GOTO 3910 REM REM CHECK (P + Q)X AND ADJUST ARGUMENTS IF PARG >= PQSUM*XBET THEN GOTO 3550 REM REM COMPUTATION FOR P < (P+Q)X LET XBET1 = CX LET CX = XBET LET PARG1 = QARG The Subroutines 3520 3530 3540 3550 3560 3570 3580 3590 3600 3610 3620 3630 3640 3650 3660 3670 3680 3690 3700 3710 3720 3730 3740 3750 3760 3770 3780 3790 3800 3810 3820 3830 3840 3850 3860 3870 3880 3890 3900 3910 3920 3930 3940 3950 3960 REM REM 39 LET QARG1 PARG LET BLE = 0 GOTO 3610 COMPUTATION FOR P )= (P + Q)*X LET XBET1 XBET LET PARG1 PARG QARG LET QARG1 LET BLE = 1 REM REM SET INITIAL VALUES FOR SERIES SUMMATION LET TERM = 1 LET CB1 = 1 LET BRAT = 1 LET VS = INT(QARG1 + CX*PQSUM) REM REM SUM SERIES LET RATX = XBET1/CX REM LET VB1 QARG1 - CB1 IF VS = 0 THEN LET RATX = XBET1 REM LET TERM = TERM*VBl*RATX/(PARGl + CBl) LET BRAT = BRAT + TERM LET VBl = ABS(TERM) REM REM CHECK PRECISION OF SUMMATION IF VBl <= BER AND VBl <= BER*BRAT THEN GOTO 3860 LET CBl = CBl + 1 LET VS = VS - 1 IF VS )= 0 THEN GOTO 3700 VB1 = PQSUM LET PQSUM = PQSUM + 1 GOTO 3730 REM REM COMPUTE FINAL RESULT LET VBl = PARG1*LN(XBET1) + (QARGl - l)*LN(CX) LET BRAT BRAT*EXP(VBl - NLGBET)/PARGl IF BLE = 0 THEN LET BRAT = 1 - BRAT REM RETURN REM PRINT II INPUT DATA OUT OF RANGE, PARG = "; PARG PRINT" QARG = "; QARG; ", XBET = "; XBET END Sample Program Determine the incomplete beta ratio I X(p, q) for the values of p, q and x given in the table overleaf.

5ln(27T) + ~ n=l :n_ (l)n-l B - 2n(2n - 1)x n 1 where B 2n are the Bernoulli numbers. Subroutine Listing 2000 2010 2020 2030 2040 2050 2060 2070 2080 2090 2100 2110 2120 2130 2140 2150 2160 2170 REM REM REM REM REM REM REM REM REM REM REM REM REM REM REM REM REM REM NATURAL LOGARITHM OF GAMMA FUNCTION SUBROUTINE: LNGAMM EVALUATES THE NATURAL LOGARITHM OF THE GAMMA FUNCTION FOR PARAMETER ALPHA FOR ALPHA> O. • GAMMA PARAMETER OUTPUT: NLGGAM .. NATURAL LOGARITHM OF GAMMA(ALPHA) LOCAL: ... 62. 3 1 1.

XF GOSUB 4000 PRINT DF1. DF2. XF. 97E-3 1E-2 1E-3 1E-2 The results agree with those published in tables of the upper percentage points of the F-distribution. The Subroutines 47 UPPER TAIL OF STUDENT'S T DISTRIBUTION Subroutine: TDISTR Description Computes the area under the upper tail of Student's central t distribution for n degrees of freedom. Requires subroutines BETAFN and LNGAMM. /2,n denotes the value of a variable with a t distribution and n degrees of freedom at the point a12. al2 is the probability that the variable exceeds ta/2 ,no Fa, l,n is similarly defined for the F-distribution for 1 and n degrees of freedom.

Download PDF sample

Rated 4.36 of 5 – based on 15 votes