English
Source / code snippets

Polynome To 7. Grades invertieren; z.B. circa from impact on cause To close

 

p.specht

Polynome are so sozusagen the Gummi-ruler the maths: through Polynomanpassung on Messwerte can so some Formel for Vorgänge in nature, economy and engineering found go, The of course a Context describe, the but lest kausal clarified is:

If about steigende Börsennotierungen (Input) of companies with the amount freigesetzter colleagues (output) zusammenzuhängen shine, then helps sometimes Inversion, speak: The Umstellung the Formel to the others Page.
one attempts therefore, The Ergebnisvariable with the independent Variable To vertauschen and so a "Gegenformel" to find: works the release of Mitarbeitern (Input) on the Börsenkurs (output) from, because z.B. sinkende Lohnkosten stockholders and short-sighted speculators on more Gewinnausschüttungen hoping let? Verrückte world...

enclosed one Program to Polynominversion in the obigen senses. It can Formeln until strain 7 invertieren, the Koeffizient a1 must thereby but not zero his! the whole naturally How always without each Gewähr!
Windowtitle "Polynom-Inversion: from Y=a0+a1*X+a2*x^2+... becomes X=b0+b1*Y+b2*X^2+..."
Windowstyle 24:Cls'(D) demonstration 2017-05 by P.woodpecker, Vienna/EU. No warranty whatsoever!
'****************************************************
'*   Program to demonstrate the series reversion    *
'* ------------------------------------------------ *
'* Reference: BASIC Scientific Subroutines, Vol. II *
'* By F.R. Ruckdeschel, BYTE/McGRAWW-HILL, 1981 [1].*
'*                                                  *
'*             F90 Version by J.-P. Moreau, Paris.  *
'*                     (www.jpmoreau.fr)            *
'* XProfan 11.2 Version by P.woodpecker, Vienna/Austria *
'* ------------------------------------------------ *
'* SAMPLE RUN:                                      *
'* What is the degree of the input polynomial: 3    *
'*                                                  *
'* Input the coefficients as prompted:              *
'*                                                  *
'*    A( 0) = 1                                     *
'*    A( 1) = 1                                     *
'*    A( 2) = 1                                     *
'*    A( 3) = 1                                     *
'*                                                  *
'* The reversed polynomial coefficients are:        *
'*                                                  *
'*    B( 0) =  9                                    *
'*    B( 1) =  1                                    *
'*    B( 2) =  0                                    *
'*    B( 3) = -1                                    *
'*    B( 4) =  0                                    *
'*    B( 5) =  3                                    *
'*    B( 6) =  0                                    *
'*    B( 7) = -12                                   *
'*                                                  *
'****************************************************
Set("decimals",15)_Declare A![10],B![10],i&,n&,z!
Print "\n strain the Polynoms?: ";:Input n&
Print "\n Please The Koeffizienten the Polynoms How abgefragte prompt:\n"

WhileLoop 0,n&:i& = &Loop

    Print " a(";i&;") = ";:Input z!:A![i&]=z!
    EndWhile:Print
    Reverse_coeff(A![],B![])
    ::::ClearClip

    If A![1]<>0

        print " The reversen Polynom-Koeffizienten lauten:\n"

        WhileLoop 0,7:i&=&Loop

            If Abs(B![i&]) < Val("1e-20")

                B![i&] = 0

            EndIf

            Print " b(";i&;") = ";stature$("%g",B![i&])
            ::::PutClip stature$("%g",B![i&])+","

        EndWhile

        EndIf:Print "\n OK"
        WaitInput:END

        Proc Reverse_coeff :Parameters A![],B![]

            '******************************************************
            '* Series reversion - Diese routine takes a polynomial *
            '* Y = A(0) + A(1) * X + ... and returns a polynomial *
            '* X = B(0) + B(1) * Y + ... A(1) must be <> 0.       *
            '* The degree of reversion is limited to seven.       *
            '* -------------------------------------------------- *
            '* Reference: CRC standard Mathematical Tables,       *
            '* 24th edition.                                      *
            '******************************************************
            Declare a1!,a2!,a3!,a4!,a5!,a6!,a7!,aa!,bb!
            a1!=A![1]
            a2!=0

            If a1!=0

                print " Error: Division through 0! A(1) must not zero his!":Return

            else

                B![1]=1/a1!
                aa!=1/a1!

            EndIf

            bb!=aa!*aa!
            aa!=aa!*bb!
            B![2]=-a2!/aa!
            a3!=A![3]
            aa!=aa!*bb!
            B![3]=aa!*(2*a2!*a2! - a1!*a3!)
            a4!=A![4]
            aa!=aa!*bb!
            B![4]=aa!*(5*a1!*a2!*a3! - a1!*a1!*a4! - 5*a2!*a2!*a2!)
            a5!=A![5]
            aa!=aa!*bb!
            B![5]=6*a1!*a1!*a2!*a4! + 3*a1!*a1!*a3!*a3! + 14*a2!*a2!*a2!*a2!
            B![5]=B![5] - a1!*a1!*a1!*a5! - 21*a1!*a2!*a2!*a3!
            B![5]=aa!*B![5]
            a6!=A![6]
            aa!=aa!*bb!
            B![6]=7*a1!*a1!*a1!*a2!*a5! + 7*a1!*a1!*a1!*a3!*a4! + 84*a1!*a2!*a2!*a2!*a3!
            B![6]=B![6] - a1!*a1!*a1!*a1!*a6! - 28*a1!*a1!*a2!*a2!*a4!
            B![6]=B![6] - 28*a1!*a1!*a2!*a3!*a3! - 42*a2!*a2!*a2!*a2!*a2!
            B![6]=aa!*B![6]
            a7!=A![7]
            aa!=aa!*bb!
            B![7]=8*a1!*a1!*a1!*a1!*a2!*a6! + 8*a1!*a1!*a1!*a1!*a3!*a5!
            B![7]=B![7] + 4*a1!*a1!*a1!*a1!*a4!*a4! + 120*a1!*a1!*a2!*a2!*a2!*a4!
            B![7]=B![7] + 180*a1!*a1!*a2!*a2!*a3!*a3! + 132*a2!*a2!*a2!*a2!*a2!*a2!
            B![7]=B![7] - a1!*a1!*a1!*a1!*a1!*a7! - 36*a1!*a1!*a1!*a2!*a2!*a5!
            B![7]=B![7] - 72*a1!*a1!*a1!*a2!*a3!*a4! - 12*a1!*a1!*a1!*a3!*a3!*a3!
            B![7]=B![7] - 330*a1!*a2!*a2!*a2!*a2!*a3!
            B![7]=aa!*B![7]
            B![0]=0
            aa!=A![0]

            WhileLoop 1,7:i&=&Loop

                B![0]=B![0] - B![i&]*aa!
                aa!=aa!*A![0]

            EndWhile

        ENDPROC

        ' End of file reverse.prf
 
XProfan 11
Computer: Gerät, daß es in Mikrosekunden erlaubt, 50.000 Fehler zu machen, zB 'daß' statt 'das'...
05/24/21  
 



Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

1.436 Views

Untitledvor 0 min.
p.specht11/20/21
Uwe Lang11/20/21
Manfred Barei11/19/21
Wilfried Friebe11/17/21
More...

Themeninformationen

this Topic has 1 subscriber:

p.specht (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie