Float16 use

Trying to use Xcode 12.0.1 with macOS 10.15.7 to assign a Float16? Getting this error ... any help is appreciated. Thank you.

Playground execution failed:

error: NumbersPlayground.playground:11:9: error: cannot find type 'Float16' in scope

let d : Float16 = 3.1415926535
        ^~~
Accepted Answer
Is this a macOS playground? If so, be aware that Float16 is not available on the Mac. It works just fine if you create an iOS playground though.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@apple.com"
Thank you, eskimo!

I just found that was the case ... and was going to reply to my own problem!

I didn't read, or see the scope restrictions. I know it may be obvious, but I got confused after watching the Swift 5.3 video. Would you know if it will be made available for the Macs? Also, tvOS? Thank you, again.

Would you know if it will be made available for the Macs?

I can’t predict the future, alas, but it seems pretty darned likely (so much so that I don’t think it’s worth you filing your own bug about this).

Also, tvOS?

It’s already present on tvOS (which makes sense because tvOS is essentially a ‘child’ platform of iOS).

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@apple.com"
Thank you. Understood.

And the tvOS also works! ... I just didn't wait until playground had done its thing. I guess I really should have a static ram drive!
Would Float16 work on an M1 Mac computer?
Float16 use
 
 
Q