| |
|
|
p.specht
| who from the school yet The terror the Polynome in recollection has, ought to itself in thoughts at english headmaster and Optiker William George Horner from Bristol (UK circa 1815) for a strong schematische Vereinfachung thank. Gänzlich lose The thing your terror, if one too yet The Erfindungen the gentlemen W. Schickard, B. Pascal, Ch. Babbage and (parallel moreover) W. Leibnitz, which in cogwheel-betriebenen undertow. "Rechenmaschinen" from wood and Messing gipfelten, his own name: there becomes The rapid numerische Polynomauswerung to that children's play. one follow solely very very whom nachstehenden instructions
Windowtitle " HORNER-SCHEMA "
' Orig.-fountain: E.Floegel: Pascal-manuals s. 76
' After Profan transkribiert, Error abgefangen and adaptiert 2012 P. woodpecker
' (D) only for Demonstrationszwecke - without jedwede Gewähr!
windowstyle 1048 : font 2 : randomize
window %maxx\4,0-%maxx\2,%maxy-41
set("decimals",15):declare x!,y!,z!,i&,n&,a![],a$
strain:
Cls rnd(8^8)
print
print " Numerische Polynomauswertung through Horner-Schema"
print
print " strain the Polynoms: ";n&
locate %csrlin-1,21
input a$
case a$>"":n&=val(a$)
setsize a![],n&+1
neukoeff:
print
print " Please Koeffizienten prompt: "
print
whileloop n&,0,-1
print " Koeff. of x^";st$(&Loop);
print " = a[';str$(& Loop);'] ";
case &Loop<10:print " ";
print "= ";
case a![&Loop]>0:print tab(28);a![&Loop];
print
locate %csrlin-1,28
input a$
case a$>"":a![&Loop]=val(a$)
endwhile
xwert:
print
print " Auswertung on the place x = ";
case x!>0:print x!;
print
locate %csrlin-1,31
input a$
case a$>"":x!=val(a$)
y!=0
whileloop n&,0,-1
y!=y!*x!+a![&Loop]
endwhile
print "------------------------------------------------------------------------"
print " Polynomwert on place ";x!;" is : ";
if abs(y!)>10^6
print stature$("%e",y!)
else
print y!
endif
y!=0
print "------------------------------------------------------------------------"
print " for other x to charge? ";
input a$
a$=lower$(a$)
case ord(a$)=ord("j"):goto "xwert"
case val(a$)<>0:beep
case val(a$)<>0:goto "xwert"
print " for others Koeffizienten with strain ";n&;" to charge? ";
input a$
a$=lower$(a$)
if ord(a$)=ord("j")
cls rnd(8^8)
goto "neukoeff"
endif
print " other Polynom to charge? ";
input a$
a$=lower$(a$)
case ord(a$)=ord("j"):goto "grad"
print
beep
print " see again! "
waitinput 5000
|
|
|
| Computer: Gerät, daß es in Mikrosekunden erlaubt, 50.000 Fehler zu machen, zB 'daß' statt 'das'... | 05/07/21 ▲ |
|
|
|