SlideShare a Scribd company logo
www.openeering.com
powered by
NUMERICAL ANALYSIS USING SCILAB:
ERROR ANALYSIS AND PROPAGATION
This tutorial provides a collection of numerical examples and advises on error
analysis and its propagation. All examples are developed in Scilab.
Level
This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.
Error analysis and propagation www.openeering.com page 2/10
Step 1: The purpose of this tutorial
The purpose of this Scilab tutorial is to provide a collection of numerical
examples that are typically part of numerical analysis courses.
This tutorial is intended to help readers familiarize with numerical methods
and their implementations, keeping under control the error propagation.
Here we provide some classical examples on error analysis and
propagation.
An introduction to
NUMERICAL ANALYSIS USING SCILAB
(Error study in Numerical Analysis)
Step 2: Roadmap
In this tutorial, after a brief introduction to the concept of numerical errors,
we analyze some examples in which numerical errors occur. These
examples are useful to understand how important is to pay attention to
error propagation when implementing numerical methods.
Descriptions Steps
Numerical errors 3-5
Examples 6-10
Conclusions and remarks 11-12
Error analysis and propagation www.openeering.com page 3/10
Step 3: Numerical error
What is allocated in a computer is only a subset of real number (using
IEEE 754 standard) and hence, a real number is represented in the
computer as , a fixed strings of digits. This limited amount of storage
introduces a rounding error (or round-off error). It is possible to prove the
following relation
with
| |
where is a constant that depends on the floating point system used to
represent the number (for double precision arithmetic is equal to
).
// Scilab command to obtain eps
// ----------------------------
%eps
Step 4: Truncation error
The next step is to study what happens when the basic arithmetic
operations are used.
We denote the computer arithmetic as , , , to distinguish them
from real arithmetic , , and respectively.
A part from the numerical error due to limited length in bits of registers, the
computer arithmetic introduces a further truncation error when results are
transfer from CPU to the memory. This error is caused by the fact that the
length in bits of the CPU register is greater than the one used to store
numbers.
As an example, if we sum two numbers and (to compute )
the corresponding machine operation can be written as
( )
with | | . The sum of two numbers involves the sum of the
two floating point operands. Since this operation is done in a register
of the computer, it is necessary to consider a further floating point
representation when the number is transferred to be stored into the
memory.
Error analysis and propagation www.openeering.com page 4/10
Step 5: Cancellation error
It is interesting to analyze the arithmetic operations when we consider
relative errors. For example, we want to analyze the sum operation:
| |
| |
in terms of the relative error of the input operands and . The relative
error for is defined as
| |
| |
A computer operation is considered numerically stable when
where and and are two input operands.
It is possible to prove that the computer operations and are the only
stable operations with respect to the rounding error. Conversely, for
addition we have:
(
| |
| |
| |
| |
)
A similar inequality holds for subtraction.
When , the right hand side of the inequality may be very high and
hence may generate a high relative error (cancellation error).
Cancellation error should be avoided whenever possible!
Example of cancellation error for subtraction operation
In this example we consider a decimal arithmetic with floating point where a
number is expressed in the following way:
with . is the exponent (or characteristic) of the representation while
is the mantissa of the representation. The mantissa has always a
fixed number of digits, in this case m.
For example, we can compute using a system with a mantissa of
4 digits for the number, while we use a mantissa of 8 digits for the internal
representations in the CPU register.
The example is done using .
From memory to registers:
Memory (mantissa = 4) Register (mantissa = 8)


Arithmetic operation with alignment of the exponent:
Register (mantissa = 8) Register with aligned exp.


+

From register to memory:
Register (mantissa = 8) Memory (mantissa = 4)

It is easy to compute the final step in which we subtract again 1 to evaluate
. As a result we obtain that is not equal to x.
Error analysis and propagation www.openeering.com page 5/10
Step 6: Two equivalent expressions
In this example we compare the following two equivalent expressions:
These two expressions are equivalent from an algebraic point of view; the
second expression is simply obtained from the first one through
simplification.
The first function suffers of the cancellation error when goes to zero.
This phenomenon has been explained in the previous step.
In the reported figure we have plotted the error . We
may see that the cancellation error is huge when is close to zero. This
phenomenon produces a loss of significant digits.
The Scilab script for the figure on the right is available in ex01.sce. The
code can be downloaded from the Openeering website.
(Error err in the range [-1e-07;1e-07])
Error analysis and propagation www.openeering.com page 6/10
Step 7: Two equivalent polynomials
In this example, we compare the two following polynomial expressions:
where the first expression is obtained from the second by expansion.
As depicted on the right, the second expression is numerically stable while
the first one is more unstable.
The Scilab script is reported in the function ex02.sce.
(Comparison between two algebraic equivalent polynomials)
Error analysis and propagation www.openeering.com page 7/10
Step 8: Derivative example
In this step, we study the computation of a derivative from a numerical
point of view. To approximate the first derivate, we use here the difference
quotient (a.k.a. Newton’s quotient):
For example, we may analyze the formula for the function at
point varying h in the following way:
The plot on the right visualizes the results.
From a mathematical point of view, when goes to zero, the formula
should assume the value of the first derivative. Intuitively, we may expect
the smaller the , the better the approximation. Unfortunately, because of
cancellation errors, it happens that the most reliable value for the derivate
is reached in (for , the value of the derivate is the same
as ).
The Scilab script for plot and table is reported in the function ex03.sce.
(Value of the derivative changing the value of h)
(Derivative example – table of results)
Error analysis and propagation www.openeering.com page 8/10
Step 9: Error analysis and optimal step
The Newton’s quotient to approximate the derivative contains two
sources of error:
 Round-off error;
 Truncation error.
