peachsim 0.1.1692 → 0.1.1700

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (245) hide show
  1. package/cli/bridge-flow-runner.ts +61 -39
  2. package/cli/commands/agent-wrapper.ts +21 -10
  3. package/cli/commands/control.ts +27 -7
  4. package/cli/commands/coverage.ts +1 -1
  5. package/cli/commands/detect.ts +17 -4
  6. package/cli/commands/maestro-compare.ts +25 -99
  7. package/cli/help-core.ts +3 -4
  8. package/cli/maestro-compare.ts +172 -4
  9. package/cli/outbound-endpoints.ts +2 -10
  10. package/detox/index.ts +15 -0
  11. package/detox/launch-permissions.ts +169 -0
  12. package/dist-lib/agent-daemon-client.cjs +2 -2
  13. package/dist-lib/agent-events.cjs +2 -2
  14. package/dist-lib/attached-projects.cjs +2 -2
  15. package/dist-lib/auth/shared-session.cjs +2 -2
  16. package/dist-lib/backend-origin.cjs +2 -2
  17. package/dist-lib/beta.cjs +2 -2
  18. package/dist-lib/beta.mjs +1 -1
  19. package/dist-lib/bridge-constants.cjs +2 -2
  20. package/dist-lib/bridge-contract-input.cjs +2 -2
  21. package/dist-lib/bridge-contract-input.mjs +1 -1
  22. package/dist-lib/bridge-contract.cjs +2 -2
  23. package/dist-lib/bridge-contract.mjs +1 -1
  24. package/dist-lib/bundle-channel.cjs +18273 -15925
  25. package/dist-lib/capture-contract.cjs +2 -2
  26. package/dist-lib/capture-contract.mjs +1 -1
  27. package/dist-lib/cloud-contract.cjs +2 -2
  28. package/dist-lib/cloud-contract.mjs +1 -1
  29. package/dist-lib/cloud-test-args.cjs +2 -2
  30. package/dist-lib/cloud-test-args.mjs +1 -1
  31. package/dist-lib/cloud.cjs +2 -2
  32. package/dist-lib/cloud.mjs +1 -1
  33. package/dist-lib/config.cjs +2 -2
  34. package/dist-lib/config.mjs +1 -1
  35. package/dist-lib/detox/index.cjs +104 -3
  36. package/dist-lib/dev-bundle-resolution.cjs +208 -44
  37. package/dist-lib/expo-swift-bundle.cjs +2349 -1778
  38. package/dist-lib/expo-swift-metadata.cjs +2 -2
  39. package/dist-lib/expo-swift-metadata.mjs +1 -1
  40. package/dist-lib/home-paths.cjs +2 -2
  41. package/dist-lib/host/bridge-host.cjs +7885 -3334
  42. package/dist-lib/host/fetch-proxy-handler.cjs +331 -39
  43. package/dist-lib/host/fetch-proxy-overrides.cjs +2 -2
  44. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  45. package/dist-lib/host/replacement-module-handler.cjs +2 -2
  46. package/dist-lib/host/websocket-proxy.cjs +2 -2
  47. package/dist-lib/index.cjs +297 -77
  48. package/dist-lib/jump-to-source-babel.cjs +2 -2
  49. package/dist-lib/jump-to-source-native.cjs +2 -2
  50. package/dist-lib/kotlin-host.cjs +2 -2
  51. package/dist-lib/menu.cjs +2 -2
  52. package/dist-lib/menu.mjs +1 -1
  53. package/dist-lib/metro-fingerprint-registry.cjs +2 -2
  54. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  55. package/dist-lib/metro-production-bundle.cjs +2 -2
  56. package/dist-lib/metro-production-bundle.mjs +1 -1
  57. package/dist-lib/metro.cjs +294 -74
  58. package/dist-lib/native-app-identity-project.cjs +48 -37
  59. package/dist-lib/native-app-identity-project.mjs +47 -36
  60. package/dist-lib/native-app-identity.cjs +2 -2
  61. package/dist-lib/native-app-identity.mjs +1 -1
  62. package/dist-lib/native-firebase-metadata.cjs +2 -2
  63. package/dist-lib/native-firebase-metadata.mjs +1 -1
  64. package/dist-lib/plist.cjs +2 -2
  65. package/dist-lib/plist.mjs +1 -1
  66. package/dist-lib/profiles.cjs +2 -2
  67. package/dist-lib/public-brand.cjs +2 -2
  68. package/dist-lib/public-origins-lib-esm.json +24 -23
  69. package/dist-lib/public-origins-lib.json +199 -79
  70. package/dist-lib/react-native-host-modules.cjs +2 -2
  71. package/dist-lib/react-native-host-modules.mjs +1 -1
  72. package/dist-lib/reap-browser.cjs +2 -2
  73. package/dist-lib/scripts/dev-server-scanner.cjs +206 -31
  74. package/dist-lib/sdk.cjs +2 -2
  75. package/dist-lib/sdk.mjs +1 -1
  76. package/dist-lib/skills.cjs +19600 -15992
  77. package/dist-lib/swift-compile.cjs +640 -402
  78. package/dist-lib/swift-compile.mjs +595 -357
  79. package/dist-lib/swift-package.cjs +24 -20
  80. package/dist-lib/swift-package.mjs +23 -19
  81. package/dist-lib/swift-submit.cjs +2 -2
  82. package/dist-lib/swift-submit.mjs +1 -1
  83. package/dist-lib/swift-toolchain.cjs +31 -4
  84. package/dist-lib/swift.cjs +2 -2
  85. package/dist-lib/vite-swift.cjs +1559 -1208
  86. package/dist-lib/vite.cjs +251 -42
  87. package/dist-lib/worklet-executable.cjs +2 -2
  88. package/dist-lib/worklet-executable.mjs +1 -1
  89. package/dist-types/packages/peach-engine/src/engine/font-config.d.ts +1 -1
  90. package/dist-types/packages/peach-engine/src/engine/node.d.ts +1 -0
  91. package/dist-types/packages/peach-engine/src/engine/scroll-pan-contacts.d.ts +3 -1
  92. package/dist-types/packages/peach-engine/src/engine/scroll.d.ts +7 -0
  93. package/dist-types/packages/peach-engine/src/engine/types.d.ts +2 -1
  94. package/dist-types/packages/peach-engine/src/remote-stream/cloud-display.d.ts +2 -2
  95. package/dist-types/packages/peach-engine/src/render-worker/host-service-protocol.d.ts +3 -0
  96. package/dist-types/packages/peach-engine/src/render-worker/protocol.d.ts +1 -0
  97. package/dist-types/packages/peach-engine/src/render-worker/scroll-mirror.d.ts +17 -0
  98. package/dist-types/packages/peach-engine/src/render-worker/worker-input-runtime.d.ts +2 -1
  99. package/dist-types/packages/peach-engine/src/render-worker/worklet-runtime.d.ts +3 -0
  100. package/dist-types/packages/peach-globals/src/cameraBridgeContract.d.ts +1 -0
  101. package/dist-types/packages/peach-globals/src/replayBridgeContract.d.ts +1 -0
  102. package/dist-types/packages/peach-globals/src/shellHostBridgeContract.d.ts +3 -0
  103. package/dist-types/packages/peach-kit/src/materials/types.d.ts +1 -0
  104. package/package.json +1 -1
  105. package/runtime-companion.json +1 -1
  106. package/scripts/dev-server-scanner.ts +4 -0
  107. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Alpha.h +2282 -0
  108. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/BasicImageTypes.h +55 -0
  109. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Conversion.h +10551 -6
  110. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Convolution.h +4236 -3
  111. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Geometry.h +827 -8
  112. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Histogram.h +1369 -0
  113. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Morphology.h +1243 -0
  114. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Transform.h +1747 -0
  115. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/vImage.h +291 -2
  116. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/vImage_CVUtilities.h +1283 -0
  117. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/vImage_Types.h +811 -91
  118. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/vImage_Utilities.h +1342 -25
  119. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/BNNS/bnns.h +2738 -0
  120. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/BNNS/bnns_constants.h +1685 -0
  121. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/BNNS/bnns_graph.h +913 -0
  122. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/BNNS/bnns_structures.h +1917 -0
  123. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/LinearAlgebra.h +23 -0
  124. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/arithmetic.h +209 -0
  125. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/base.h +104 -0
  126. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/linear_systems.h +77 -0
  127. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/matrix.h +554 -0
  128. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/norms.h +58 -0
  129. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/object.h +186 -0
  130. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/splat.h +86 -0
  131. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/vector.h +364 -0
  132. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Quadrature/Integration.h +195 -0
  133. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Quadrature/Quadrature.h +44 -0
  134. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/BLAS/BLAS.h +2330 -0
  135. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/BLAS/Types.h +123 -0
  136. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/Solve.h +8339 -0
  137. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/SolveImplementation.h +520 -0
  138. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/SolveImplementationTyped.h +1893 -0
  139. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/Sparse.h +10 -0
  140. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/blas_new.h +1098 -0
  141. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/cblas.h +859 -0
  142. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/cblas_new.h +1134 -0
  143. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/clapack.h +10555 -0
  144. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/fortran_blas.h +695 -0
  145. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/lapack.h +38526 -0
  146. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/lapack_types.h +60 -0
  147. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/lapack_version.h +20 -0
  148. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/thread_api.h +50 -0
  149. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vBasicOps.h +1218 -0
  150. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vBigNum.h +1458 -0
  151. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vDSP.h +10377 -0
  152. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vDSP_translate.h +167 -0
  153. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vForce.h +1243 -0
  154. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vecLib.h +114 -0
  155. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vecLibTypes.h +146 -0
  156. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vectorOps.h +1106 -0
  157. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vfp.h +294 -0
  158. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Headers/Accelerate.h +25 -1
  159. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFArray.h +673 -0
  160. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFAvailability.h +232 -0
  161. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h +827 -0
  162. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFCalendar.h +121 -0
  163. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFCharacterSet.h +387 -0
  164. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFData.h +79 -0
  165. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFDate.h +122 -0
  166. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFDictionary.h +674 -0
  167. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFError.h +182 -0
  168. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFLocale.h +213 -0
  169. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFNotificationCenter.h +82 -0
  170. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFNumber.h +129 -0
  171. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFSet.h +491 -0
  172. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFString.h +883 -2
  173. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFTimeZone.h +98 -0
  174. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h +11 -229
  175. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h +2 -6
  176. package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h +2 -1
  177. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.h +1 -0
  178. package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecBase.h +906 -3
  179. package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecCertificate.h +613 -0
  180. package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecItem.h +1284 -29
  181. package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecPolicy.h +441 -0
  182. package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecTrust.h +845 -0
  183. package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/Security.h +4 -0
  184. package/sdk/ios/usr/include/AvailabilityMacros.h +3985 -0
  185. package/sdk/ios/usr/include/copyfile.h +143 -0
  186. package/sdk/ios/usr/include/malloc/_malloc.h +143 -0
  187. package/sdk/ios/usr/include/malloc/_malloc_type.h +153 -0
  188. package/sdk/ios/usr/include/malloc/_platform.h +80 -0
  189. package/sdk/ios/usr/include/malloc/_ptrcheck.h +43 -0
  190. package/sdk/ios/usr/include/malloc/malloc.h +768 -0
  191. package/sdk/ios/usr/include/os/availability.h +168 -6
  192. package/sdk/ios/usr/include/os/base.h +351 -0
  193. package/sdk/ios/usr/include/os/clock.h +18 -0
  194. package/sdk/ios/usr/include/os/lock.h +232 -10
  195. package/sdk/ios/usr/include/os/log.h +521 -38
  196. package/sdk/ios/usr/include/os/object.h +320 -3
  197. package/sdk/ios/usr/include/os/trace.h +492 -0
  198. package/sdk/ios/usr/include/os/trace_base.h +167 -0
  199. package/sdk/ios/usr/include/os/workgroup.h +37 -0
  200. package/sdk/ios/usr/include/os/workgroup_base.h +91 -0
  201. package/sdk/ios/usr/include/os/workgroup_interval.h +156 -0
  202. package/sdk/ios/usr/include/os/workgroup_object.h +359 -0
  203. package/sdk/ios/usr/include/os/workgroup_parallel.h +76 -0
  204. package/sdk/ios/usr/include/sys/cdefs.h +38 -0
  205. package/sdk/ios/wasm/include/unistd.h +3 -0
  206. package/skills/contrast/SKILL.md +3 -0
  207. package/src/codex-client.ts +11 -6
  208. package/src/dev-bundle-resolution.ts +124 -48
  209. package/src/expo-native-workspace.ts +176 -0
  210. package/src/expo-swift-host.ts +161 -26
  211. package/src/expo-swift-ready.ts +14 -28
  212. package/src/expoSwiftContract.ts +4 -1
  213. package/src/generated/swift-c-predefines.json +68 -12
  214. package/src/host/bridge-host.ts +5 -0
  215. package/src/installed-package-versions.ts +14 -1
  216. package/src/metro-project-root.ts +44 -33
  217. package/src/native-app-identity-project.ts +1 -0
  218. package/src/nitro-adapter.lock.json +916 -10
  219. package/src/nitro-adapter.ts +33 -24
  220. package/src/nitro-bundle.ts +108 -22
  221. package/src/nitro-compile.ts +32 -5
  222. package/src/nitro-source.ts +13 -3
  223. package/src/nitroAdapterContract.ts +100 -20
  224. package/src/node-http-fetch.ts +116 -0
  225. package/src/packageVersionsContract.ts +46 -0
  226. package/src/serverDiscoveryContract.ts +1 -0
  227. package/src/settingsContract.ts +0 -30
  228. package/src/swift-binary-modules.ts +20 -5
  229. package/src/swift-compile.ts +168 -48
  230. package/src/swift-coverage/xcode-assets.ts +4 -3
  231. package/src/swift-host.ts +14 -3
  232. package/src/swift-objc-compile.ts +32 -5
  233. package/src/swift-objc-metadata.ts +2 -2
  234. package/src/swift-objc-platform.ts +2 -2
  235. package/src/swift-objc-standin.ts +43 -13
  236. package/src/swift-package.ts +33 -26
  237. package/src/swift-source-pods.ts +126 -41
  238. package/src/swift-standin-digest.ts +77 -0
  239. package/src/swift-standin-emit.ts +40 -4
  240. package/src/swift-standins.ts +68 -19
  241. package/src/swift-toolchain.ts +38 -0
  242. package/src/swiftContract.ts +8 -0
  243. package/src/vite-plugin.ts +0 -10
  244. package/src/xcode-project.ts +62 -42
  245. package/src/settings-flags.ts +0 -107
