2
2
//
3
3
// This source file is part of the Swift.org open source project
4
4
//
5
- // Copyright (c) 2014 - 2018 Apple Inc. and the Swift project authors
5
+ // Copyright (c) 2014 - 2024 Apple Inc. and the Swift project authors
6
6
// Licensed under Apache License v2.0 with Runtime Library Exception
7
7
//
8
8
// See https://swift.org/LICENSE.txt for license information
13
13
@_exported import _Builtin_float
14
14
15
15
@available(swift, deprecated: 3.0, message: "Please use 'T.radix' to get the radix of a FloatingPoint type 'T'.")
16
- @available(macOS 10.9, iOS 7.0, watchOS 2.0, tvOS 9.0, *)
17
- @_originallyDefinedIn(module: "Darwin", macOS 9999 , iOS 9999 , watchOS 9999 , tvOS 9999 )
16
+ @available(macOS 10.9, iOS 7.0, watchOS 2.0, tvOS 9.0, visionOS 1.0, *)
17
+ @_originallyDefinedIn(module: "Darwin", macOS 15.0 , iOS 18.0 , watchOS 11.0 , tvOS 18.0, visionOS 2.0 )
18
18
public let FLT_RADIX = Double.radix
19
19
20
20
%for type, prefix in [('Float', 'FLT'), ('Double', 'DBL'), ('Float80', 'LDBL')]:
@@ -24,7 +24,7 @@ public let FLT_RADIX = Double.radix
24
24
// Where does the 1 come from? C counts the usually-implicit leading
25
25
// significand bit, but Swift does not. Neither is really right or wrong.
26
26
@available(swift, deprecated: 3.0, message: "Please use '${type}.significandBitCount + 1'.")
27
- @available(macOS 10.9, iOS 7.0, watchOS 2.0, tvOS 9.0, *)
27
+ @available(macOS 10.9, iOS 7.0, watchOS 2.0, tvOS 9.0, visionOS 1.0, *)
28
28
@_originallyDefinedIn(module: "Darwin", macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0)
29
29
public let ${prefix}_MANT_DIG = ${type}.significandBitCount + 1
30
30
@@ -33,32 +33,32 @@ public let ${prefix}_MANT_DIG = ${type}.significandBitCount + 1
33
33
// significand to be in [1, 2). This rationale applies to ${prefix}_MIN_EXP
34
34
// as well.
35
35
@available(swift, deprecated: 3.0, message: "Please use '${type}.greatestFiniteMagnitude.exponent + 1'.")
36
- @available(macOS 10.9, iOS 7.0, watchOS 2.0, tvOS 9.0, *)
36
+ @available(macOS 10.9, iOS 7.0, watchOS 2.0, tvOS 9.0, visionOS 1.0, *)
37
37
@_originallyDefinedIn(module: "Darwin", macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0)
38
38
public let ${prefix}_MAX_EXP = ${type}.greatestFiniteMagnitude.exponent + 1
39
39
40
40
@available(swift, deprecated: 3.0, message: "Please use '${type}.leastNormalMagnitude.exponent + 1'.")
41
- @available(macOS 10.9, iOS 7.0, watchOS 2.0, tvOS 9.0, *)
41
+ @available(macOS 10.9, iOS 7.0, watchOS 2.0, tvOS 9.0, visionOS 1.0, *)
42
42
@_originallyDefinedIn(module: "Darwin", macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0)
43
43
public let ${prefix}_MIN_EXP = ${type}.leastNormalMagnitude.exponent + 1
44
44
45
45
@available(swift, deprecated: 3.0, message: "Please use '${type}.greatestFiniteMagnitude' or '.greatestFiniteMagnitude'.")
46
- @available(macOS 10.9, iOS 7.0, watchOS 2.0, tvOS 9.0, *)
46
+ @available(macOS 10.9, iOS 7.0, watchOS 2.0, tvOS 9.0, visionOS 1.0, *)
47
47
@_originallyDefinedIn(module: "Darwin", macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0)
48
48
public let ${prefix}_MAX = ${type}.greatestFiniteMagnitude
49
49
50
50
@available(swift, deprecated: 3.0, message: "Please use '${type}.ulpOfOne' or '.ulpOfOne'.")
51
- @available(macOS 10.9, iOS 7.0, watchOS 2.0, tvOS 9.0, *)
51
+ @available(macOS 10.9, iOS 7.0, watchOS 2.0, tvOS 9.0, visionOS 1.0, *)
52
52
@_originallyDefinedIn(module: "Darwin", macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0)
53
53
public let ${prefix}_EPSILON = ${type}.ulpOfOne
54
54
55
55
@available(swift, deprecated: 3.0, message: "Please use '${type}.leastNormalMagnitude' or '.leastNormalMagnitude'.")
56
- @available(macOS 10.9, iOS 7.0, watchOS 2.0, tvOS 9.0, *)
56
+ @available(macOS 10.9, iOS 7.0, watchOS 2.0, tvOS 9.0, visionOS 1.0, *)
57
57
@_originallyDefinedIn(module: "Darwin", macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0)
58
58
public let ${prefix}_MIN = ${type}.leastNormalMagnitude
59
59
60
60
@available(swift, deprecated: 3.0, message: "Please use '${type}.leastNonzeroMagnitude' or '.leastNonzeroMagnitude'.")
61
- @available(macOS 10.9, iOS 7.0, watchOS 2.0, tvOS 9.0, *)
61
+ @available(macOS 10.9, iOS 7.0, watchOS 2.0, tvOS 9.0, visionOS 1.0, *)
62
62
@_originallyDefinedIn(module: "Darwin", macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0)
63
63
public let ${prefix}_TRUE_MIN = ${type}.leastNonzeroMagnitude
64
64
0 commit comments