This follows from the Taylor series expansion of :
where and hence:
The first term contributes to round-off error, while the second term gives
rise to a truncation error.
As reported on the right the total error can be expressed as
̅
From the above formula it is possible to compute the optimal step size .
Taking the derivative of the total error with respect to and setting this
quantity equal to zero, we have:
√
̅
This represents the optimal value for to minimize the total error.
Evaluation of the round-off error:
The round-off error for the Newton’s quotient can be written as:
|
( ) ( )
|
| |
where | | (remember that where | | ).
Moreover we ignore error from division by .
In order to evaluate this error, with small, we replace by
We do not know the signs of and , so we replace the difference
with ̅. This leads to:
̅
| |
̅
where | |.
Evaluation of the truncation error:
The truncation error is given by:
| |
where for small values of we replace by and | |.
Error analysis and propagation www.openeering.com page 9/10
Step 10: Exercise
It is possible to compute the second derivatives of a function using the
following approximation
Apply the above formula to compute the second derivative of the function
at a given point .
Moreover, prove the following estimate for the total error:
|
( ) ( ) ( )
|
̅
where | | and | |.
The upper bound error is minimized when has the value
√
̅
Hints: Using Taylor expansion for the function and to
the fourth order paying attention to the signs.
(Relative error for second derivative approximation)
(Second derivative approximation, table of results)
Error analysis and propagation www.openeering.com page 10/10
Step 11: Concluding remarks and References
In this tutorial we have collected a series of numerical examples written in
Scilab for the study of numerical errors.
1. Scilab Web Page: Available: www.scilab.org.
2. Openeering: www.openeering.com.
3. J. Higham, accuracy and Stability of Numerical Algorithms, SIAM
4. Atkinson, An Introduction to Numerical Analysis, Wiley
Step 12: Software content
To report a bug or suggest improvements please contact Openeering
team at the web site www.openeering.com.
Thank you for your attention,
Silvia Poles and Manolo Venturin
--------------
Main directory
--------------
ex01.sce : Expression example
ex02.sce : Polynomial example
ex03.sce : Derivative example
ex04.sce : Second derivative exercise
license.txt : The license file

More Related Content

What's hot

Cartografia interpretacion de fotografias aereas
Cartografia interpretacion de fotografias aereasCartografia interpretacion de fotografias aereas
Cartografia interpretacion de fotografias aereas
Kimberlyn Piñeros Herrera
 
Module 5 Cams
Module 5 CamsModule 5 Cams
Module 5 Cams
taruian
 
Gear trains
Gear trainsGear trains
Gear trains
ashok340
 
Gyroscope
GyroscopeGyroscope
Gyroscope
Elesh Koshti
 
Tutorials questions
Tutorials questionsTutorials questions
Tutorials questions
mohammed mahmood
 
Mobileye SeeQ Brochure
Mobileye SeeQ BrochureMobileye SeeQ Brochure
Mobileye SeeQ Brochure
Mobileye
 
INVERSION MECHANISM
INVERSION MECHANISMINVERSION MECHANISM
INVERSION MECHANISM
SHUBHAM KULSHRESTHA
 
5.1 gyroscope introduction
5.1 gyroscope introduction  5.1 gyroscope introduction
5.1 gyroscope introduction
Kiran Wakchaure
 
Single Rotor, Two Rotor and Three Rotor Torsional Vibration System
Single Rotor, Two Rotor and Three Rotor Torsional Vibration SystemSingle Rotor, Two Rotor and Three Rotor Torsional Vibration System
Single Rotor, Two Rotor and Three Rotor Torsional Vibration System
Devan P.D
 
Exploración fisica
Exploración fisicaExploración fisica
Exploración fisica
César Rincón Guerrero
 

What's hot (10)

Cartografia interpretacion de fotografias aereas
Cartografia interpretacion de fotografias aereasCartografia interpretacion de fotografias aereas
Cartografia interpretacion de fotografias aereas
 
Module 5 Cams
Module 5 CamsModule 5 Cams
Module 5 Cams
 
Gear trains
Gear trainsGear trains
Gear trains
 
Gyroscope
GyroscopeGyroscope
Gyroscope
 
Tutorials questions
Tutorials questionsTutorials questions
Tutorials questions
 
Mobileye SeeQ Brochure
Mobileye SeeQ BrochureMobileye SeeQ Brochure
Mobileye SeeQ Brochure
 
INVERSION MECHANISM
INVERSION MECHANISMINVERSION MECHANISM
INVERSION MECHANISM
 
5.1 gyroscope introduction
5.1 gyroscope introduction  5.1 gyroscope introduction
5.1 gyroscope introduction
 
Single Rotor, Two Rotor and Three Rotor Torsional Vibration System
Single Rotor, Two Rotor and Three Rotor Torsional Vibration SystemSingle Rotor, Two Rotor and Three Rotor Torsional Vibration System
Single Rotor, Two Rotor and Three Rotor Torsional Vibration System
 
Exploración fisica
Exploración fisicaExploración fisica
Exploración fisica
 

Viewers also liked

