Hacker News new | past | comments | ask | show | jobs | submit login

I was referring to this:

$ swift Welcome to Swift! Type :help for assistance. 1> 3.14 * 2.5 * 2.5 $R0: Double = 19.625 2> println("The area of the circle is \($R0)") The area of the circle is 19.625 3> 4> $R0 * 2 $R1: Double = 39.25 5> println("And double that is \($R1)") And double that is 39.25 6>

What's Double? Trying to follow this (which didn't make sense to me because I didn't know the history stuff was there) simply caused error messages.




Isn't Double just a bigger floating point number?


Right. A double has twice the precision of a float (hence the name). It's also the default floating point data type in Swift.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: