Web-Books
im Austria-Forum
Austria-Forum
Web-Books
Informatik
Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python 3.6, Band Second Edition
Seite - 131 -
  • Benutzer
  • Version
    • Vollversion
    • Textversion
  • Sprache
    • Deutsch
    • English - Englisch

Seite - 131 - in Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python 3.6, Band Second Edition

Bild der Seite - 131 -

Bild der Seite - 131 - in Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python 3.6, Band Second Edition

Text der Seite - 131 -

6ComputingIntegralsandTestingCode We now turn our prime attention to the solving of mathematical problems through computer programming. A fundamentally important part of programming, is to checkthat thewrittencodeworksas intended.That is, thecodemustbe tested.This far, we have checked our coding in rather simple ways, e.g., by comparing to hand calculations. Now, we will look at more powerful test strategies, while addressing numericalcomputationof integrals. Therearemanyreasons tochoose integrationasourfirst application. Integration is well known already from high school mathematics. Most integrals are not tractablebypenandpaper,andacomputerizedsolutionapproachisbothverymuch simplerandmuchmorepowerful—youcanessentially treatall integrals ∫b a f(x)dx in10 linesofcomputercode! Integration also demonstrates the difference between exact mathematics by pen and paper and numerical mathematics on a computer. The latter approaches the resultof theformerwithoutanyworriesaboutroundingerrorsduetofiniteprecision arithmetics incomputers(incontrast todifferentiation,wheresucherrorspreventus fromgettinga result as accurateaswe desire). Finally, integration is thought of as a somewhat difficult mathematical concept tograsp,andprogrammingintegrationshouldgreatly improvetheunderstandingof what integrationreally isandhowit works. Not onlyshall we understandhow to use the computer to integrate,but we shall also learn a series of good habits to ensure your computer work is of the highest scientific quality. In particular,we will have a strong focuson how to write Python code that is freeofprogrammingmistakes. ©The Author(s) 2020 S.Linge, H.P. Langtangen, Programming forComputations -Python, Texts in Computational Science and Engineering 15, https://doi.org/10.1007/978-3-030-16877-3_6 131
zurück zum  Buch Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python 3.6, Band Second Edition"
Programming for Computations – Python A Gentle Introduction to Numerical Simulations with Python 3.6, Band Second Edition
Titel
Programming for Computations – Python
Untertitel
A Gentle Introduction to Numerical Simulations with Python 3.6
Band
Second Edition
Autoren
Svein Linge
Hans Petter Langtangen
Verlag
Springer Open
Datum
2020
Sprache
englisch
Lizenz
CC BY 4.0
ISBN
978-3-319-32428-9
Abmessungen
17.8 x 25.4 cm
Seiten
356
Schlagwörter
Programmiersprache, Informatik, programming language, functional, imperative, object-oriented, reflective
Kategorie
Informatik
Web-Books
Bibliothek
Datenschutz
Impressum
Austria-Forum
Austria-Forum
Web-Books
Programming for Computations – Python