Fandom

Python Wiki

Float

43pages on
this wiki
Add New Page
Talk0 Share

Floats are a primitive data-type that describe floating point numbers.
Floating point numbers include a mantisse and a exponent of 2. An example:

1.42 * 2^7
In ther the 1.42 is the mantisse and the 7 is the exponent.
The range of this numbers are 64-Bit numbers (on a 64-Bit computer) with a maximum exponent of 127 - BIAS where the BIAS is 127 (by convention).
Note that in Python there does not exist floats with double precision (double).

Casting Edit

To convert something into a float, type:

float(your_variable)

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.