@@ -0,0 +1,1243 @@
1
+ /*
2
+ vForce.h (from vecLib-1155.0)
3
+ Copyright (c) 1999-2026 by Apple Inc. All rights reserved.
4
+
5
+ @APPLE_LICENSE_HEADER_START@
6
+
7
+ This file contains Original Code and/or Modifications of Original Code
8
+ as defined in and that are subject to the Apple Public Source License
9
+ Version 2.0 (the 'License'). You may not use this file except in
10
+ compliance with the License. Please obtain a copy of the License at
11
+ http://www.opensource.apple.com/apsl/ and read it before using this
12
+ file.
13
+
14
+ The Original Code and all software distributed under the License are
15
+ distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
16
+ EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
17
+ INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
19
+ Please see the License for the specific language governing rights and
20
+ limitations under the License.
21
+
22
+ @APPLE_LICENSE_HEADER_END@
23
+ */
24
+
25
+ /*! @header
26
+ * vForce provides fast mathematical operations on large arrays.
27
+ *
28
+ * There are several differences between vForce and the similar functions
29
+ * available in libm. They are:
30
+ * 1) vForce can operate on arrays of any size (libm only works on scalars,
31
+ * and simd.h on small fixed size vectors).
32
+ * 2) vForce may treat some or all denormal numbers as zero.
33
+ * 3) vForce does not guarantee to set floating point flags correctly.
34
+ *
35
+ * However, unlike some fast math alternatives, vForce respects the closure of
36
+ * the number system, therefore infinities and NaNs are correctly processed.
37
+ *
38
+ * Developers should assume that the exact value returned and treatment of
39
+ * denormal values will vary across different microarchitectures and versions
40
+ * of the operating system.
41
+ *
42
+ * For very small vectors, users may wish to consider using simd.h for
43
+ * increased performance.
44
+ */
45
+
46
+ #ifndef __VFORCE_H
47
+ #define __VFORCE_H
48
+
49
+ #ifdef __cplusplus
50
+ #include <ciso646> // Get library version.
51
+ #if defined _LIBCPP_VERSION
52
+ // When using libc++, include <complex>.
53
+ #include <complex>
54
+ #else
55
+ // When not using libc++, try using definition as given in C++ 98.
56
+ namespace std
57
+ {
58
+ template<class T> class complex;
59
+ template<> class complex<float>;
60
+ template<> class complex<double>;
61
+ }
62
+ #endif
63
+ typedef std::complex<float> __float_complex_t;
64
+ typedef std::complex<double> __double_complex_t;
65
+ #else
66
+ typedef _Complex float __float_complex_t;
67
+ typedef _Complex double __double_complex_t;
68
+ #endif
69
+
70
+ #include <math.h>
71
+
72
+ #ifdef __cplusplus
73
+ extern "C" {
74
+ #endif
75
+
76
+ #if __has_include(<os/availability.h>)
77
+ # include <os/availability.h>
78
+ #else // __has_include(<os/availability.h>)
79
+ #if !defined API_AVAILABLE
80
+ #define API_AVAILABLE(...)
81
+ #endif
82
+ #endif // __has_include(<os/availability.h>)
83
+
84
+
85
+ #if !defined __has_feature
86
+ #define __has_feature(f) 0
87
+ #endif
88
+ #if __has_feature(assume_nonnull)
89
+ _Pragma("clang assume_nonnull begin")
90
+ #endif
91
+
92
+
93
+
94
+ /*! @abstract Calculates the reciprocal for each element of a vector.
95
+ *
96
+ * @param y (output) Output vector of size *n. y[i] is set to 1/x[i].
97
+ *
98
+ * @param x (input) Input vector of size *n.
99
+ *
100
+ * @param n (input) The number of elements in the vectors x and y. */
101
+ void vvrecf (float * /* y */, const float * /* x */, const int * /* n */) API_AVAILABLE(macos(10.4), ios(5.0));
102
+ /*! @abstract Calculates the reciprocal for each element of a vector.
103
+ *
104
+ * @param y (output) Output vector of size *n. y[i] is set to 1/x[i].
105
+ *
106
+ * @param x (input) Input vector of size *n.
107
+ *
108
+ * @param n (input) The number of elements in the vectors x and y. */
109
+ void vvrec (double * /* y */, const double * /* x */, const int * /* n */) API_AVAILABLE(macos(10.4), ios(5.0));
110
+
111
+ /*! @abstract Calculates the quotient of the two source vectors.
112
+ *
113
+ * @param z (output) Output vector of size *n. z[i] is set to y[i]/x[i].
114
+ *
115
+ * @param y (input) Input vector of size *n, numerators in division.
116
+ *
117
+ * @param x (input) Input vector of size *n, denominators in division.
118
+ *
119
+ * @param n (input) The number of elements in the vectors x, y and z. */
120
+ void vvdivf (float * /* z */, const float * /* y */, const float * /* x */, const int * /* n */) API_AVAILABLE(macos(10.4), ios(5.0));
121
+ /*! @abstract Calculates the quotient of the two source vectors.
122
+ *
123
+ * @param z (output) Output vector of size *n. z[i] is set to y[i]/x[i].
124
+ *
125
+ * @param y (input) Input vector of size *n, numerators in division.
126
+ *
127
+ * @param x (input) Input vector of size *n, denominators in division.
128
+ *
129
+ * @param n (input) The number of elements in the vectors x, y and z. */
130
+ void vvdiv (double * /* z */, const double * /* y */, const double * /* x */, const int * /* n */) API_AVAILABLE(macos(10.4), ios(5.0));
131
+
132
+ /*! @abstract Calculates the square root for each element of a vector.
133
+ *
134
+ * @param y (output) Output vector of size *n. y[i] is set to sqrt(x[i]).
135
+ *
136
+ * @param x (input) Input vector of size *n.
137
+ *
138
+ * @param n (input) The number of elements in the vectors x and y. */
139
+ void vvsqrtf (float * /* y */, const float * /* x */, const int * /* n */) API_AVAILABLE(macos(10.4), ios(5.0));
140
+ /*! @abstract Calculates the square root for each element of a vector.
141
+ *
142
+ * @param y (output) Output vector of size *n. y[i] is set to sqrt(x[i]).
143
+ *
144
+ * @param x (input) Input vector of size *n.
145
+ *
146
+ * @param n (input) The number of elements in the vectors x and y. */
147
+ void vvsqrt (double * /* y */, const double * /* x */, const int * /* n */) API_AVAILABLE(macos(10.4), ios(5.0));
148
+
149
+ /*! @abstract Calculates the cube root for each element of a vector.
150
+ *
151
+ * @param y (output) Output vector of size *n. y[i] is set to cbrt(x[i]).
152
+ *
153
+ * @param x (input) Input vector of size *n.
154
+ *
155
+ * @param n (input) The number of elements in the vectors x and y. */
156
+ void vvcbrtf (float * /* y */, const float * /* x */, const int * /* n */) API_AVAILABLE(macos(10.10), ios(8.0));
157
+ /*! @abstract Calculates the cube root for each element of a vector.
158
+ *
159
+ * @param y (output) Output vector of size *n. y[i] is set to cbrt(x[i]).
160
+ *
161
+ * @param x (input) Input vector of size *n.
162
+ *
163
+ * @param n (input) The number of elements in the vectors x and y. */
164
+ void vvcbrt (double * /* y */, const double * /* x */, const int * /* n */) API_AVAILABLE(macos(10.10), ios(8.0));
165
+
166
+ /*! @abstract Calculates the reciprocal square root for each element of a
167
+ * vector.
168
+ *
169
+ * @param y (output) Output vector of size *n. y[i] is set to 1/sqrt(x[i]).
170
+ *
171
+ * @param x (input) Input vector of size *n.
172
+ *
173
+ * @param n (input) The number of elements in the vectors x and y. */
174
+ void vvrsqrtf (float * /* y */, const float * /* x */, const int * /* n */) API_AVAILABLE(macos(10.4), ios(5.0));
175
+ /*! @abstract Calculates the reciprocal square root for each element of a
176
+ * vector.
177
+ *
178
+ * @param y (output) Output vector of size *n. y[i] is set to 1/sqrt(x[i]).
179
+ *
180
+ * @param x (input) Input vector of size *n.
181
+ *
182
+ * @param n (input) The number of elements in the vectors x and y. */
183
+ void vvrsqrt (double * /* y */, const double * /* x */, const int * /* n */) API_AVAILABLE(macos(10.4), ios(5.0));
184
+
185
+ /*! @abstract Calculates the exponential function e**x for each element of a
186
+ * vector.
187
+ *
188
+ * @param y (output) Output vector of size *n. y[i] is set to exp(x[i]).
189
+ *
190
+ * @param x (input) Input vector of size *n.
191
+ *
192
+ * @param n (input) The number of elements in the vectors x and y. */
193
+ void vvexpf (float * /* y */, const float * /* x */, const int * /* n */) API_AVAILABLE(macos(10.4), ios(5.0));
194
+ /*! @abstract Calculates the exponential function e**x for each element of a
195
+ * vector.
196
+ *
197
+ * @param y (output) Output vector of size *n. y[i] is set to exp(x[i]).
198
+ *
199
+ * @param x (input) Input vector of size *n.
200
+ *
201
+ * @param n (input) The number of elements in the vectors x and y. */
202
+ void vvexp (double * /* y */, const double * /* x */, const int * /* n */) API_AVAILABLE(macos(10.4), ios(5.0));
203
+
204
+ /*! @abstract Calculates the base 2 exponential function 2**x for each element
205
+ * of a vector.
206
+ *
207
+ * @param y (output) Output vector of size *n. y[i] is set to exp2(x[i]).
208
+ *
209
+ * @param x (input) Input vector of size *n.
210
+ *
211
+ * @param n (input) The number of elements in the vectors x and y. */
212
+ void vvexp2f (float * /* y */, const float * /* x */, const int * /* n */) API_AVAILABLE(macos(10.7), ios(5.0));
213
+ /*! @abstract Calculates the base 2 exponential function 2**x for each element
214
+ * of a vector.
215
+ *
216
+ * @param y (output) Output vector of size *n. y[i] is set to exp2(x[i]).
217
+ *
218
+ * @param x (input) Input vector of size *n.
219
+ *
220
+ * @param n (input) The number of elements in the vectors x and y. */
221
+ void vvexp2 (double * /* y */, const double * /* x */, const int * /* n */) API_AVAILABLE(macos(10.7), ios(5.0));
222
+
223
+ /*! @abstract Calculates (e**x) - 1 for each element of a vector, with high
224
+ * accuracy around x=0.
225
+ *
226
+ * @discussion
227
+ * If x is nearly zero, then the common expression exp(x) - 1.0 will suffer
228
+ * from catastrophic cancellation and the result will have little or no
229
+ * precision. This function provides an alternative means to do this
230
+ * calculation without the risk of significant loss of precision.
231
+ *
232
+ * @seealso log1pf
233
+ *
234
+ * @param y (output) Output vector of size *n. y[i] is set to expm1(x[i]).
235
+ *
236
+ * @param x (input) Input vector of size *n.
237
+ *
238
+ * @param n (input) The number of elements in the vectors x and y. */
239
+ void vvexpm1f (float * /* y */, const float * /* x */, const int * /* n */) API_AVAILABLE(macos(10.5), ios(5.0));
240
+ /*! @abstract Calculates (e**x) - 1 for each element of a vector, with high
241
+ * accuracy around x=0.
242
+ *
243
+ * @discussion
244
+ * If x is nearly zero, then the common expression exp(x) - 1.0 will suffer
245
+ * from catastrophic cancellation and the result will have little or no
246
+ * precision. This function provides an alternative means to do this
247
+ * calculation without the risk of significant loss of precision.
248
+ *
249
+ * @seealso log1p
250
+ *
251
+ * @param y (output) Output vector of size *n. y[i] is set to expm1(x[i]).
252
+ *
253
+ * @param x (input) Input vector of size *n.
254
+ *
255
+ * @param n (input) The number of elements in the vectors x and y. */
256
+ void vvexpm1 (double * /* y */, const double * /* x */, const int * /* n */) API_AVAILABLE(macos(10.7), ios(5.0));
257
+
258
+ /*! @abstract Calculates the natural logarithm for each element of a vector.
259
+ *
260
+ * @param y (output) Output vector of size *n. y[i] is set to log(x[i]).
261
+ *
262
+ * @param x (input) Input vector of size *n.
263
+ *
264
+ * @param n (input) The number of elements in the vectors x and y. */
265
+ void vvlogf (float * /* y */, const float * /* x */, const int * /* n */) API_AVAILABLE(macos(10.4), ios(5.0));
266
+ /*! @abstract Calculates the natural logarithm for each element of a vector.
267
+ *
268
+ * @param y (output) Output vector of size *n. y[i] is set to log(x[i]).
269
+ *
270
+ * @param x (input) Input vector of size *n.
271
+ *
272
+ * @param n (input) The number of elements in the vectors x and y. */
273
+ void vvlog (double * /* y */, const double * /* x */, const int * /* n */) API_AVAILABLE(macos(10.4), ios(5.0));
274
+
275
+ /*! @abstract Calculates the logarithm base 10 for each element of a vector.
276
+ *
277
+ * @param y (output) Output vector of size *n. y[i] is set to log10(x[i]).
278
+ *
279
+ * @param x (input) Input vector of size *n.
280
+ *
281
+ * @param n (input) The number of elements in the vectors x and y. */
282
+ void vvlog10f (float * /* y */, const float * /* x */, const int * /* n */) API_AVAILABLE(macos(10.4), ios(5.0));
283
+ /*! @abstract Calculates the logarithm base 10 for each element of a vector.
284
+ *
285
+ * @param y (output) Output vector of size *n. y[i] is set to log10(x[i]).
286
+ *
287
+ * @param x (input) Input vector of size *n.
288
+ *
289
+ * @param n (input) The number of elements in the vectors x and y. */
290
+ void vvlog10 (double * /* y */, const double * /* x */, const int * /* n */) API_AVAILABLE(macos(10.4), ios(5.0));
291
+
292
+ /*! @abstract Calculates log(1+x) for each element of a vector, with high
293
+ * accuracy around x=0.
294
+ *
295
+ * @discussion
296
+ * If x is nearly zero, the expression log(1+x) will be highly inaccurate
297
+ * due to floating point rounding errors in (1+x).
298
+ * This function provides an alternative means to calculate this value with
299
+ * higher accuracy.
300
+ *
301
+ * @seealso expm1f
302
+ *
303
+ * @param y (output) Output vector of size *n. y[i] is set to log1p(x[i]).
304
+ *
305
+ * @param x (input) Input vector of size *n.
306
+ *
307
+ * @param n (input) The number of elements in the vectors x and y. */
308
+ void vvlog1pf (float * /* y */, const float * /* x */, const int * /* n */) API_AVAILABLE(macos(10.5), ios(5.0));
309
+ /*! @abstract Calculates log(1+x) for each element of a vector, with high
310
+ * accuracy around x=0.
311
+ *
312
+ * @discussion
313
+ * If x is nearly zero, the expression log(1+x) will be highly inaccurate
314
+ * due to floating point rounding errors in (1+x).
315
+ * This function provides an alternative means to calculate this value with
316
+ * higher accuracy.
317
+ *
318
+ * @seealso expm1
319
+ *
320
+ * @param y (output) Output vector of size *n. y[i] is set to log1p(x[i]).
321
+ *
322
+ * @param x (input) Input vector of size *n.
323
+ *
324
+ * @param n (input) The number of elements in the vectors x and y. */
325
+ void vvlog1p (double * /* y */, const double * /* x */, const int * /* n */) API_AVAILABLE(macos(10.7), ios(5.0));
326
+
327
+ /*! @abstract Calculates the base 2 logarithm for each element of a vector.
328
+ *
329
+ * @param y (output) Output vector of size *n. y[i] is set to log2(x[i]).
330
+ *
331
+ * @param x (input) Input vector of size *n.
332
+ *
333
+ * @param n (input) The number of elements in the vectors x and y. */
334
+ void vvlog2f (float * /* y */, const float * /* x */, const int * /* n */) API_AVAILABLE(macos(10.7), ios(5.0));
335
+ /*! @abstract Calculates the base 2 logarithm for each element of a vector.
336
+ *
337
+ * @param y (output) Output vector of size *n. y[i] is set to log2(x[i]).
338
+ *
339
+ * @param x (input) Input vector of size *n.
340
+ *
341
+ * @param n (input) The number of elements in the vectors x and y. */
342
+ void vvlog2 (double * /* y */, const double * /* x */, const int * /* n */) API_AVAILABLE(macos(10.7), ios(5.0));
343
+
344
+ /*! @abstract Returns, as a floating-point value, the unbiased floating-point
345
+ * exponent for each element of a vector.
346
+ *
347
+ * @discussion
348
+ * For a non-zero finite floating-point number f, logb is defined to be the
349
+ * integer that satisfies abs(f) = significand * 2**logb(f), with significand
350
+ * in [1,2).
351
+ *
352
+ * If x is +/-0, then y is set to -inf.
353
+ * If x is +/-inf, then y is set to +inf.
354
+ * If x is NaN, then y is set to NaN.
355
+ *
356
+ * @param y (output) Output vector of size *n. y[i] is set to log10(x[i]).
357
+ *
358
+ * @param x (input) Input vector of size *n.
359
+ *
360
+ * @param n (input) The number of elements in the vectors x and y. */
361
+ void vvlogbf (float * /* y */, const float * /* x */, const int * /* n */) API_AVAILABLE(macos(10.5), ios(5.0));
362
+ /*! @abstract Returns, as a floating-point value, the unbiased floating-point
363
+ * exponent for each element of a vector.
364
+ *
365
+ * @discussion
366
+ * For a non-zero finite floating-point number f, logb is defined to be the
367
+ * integer that satisfies abs(f) = significand * 2**logb(f), with significand
368
+ * in [1,2).
369
+ *
370
+ * If x is +/-0, then y is set to -inf.
371
+ * If x is +/-inf, then y is set to +inf.
372
+ * If x is NaN, then y is set to NaN.
373
+ *
374
+ * @param y (output) Output vector of size *n. y[i] is set to log10(x[i]).
375
+ *
376
+ * @param x (input) Input vector of size *n.
377
+ *
378
+ * @param n (input) The number of elements in the vectors x and y. */
379
+ void vvlogb (double * /* y */, const double * /* x */, const int * /* n */) API_AVAILABLE(macos(10.7), ios(5.0));
380
+
381
+ /*! @abstract Returns the absolute value for each element of a vector.
382
+ *
383
+ * @param y (output) Output vector of size *n. y[i] is set to fabs(x[i]).
384
+ *
385
+ * @param x (input) Input vector of size *n.
386
+ *
387
+ * @param n (input) The number of elements in the vectors x and y. */
388
+ void vvfabsf (float * /* y */, const float * /* x */, const int * /* n */) API_AVAILABLE(macos(10.7), ios(5.0));
389
+ /*! @abstract Returns the absolute value for each element of a vector.
390
+ *
391
+ * @param y (output) Output vector of size *n. y[i] is set to fabs(x[i]).
392
+ *
393
+ * @param x (input) Input vector of size *n.
394
+ *
395
+ * @param n (input) The number of elements in the vectors x and y. */
396
+ void vvfabs (double * /* y */, const double * /* x */, const int * /* n */) API_AVAILABLE(macos(10.7), ios(5.0));
397
+
398
+ /*! @abstract Calculates, elementwise, x**y for two vectors x and y.
399
+ *
400
+ * @discussion
401
+ * The following special values of x and y produce the given value of z:
402
+ * y x z
403
+ * ============== ======= =======
404
+ * odd integer,<0 +/-0 +/-inf
405
+ * odd integer,>0 +/-0 +/-0
406
+ * otherwise, <0 +/-0 +inf
407
+ * otherwise, >0 +/-0 +0
408
+ * +/-inf -1 1
409
+ * NaN +1 1
410
+ * +/-0 NaN 1
411
+ * -inf |x|<1 +inf
412
+ * -inf |x|>1 +0
413
+ * +inf |x|<1 +0
414
+ * +inf |x|>1 +inf
415
+ * odd integer,<0 -inf -0
416
+ * odd integer,>0 -inf -inf
417
+ * otherwise, <0 -inf +0
418
+ * otherwise, >0 -inf +inf
419
+ * <0 +inf +0
420
+ * >0 +inf +inf
421
+ * non-integer <0 NaN
422
+ *
423
+ * @param z (output) Output vector of size *n. z[i] is set to pow(x[i], y[i]).
424
+ *
425
+ * @param y (input) Input vector of size *n, exponent in calculation.
426
+ *
427
+ * @param x (input) Input vector of size *n, base in calculation.
428
+ *
429
+ * @param n (input) The number of elements in the vectors x, y and z.
430
+ */
431
+ void vvpowf (float * /* z */, const float * /* y */, const float * /* x */, const int * /* n */) API_AVAILABLE(macos(10.4), ios(5.0));
432
+ /*! @abstract Calculates, elementwise, x**y for two vectors x and y.
433
+ *
434
+ * @discussion
435
+ * The following special values of x and y produce the given value of z:
436
+ * y x z
437
+ * ============== ======= =======
438
+ * odd integer,<0 +/-0 +/-inf
439
+ * odd integer,>0 +/-0 +/-0
440
+ * otherwise, <0 +/-0 +inf
441
+ * otherwise, >0 +/-0 +0
442
+ * +/-inf -1 1
443
+ * NaN +1 1
444
+ * +/-0 NaN 1
445
+ * -inf |x|<1 +inf
446
+ * -inf |x|>1 +0
447
+ * +inf |x|<1 +0
448
+ * +inf |x|>1 +inf
449
+ * odd integer,<0 -inf -0
450
+ * odd integer,>0 -inf -inf
451
+ * otherwise, <0 -inf +0
452
+ * otherwise, >0 -inf +inf
453
+ * <0 +inf +0
454
+ * >0 +inf +inf
455
+ * non-integer <0 NaN
456
+ *
457
+ * @param z (output) Output vector of size *n. z[i] is set to pow(x[i], y[i]).
458
+ *
459
+ * @param y (input) Input vector of size *n, exponent in calculation.
460
+ *
461
+ * @param x (input) Input vector of size *n, base in calculation.
462
+ *
463
+ * @param n (input) The number of elements in the vectors x, y and z.
464
+ */
465
+ void vvpow (double * /* z */, const double * /* y */, const double * /* x */, const int * /* n */) API_AVAILABLE(macos(10.4), ios(5.0));
466
+
467
+ /*! @abstract Calculates, elementwise, x**y for a vector x and a scalar y.
468
+ *
469
+ * @param z (output) Output vector of size *n. z[i] is set to pow(x[i], y).
470
+ *
471
+ * @param y (input) Input scalar, exponent in calculation.
472
+ *
473
+ * @param x (input) Input vector of size *n, base in calculation.
474
+ *
475
+ * @param n (input) The number of elements in the vectors x, y and z. */
476
+ void vvpowsf (float * /* z */, const float * /* y */, const float * /* x */, const int * /* n */) API_AVAILABLE(macos(10.9), ios(6.0));
477
+ /*! @abstract Calculates, elementwise, x**y for a vector x and a scalar y.
478
+ *
479
+ * @param z (output) Output vector of size *n. z[i] is set to pow(x[i], y).
480
+ *
481
+ * @param y (input) Input scalar, exponent in calculation.
482
+ *
483
+ * @param x (input) Input vector of size *n, base in calculation.
484
+ *
485
+ * @param n (input) The number of elements in the vectors x, y and z. */
486
+ void vvpows (double * /* z */, const double * /* y */, const double * /* x */, const int * /* n */) API_AVAILABLE(macos(10.9), ios(6.0));
487
+
488
+ /*! @abstract Returns the sine for each element of a vector.
489
+ *
490
+ * @discussion
491
+ * If x[i] is +/-0, y[i] preserves the signed zero.
492
+ * If x[i] is +/-inf, y[i] is set to NaN.
493
+ *
494
+ * @param y (output) Output vector of size *n. y[i] is set to sin(x[i]).
495
+ *
496
+ * @param x (input) Input vector of size *n, in radians.
497
+ *
498
+ * @param n (input) The number of elements in the vectors x and y. */
499
+ void vvsinf (float * /* y */, const float * /* x */, const int * /* n */) API_AVAILABLE(macos(10.4), ios(5.0));
500
+ /*! @abstract Returns the sine for each element of a vector.
501
+ *
502
+ * @discussion
503
+ * If x[i] is +/-0, y[i] preserves the signed zero.
504
+ * If x[i] is +/-inf, y[i] is set to NaN.
505
+ *
506
+ * @param y (output) Output vector of size *n. y[i] is set to sin(x[i]).
507
+ *
508
+ * @param x (input) Input vector of size *n, in radians.
509
+ *
510
+ * @param n (input) The number of elements in the vectors x and y. */
511
+ void vvsin (double * /* y */, const double * /* x */, const int * /* n */) API_AVAILABLE(macos(10.4), ios(5.0));
512
+
513
+ /*! @abstract Returns the cosine for each element of a vector.
514
+ *
515
+ * @discussion
516
+ * If x[i] is +/-inf, y[i] is set to NaN.
517
+ *
518
+ * @param y (output) Output vector of size *n. y[i] is set to cos(x[i]).
519
+ *
520
+ * @param x (input) Input vector of size *n, in radians.
521
+ *
522
+ * @param n (input) The number of elements in the vectors x and y. */
523
+ void vvcosf (float * /* y */, const float * /* x */, const int * /* n */) API_AVAILABLE(macos(10.4), ios(5.0));
524
+ /*! @abstract Returns the cosine for each element of a vector.
525
+ *
526
+ * @discussion
527
+ * If x[i] is +/-inf, y[i] is set to NaN.
528
+ *
529
+ * @param y (output) Output vector of size *n. y[i] is set to cos(x[i]).
530
+ *
531
+ * @param x (input) Input vector of size *n, in radians.
532
+ *
533
+ * @param n (input) The number of elements in the vectors x and y. */
534
+ void vvcos (double * /* y */, const double * /* x */, const int * /* n */) API_AVAILABLE(macos(10.4), ios(5.0));
535
+
536
+ /*! @abstract Returns the tangent for each element of a vector.
537
+ *
538
+ * @discussion
539
+ * If x[i] is +/-0, y[i] preserves the signed zero.
540
+ * If x[i] is +/-inf, y[i] is set to NaN.
541
+ *
542
+ * @param y (output) Output vector of size *n. y[i] is set to tan(x[i]).
543
+ *
544
+ * @param x (input) Input vector of size *n, in radians.
545
+ *
546
+ * @param n (input) The number of elements in the vectors x and y. */
547
+ void vvtanf (float * /* y */, const float * /* x */, const int * /* n */) API_AVAILABLE(macos(10.4), ios(5.0));
548
+ /*! @abstract Returns the tangent for each element of a vector.
549
+ *
550
+ * @discussion
551
+ * If x[i] is +/-0, y[i] preserves the signed zero.
552
+ * If x[i] is +/-inf, y[i] is set to NaN.
553
+ *
554
+ * @param y (output) Output vector of size *n. y[i] is set to tan(x[i]).
555
+ *
556
+ * @param x (input) Input vector of size *n, in radians.
557
+ *
558
+ * @param n (input) The number of elements in the vectors x and y. */
559
+ void vvtan (double * /* y */, const double * /* x */, const int * /* n */) API_AVAILABLE(macos(10.4), ios(5.0));
560
+
561
+ /*! @abstract Returns the principal value of arc sine for each element of a
562
+ * vector.
563
+ *
564
+ * @discussion
565
+ * The calculated values are in the range [-pi/2, +pi/2].
566
+ * If x[i] is +/-0, y[i] preserves the signed zero.
567
+ * If |x[i]| > 1, y[i] is set to NaN.
568
+ *
569
+ * @param y (output) Output vector of size *n. y[i] is set to asin(x[i]).
570
+ *
571
+ * @param x (input) Input vector of size *n.
572
+ *
573
+ * @param n (input) The number of elements in the vectors x and y. */
574
+ void vvasinf (float * /* y */, const float * /* x */, const int * /* n */) API_AVAILABLE(macos(10.4), ios(5.0));
575
+ /*! @abstract Returns the principal value of arc sine for each element of a
576
+ * vector.
577
+ *
578
+ * @discussion
579
+ * The calculated values are in the range [-pi/2, +pi/2].
580
+ * If x[i] is +/-0, y[i] preserves the signed zero.
581
+ * If |x[i]| > 1, y[i] is set to NaN.
582
+ *
583
+ * @param y (output) Output vector of size *n. y[i] is set to asin(x[i]).
584
+ *
585
+ * @param x (input) Input vector of size *n.
586
+ *
587
+ * @param n (input) The number of elements in the vectors x and y. */
588
+ void vvasin (double * /* y */, const double * /* x */, const int * /* n */) API_AVAILABLE(macos(10.4), ios(5.0));
589
+
590
+ /*! @abstract Returns the principal value of arc cosine for each element of a
591
+ * vector.
592
+ *
593
+ * @discussion
594
+ * The calculated values are in the range [0, pi].
595
+ * If x[i] is 1, y[i] is set to +0.
596
+ * If |x[i]| > 1, y[i] is set to NaN.
597
+ *
598
+ * @param y (output) Output vector of size *n. y[i] is set to acos(x[i]).
599
+ *
600
+ * @param x (input) Input vector of size *n.
601
+ *
602
+ * @param n (input) The number of elements in the vectors x and y. */
603
+ void vvacosf (float * /* y */, const float * /* x */, const int * /* n */) API_AVAILABLE(macos(10.4), ios(5.0));
604
+ /*! @abstract Returns the principal value of arc cosine for each element of a
605
+ * vector.
606
+ *
607
+ * @discussion
608
+ * The calculated values are in the range [0, pi].
609
+ * If x[i] is 1, y[i] is set to +0.
610
+ * If |x[i]| > 1, y[i] is set to NaN.
611
+ *
612
+ * @param y (output) Output vector of size *n. y[i] is set to acos(x[i]).
613
+ *
614
+ * @param x (input) Input vector of size *n.
615
+ *
616
+ * @param n (input) The number of elements in the vectors x and y. */
617
+ void vvacos (double * /* y */, const double * /* x */, const int * /* n */) API_AVAILABLE(macos(10.4), ios(5.0));
618
+
619
+ /*! @abstract Returns the principal value of arc tangent for each element of a
620
+ * vector.
621
+ *
622
+ * @discussion
623
+ * The calculated values are in the range [-pi/2, pi/2].
624
+ * If x[i] is +/-0, y[i] preserves the signed zero.
625
+ * If x[i] is +/-inf, y[i] is set to +/-pi/2.
626
+ *
627
+ * @param y (output) Output vector of size *n. y[i] is set to atan(x[i]).
628
+ *
629
+ * @param x (input) Input vector of size *n.
630
+ *
631
+ * @param n (input) The number of elements in the vectors x and y. */
632
+ void vvatanf (float * /* y */, const float * /* x */, const int * /* n */) API_AVAILABLE(macos(10.4), ios(5.0));
633
+ /*! @abstract Returns the principal value of arc tangent for each element of a
634
+ * vector.
635
+ *
636
+ * @discussion
637
+ * The calculated values are in the range [-pi/2, pi/2].
638
+ * If x[i] is +/-0, y[i] preserves the signed zero.
639
+ * If x[i] is +/-inf, y[i] is set to +/-pi/2.
640
+ *
641
+ * @param y (output) Output vector of size *n. y[i] is set to atan(x[i]).
642
+ *
643
+ * @param x (input) Input vector of size *n.
644
+ *
645
+ * @param n (input) The number of elements in the vectors x and y. */
646
+ void vvatan (double * /* y */, const double * /* x */, const int * /* n */) API_AVAILABLE(macos(10.4), ios(5.0));
647
+
648
+ /*! @abstract Calculates, elementwise, the principal value of the arc tangent
649
+ * of y/x, for two vectors x and y.
650
+ *
651
+ * @discusssion
652
+ * The signs of both arguments are used to determine the quadrant of the
653
+ * calculated value.
654
+ *
655
+ * The following special values of x and y produce the given value of z:
656
+ * y x z
657
+ * ======= ======= =======
658
+ * +/-0 -0 +/-pi
659
+ * +/-0 +0 +/-0
660
+ * +/-0 <0 +/-pi
661
+ * +/-0 >0 +/-0
662
+ * >0 +/-0 +pi/2
663
+ * <0 +/-0 -pi/2
664
+ * +/-y -inf +/-pi y>0, finite
665
+ * +/-y +inf +/-0 y>0, finite
666
+ * +/-inf x +/-pi/2 x finite
667
+ * +/-inf -inf +/-3pi/4
668
+ * +/-inf +inf +/-pi/4
669
+ *
670
+ * @param z (output) Output vector of size *n. z[i] is set to atan2(y,x).
671
+ *
672
+ * @param y (input) Input vector of size *n.
673
+ *
674
+ * @param x (input) Input vector of size *n.
675
+ *
676
+ * @param n (input) The number of elements in the vectors x, y and z. */
677
+ void vvatan2f (float * /* z */, const float * /* y */, const float * /* x */, const int * /* n */) API_AVAILABLE(macos(10.4), ios(5.0));
678
+ /*! @abstract Calculates, elementwise, the principal value of the arc tangent
679
+ * of y/x, for two vectors x and y.
680
+ *
681
+ * @discusssion
682
+ * The signs of both arguments are used to determine the quadrant of the
683
+ * calculated value.
684
+ *
685
+ * The following special values of x and y produce the given value of z:
686
+ * y x z
687
+ * ======= ======= =======
688
+ * +/-0 -0 +/-pi
689
+ * +/-0 +0 +/-0
690
+ * +/-0 <0 +/-pi
691
+ * +/-0 >0 +/-0
692
+ * >0 +/-0 +pi/2
693
+ * <0 +/-0 -pi/2
694
+ * +/-y -inf +/-pi y>0, finite
695
+ * +/-y +inf +/-0 y>0, finite
696
+ * +/-inf x +/-pi/2 x finite
697
+ * +/-inf -inf +/-3pi/4
698
+ * +/-inf +inf +/-pi/4
699
+ *
700
+ * @param z (output) Output vector of size *n. z[i] is set to atan2(y,x).
701
+ *
702
+ * @param y (input) Input vector of size *n.
703
+ *
704
+ * @param x (input) Input vector of size *n.
705
+ *
706
+ * @param n (input) The number of elements in the vectors x, y and z. */
707
+ void vvatan2 (double * /* z */, const double * /* y */, const double * /* x */, const int * /* n */) API_AVAILABLE(macos(10.4), ios(5.0));
708
+
709
+ /*! @abstract Returns the sine and cosine for each element of a vector.
710
+ *
711
+ * @param z (output) Output vector of size *n. z[i] is set to sin(x[i]).
712
+ *
713
+ * @param y (output) Output vector of size *n. y[i] is set to cos(x[i]).
714
+ *
715
+ * @param x (input) Input vector of size *n, in radians.
716
+ *
717
+ * @param n (input) The number of elements in the vectors x and y. */
718
+ void vvsincosf (float * /* z */, float * /* y */, const float * /* x */, const int * /* n */) API_AVAILABLE(macos(10.4), ios(5.0));
719
+ /*! @abstract Returns the sine and cosine for each element of a vector.
720
+ *
721
+ * @param z (output) Output vector of size *n. z[i] is set to sin(x[i]).
722
+ *
723
+ * @param y (output) Output vector of size *n. y[i] is set to cos(x[i]).
724
+ *
725
+ * @param x (input) Input vector of size *n, in radians.
726
+ *
727
+ * @param n (input) The number of elements in the vectors x and y. */
728
+ void vvsincos (double * /* z */, double * /* y */, const double * /* x */, const int * /* n */) API_AVAILABLE(macos(10.4), ios(5.0));
729
+
730
+ /*! @abstract Returns the complex number on the unit circle corresponding to
731
+ * the angle given by each element of a vector.
732
+ *
733
+ * @discussion
734
+ * Sets the real part of C to the cosine of x, and the imaginary part to the
735
+ * sine of y.
736
+ *
737
+ * The typedef __float_complex_t is defined on a per language basis, and the
738
+ * following types should be used:
739
+ * In C, _Complex float
740
+ * In C++, std::complex<float>.
741
+ *
742
+ * @param C (output) Output vector of size *n.
743
+ * C[i] is set to cos(x[i]) + I*sin(x[i]).
744
+ *
745
+ * @param x (input) Input vector of size *n, in radians.
746
+ *
747
+ * @param n (input) The number of elements in the vectors x and y. */
748
+ void vvcosisinf (__float_complex_t * /* C */, const float * /* x */, const int * /* n */) API_AVAILABLE(macos(10.4), ios(5.0));
749
+ /*! @abstract Returns the complex number on the unit circle corresponding to
750
+ * the angle given by each element of a vector.
751
+ *
752
+ * @discussion
753
+ * Sets the real part of C to the cosine of x, and the imaginary part to the
754
+ * sine of y.
755
+ *
756
+ * The typedef __double_complex_t is defined on a per language basis, and the
757
+ * following types should be used:
758
+ * In C, _Complex double
759
+ * In C++, std::complex<double>.
760
+ *
761
+ * @param C (output) Output vector of size *n.
762
+ * C[i] is set to cos(x[i]) + I*sin(x[i]).
763
+ *
764
+ * @param x (input) Input vector of size *n, in radians.
765
+ *
766
+ * @param n (input) The number of elements in the vectors x and y. */
767
+ void vvcosisin (__double_complex_t * /* C */, const double * /* x */, const int * /* n */) API_AVAILABLE(macos(10.4), ios(5.0));
768
+
769
+ /*! @abstract Calculates the hyperbolic sine for each element of a vector.
770
+ *
771
+ * @discussion
772
+ * If x[i] is +/-0, y[i] preserves the signed zero.
773
+ * If x[i] is +/-inf, y[i] is set to +/-inf.
774
+ *
775
+ * @param y (output) Output vector of size *n. y[i] is set to sinh(x[i]).
776
+ *
777
+ * @param x (input) Input vector of size *n.
778
+ *
779
+ * @param n (input) The number of elements in the vectors x and y. */
780
+ void vvsinhf (float * /* y */, const float * /* x */, const int * /* n */) API_AVAILABLE(macos(10.4), ios(5.0));
781
+ /*! @abstract Calculates the hyperbolic sine for each element of a vector.
782
+ *
783
+ * @discussion
784
+ * If x[i] is +/-0, y[i] preserves the signed zero.
785
+ * If x[i] is +/-inf, y[i] is set to +/-inf.
786
+ *
787
+ * @param y (output) Output vector of size *n. y[i] is set to sinh(x[i]).
788
+ *
789
+ * @param x (input) Input vector of size *n.
790
+ *
791
+ * @param n (input) The number of elements in the vectors x and y. */
792
+ void vvsinh (double * /* y */, const double * /* x */, const int * /* n */) API_AVAILABLE(macos(10.4), ios(5.0));
793
+
794
+ /*! @abstract Calculates the hyperbolic cosine for each element of a vector.
795
+ *
796
+ * @discussion
797
+ * If x[i] is +/-0, y[i] is set to 1.
798
+ * If x[i] is +/-inf, y[i] is set to +inf.
799
+ *
800
+ * @param y (output) Output vector of size *n. y[i] is set to cosh(x[i]).
801
+ *
802
+ * @param x (input) Input vector of size *n.
803
+ *
804
+ * @param n (input) The number of elements in the vectors x and y. */
805
+ void vvcoshf (float * /* y */, const float * /* x */, const int * /* n */) API_AVAILABLE(macos(10.4), ios(5.0));
806
+ /*! @abstract Calculates the hyperbolic cosine for each element of a vector.
807
+ *
808
+ * @discussion
809
+ * If x[i] is +/-0, y[i] is set to 1.
810
+ * If x[i] is +/-inf, y[i] is set to +inf.
811
+ *
812
+ * @param y (output) Output vector of size *n. y[i] is set to cosh(x[i]).
813
+ *
814
+ * @param x (input) Input vector of size *n.
815
+ *
816
+ * @param n (input) The number of elements in the vectors x and y. */
817
+ void vvcosh (double * /* y */, const double * /* x */, const int * /* n */) API_AVAILABLE(macos(10.4), ios(5.0));
818
+
819
+ /*! @abstract Calculates the hyperbolic tangent for each element of a vector.
820
+ *
821
+ * @discussion
822
+ * If x[i] is +/-0, y[i] preserves the signed zero.
823
+ * If x[i] is +/-inf, y[i] is set to +/-1.
824
+ *
825
+ * @param y (output) Output vector of size *n. y[i] is set to tanh(x[i]).
826
+ *
827
+ * @param x (input) Input vector of size *n.
828
+ *
829
+ * @param n (input) The number of elements in the vectors x and y. */
830
+ void vvtanhf (float * /* y */, const float * /* x */, const int * /* n */) API_AVAILABLE(macos(10.4), ios(5.0));
831
+ /*! @abstract Calculates the hyperbolic tangent for each element of a vector.
832
+ *
833
+ * @discussion
834
+ * If x[i] is +/-0, y[i] preserves the signed zero.
835
+ * If x[i] is +/-inf, y[i] is set to +/-1.
836
+ *
837
+ * @param y (output) Output vector of size *n. y[i] is set to tanh(x[i]).
838
+ *
839
+ * @param x (input) Input vector of size *n.
840
+ *
841
+ * @param n (input) The number of elements in the vectors x and y. */
842
+ void vvtanh (double * /* y */, const double * /* x */, const int * /* n */) API_AVAILABLE(macos(10.4), ios(5.0));
843
+
844
+ /*! @abstract Calculates the inverse hyperbolic sine for each element of a
845
+ * vector.
846
+ *
847
+ * @discussion
848
+ * If x[i] is +/-0, y[i] preserves the signed zero.
849
+ * If x[i] is +/-inf, y[i] is set to +/-inf.
850
+ *
851
+ * @param y (output) Output vector of size *n. y[i] is set to asinh(x[i]).
852
+ *
853
+ * @param x (input) Input vector of size *n.
854
+ *
855
+ * @param n (input) The number of elements in the vectors x and y. */
856
+ void vvasinhf (float * /* y */, const float * /* x */, const int * /* n */) API_AVAILABLE(macos(10.4), ios(5.0));
857
+ /*! @abstract Calculates the inverse hyperbolic sine for each element of a
858
+ * vector.
859
+ *
860
+ * @discussion
861
+ * If x[i] is +/-0, y[i] preserves the signed zero.
862
+ * If x[i] is +/-inf, y[i] is set to +/-inf.
863
+ *
864
+ * @param y (output) Output vector of size *n. y[i] is set to asinh(x[i]).
865
+ *
866
+ * @param x (input) Input vector of size *n.
867
+ *
868
+ * @param n (input) The number of elements in the vectors x and y. */
869
+ void vvasinh (double * /* y */, const double * /* x */, const int * /* n */) API_AVAILABLE(macos(10.4), ios(5.0));
870
+
871
+ /*! @abstract Calculates the principal value of inverse hyperbolic cosine for
872
+ * each element of a vector.
873
+ *
874
+ * @discussion
875
+ * The calculated values are in the range [0, +inf].
876
+ * If x[i] == 1, y[i] is set to +0.
877
+ * If x[i] < 1, y[i] is set to NaN.
878
+ * If x[i] == +inf, y[i] is set to +inf.
879
+ *
880
+ * @param y (output) Output vector of size *n. y[i] is set to acosh(x[i]).
881
+ *
882
+ * @param x (input) Input vector of size *n.
883
+ *
884
+ * @param n (input) The number of elements in the vectors x and y. */
885
+ void vvacoshf (float * /* y */, const float * /* x */, const int * /* n */) API_AVAILABLE(macos(10.4), ios(5.0));
886
+ /*! @abstract Calculates the principal value of inverse hyperbolic cosine for
887
+ * each element of a vector.
888
+ *
889
+ * @discussion
890
+ * The calculated values are in the range [0, +inf].
891
+ * If x[i] == 1, y[i] is set to +0.
892
+ * If x[i] < 1, y[i] is set to NaN.
893
+ * If x[i] == +inf, y[i] is set to +inf.
894
+ *
895
+ * @param y (output) Output vector of size *n. y[i] is set to acosh(x[i]).
896
+ *
897
+ * @param x (input) Input vector of size *n.
898
+ *
899
+ * @param n (input) The number of elements in the vectors x and y. */
900
+ void vvacosh (double * /* y */, const double * /* x */, const int * /* n */) API_AVAILABLE(macos(10.4), ios(5.0));
901
+
902
+ /*! @abstract Calculates the inverse hyperbolic tangent for each element of a
903
+ * vector.
904
+ *
905
+ * @discussion
906
+ * If x[i] is +/-0, y[i] preserves the signed zero.
907
+ * If x[i] is +/-1, y[i] is set to +/-inf.
908
+ * If |x[i]|>1, y[i] is set to NaN.
909
+ *
910
+ * @param y (output) Output vector of size *n. y[i] is set to atanh(x[i]).
911
+ *
912
+ * @param x (input) Input vector of size *n.
913
+ *
914
+ * @param n (input) The number of elements in the vectors x and y. */
915
+ void vvatanhf (float * /* y */, const float * /* x */, const int * /* n */) API_AVAILABLE(macos(10.4), ios(5.0));
916
+ /*! @abstract Calculates the inverse hyperbolic tangent for each element of a
917
+ * vector.
918
+ *
919
+ * @discussion
920
+ * If x[i] is +/-0, y[i] preserves the signed zero.
921
+ * If x[i] is +/-1, y[i] is set to +/-inf.
922
+ * If |x[i]|>1, y[i] is set to NaN.
923
+ *
924
+ * @param y (output) Output vector of size *n. y[i] is set to atanh(x[i]).
925
+ *
926
+ * @param x (input) Input vector of size *n.
927
+ *
928
+ * @param n (input) The number of elements in the vectors x and y. */
929
+ void vvatanh (double * /* y */, const double * /* x */, const int * /* n */) API_AVAILABLE(macos(10.4), ios(5.0));
930
+
931
+ /*! @abstract Calculates the integer truncation for each element of a vector.
932
+ *
933
+ * @discussion
934
+ * The behavior of this function is equivalent to the libm function truncf().
935
+ * It rounds x[i] to the nearest integer in the direction of zero,
936
+ * equivalent to the C typecast y[i] = (float) (int) x[i].
937
+ *
938
+ * @param y (output) Output vector of size *n. y[i] is set to integer
939
+ * trunction of x[i].
940
+ *
941
+ * @param x (input) Input vector of size *n.
942
+ *
943
+ * @param n (input) The number of elements in the vectors x and y. */
944
+ void vvintf (float * /* y */, const float * /* x */, const int * /* n */) API_AVAILABLE(macos(10.4), ios(5.0));
945
+ /*! @abstract Calculates the integer truncation for each element of a vector.
946
+ *
947
+ * @discussion
948
+ * The behavior of this function is equivalent to the libm function trunc().
949
+ * It rounds x[i] to the nearest integer in the direction of zero,
950
+ * equivalent to the C typecast y[i] = (double) (int) x[i].
951
+ *
952
+ * @param y (output) Output vector of size *n. y[i] is set to integer
953
+ * trunction of x[i].
954
+ *
955
+ * @param x (input) Input vector of size *n.
956
+ *
957
+ * @param n (input) The number of elements in the vectors x and y. */
958
+ void vvint (double * /* y */, const double * /* x */, const int * /* n */) API_AVAILABLE(macos(10.4), ios(5.0));
959
+
960
+ /*! @abstract Calculates the rounding to the nearest integer for each element
961
+ * of a vector.
962
+ *
963
+ * @discussion
964
+ * Rounds x[i] to the nearest integer, with ties rounded to even.
965
+ *
966
+ * @param y (output) Output vector of size *n. y[i] is set to the nearest
967
+ * integer to x[i].
968
+ *
969
+ * @param x (input) Input vector of size *n.
970
+ *
971
+ * @param n (input) The number of elements in the vectors x and y. */
972
+ void vvnintf (float * /* y */, const float * /* x */, const int * /* n */) API_AVAILABLE(macos(10.4), ios(5.0));
973
+ /*! @abstract Calculates the rounding to the nearest integer for each element
974
+ * of a vector.
975
+ *
976
+ * @discussion
977
+ * Rounds x[i] to the nearest integer, with ties rounded to even.
978
+ *
979
+ * @param y (output) Output vector of size *n. y[i] is set to the nearest
980
+ * integer to x[i].
981
+ *
982
+ * @param x (input) Input vector of size *n.
983
+ *
984
+ * @param n (input) The number of elements in the vectors x and y. */
985
+ void vvnint (double * /* y */, const double * /* x */, const int * /* n */) API_AVAILABLE(macos(10.4), ios(5.0));
986
+
987
+ /*! @abstract Calculates the ceiling function for each element of a vector.
988
+ *
989
+ * @discussion
990
+ * Rounds to smallest integral value not less than x[i]. That is to say,
991
+ * rounds towards +inf.
992
+ *
993
+ * @param y (output) Output vector of size *n. y[i] is set to ceil(x[i]).
994
+ *
995
+ * @param x (input) Input vector of size *n.
996
+ *
997
+ * @param n (input) The number of elements in the vectors x and y. */
998
+ void vvceilf (float * /* y */, const float * /* x */, const int * /* n */) API_AVAILABLE(macos(10.4), ios(5.0));
999
+ /*! @abstract Calculates the ceiling function for each element of a vector.
1000
+ *
1001
+ * @discussion
1002
+ * Rounds to smallest integral value not less than x[i]. That is to say,
1003
+ * rounds towards +inf.
1004
+ *
1005
+ * @param y (output) Output vector of size *n. y[i] is set to ceil(x[i]).
1006
+ *
1007
+ * @param x (input) Input vector of size *n.
1008
+ *
1009
+ * @param n (input) The number of elements in the vectors x and y. */
1010
+ void vvceil (double * /* y */, const double * /* x */, const int * /* n */) API_AVAILABLE(macos(10.4), ios(5.0));
1011
+
1012
+ /*! @abstract Calculates the floor function for each element of a vector.
1013
+ *
1014
+ * @discussion
1015
+ * Rounds to smallest integral value not greater than x[i]. That is to say,
1016
+ * rounds towards -inf.
1017
+ *
1018
+ * @param y (output) Output vector of size *n. y[i] is set to floor(x[i]).
1019
+ *
1020
+ * @param x (input) Input vector of size *n.
1021
+ *
1022
+ * @param n (input) The number of elements in the vectors x and y. */
1023
+ void vvfloorf (float * /* y */, const float * /* x */, const int * /* n */) API_AVAILABLE(macos(10.4), ios(5.0));
1024
+ /*! @abstract Calculates the floor function for each element of a vector.
1025
+ *
1026
+ * @discussion
1027
+ * Rounds to smallest integral value not greater than x[i]. That is to say,
1028
+ * rounds towards -inf.
1029
+ *
1030
+ * @param y (output) Output vector of size *n. y[i] is set to floor(x[i]).
1031
+ *
1032
+ * @param x (input) Input vector of size *n.
1033
+ *
1034
+ * @param n (input) The number of elements in the vectors x and y. */
1035
+ void vvfloor (double * /* y */, const double * /* x */, const int * /* n */) API_AVAILABLE(macos(10.4), ios(5.0));
1036
+
1037
+ /*! @abstract Calculates, elementwise, the floating-point remainder of y/x,
1038
+ * for two vectors x and y.
1039
+ *
1040
+ * @discussion
1041
+ * Specifically, the function calculates z=y-k*x, for some integer k such that,
1042
+ * if x is non-zero, the result has the same sign as y, and magnitude less than
1043
+ * that of x.
1044
+ *
1045
+ * If y[i] is +/-0, and x[i] is not 0 or NaN, z[i] is set to +/-0.
1046
+ * If y[i] is +/-inf, or x[i] is +/-0, z[i] is set to NaN.
1047
+ * If x[i] is +/-inf, and y is finite, z[i] is set to y[i].
1048
+ *
1049
+ * Note that argument labels are switched with respect to the libm function
1050
+ * fmod().
1051
+ *
1052
+ * @seealso vvremainderf
1053
+ *
1054
+ * @param z (output) Output vector of size *n. z[i] is set to fmod(y[i], x[i]).
1055
+ *
1056
+ * @param y (input) Input vector of size *n, numerator in calculation.
1057
+ *
1058
+ * @param x (input) Input vector of size *n, denominator in calculation.
1059
+ *
1060
+ * @param n (input) The number of elements in the vectors x, y and z. */
1061
+ void vvfmodf (float * /* z */, const float * /* y */, const float * /* x */, const int * /* n */) API_AVAILABLE(macos(10.5), ios(5.0));
1062
+ /*! @abstract Calculates, elementwise, the floating-point remainder of y/x,
1063
+ * for two vectors x and y.
1064
+ *
1065
+ * @discussion
1066
+ * Specifically, the function calculates z=y-k*x, for some integer k such that,
1067
+ * if x is non-zero, the result has the same sign as y, and magnitude less than
1068
+ * that of x.
1069
+ *
1070
+ * If y[i] is +/-0, and x[i] is not 0 or NaN, z[i] is set to +/-0.
1071
+ * If y[i] is +/-inf, or x[i] is +/-0, z[i] is set to NaN.
1072
+ * If x[i] is +/-inf, and y is finite, z[i] is set to y[i].
1073
+ *
1074
+ * Note that argument labels are switched with respect to the libm function
1075
+ * fmod().
1076
+ *
1077
+ * @seealso vvremainder
1078
+ *
1079
+ * @param z (output) Output vector of size *n. z[i] is set to fmod(y[i], x[i]).
1080
+ *
1081
+ * @param y (input) Input vector of size *n, numerator in calculation.
1082
+ *
1083
+ * @param x (input) Input vector of size *n, denominator in calculation.
1084
+ *
1085
+ * @param n (input) The number of elements in the vectors x, y and z. */
1086
+ void vvfmod (double * /* z */, const double * /* y */, const double * /* x */, const int * /* n */) API_AVAILABLE(macos(10.7), ios(5.0));
1087
+
1088
+ /*! @abstract Calculates, elementwise, the difference between k*x and y, where
1089
+ * k is the nearest integer to y/x.
1090
+ *
1091
+ * @discussion
1092
+ * Specifically, the function calculates z=y-k*x, for the integer k nearest the
1093
+ * exact value of y/x, with ties rounded to even.
1094
+ * The result z satisfies abs(z) <= abs(x)/2.
1095
+ *
1096
+ * If y-k*x is zero, it is given the same sign as y.
1097
+ *
1098
+ * If y[i] is +/-inf, or x[i] is +/-0, z[i] is set to NaN.
1099
+ * If x[i] is +/-inf, and y is finite, z[i] is set to y[i].
1100
+ *
1101
+ * @seealso vvfmodf
1102
+ *
1103
+ * @param z (output) Output vector of size *n. z[i] is set to y[i]-k[i]*x[i].
1104
+ *
1105
+ * @param y (input) Input vector of size *n, numerator in calculation.
1106
+ *
1107
+ * @param x (input) Input vector of size *n, denominator in calculation.
1108
+ *
1109
+ * @param n (input) The number of elements in the vectors x, y and z. */
1110
+ void vvremainderf (float * /* z */, const float * /* y */, const float * /* x */, const int * /* n */) API_AVAILABLE(macos(10.5), ios(5.0));
1111
+ /*! @abstract Calculates, elementwise, the difference between k*x and y, where
1112
+ * k is the nearest integer to y/x.
1113
+ *
1114
+ * @discussion
1115
+ * Specifically, the function calculates z=y-k*x, for the integer k nearest the
1116
+ * exact value of y/x, with ties rounded to even.
1117
+ * The result z satisfies abs(z) <= abs(x)/2.
1118
+ *
1119
+ * If y-k*x is zero, it is given the same sign as y.
1120
+ *
1121
+ * If y[i] is +/-inf, or x[i] is +/-0, z[i] is set to NaN.
1122
+ * If x[i] is +/-inf, and y is finite, z[i] is set to y[i].
1123
+ *
1124
+ * @seealso vvfmod
1125
+ *
1126
+ * @param z (output) Output vector of size *n. z[i] is set to y[i]-k[i]*x[i].
1127
+ *
1128
+ * @param y (input) Input vector of size *n, numerator in calculation.
1129
+ *
1130
+ * @param x (input) Input vector of size *n, denominator in calculation.
1131
+ *
1132
+ * @param n (input) The number of elements in the vectors x, y and z. */
1133
+ void vvremainder (double * /* z */, const double * /* y */, const double * /* x */, const int * /* n */) API_AVAILABLE(macos(10.7), ios(5.0));
1134
+
1135
+ /*! @abstract Copies, elementwise, the sign of x with the value of y, for two
1136
+ * vectors x and y.
1137
+ *
1138
+ * @param z (output) Output vector of size *n.
1139
+ * z[i] is set to copysign(y[i], x[i]).
1140
+ *
1141
+ * @param y (input) Input vector of size *n, used for the magnitude.
1142
+ *
1143
+ * @param x (input) Input vector of size *n, used for the sign.
1144
+ *
1145
+ * @param n (input) The number of elements in the vectors x, y and z. */
1146
+ void vvcopysignf (float * /* z */, const float * /* y */, const float * /* x */, const int * /* n */) API_AVAILABLE(macos(10.5), ios(5.0));
1147
+ /*! @abstract Copies, elementwise, the sign of x with the value of y, for two
1148
+ * vectors x and y.
1149
+ *
1150
+ * @param z (output) Output vector of size *n.
1151
+ * z[i] is set to copysign(y[i], x[i]).
1152
+ *
1153
+ * @param y (input) Input vector of size *n, used for the magnitude.
1154
+ *
1155
+ * @param x (input) Input vector of size *n, used for the sign.
1156
+ *
1157
+ * @param n (input) The number of elements in the vectors x, y and z. */
1158
+ void vvcopysign (double * /* z */, const double * /* y */, const double * /* x */, const int * /* n */) API_AVAILABLE(macos(10.7), ios(5.0));
1159
+
1160
+ /*! @abstract Determines, elementwise, the next machine representable number
1161
+ * from y in the direction of x.
1162
+ *
1163
+ * @param z (output) Output vector of size *n.
1164
+ * z[i] is set to nextafter(y[i], x[i]).
1165
+ *
1166
+ * @param y (input) Input vector of size *n, used for the magnitude.
1167
+ *
1168
+ * @param x (input) Input vector of size *n, used for the sign.
1169
+ *
1170
+ * @param n (input) The number of elements in the vectors x, y and z. */
1171
+ void vvnextafterf (float * /* z */, const float * /* y */, const float * /* x */, const int * /* n */) API_AVAILABLE(macos(10.5), ios(5.0));
1172
+ /*! @abstract Determines, elementwise, the next machine representable number
1173
+ * from y in the direction of x.
1174
+ *
1175
+ * @param z (output) Output vector of size *n.
1176
+ * z[i] is set to nextafter(y[i], x[i]).
1177
+ *
1178
+ * @param y (input) Input vector of size *n, used for the magnitude.
1179
+ *
1180
+ * @param x (input) Input vector of size *n, used for the sign.
1181
+ *
1182
+ * @param n (input) The number of elements in the vectors x, y and z. */
1183
+ void vvnextafter (double * /* z */, const double * /* y */, const double * /* x */, const int * /* n */) API_AVAILABLE(macos(10.7), ios(5.0));
1184
+
1185
+ /*! @abstract Calculates the sine for pi times each element of a vector.
1186
+ *
1187
+ * @param y (output) Output vector of size *n. y[i] is set to sin(x[i]*PI).
1188
+ *
1189
+ * @param x (input) Input vector of size *n.
1190
+ *
1191
+ * @param n (input) The number of elements in the vectors x and y. */
1192
+ void vvsinpif (float * /* y */, const float * /* x */, const int * /* n */) API_AVAILABLE(macos(10.7), ios(5.0));
1193
+ /*! @abstract Calculates the sine for pi times each element of a vector.
1194
+ *
1195
+ * @param y (output) Output vector of size *n. y[i] is set to sin(x[i]*PI).
1196
+ *
1197
+ * @param x (input) Input vector of size *n.
1198
+ *
1199
+ * @param n (input) The number of elements in the vectors x and y. */
1200
+ void vvsinpi (double * /* y */, const double * /* x */, const int * /* n */) API_AVAILABLE(macos(10.7), ios(5.0));
1201
+
1202
+ /*! @abstract Calculates the cosine for pi times each element of a vector.
1203
+ *
1204
+ * @param y (output) Output vector of size *n. y[i] is set to cos(x[i]*PI).
1205
+ *
1206
+ * @param x (input) Input vector of size *n.
1207
+ *
1208
+ * @param n (input) The number of elements in the vectors x and y. */
1209
+ void vvcospif (float * /* y */, const float * /* x */, const int * /* n */) API_AVAILABLE(macos(10.7), ios(5.0));
1210
+ /*! @abstract Calculates the cosine for pi times each element of a vector.
1211
+ *
1212
+ * @param y (output) Output vector of size *n. y[i] is set to cos(x[i]*PI).
1213
+ *
1214
+ * @param x (input) Input vector of size *n.
1215
+ *
1216
+ * @param n (input) The number of elements in the vectors x and y. */
1217
+ void vvcospi (double * /* y */, const double * /* x */, const int * /* n */) API_AVAILABLE(macos(10.7), ios(5.0));
1218
+
1219
+ /*! @abstract Calculates the tangent for pi times each element of a vector.
1220
+ *
1221
+ * @param y (output) Output vector of size *n. y[i] is set to tan(x[i]*PI).
1222
+ *
1223
+ * @param x (input) Input vector of size *n.
1224
+ *
1225
+ * @param n (input) The number of elements in the vectors x and y. */
1226
+ void vvtanpif (float * /* y */, const float * /* x */, const int * /* n */) API_AVAILABLE(macos(10.7), ios(5.0));
1227
+ /*! @abstract Calculates the tangent for pi times each element of a vector.
1228
+ *
1229
+ * @param y (output) Output vector of size *n. y[i] is set to tan(x[i]*PI).
1230
+ *
1231
+ * @param x (input) Input vector of size *n.
1232
+ *
1233
+ * @param n (input) The number of elements in the vectors x and y. */
1234
+ void vvtanpi (double * /* y */, const double * /* x */, const int * /* n */) API_AVAILABLE(macos(10.7), ios(5.0));
1235
+
1236
+ #if __has_feature(assume_nonnull)
1237
+ _Pragma("clang assume_nonnull end")
1238
+ #endif
1239
+
1240
+ #ifdef __cplusplus
1241
+ }
1242
+ #endif
1243
+ #endif /* __VFORCE_H */