E-Book Overview
This is a book about numbers and how those numbers are represented in and operated on by computers. It is crucial that developers understand this area because the numerical operations allowed by computers, and the limitations of those operations, especially in the area of floating point math, affect virtually everything people try to do with computers. This book aims to fill this gap by exploring, in sufficient but not overwhelming detail, just what it is that computers do with numbers.
Divided into two parts, the first deals with standard representations of integers and floating point numbers, while the second details several other number representations. Each chapter ends with exercises to review the key points. Topics covered include interval arithmetic, fixed-point numbers, floating point numbers, big integers and rational arithmetic.
This book is for anyone who develops software including software engineerings, scientists, computer science students, engineering students and anyone who programs for fun.
E-Book Content
Ronald T. Kneusel
Numbers and Computers
Numbers and Computers
Ronald T. Kneusel
Numbers and Computers
123
Ronald T. Kneusel Broomfield, CO, USA
ISBN 978-3-319-17259-0 ISBN 978-3-319-17260-6 (eBook) DOI 10.1007/978-3-319-17260-6 Library of Congress Control Number: 2015935728 Springer Cham Heidelberg New York Dordrecht London © Springer International Publishing Switzerland 2015 This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed. The use of general descriptive names, registered names, trademarks, service marks, etc. in this publication does not imply, even in the absence of a specific statement, that such names are exempt from the relevant protective laws and regulations and therefore free for general use. The publisher, the authors and the editors are safe to assume that the advice and information in this book are believed to be true and accurate at the date of publication. Neither the publisher nor the authors or the editors give a warranty, express or implied, with respect to the material contained herein or for any errors or omissions that may have been made. Printed on acid-free paper Springer International Publishing AG Switzerland is part of Springer Science+Business Media (www. springer.com)
To my parents, Janet and Tom, for fostering my love of science.
Preface
This is a book about numbers and how those numbers are represented in and operated on by computers. Of course, numbers are fundamental to how computers operate because, in the end, everything a computer works with is a number. It is crucial that people who develop code understand this area because the numerical operations allowed by computers and the limitations of those operations, especially in the area of floating point math, affect virtually everything people try to do with computers. This book aims to help by exploring, in sufficient, but not overwhelming, detail, just what it is that computers do with numbers.
Who Should Read This Book This book is for anyone who develops software including software engineers, scientists, computer science students, and engineering students and anyone who programs for fun. If you are a software engineer, you should already be familiar with many of the topics in this book, especially if you have been in the field for any length of time. Still, I urge you to press on, for perhaps you w