|
| 1 | +//===----------------------------------------------------------------------===// |
| 2 | +// |
| 3 | +// This source file is part of the Swift.org open source project |
| 4 | +// |
| 5 | +// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors |
| 6 | +// Licensed under Apache License v2.0 with Runtime Library Exception |
| 7 | +// |
| 8 | +// See https://swift.org/LICENSE.txt for license information |
| 9 | +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors |
| 10 | +// |
| 11 | +//===----------------------------------------------------------------------===// |
| 12 | + |
| 13 | +@_exported import Android // Clang module |
| 14 | + |
| 15 | +@available(swift, deprecated: 3.0, message: "Please use 'Double.pi' or '.pi' to get the value of correct type and avoid casting.") |
| 16 | +public let M_PI = Double.pi |
| 17 | +@available(swift, deprecated: 3.0, message: "Please use 'Double.pi / 2' or '.pi / 2' to get the value of correct type and avoid casting.") |
| 18 | +public let M_PI_2 = Double.pi / 2 |
| 19 | +@available(swift, deprecated: 3.0, message: "Please use 'Double.pi / 4' or '.pi / 4' to get the value of correct type and avoid casting.") |
| 20 | +public let M_PI_4 = Double.pi / 4 |
| 21 | + |
| 22 | +@available(swift, deprecated: 3.0, message: "Please use 2.squareRoot()'.") |
| 23 | +public let M_SQRT2 = 2.squareRoot() |
| 24 | + |
| 25 | +@available(swift, deprecated: 3.0, message: "Please use 0.5.squareRoot()'.") |
| 26 | +public let M_SQRT1_2 = 0.5.squareRoot() |
| 27 | + |
| 28 | +@available(swift, deprecated: 3.0, message: "Please use 'T.radix' to get the radix of a FloatingPoint type 'T'.") |
| 29 | +public let FLT_RADIX = Double.radix |
| 30 | + |
| 31 | +// Where does the 1 come from? C counts the usually-implicit leading |
| 32 | +// significand bit, but Swift does not. Neither is really right or wrong. |
| 33 | +@available(swift, deprecated: 3.0, message: "Please use 'Float.significandBitCount + 1'.") |
| 34 | +public let FLT_MANT_DIG = Float.significandBitCount + 1 |
| 35 | + |
| 36 | +// Where does the 1 come from? C models floating-point numbers as having a |
| 37 | +// significand in [0.5, 1), but Swift (following IEEE 754) considers the |
| 38 | +// significand to be in [1, 2). This rationale applies to FLT_MIN_EXP |
| 39 | +// as well. |
| 40 | +@available(swift, deprecated: 3.0, message: "Please use 'Float.greatestFiniteMagnitude.exponent + 1'.") |
| 41 | +public let FLT_MAX_EXP = Float.greatestFiniteMagnitude.exponent + 1 |
| 42 | + |
| 43 | +@available(swift, deprecated: 3.0, message: "Please use 'Float.leastNormalMagnitude.exponent + 1'.") |
| 44 | +public let FLT_MIN_EXP = Float.leastNormalMagnitude.exponent + 1 |
| 45 | + |
| 46 | +@available(swift, deprecated: 3.0, message: "Please use 'Float.greatestFiniteMagnitude' or '.greatestFiniteMagnitude'.") |
| 47 | +public let FLT_MAX = Float.greatestFiniteMagnitude |
| 48 | + |
| 49 | +@available(swift, deprecated: 3.0, message: "Please use 'Float.ulpOfOne' or '.ulpOfOne'.") |
| 50 | +public let FLT_EPSILON = Float.ulpOfOne |
| 51 | + |
| 52 | +@available(swift, deprecated: 3.0, message: "Please use 'Float.leastNormalMagnitude' or '.leastNormalMagnitude'.") |
| 53 | +public let FLT_MIN = Float.leastNormalMagnitude |
| 54 | + |
| 55 | +@available(swift, deprecated: 3.0, message: "Please use 'Float.leastNonzeroMagnitude' or '.leastNonzeroMagnitude'.") |
| 56 | +public let FLT_TRUE_MIN = Float.leastNonzeroMagnitude |
| 57 | + |
| 58 | + |
| 59 | +// Where does the 1 come from? C counts the usually-implicit leading |
| 60 | +// significand bit, but Swift does not. Neither is really right or wrong. |
| 61 | +@available(swift, deprecated: 3.0, message: "Please use 'Double.significandBitCount + 1'.") |
| 62 | +public let DBL_MANT_DIG = Double.significandBitCount + 1 |
| 63 | + |
| 64 | +// Where does the 1 come from? C models floating-point numbers as having a |
| 65 | +// significand in [0.5, 1), but Swift (following IEEE 754) considers the |
| 66 | +// significand to be in [1, 2). This rationale applies to DBL_MIN_EXP |
| 67 | +// as well. |
| 68 | +@available(swift, deprecated: 3.0, message: "Please use 'Double.greatestFiniteMagnitude.exponent + 1'.") |
| 69 | +public let DBL_MAX_EXP = Double.greatestFiniteMagnitude.exponent + 1 |
| 70 | + |
| 71 | +@available(swift, deprecated: 3.0, message: "Please use 'Double.leastNormalMagnitude.exponent + 1'.") |
| 72 | +public let DBL_MIN_EXP = Double.leastNormalMagnitude.exponent + 1 |
| 73 | + |
| 74 | +@available(swift, deprecated: 3.0, message: "Please use 'Double.greatestFiniteMagnitude' or '.greatestFiniteMagnitude'.") |
| 75 | +public let DBL_MAX = Double.greatestFiniteMagnitude |
| 76 | + |
| 77 | +@available(swift, deprecated: 3.0, message: "Please use 'Double.ulpOfOne' or '.ulpOfOne'.") |
| 78 | +public let DBL_EPSILON = Double.ulpOfOne |
| 79 | + |
| 80 | +@available(swift, deprecated: 3.0, message: "Please use 'Double.leastNormalMagnitude' or '.leastNormalMagnitude'.") |
| 81 | +public let DBL_MIN = Double.leastNormalMagnitude |
| 82 | + |
| 83 | +@available(swift, deprecated: 3.0, message: "Please use 'Double.leastNonzeroMagnitude' or '.leastNonzeroMagnitude'.") |
| 84 | +public let DBL_TRUE_MIN = Double.leastNonzeroMagnitude |
| 85 | + |
| 86 | +public let M_LN2 = Android.M_LN2 |
| 87 | +public let M_LOG10E = Android.M_LOG10E |
| 88 | +public let M_2_SQRTPI = Android.M_2_SQRTPI |
0 commit comments