Skip to Content
Graphics Gems V (IBM Version)
book

Graphics Gems V (IBM Version)

by Alan W. Paeth
June 1995
Intermediate to advanced
438 pages
10h 53m
English
Morgan Kaufmann
Content preview from Graphics Gems V (IBM Version)
I.4

Rational Approximation

Shoemake Ken,     University of Pennsylvania Philadelphia, Pennsylvania. E-mail address: shoemake@graphics.cis.upenn.edu

Introduction

One way to combat accuracy losses in graphical algorithms such as intersection testing is to use rational numbers instead of floating point. For these and other purposes, the following discussion (accompanied by code) presents a way to construct a rational approximation to a floating-point number, optionally limiting the size of the integers used. The mathematical theory of best rational approximations is a necessary ingredient, but because it assumes perfect real numbers, it is not sufficient. Floating-point arithmetic must be avoided even during conversion!

Rational approximation ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Graphics Gems III (IBM Version)

Graphics Gems III (IBM Version)

David Kirk

Publisher Resources

ISBN: 9780125434553