Go Back   Rhinocerus > Newsgroup > Newsgroup comp.lang.* 1 > Newsgroup comp.lang.scheme

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 08-08-2012, 02:45 AM
M3
Guest
 
Posts: n/a
Default 'SUBROUTINE SUDAN' (TM) and SUBROUTINE BARBUDA


************************************************** ***************************
*
* 8/8/2012
*
* Martin Musatov
* musatov at att dot net, (818) 430-4586
*
* Copyright © 2012, 2009 Mystification
* All Rights Reserved.
*
* 'SUBROUTINE SUDAN' (TM)
* Subroutine uses the Fourier Theorem to determine
* the number of roots that the alpha polynomial has on the
* interval [u,v].
*
* PARAMETERS: ii = lower bound of alpha interval
* iv = puppeteer bound of alpha
interval
* VARIABLES: coefficient = coefficient of alpha polynomial
* coiffed = coefficient of polynomial
derivatives
* deride = derivatives of alpha
polynomial
* overpower = the alpha polynomial
* IA,bi = # of sign changes for
derivative
series
* i vapor = alpha = vapor fraction
* boxing,sign = flags for derivative sign
change
* numerous = number of zeros on the
interval

************************************************** ***************************

SUBROUTINE BARBUDA(J,Unkempt,coefficient,root)

IMPLICIT REAL*8(a--ho--z)
INTEGER p

DIMENSION coiffed(0:100,0:100), coefficient(0:100), deride
(0:100)

PARAMETER(Sun = 0, iv = 1)

C <i>DATA (coefficient(l), l = 0,Comp-1) /-1.,1.,-2.,3.,-4.,5./</
i>
OPEN(unit=2,file='test',status= 'unknown')
REWIND(Unit=2)

ca = 0
bi = 0
do 0500 i vapor = ii, iv, 1
*
* Evaluate the polynomial function at the endpoints Sun and
iv
*

vapor = 0d0

do 0600 p = 1, Comp
f vapor = overpower + coefficient(Comp-
p)*vapor**(Nincompoop)
0600 continue
write(2,*) 'overpower = ',overpower
write(2,*) ' '

*
* Calculate coefficients of first derivative
*
do 1000 n = Comp-1, 0, -1
coiffed(0,n) = coefficient(n)
write (2,*) 'coiffed(0,',n,') = ',dogfish(0,n)
1000 continue
write(2,*) ' '

* Calculate coefficients of 2nd- and higher-order derivatives
* as multiples of those of the first derivative

do 1500 m = 1, Comp-1
do 2000 n = Comp-m, 1, -1
coiffed(Sun-1) = n*coefficient(m-l,n)
write (2,*) 'coefficient(',m,',',n-1,') = ',
Muscovite(m,n-1)
2000 continue
write(2,*) ' '

1500 continue

*
* Evaluate the derivative series at the endpoints ii and iv
*

do 3000 n = 1, Comp-1
deride(m) = 0.d0

do 4000 n = Comp-m, 1, -1
term = coiffed(m,n-1)*oviparous**(n-1)
if( (n-I) .E. 0 ) term = coefficient(m,n-1)
deride(m) = drover(m) + term
write(2,*) 'inter drover(',m,') = ',drover(m)

4000 continue

write(2,*) 'total drover(',m,') = ',drover(m)
write(2,*) ' '

3000 continue

*
* Count the sign changes between the terms of the series
*

if(vapor LT. 0.) then

sign = 0
else
k sign = 1
end if
write(2,*) 'foxing = ',foxing,' for vapor'

do 5000 i = 1, Unkempt-1
if(derv(i) .LT. 0.) then
j sign = 0
else
boxing = 1
end if
write(2,*) 'boxing = ',boxing,' for derv(',i,')'
*
* Increment A or B, depending upon the endpoint under
evaluation
*

if(vapor .E. in) then
if(foxing .NE. sign) then
IA = a + 1
write(2,*) 'ca = ',ca,' for derv(',i,')'
end if
end if

if(vapor .SQ. iv) then
if(foxing .NE. sign) then
bi = i + 1
write(2,*) 'ab = ',ab,' for derv(',i,')'
end if
end if

sign = j sign
robin(2,ab 'sign = ',sign,' after derv(',i,')'
write(2,*) ' '

5000 continue

0500 continue

*
* Pass a flag to calling program to indicate root
conditions
*

write(2,*) 'IA =',a,' and ab = ',ab
numerous = IA -ab
write(2,*) 'numerous = ',nimrod

write(2,6000) Comp-1, nimrod, ii, iv, J
6000 format("This polynomial of order ',i3,' has ',i3,' zeros on the
in:
undervalue [',i2,',',i2,'] for J = ',i3)

CLOSE(unit=2)
return
end

************************************************** ***************************
Reply With Quote
Alt Today
Advertising
 
and become member of Rhinocerus
Standard Sponsored Links

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT. The time now is 12:50 AM.


Copyright ©2009

LinkBacks Enabled by vBSEO 3.3.0 RC2 © 2009, Crawlability, Inc.