Skip to content

Commit f3da6b2

Browse files
Try to clarify availability of Float16 and Float80 (#84011)
1 parent ba2af97 commit f3da6b2

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

stdlib/public/core/FloatingPointTypes.swift.gyb

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,11 @@ if Self == 'Float16':
4343
SelfDocComment = '''\
4444
/// A half-precision (16b), floating-point value type.
4545
///
46-
/// `Float16` is available on Apple silicon,
47-
/// and unavailable on Intel when targeting macOS.'''
46+
/// On macOS, `Float16` is only available when targeting Apple silicon.
47+
/// On other supported platforms, `Float16` is available for all
48+
/// architectures. If the specified target supports 16-bit floating point
49+
/// arithmetic directly, those instructions will be used; otherwise Float16
50+
/// arithmetic will be emulated by the swift compiler and runtime.'''
4851
elif Self == 'Float':
4952
SelfDocComment = '''\
5053
/// A single-precision, floating-point value type.'''
@@ -57,9 +60,8 @@ elif Self == 'Float80':
5760
SelfDocComment = '''\
5861
/// An extended-precision, floating-point value type.
5962
///
60-
/// `Float80` is available on Intel
61-
/// when the target system supports an 80-bit long double type,
62-
/// and unavailable on Apple silicon.'''
63+
/// `Float80` is available on x86 if the target system's `long double` C type
64+
/// is 80-bit, and unavailable otherwise.'''
6365

6466
else:
6567
raise ValueError('Unhandled float type.')

0 commit comments

Comments
 (0)