“Float vs Double in Swift” Respostas de código

Float vs Double in Swift

/* Float can only hold seven digits of decimal numbers
while Double can hold twice the number. */
// i.e:
let valueOfPi: Float = 3.142857143 
print(valueOfPi) // 3.142857

let valueOfRandomDecimal: Double = 7.1428571434322432345331
print(valueOfRandomNumber) // 7.142857143432243
Friendly Flatworm

Swift Double V Float

Double is 64-bit // stores more precise decimal number
Float is 32-bit 
emoant

Respostas semelhantes a “Float vs Double in Swift”

Perguntas semelhantes a “Float vs Double in Swift”

Mais respostas relacionadas para “Float vs Double in Swift” em Swift

Procure respostas de código populares por idioma

Procurar outros idiomas de código