+ 6
FLOAT vs DOUBLE
Cual es la diferencia entre estos tipos de variables
5 ответов
+ 4
Their only difference is their storage capacity.
As I don't remember what their actual capacity is I'll give an example with an analogy.
Floats can hold up to say 5 digits like 0.54321
Doubles up to say 20 digits like 0.1234567890987654321
Aside this they also have a marginal impact on performance.
Using a data type that accurately describes the data you are using saves a little time in your program.
That applies for all data types not just doubles and floats.
+ 3
la diferencias son
- El formato de cada uno dado por la ieee
- La mantisa ya que la del float es variable y la del double no
- El cero absoluto no existe en float
- Existe mayor precisión en double
- El número de bits 32 para float y 64 para doble
+ 3
The differences are
- The format of each given by the ieee
- The mantisa since the float is variable and the double is not
- Absolute zero does not exist in float
- There may be precision in double
- The number of 32 bits for float and 64 for double
+ 1
I hope this will help, although the TS asked in Spain.
* Wikipedia
# Float
https://en.wikipedia.org/wiki/Single-precision_floating-point_format
# Double
https://en.wikipedia.org/wiki/Double-precision_floating-point_format
* Quora
https://www.quora.com/What-is-meant-by-single-precision-and-double-precision-in-floating-point-data-types
* StackOverflow
https://stackoverflow.com/questions/801117/whats-the-difference-between-a-single-precision-and-double-precision-floating-p
* Floating point guide
http://floating-point-gui.de/formats/fp/
Hth, sorry I don't speak Spain.
- 1
a double is bigger than a float. most likely the 2 types you will be using are doubles and ints so u don't need to worry bout it