Numerical analysis using Scilab: Solving nonlinear equations
Numerical analysis using Scilab: Solving nonlinear equationsNumerical analysis using Scilab: Solving nonlinear equations
Numerical analysis using Scilab: Solving nonlinear equations
Scilab
 
Numerical analysis using Scilab: Numerical stability and conditioning
Numerical analysis using Scilab: Numerical stability and conditioningNumerical analysis using Scilab: Numerical stability and conditioning
Numerical analysis using Scilab: Numerical stability and conditioning
Scilab
 
Introduction to error analysis
Introduction to error analysis Introduction to error analysis
Introduction to error analysis Muhmmad Asif
 
First steps with Scilab
First steps with ScilabFirst steps with Scilab
First steps with Scilab
Scilab
 
Aeraulic toolbox for Xcos
Aeraulic toolbox for XcosAeraulic toolbox for Xcos
Aeraulic toolbox for Xcos
Scilab
 
Data mining
Data miningData mining
Data mining
Scilab
 
Modeling an ODE: 3 different approaches - Part 1
Modeling an ODE: 3 different approaches - Part 1Modeling an ODE: 3 different approaches - Part 1
Modeling an ODE: 3 different approaches - Part 1
Scilab
 
Modeling an ODE: 3 different approaches - Part 2
Modeling an ODE: 3 different approaches - Part 2Modeling an ODE: 3 different approaches - Part 2
Modeling an ODE: 3 different approaches - Part 2
Scilab
 
Approximation and error
Approximation and errorApproximation and error
Approximation and errorrubenarismendi
 
Introduction to Control systems in scilab
Introduction to Control systems in scilabIntroduction to Control systems in scilab
Introduction to Control systems in scilab
Scilab
 
Numerical Methods
Numerical MethodsNumerical Methods
Numerical Methods
ESUG
 
Customizing Xcos with new Blocks and Palette
Customizing Xcos with new Blocks and PaletteCustomizing Xcos with new Blocks and Palette
Customizing Xcos with new Blocks and Palette
Scilab
 
Error analysis
Error analysisError analysis
Error analysis
Ahmed Hussein
 
Types of errors
Types of errorsTypes of errors
Types of errors
Rima fathi
 
Introduction to Numerical Analysis
Introduction to Numerical AnalysisIntroduction to Numerical Analysis
Introduction to Numerical Analysis
Mohammad Tawfik
 
Error analysis presentation
Error analysis presentationError analysis presentation
Error analysis presentation
Geraldine Lopez
 
Error analysis
Error  analysisError  analysis
Error analysis
fateme faryabi
 
Errors in Computing- Runtime, Semantics, Syntax and Fixed and Floating point
Errors in Computing- Runtime, Semantics, Syntax and Fixed and Floating pointErrors in Computing- Runtime, Semantics, Syntax and Fixed and Floating point
Errors in Computing- Runtime, Semantics, Syntax and Fixed and Floating point
Ryon Whyte
 
Scilab as a calculator
Scilab as a calculatorScilab as a calculator
Scilab as a calculator
Scilab
 
Example of error analysis and worked examples
Example of error analysis and worked examplesExample of error analysis and worked examples
Example of error analysis and worked examples
Lisa Thompson Sousa
 

Viewers also liked (20)

Numerical analysis using Scilab: Solving nonlinear equations
Numerical analysis using Scilab: Solving nonlinear equationsNumerical analysis using Scilab: Solving nonlinear equations
Numerical analysis using Scilab: Solving nonlinear equations
 
Numerical analysis using Scilab: Numerical stability and conditioning
Numerical analysis using Scilab: Numerical stability and conditioningNumerical analysis using Scilab: Numerical stability and conditioning
Numerical analysis using Scilab: Numerical stability and conditioning
 
Introduction to error analysis
Introduction to error analysis Introduction to error analysis
Introduction to error analysis
 
First steps with Scilab
First steps with ScilabFirst steps with Scilab
First steps with Scilab
 
Aeraulic toolbox for Xcos
Aeraulic toolbox for XcosAeraulic toolbox for Xcos
Aeraulic toolbox for Xcos
 
Data mining
Data miningData mining
Data mining
 
Modeling an ODE: 3 different approaches - Part 1
Modeling an ODE: 3 different approaches - Part 1Modeling an ODE: 3 different approaches - Part 1
Modeling an ODE: 3 different approaches - Part 1
 
Modeling an ODE: 3 different approaches - Part 2
Modeling an ODE: 3 different approaches - Part 2Modeling an ODE: 3 different approaches - Part 2
Modeling an ODE: 3 different approaches - Part 2
 
Approximation and error
Approximation and errorApproximation and error
Approximation and error
 
Introduction to Control systems in scilab
Introduction to Control systems in scilabIntroduction to Control systems in scilab
Introduction to Control systems in scilab
 
Numerical Methods
Numerical MethodsNumerical Methods
Numerical Methods
 
Customizing Xcos with new Blocks and Palette
Customizing Xcos with new Blocks and PaletteCustomizing Xcos with new Blocks and Palette
Customizing Xcos with new Blocks and Palette
 
Error analysis
Error analysisError analysis
Error analysis
 
Types of errors
Types of errorsTypes of errors
Types of errors
 
Introduction to Numerical Analysis
Introduction to Numerical AnalysisIntroduction to Numerical Analysis
Introduction to Numerical Analysis
 
Error analysis presentation
Error analysis presentationError analysis presentation
Error analysis presentation
 
Error analysis
Error  analysisError  analysis
Error analysis
 
Errors in Computing- Runtime, Semantics, Syntax and Fixed and Floating point
Errors in Computing- Runtime, Semantics, Syntax and Fixed and Floating pointErrors in Computing- Runtime, Semantics, Syntax and Fixed and Floating point
Errors in Computing- Runtime, Semantics, Syntax and Fixed and Floating point
 
Scilab as a calculator
Scilab as a calculatorScilab as a calculator
Scilab as a calculator
 
Example of error analysis and worked examples
Example of error analysis and worked examplesExample of error analysis and worked examples
Example of error analysis and worked examples
 

Similar to Numerical analysis using Scilab: Error analysis and propagation

(Slides) Efficient Evaluation Methods of Elementary Functions Suitable for SI...
(Slides) Efficient Evaluation Methods of Elementary Functions Suitable for SI...(Slides) Efficient Evaluation Methods of Elementary Functions Suitable for SI...
(Slides) Efficient Evaluation Methods of Elementary Functions Suitable for SI...
Naoki Shibata
 
Conditional Statements
Conditional StatementsConditional Statements
Conditional Statements
MuhammadBakri13
 
Algoritmos
AlgoritmosAlgoritmos
Algoritmos
Fab Lab LIMA
 
Adsa u1 ver 1.0
Adsa u1 ver 1.0Adsa u1 ver 1.0
Adsa u1 ver 1.0
Dr. C.V. Suresh Babu
 
Data Transformation
Data TransformationData Transformation
Data Transformation
ArmanArafatAnik
 
Algorithms notes 2 tutorials duniya
Algorithms notes 2   tutorials duniyaAlgorithms notes 2   tutorials duniya
Algorithms notes 2 tutorials duniya
TutorialsDuniya.com
 
Python_Module_2.pdf
Python_Module_2.pdfPython_Module_2.pdf
Python_Module_2.pdf
R.K.College of engg & Tech
 
House Price Estimation as a Function Fitting Problem with using ANN Approach
House Price Estimation as a Function Fitting Problem with using ANN ApproachHouse Price Estimation as a Function Fitting Problem with using ANN Approach
House Price Estimation as a Function Fitting Problem with using ANN ApproachYusuf Uzun
 
Lecture 05.pptx
Lecture 05.pptxLecture 05.pptx
Lecture 05.pptx
Mohammad Hassan
 
A study of the Behavior of Floating-Point Errors
A study of the Behavior of Floating-Point ErrorsA study of the Behavior of Floating-Point Errors
A study of the Behavior of Floating-Point Errors
ijpla
 
Curve fitting
Curve fittingCurve fitting
Curve fitting
dusan4rs
 
GENETIC ALGORITHM FOR FUNCTION APPROXIMATION: AN EXPERIMENTAL INVESTIGATION
GENETIC ALGORITHM FOR FUNCTION APPROXIMATION: AN EXPERIMENTAL INVESTIGATIONGENETIC ALGORITHM FOR FUNCTION APPROXIMATION: AN EXPERIMENTAL INVESTIGATION
GENETIC ALGORITHM FOR FUNCTION APPROXIMATION: AN EXPERIMENTAL INVESTIGATION
ijaia
 
Daa chapter 1
Daa chapter 1Daa chapter 1
Daa chapter 1
B.Kirron Reddi
 
PVS-Studio team is about to produce a technical breakthrough, but for now let...
PVS-Studio team is about to produce a technical breakthrough, but for now let...PVS-Studio team is about to produce a technical breakthrough, but for now let...
PVS-Studio team is about to produce a technical breakthrough, but for now let...
PVS-Studio
 
Dsp lab _eec-652__vi_sem_18012013
Dsp lab _eec-652__vi_sem_18012013Dsp lab _eec-652__vi_sem_18012013
Dsp lab _eec-652__vi_sem_18012013Kurmendra Singh
 
Dsp lab _eec-652__vi_sem_18012013
Dsp lab _eec-652__vi_sem_18012013Dsp lab _eec-652__vi_sem_18012013
Dsp lab _eec-652__vi_sem_18012013
amanabr
 

Similar to Numerical analysis using Scilab: Error analysis and propagation (20)

(Slides) Efficient Evaluation Methods of Elementary Functions Suitable for SI...
(Slides) Efficient Evaluation Methods of Elementary Functions Suitable for SI...(Slides) Efficient Evaluation Methods of Elementary Functions Suitable for SI...
(Slides) Efficient Evaluation Methods of Elementary Functions Suitable for SI...
 
Conditional Statements
Conditional StatementsConditional Statements
Conditional Statements
 
Algoritmos
AlgoritmosAlgoritmos
Algoritmos
 
Chapter 2
Chapter 2Chapter 2
Chapter 2
 
Chapter 2
Chapter 2Chapter 2
Chapter 2
 
Adsa u1 ver 1.0
Adsa u1 ver 1.0Adsa u1 ver 1.0
Adsa u1 ver 1.0
 
Data Transformation
Data TransformationData Transformation
Data Transformation
 
Lect 3-4 Zaheer Abbas
Lect 3-4 Zaheer AbbasLect 3-4 Zaheer Abbas
Lect 3-4 Zaheer Abbas
 
Algorithms notes 2 tutorials duniya
Algorithms notes 2   tutorials duniyaAlgorithms notes 2   tutorials duniya
Algorithms notes 2 tutorials duniya
 
Python_Module_2.pdf
Python_Module_2.pdfPython_Module_2.pdf
Python_Module_2.pdf
 
