0001 http://mattt.me)
0023 import Accelerate
0024
0025
0027 public func sinh(x: [Float]) -> [Float] {
0028 var results = [Float](count: x.count, repeatedValue: 0.0)
0029 vvsinhf(&results, x, [Int32(x.count)])
0030
0031 return results
0032 }
0033
0034 public func sinh(x: [Double]) -> [Double] {
0035 var results = [Double](count: x.count, repeatedValue: 0.0)
0036 vvsinh(&results, x, [Int32(x.count)])
0037
0038 return results
0039 }
0040
0041
0043 public func cosh(x: [Float]) -> [Float] {
0044 var results = [Float](count: x.count, repeatedValue: 0.0)
0045 vvcoshf(&results, x, [Int32(x.count)])
0046
0047 return results
0048 }
0049
0050 public func cosh(x: [Double]) -> [Double] {
0051 var results = [Double](count: x.count, repeatedValue: 0.0)
0052 vvcosh(&results, x, [Int32(x.count)])
0053
0054 return results
0055 }
0056
0057
0059 public func tanh(x: [Float]) -> [Float] {
0060 var results = [Float](count: x.count, repeatedValue: 0.0)
0061 vvtanhf(&results, x, [Int32(x.count)])
0062
0063 return results
0064 }
0065
0066 public func tanh(x: [Double]) -> [Double] {
0067 var results = [Double](count: x.count, repeatedValue: 0.0)
0068 vvtanh(&results, x, [Int32(x.count)])
0069
0070 return results
0071 }
0072
0073
0075 public func asinh(x: [Float]) -> [Float] {
0076 var results = [Float](count: x.count, repeatedValue: 0.0)
0077 vvasinhf(&results, x, [Int32(x.count)])
0078
0079 return results
0080 }
0081
0082 public func asinh(x: [Double]) -> [Double] {
0083 var results = [Double](count: x.count, repeatedValue: 0.0)
0084 vvasinh(&results, x, [Int32(x.count)])
0085
0086 return results
0087 }
0088
0089
0091 public func acosh(x: [Float]) -> [Float] {
0092 var results = [Float](count: x.count, repeatedValue: 0.0)
0093 vvacoshf(&results, x, [Int32(x.count)])
0094
0095 return results
0096 }
0097
0098 public func acosh(x: [Double]) -> [Double] {
0099 var results = [Double](count: x.count, repeatedValue: 0.0)
0100 vvacosh(&results, x, [Int32(x.count)])
0101
0102 return results
0103 }
0104
0105
0107 public func atanh(x: [Float]) -> [Float] {
0108 var results = [Float](count: x.count, repeatedValue: 0.0)
0109 vvatanhf(&results, x, [Int32(x.count)])
0110
0111 return results
0112 }
0113
0114 public func atanh(x: [Double]) -> [Double] {
0115 var results = [Double](count: x.count, repeatedValue: 0.0)
0116 vvatanh(&results, x, [Int32(x.count)])
0117
0118 return results
0119 }
0120