Floating Point Numerics for Games and Simulations

Floating Point Numerics for Games and Simulations

Floating Point Numerics for Games and Simulations

by: Nima Badizadegan (Author)

Edition: 1st

Publication Date: 2025-05-30

Language: English

Print Length: 230 pages

ISBN-10: 1032933550

ISBN-13: 9781032933559

Book Description

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 worksDescribes how floating-point error arises and how to avoid itSurveys numerical methods important to graphics and numerical simulationsIncludes modern techniques to apply to your numerical problemsShows how to hack the floating-point numbers to compute faster and more accurately

Editorial Reviews

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 worksDescribes how floating-point error arises and how to avoid itSurveys numerical methods important to graphics and numerical simulationsIncludes modern techniques to apply to your numerical problemsShows how to hack the floating-point numbers to compute faster and more accurately

Amazon Page

代发服务PDF电子书10立即求助
1111
打赏
未经允许不得转载:Wow! eBook » Floating Point Numerics for Games and Simulations

觉得文章有用就打赏一下文章作者

支付宝扫一扫

微信扫一扫