House Price Estimation as a Function Fitting Problem with using ANN Approach
House Price Estimation as a Function Fitting Problem with using ANN ApproachHouse Price Estimation as a Function Fitting Problem with using ANN Approach
House Price Estimation as a Function Fitting Problem with using ANN Approach
 
Lecture 05.pptx
Lecture 05.pptxLecture 05.pptx
Lecture 05.pptx
 
A study of the Behavior of Floating-Point Errors
A study of the Behavior of Floating-Point ErrorsA study of the Behavior of Floating-Point Errors
A study of the Behavior of Floating-Point Errors
 
Curve fitting
Curve fittingCurve fitting
Curve fitting
 
GENETIC ALGORITHM FOR FUNCTION APPROXIMATION: AN EXPERIMENTAL INVESTIGATION
GENETIC ALGORITHM FOR FUNCTION APPROXIMATION: AN EXPERIMENTAL INVESTIGATIONGENETIC ALGORITHM FOR FUNCTION APPROXIMATION: AN EXPERIMENTAL INVESTIGATION
GENETIC ALGORITHM FOR FUNCTION APPROXIMATION: AN EXPERIMENTAL INVESTIGATION
 
Chapitre 08
Chapitre 08Chapitre 08
Chapitre 08
 
Daa chapter 1
Daa chapter 1Daa chapter 1
Daa chapter 1
 
PVS-Studio team is about to produce a technical breakthrough, but for now let...
PVS-Studio team is about to produce a technical breakthrough, but for now let...PVS-Studio team is about to produce a technical breakthrough, but for now let...
PVS-Studio team is about to produce a technical breakthrough, but for now let...
 
Dsp lab _eec-652__vi_sem_18012013
Dsp lab _eec-652__vi_sem_18012013Dsp lab _eec-652__vi_sem_18012013
Dsp lab _eec-652__vi_sem_18012013
 
Dsp lab _eec-652__vi_sem_18012013
Dsp lab _eec-652__vi_sem_18012013Dsp lab _eec-652__vi_sem_18012013
Dsp lab _eec-652__vi_sem_18012013
 

More from Scilab

Statistical Analysis for Robust Design
Statistical Analysis for Robust DesignStatistical Analysis for Robust Design
Statistical Analysis for Robust Design
Scilab
 
Electric motor optimization
Electric motor optimizationElectric motor optimization
Electric motor optimization
Scilab
 
Asteroidlanding - Scilab conference 2019 Keynote
Asteroidlanding - Scilab conference 2019 KeynoteAsteroidlanding - Scilab conference 2019 Keynote
Asteroidlanding - Scilab conference 2019 Keynote
Scilab
 
Faster Time to Market using Scilab/XCOS/X2C for motor control algorithm devel...
Faster Time to Market using Scilab/XCOS/X2C for motor control algorithm devel...Faster Time to Market using Scilab/XCOS/X2C for motor control algorithm devel...
Faster Time to Market using Scilab/XCOS/X2C for motor control algorithm devel...
Scilab
 
Scilab and Xcos for Very Low Earth Orbits satellites modelling
Scilab and Xcos for Very Low Earth Orbits satellites modellingScilab and Xcos for Very Low Earth Orbits satellites modelling
Scilab and Xcos for Very Low Earth Orbits satellites modelling
Scilab
 
X2C -a tool for model-based control development and automated code generation...
X2C -a tool for model-based control development and automated code generation...X2C -a tool for model-based control development and automated code generation...
X2C -a tool for model-based control development and automated code generation...
Scilab
 
A Real-Time Interface for Xcos – an illustrative demonstration using a batter...
A Real-Time Interface for Xcos – an illustrative demonstration using a batter...A Real-Time Interface for Xcos – an illustrative demonstration using a batter...
A Real-Time Interface for Xcos – an illustrative demonstration using a batter...
Scilab
 
Aircraft Simulation Model and Flight Control Laws Design Using Scilab and XCos
Aircraft Simulation Model and Flight Control Laws Design Using Scilab and XCosAircraft Simulation Model and Flight Control Laws Design Using Scilab and XCos
Aircraft Simulation Model and Flight Control Laws Design Using Scilab and XCos
Scilab
 
Scilab for real dummies j.heikell - part3
Scilab for real dummies j.heikell - part3Scilab for real dummies j.heikell - part3
Scilab for real dummies j.heikell - part3
Scilab
 
Scilab for real dummies j.heikell - part 2
Scilab for real dummies j.heikell - part 2Scilab for real dummies j.heikell - part 2
Scilab for real dummies j.heikell - part 2
Scilab
 
Scilab for real dummies j.heikell - part 1
Scilab for real dummies j.heikell - part 1Scilab for real dummies j.heikell - part 1
Scilab for real dummies j.heikell - part 1
Scilab
 
Multiobjective optimization and Genetic algorithms in Scilab
Multiobjective optimization and Genetic algorithms in ScilabMultiobjective optimization and Genetic algorithms in Scilab
Multiobjective optimization and Genetic algorithms in Scilab
Scilab
 
Scilab optimization workshop
Scilab optimization workshop Scilab optimization workshop
Scilab optimization workshop
Scilab
 
INRA @ Scilab Conference 2018
INRA @ Scilab Conference 2018INRA @ Scilab Conference 2018
INRA @ Scilab Conference 2018
Scilab
 
