Floating Point Numerics for Games and Simulations
eBook - ePub

Floating Point Numerics for Games and Simulations

  1. English
  2. ePUB (mobile friendly)
  3. Available on iOS & Android
eBook - ePub

Floating Point Numerics for Games and Simulations

About this book

Floating point is ubiquitous in computers, where it is the default way to represent non-integer numbers. However, few people understand it. We all see weird behavior sometimes, and many programmers treat it as a mystical and imprecise system of math that just works until it sometimes doesn't. We hear that we shouldn't trust floating point with money, we know that 0.1 + 0.2 does not equal 0.3, and "NaN" shows up in our logs when things break. We rarely hear why any of this is the case, and less about what to do about it.

This book pulls back the veil on floating point and shows how this number system we program with every day works. It discusses how to leverage the number system for common calculations, particularly in graphics and simulations, and avoid pitfalls. Further, we will review methods that can give you either better performance or better accuracy on tasks like numerical integration and function approximation, so you can learn to make the right tradeoffs in your programs.

This book builds upon a basic knowledge of calculus and linear algebra, working with illustrative examples that demonstrate concepts rather than relying on theoretical proofs. Along the way, we will learn why Minecraft has struggled with boat physics and what the heck John Carmack was thinking with Quake III's infamous fast reciprocal square root algorithm. By the end of the book, you will be able to understand how to work with floating point in a practical sense, from tracking down and preventing error in small calculations to choosing numerical building blocks for complex 3D simulations.

  • Gives insight into how and why floating-point math works
  • Describes how floating-point error arises and how to avoid it
  • Surveys numerical methods important to graphics and numerical simulations
  • Includes modern techniques to apply to your numerical problems
  • Shows how to hack the floating-point numbers to compute faster and more accurately

Frequently asked questions

Yes, you can cancel anytime from the Subscription tab in your account settings on the Perlego website. Your subscription will stay active until the end of your current billing period. Learn how to cancel your subscription.
No, books cannot be downloaded as external files, such as PDFs, for use outside of Perlego. However, you can download books within the Perlego app for offline reading on mobile or tablet. Learn more here.
Perlego offers two plans: Essential and Complete
  • Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
  • Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Both plans are available with monthly, semester, or annual billing cycles.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Yes! You can use the Perlego app on both iOS or Android devices to read anytime, anywhere — even offline. Perfect for commutes or when you’re on the go.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app.
Yes, you can access Floating Point Numerics for Games and Simulations by Nima Badizadegan in PDF and/or ePUB format, as well as other popular books in Mathematics & Computer Graphics. We have over one million books available in our catalogue for you to explore.

Information

Table of contents

  1. Cover Page
  2. Half-Title Page
  3. Title Page
  4. Copyright Page
  5. Dedication Page
  6. Contents
  7. Preface
  8. Figures
  9. Tables
  10. Algorithms
  11. 1 Computing with Numbers
  12. 2 Numbers in Floating Point
  13. 3 Sources of Error
  14. 4 The Basic Arithmetic Operations
  15. 5 Comparing Floating-Point Numbers
  16. 6 Conversion to and from Floating Point
  17. 7 Numerical Operations
  18. 8 Bitwise Manipulations
  19. 9 Working with Error in Floating Point
  20. 10 Function Approximation
  21. 11 Geometry in Floating Point
  22. 12 Numerical Integration
  23. Bibliography
  24. Index