Real Numbers on a Computer vs in Math Class - Where rounding errors and special values come from

Опубликовано: 04 Март 2026
на канале: Merlin Wellington
223
11

When we do math on a computer, things don't go exactly the way they did in math class. In this video, I show how real numbers behave differently. Because they are stored in floating point notation, we have to worry about how we do arithmetic and what happens when be cross particular boundary conditions. Understanding where rounding error comes from gives us strategies for how to limit those errors.

In this video I'll walk you through:
How real numbers are stored (Check out my IEEE-754 video for more details-    • IEEE 754 Floating Point Representations an...  )
How addition, subtraction, multiplication and division are done in that format
What happens when we exceed the space allocated for a real number
Why the arithmetic operations don't always give you the results you get in math class

TIMESTAMPS
0:00 Intro
0:09 Storing Real Numbers
1:54 Multiplying
2:37 Special Values Real Numbers Can Have
3:04 Adding
5:35 Losing Precision
7:31 Conclusion

ABOUT MY CHANNEL
My channel is about good software engineering practices. We cover introductions to programming in C and Java. But I also have lots of software and computer engineering topics like PIC programming, advanced programming techniques, and things that distinguish good code from code that works.

Check out my channel here:
   / @wizardcraftcode  

Don’t forget to subscribe!

CHECK OUT MY OTHER VIDEOS:

How integers are stored:    • Storing Integers - Unsigned, Signed Magnit...  
How real numbers are stored:    • IEEE 754 Floating Point Representations an...  
C Programming Playlist:    • Coding in C  
Intro to Java Playlist:    • Introduction to Java Programming based on ...  
Software Engineering Topics Playlist:    • General Software Engineering Topics