Qualcomm @ Scilab Conference 2018
Qualcomm @ Scilab Conference 2018Qualcomm @ Scilab Conference 2018
Qualcomm @ Scilab Conference 2018
Scilab
 
Sanofi @ Scilab Conference 2018
Sanofi @ Scilab Conference 2018Sanofi @ Scilab Conference 2018
Sanofi @ Scilab Conference 2018
Scilab
 
University of Applied Science Esslingen @ Scilab Conference 2018
University of Applied Science Esslingen @ Scilab Conference 2018University of Applied Science Esslingen @ Scilab Conference 2018
University of Applied Science Esslingen @ Scilab Conference 2018
Scilab
 
DLR @ Scilab Conference 2018
DLR @ Scilab Conference 2018DLR @ Scilab Conference 2018
DLR @ Scilab Conference 2018
Scilab
 
Fraunhofer IIS @ Scilab Conference 2018
Fraunhofer IIS @ Scilab Conference 2018Fraunhofer IIS @ Scilab Conference 2018
Fraunhofer IIS @ Scilab Conference 2018
Scilab
 
Arcelormittal @ Scilab Conference 2018
Arcelormittal @ Scilab Conference 2018Arcelormittal @ Scilab Conference 2018
Arcelormittal @ Scilab Conference 2018
Scilab
 

More from Scilab (20)

Statistical Analysis for Robust Design
Statistical Analysis for Robust DesignStatistical Analysis for Robust Design
Statistical Analysis for Robust Design
 
Electric motor optimization
Electric motor optimizationElectric motor optimization
Electric motor optimization
 
Asteroidlanding - Scilab conference 2019 Keynote
Asteroidlanding - Scilab conference 2019 KeynoteAsteroidlanding - Scilab conference 2019 Keynote
Asteroidlanding - Scilab conference 2019 Keynote
 
Faster Time to Market using Scilab/XCOS/X2C for motor control algorithm devel...
Faster Time to Market using Scilab/XCOS/X2C for motor control algorithm devel...Faster Time to Market using Scilab/XCOS/X2C for motor control algorithm devel...
Faster Time to Market using Scilab/XCOS/X2C for motor control algorithm devel...
 
Scilab and Xcos for Very Low Earth Orbits satellites modelling
Scilab and Xcos for Very Low Earth Orbits satellites modellingScilab and Xcos for Very Low Earth Orbits satellites modelling
Scilab and Xcos for Very Low Earth Orbits satellites modelling
 
X2C -a tool for model-based control development and automated code generation...
X2C -a tool for model-based control development and automated code generation...X2C -a tool for model-based control development and automated code generation...
X2C -a tool for model-based control development and automated code generation...
 
A Real-Time Interface for Xcos – an illustrative demonstration using a batter...
A Real-Time Interface for Xcos – an illustrative demonstration using a batter...A Real-Time Interface for Xcos – an illustrative demonstration using a batter...
A Real-Time Interface for Xcos – an illustrative demonstration using a batter...
 
Aircraft Simulation Model and Flight Control Laws Design Using Scilab and XCos
Aircraft Simulation Model and Flight Control Laws Design Using Scilab and XCosAircraft Simulation Model and Flight Control Laws Design Using Scilab and XCos
Aircraft Simulation Model and Flight Control Laws Design Using Scilab and XCos
 
Scilab for real dummies j.heikell - part3
Scilab for real dummies j.heikell - part3Scilab for real dummies j.heikell - part3
Scilab for real dummies j.heikell - part3
 
Scilab for real dummies j.heikell - part 2
Scilab for real dummies j.heikell - part 2Scilab for real dummies j.heikell - part 2
Scilab for real dummies j.heikell - part 2
 
Scilab for real dummies j.heikell - part 1
Scilab for real dummies j.heikell - part 1Scilab for real dummies j.heikell - part 1
Scilab for real dummies j.heikell - part 1
 
Multiobjective optimization and Genetic algorithms in Scilab
Multiobjective optimization and Genetic algorithms in ScilabMultiobjective optimization and Genetic algorithms in Scilab
Multiobjective optimization and Genetic algorithms in Scilab
 
Scilab optimization workshop
Scilab optimization workshop Scilab optimization workshop
Scilab optimization workshop
 
INRA @ Scilab Conference 2018
INRA @ Scilab Conference 2018INRA @ Scilab Conference 2018
INRA @ Scilab Conference 2018
 
Qualcomm @ Scilab Conference 2018
Qualcomm @ Scilab Conference 2018Qualcomm @ Scilab Conference 2018
Qualcomm @ Scilab Conference 2018
 
Sanofi @ Scilab Conference 2018
Sanofi @ Scilab Conference 2018Sanofi @ Scilab Conference 2018
Sanofi @ Scilab Conference 2018
 
University of Applied Science Esslingen @ Scilab Conference 2018
University of Applied Science Esslingen @ Scilab Conference 2018University of Applied Science Esslingen @ Scilab Conference 2018
University of Applied Science Esslingen @ Scilab Conference 2018
 
DLR @ Scilab Conference 2018
DLR @ Scilab Conference 2018DLR @ Scilab Conference 2018
DLR @ Scilab Conference 2018
 
Fraunhofer IIS @ Scilab Conference 2018
Fraunhofer IIS @ Scilab Conference 2018Fraunhofer IIS @ Scilab Conference 2018
Fraunhofer IIS @ Scilab Conference 2018
 
