Float

noun

say it: “FLOHT” /ˈfloʊt/

A number with a decimal point, such as 4.99 or 0.5; in Python its type is float.

What is a float (or floating point type)?

A floating point data type is a number that can store numbers with decimal places. The size of the number that needs to be represented determines how much memory must be allocated to store the number.

 // javscript has a number data type for all floats
let bignumber = 1234567890.12345;
# python also allows any number to be stored in a variable
bignumber = 123456789.12345
// C# and Java have 2 floating point data types
// float and double 
double bigNumber = 123456789.12345;
-- SQL also supports multiple floating point data types
REAL, NUMBER(10,2), DECIMAL(10,2)

-- TSQL
DECLARE @BigNumber NUMBER(15,5)
SET @BigNumber = 123456789.12345

In a sentence

  • “The price 4.99 is a float.”
  • “Dividing 7 by 2 gives the float 3.5.”

Level: Novice · More General terms at this level

Updated

In other subjects