MANE 3351
Lecture 4
Classroom Management
Agenda
- Numerical Representations in a computer
- Lab 1 due September 17
- 4 students have not linked GitHub account through Homework 0
- 1 student has not picked up their Raspberry Pi
- Laboratory session will not meet, I will be in my office awaiting lab 1
Resources
Handouts
Lecture 4 Content
Embrace Your Inner Skeptic
Definition: Numerical Methods
Embrace your Inner Skeptic
Evaluating Numerical Methods
Numerical methods should consider these two evaluation criterion :
- Accuracy (or error) analysis
- Speed
Introduction to Error Analysis
Error Measurements
Let \(v_A\) be the approximate value and \(v_E\) be the exact value
- Absolute error: \(|v_A-v_E|\)
- Relative error: \(\frac{|v_A-v_E|}{v_E}\)
- Percentage error: \(\frac{|v_A-v_E|}{v_E}\times 100\%\)
Sources of Error
Sources of Errors
- Round-off errors are due to the fact that the computers represent numbers in a finite number of bits and bytes
- Truncation errors are errors that emerge from the approximation of the mathematical model
- Model errors are due to the fact that the mathematical model usually is an approximation of the physical reality
Number Types in Python
Python supports int, float, and complex.
- Integers can be represented exactly
- Float and complex variables can be represented approximately
- "Floating-point numbers are usually implemented using double in C"7
Computer Implementation of Floats
IEEE Standard 754 Floating Point Numbers
Floating Point Representation
Perils of Floating Point
Single Precision Range
Single Floating-Point Precision
Double Precision Range
Double Floating-Point Precision
-
"numerical methods." A Dictionary of Computing. Retrieved August 27, 2019 from Encyclopedia.com: https://www.encyclopedia.com/computing/dictionaries-thesauruses-pictures-and-press-releases/numerical-methods ↩
-
Cheney and Kincaid (2004), Numerical Mathematics and Computing, 5th edition. ↩
-
Geeks for Geeks. Retrieved August 28, 2019 from: https://www.geeksforgeeks.org/ieee-standard-754-floating-point-numbers/ ↩
-
FloatConvertor. Retrieved August 28, 2019 from: https://www.h-schmidt.net/FloatConverter/IEEE754.html ↩
-
Perils of Floating Point. Retrieved August 28, 2019 from: http://www.lahey.com/float.htm ↩
-
IEEE 754 Floating Point Representation. Retrieved August 28, 2019 from: http://cs.boisestate.edu/~alark/cs354/lectures/ieee754.pdf ↩↩
-
Python 3.12.5 Documentation » The Python Standard Library » Built-in Types. Retrieved September 6, 2024 from: https://docs.python.org/3/library/stdtypes.html ↩