Arcelormittal @ Scilab Conference 2018
Arcelormittal @ Scilab Conference 2018Arcelormittal @ Scilab Conference 2018
Arcelormittal @ Scilab Conference 2018
 

Recently uploaded

Ethernet Routing and switching chapter 1.ppt
Ethernet Routing and switching chapter 1.pptEthernet Routing and switching chapter 1.ppt
Ethernet Routing and switching chapter 1.ppt
azkamurat
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
obonagu
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
Massimo Talia
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
zwunae
 
Online aptitude test management system project report.pdf
Online aptitude test management system project report.pdfOnline aptitude test management system project report.pdf
Online aptitude test management system project report.pdf
Kamal Acharya
 
digital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdfdigital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdf
drwaing
 
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTSHeap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Soumen Santra
 
bank management system in java and mysql report1.pdf
bank management system in java and mysql report1.pdfbank management system in java and mysql report1.pdf
bank management system in java and mysql report1.pdf
Divyam548318
 
basic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdfbasic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdf
NidhalKahouli2
 
Modelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdfModelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdf
camseq
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
thanhdowork
 
ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024
Rahul
 
Series of visio cisco devices Cisco_Icons.ppt
Series of visio cisco devices Cisco_Icons.pptSeries of visio cisco devices Cisco_Icons.ppt
Series of visio cisco devices Cisco_Icons.ppt
PauloRodrigues104553
 
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
zwunae
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
JoytuBarua2
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
bakpo1
 
Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
Aditya Rajan Patra
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Sreedhar Chowdam
 
Fundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptxFundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptx
manasideore6
 
PROJECT FORMAT FOR EVS AMITY UNIVERSITY GWALIOR.ppt
PROJECT FORMAT FOR EVS AMITY UNIVERSITY GWALIOR.pptPROJECT FORMAT FOR EVS AMITY UNIVERSITY GWALIOR.ppt
PROJECT FORMAT FOR EVS AMITY UNIVERSITY GWALIOR.ppt
bhadouriyakaku
 

Recently uploaded (20)

Ethernet Routing and switching chapter 1.ppt
Ethernet Routing and switching chapter 1.pptEthernet Routing and switching chapter 1.ppt
Ethernet Routing and switching chapter 1.ppt
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
 
Online aptitude test management system project report.pdf
Online aptitude test management system project report.pdfOnline aptitude test management system project report.pdf
Online aptitude test management system project report.pdf
 
digital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdfdigital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdf
 
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTSHeap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
 
bank management system in java and mysql report1.pdf
bank management system in java and mysql report1.pdfbank management system in java and mysql report1.pdf
bank management system in java and mysql report1.pdf
 
basic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdfbasic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdf
 
Modelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdfModelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdf
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
 
ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024
 
Series of visio cisco devices Cisco_Icons.ppt
Series of visio cisco devices Cisco_Icons.pptSeries of visio cisco devices Cisco_Icons.ppt
Series of visio cisco devices Cisco_Icons.ppt
 
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
 
Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
 
Fundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptxFundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptx
 
PROJECT FORMAT FOR EVS AMITY UNIVERSITY GWALIOR.ppt
PROJECT FORMAT FOR EVS AMITY UNIVERSITY GWALIOR.pptPROJECT FORMAT FOR EVS AMITY UNIVERSITY GWALIOR.ppt
PROJECT FORMAT FOR EVS AMITY UNIVERSITY GWALIOR.ppt
 

