Conversion from string types to Double and Float in Swift

//the first method
let strPi = "3.14"
let piFloat: Float = Float(strPi)!
let piDouble: Double = Double(strPi)!

//the second method
let strExp = "2.71828"
let exp = (strExp as NSString).doubleValue

//the third method
let strHalf = "0,5"
let formatter = NSNumberFormatter()
formatter.decimalSeparator = ","
let half = formatter.numberFromString(strHalf)!.doubleValue