beanz Magazine

Floating Point Numbers

Denise Krebs on Flickr

While many people are familiar with floating point numbers in school math problems, they're very useful in computing.

What Are Floating Point Numbers?

Let’s begin with a definition of floating point numbers. Real numbers are expressed as fixed point numbers or floating point numbers. A fixed point number has a radix point, or decimal point, at a fixed location somewhere in the collection of numbers. For example:

100.22

This number represents 100 with two digits or hundredths of value, the two zeroes in this case to the right of the decimal point. We’re used to seeing this sort of fixed point number when we see or write down amounts of money.

With floating point numbers, the decimal point might appear in many possible places in a set of numbers. Floating point numbers contain a collection of numbers, a base number, and an exponent to help determine where to place the decimal point. For example:

100.22 = 10022 x 10-2

In this example, our currency value of 100.22 can be represented in a computer as 10022 (called the significand) times 10 (the base number) with -2 as exponent. The relative position of the decimal point is indicated by the exponent. The -2 exponent tells the computer to place the decimal point 2 spaces counting from the right least significant edge of the number, which results in 100.22. If the exponent was a positive number, we would count from the left.

Floating point numbers make it easy to manage very large and small numbers. For example, an astronomer might want to do calculations with the speed measured in seconds of a moon around a planet.

 

Become a subscriber and get access to the rest of this article. Plus all our magazine articles.

Stories also include numerous links to help parents, kids, and teachers learn more. Get access today at just $15 per year!

Subscribe Today!

Also In The February 2015 Issue

What is 3D Printing?

A basic introduction to 3D printing with concepts, examples, and a glossary of 3D terminology.

Gnomes, Gnomedozers, Spoonriders, and Zen Gnomes

Why are there so many gnomes available for 3D printing?

Jill Hodges Talks about Fire Tech Camp

An American living in the United Kingdom, Jill Hodges talks about how she started a summer technology camp for kids.

What 3D Models Print Best?

When you create a three-dimensional model for printing, it's important to know what prints well and what does not.

Two Books Teach Coding and Computer Science

One book teaches JavaScript in a fun way, the other computer science as fable.

Dead Programming Languages

Of 8500 plus programming languages, many are forgotten or lightly used enough to be called dead programming languages.

Where Can I Find Local 3D Printing Services?

It's possible to print your 3D project the same way you print a flyer at the UPS store. Here are several options.

Whatever good things we build end up building us.

VRML

The VRML language, or Virtual Reality Modeling Language, is ancient but still lets you create simple three-dimensional objects.

3D Printers

3D printers may be new technology but there are several printers individuals, schools, and businesses might buy.

February 2015 Learn More Links

Links from the bottom of all the February 2015 articles, collected in one place for you to print, share, or bookmark.

February 2015 News Wire

Interesting stories about computer science, software programming, and technology for December 2014 and January 2015.

Floating Point Numbers

While many people are familiar with floating point numbers in school math problems, they're very useful in computing.