1. Home
  2. Computing & Technology
  3. PHP / MySQL

Floating Point Number

By Angela Bradley, About.com

Definition: A Floating Point Number is a way to represent a precise number on a computer system. The "floating point" refers to the decimal point. Other than this it is very similar to scientific notation. Using this sort of notation when storing numbers in the computer lets you work with more accuracy and lose less digits than you might have otherwise lost. That being said, be careful of how PHP rounds numbers. You may want to use ceil () or floor () to choose if you will round up or down.
Also Known As: floats, doubles, real number
Examples:
<?php
$a = 1.234;
$b = 1.2e3;
$c = 7E-10;
?>

Explore PHP / MySQL

More from About.com

  1. Home
  2. Computing & Technology
  3. PHP / MySQL
  4. Programing Glossary
  5. Floating Point Numbers PHP

©2008 About.com, a part of The New York Times Company.

All rights reserved.