Numerical analysis using Scilab: Error analysis and propagation

  • 1. www.openeering.com powered by NUMERICAL ANALYSIS USING SCILAB: ERROR ANALYSIS AND PROPAGATION This tutorial provides a collection of numerical examples and advises on error analysis and its propagation. All examples are developed in Scilab. Level This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.
  • 2. Error analysis and propagation www.openeering.com page 2/10 Step 1: The purpose of this tutorial The purpose of this Scilab tutorial is to provide a collection of numerical examples that are typically part of numerical analysis courses. This tutorial is intended to help readers familiarize with numerical methods and their implementations, keeping under control the error propagation. Here we provide some classical examples on error analysis and propagation. An introduction to NUMERICAL ANALYSIS USING SCILAB (Error study in Numerical Analysis) Step 2: Roadmap In this tutorial, after a brief introduction to the concept of numerical errors, we analyze some examples in which numerical errors occur. These examples are useful to understand how important is to pay attention to error propagation when implementing numerical methods. Descriptions Steps Numerical errors 3-5 Examples 6-10 Conclusions and remarks 11-12
  • 3. Error analysis and propagation www.openeering.com page 3/10 Step 3: Numerical error What is allocated in a computer is only a subset of real number (using IEEE 754 standard) and hence, a real number is represented in the computer as , a fixed strings of digits. This limited amount of storage introduces a rounding error (or round-off error). It is possible to prove the following relation with | | where is a constant that depends on the floating point system used to represent the number (for double precision arithmetic is equal to ). // Scilab command to obtain eps // ---------------------------- %eps Step 4: Truncation error The next step is to study what happens when the basic arithmetic operations are used. We denote the computer arithmetic as , , , to distinguish them from real arithmetic , , and respectively. A part from the numerical error due to limited length in bits of registers, the computer arithmetic introduces a further truncation error when results are transfer from CPU to the memory. This error is caused by the fact that the length in bits of the CPU register is greater than the one used to store numbers. As an example, if we sum two numbers and (to compute ) the corresponding machine operation can be written as ( ) with | | . The sum of two numbers involves the sum of the two floating point operands. Since this operation is done in a register of the computer, it is necessary to consider a further floating point representation when the number is transferred to be stored into the memory.
  • 4. Error analysis and propagation www.openeering.com page 4/10 Step 5: Cancellation error It is interesting to analyze the arithmetic operations when we consider relative errors. For example, we want to analyze the sum operation: | | | | in terms of the relative error of the input operands and . The relative error for is defined as | | | | A computer operation is considered numerically stable when where and and are two input operands. It is possible to prove that the computer operations and are the only stable operations with respect to the rounding error. Conversely, for addition we have: ( | | | | | | | | ) A similar inequality holds for subtraction. When , the right hand side of the inequality may be very high and hence may generate a high relative error (cancellation error). Cancellation error should be avoided whenever possible! Example of cancellation error for subtraction operation In this example we consider a decimal arithmetic with floating point where a number is expressed in the following way: with . is the exponent (or characteristic) of the representation while is the mantissa of the representation. The mantissa has always a fixed number of digits, in this case m. For example, we can compute using a system with a mantissa of 4 digits for the number, while we use a mantissa of 8 digits for the internal representations in the CPU register. The example is done using . From memory to registers: Memory (mantissa = 4) Register (mantissa = 8)   Arithmetic operation with alignment of the exponent: Register (mantissa = 8) Register with aligned exp.   +  From register to memory: Register (mantissa = 8) Memory (mantissa = 4)  It is easy to compute the final step in which we subtract again 1 to evaluate . As a result we obtain that is not equal to x.
  • 5. Error analysis and propagation www.openeering.com page 5/10 Step 6: Two equivalent expressions In this example we compare the following two equivalent expressions: These two expressions are equivalent from an algebraic point of view; the second expression is simply obtained from the first one through simplification. The first function suffers of the cancellation error when goes to zero. This phenomenon has been explained in the previous step. In the reported figure we have plotted the error . We may see that the cancellation error is huge when is close to zero. This phenomenon produces a loss of significant digits. The Scilab script for the figure on the right is available in ex01.sce. The code can be downloaded from the Openeering website. (Error err in the range [-1e-07;1e-07])
  • 6. Error analysis and propagation www.openeering.com page 6/10 Step 7: Two equivalent polynomials In this example, we compare the two following polynomial expressions: where the first expression is obtained from the second by expansion. As depicted on the right, the second expression is numerically stable while the first one is more unstable. The Scilab script is reported in the function ex02.sce. (Comparison between two algebraic equivalent polynomials)
  • 7. Error analysis and propagation www.openeering.com page 7/10 Step 8: Derivative example In this step, we study the computation of a derivative from a numerical point of view. To approximate the first derivate, we use here the difference quotient (a.k.a. Newton’s quotient): For example, we may analyze the formula for the function at point varying h in the following way: The plot on the right visualizes the results. From a mathematical point of view, when goes to zero, the formula should assume the value of the first derivative. Intuitively, we may expect the smaller the , the better the approximation. Unfortunately, because of cancellation errors, it happens that the most reliable value for the derivate is reached in (for , the value of the derivate is the same as ). The Scilab script for plot and table is reported in the function ex03.sce. (Value of the derivative changing the value of h) (Derivative example – table of results)
  • 8. Error analysis and propagation www.openeering.com page 8/10 Step 9: Error analysis and optimal step The Newton’s quotient to approximate the derivative contains two sources of error:  Round-off error;  Truncation error. This follows from the Taylor series expansion of : where and hence: The first term contributes to round-off error, while the second term gives rise to a truncation error. As reported on the right the total error can be expressed as ̅ From the above formula it is possible to compute the optimal step size . Taking the derivative of the total error with respect to and setting this quantity equal to zero, we have: √ ̅ This represents the optimal value for to minimize the total error. Evaluation of the round-off error: The round-off error for the Newton’s quotient can be written as: | ( ) ( ) | | | where | | (remember that where | | ). Moreover we ignore error from division by . In order to evaluate this error, with small, we replace by We do not know the signs of and , so we replace the difference with ̅. This leads to: ̅ | | ̅ where | |. Evaluation of the truncation error: The truncation error is given by: | | where for small values of we replace by and | |.
  • 9. Error analysis and propagation www.openeering.com page 9/10 Step 10: Exercise It is possible to compute the second derivatives of a function using the following approximation Apply the above formula to compute the second derivative of the function at a given point . Moreover, prove the following estimate for the total error: | ( ) ( ) ( ) | ̅ where | | and | |. The upper bound error is minimized when has the value √ ̅ Hints: Using Taylor expansion for the function and to the fourth order paying attention to the signs. (Relative error for second derivative approximation) (Second derivative approximation, table of results)
  • 10. Error analysis and propagation www.openeering.com page 10/10 Step 11: Concluding remarks and References In this tutorial we have collected a series of numerical examples written in Scilab for the study of numerical errors. 1. Scilab Web Page: Available: www.scilab.org. 2. Openeering: www.openeering.com. 3. J. Higham, accuracy and Stability of Numerical Algorithms, SIAM 4. Atkinson, An Introduction to Numerical Analysis, Wiley Step 12: Software content To report a bug or suggest improvements please contact Openeering team at the web site www.openeering.com. Thank you for your attention, Silvia Poles and Manolo Venturin -------------- Main directory -------------- ex01.sce : Expression example ex02.sce : Polynomial example ex03.sce : Derivative example ex04.sce : Second derivative exercise license.txt : The license file