@@ -146,8 +146,6 @@ julia> deg2rad(90)
146
146
deg2rad (z:: AbstractFloat ) = z * (oftype (z, pi ) / 180 )
147
147
rad2deg (z:: Real ) = rad2deg (float (z))
148
148
deg2rad (z:: Real ) = deg2rad (float (z))
149
- @vectorize_1arg Real rad2deg
150
- @vectorize_1arg Real deg2rad
151
149
152
150
log {T<:Number} (b:: T , x:: T ) = log (x)/ log (b)
153
151
@@ -165,7 +163,6 @@ julia> log(4,2)
165
163
```
166
164
"""
167
165
log (b:: Number , x:: Number ) = log (promote (b,x)... )
168
- @vectorize_2arg Number log
169
166
170
167
# type specific math functions
171
168
@@ -178,7 +175,6 @@ for f in (:cbrt, :sinh, :cosh, :tanh, :atan, :asinh, :exp, :erf, :erfc, :exp2, :
178
175
($ f)(x:: Float64 ) = ccall (($ (string (f)),libm), Float64, (Float64,), x)
179
176
($ f)(x:: Float32 ) = ccall (($ (string (f," f" )),libm), Float32, (Float32,), x)
180
177
($ f)(x:: Real ) = ($ f)(float (x))
181
- @vectorize_1arg Number $ f
182
178
end
183
179
end
184
180
230
226
exp10 (x:: Float64 ) = 10.0 ^ x
231
227
exp10 (x:: Float32 ) = 10.0f0 ^ x
232
228
exp10 (x:: Integer ) = exp10 (float (x))
233
- @vectorize_1arg Number exp10
234
229
235
230
# utility for converting NaN return to DomainError
236
231
@inline nan_dom_err (f, x) = isnan (f) & ! isnan (x) ? throw (DomainError ()) : f
@@ -242,7 +237,6 @@ for f in (:sin, :cos, :tan, :asin, :acos, :acosh, :atanh, :log, :log2, :log10,
242
237
($ f)(x:: Float64 ) = nan_dom_err (ccall (($ (string (f)),libm), Float64, (Float64,), x), x)
243
238
($ f)(x:: Float32 ) = nan_dom_err (ccall (($ (string (f," f" )),libm), Float32, (Float32,), x), x)
244
239
($ f)(x:: Real ) = ($ f)(float (x))
245
- @vectorize_1arg Number $ f
246
240
end
247
241
end
248
242
@@ -256,7 +250,6 @@ Return ``\\sqrt{x}``. Throws `DomainError` for negative `Real` arguments. Use co
256
250
negative arguments instead. The prefix operator `√` is equivalent to `sqrt`.
257
251
"""
258
252
sqrt (x:: Real ) = sqrt (float (x))
259
- @vectorize_1arg Number sqrt
260
253
261
254
"""
262
255
hypot(x, y)
@@ -288,7 +281,6 @@ function hypot{T<:Number}(x::T, y::T)
288
281
return rr
289
282
end
290
283
end
291
- @vectorize_2arg Number hypot
292
284
293
285
"""
294
286
hypot(x...)
@@ -308,16 +300,13 @@ atan2{T<:AbstractFloat}(y::T, x::T) = Base.no_op_err("atan2", T)
308
300
309
301
atan2 (y:: Float64 , x:: Float64 ) = ccall ((:atan2 ,libm), Float64, (Float64, Float64,), y, x)
310
302
atan2 (y:: Float32 , x:: Float32 ) = ccall ((:atan2f ,libm), Float32, (Float32, Float32), y, x)
311
- @vectorize_2arg Number atan2
312
303
313
304
max {T<:AbstractFloat} (x:: T , y:: T ) = ifelse ((y > x) | (signbit (y) < signbit (x)),
314
305
ifelse (isnan (y), x, y), ifelse (isnan (x), y, x))
315
306
316
- @vectorize_2arg Real max
317
307
318
308
min {T<:AbstractFloat} (x:: T , y:: T ) = ifelse ((y < x) | (signbit (y) > signbit (x)),
319
309
ifelse (isnan (y), x, y), ifelse (isnan (x), y, x))
320
- @vectorize_2arg Real min
321
310
322
311
minmax {T<:AbstractFloat} (x:: T , y:: T ) = ifelse (isnan (x- y), ifelse (isnan (x), (y, y), (x, x)),
323
312
ifelse ((y < x) | (signbit (y) > signbit (x)), (y, x),
@@ -332,7 +321,6 @@ Compute ``x \\times 2^n``.
332
321
"""
333
322
ldexp (x:: Float64 ,e:: Integer ) = ccall ((:scalbn ,libm), Float64, (Float64,Int32), x, Int32 (e))
334
323
ldexp (x:: Float32 ,e:: Integer ) = ccall ((:scalbnf ,libm), Float32, (Float32,Int32), x, Int32 (e))
335
- # TODO : vectorize ldexp
336
324
337
325
"""
338
326
exponent(x) -> Int
@@ -353,7 +341,6 @@ function exponent{T<:AbstractFloat}(x::T)
353
341
end
354
342
k - exponent_bias (T)
355
343
end
356
- @vectorize_1arg Real exponent
357
344
358
345
"""
359
346
significand(x)
@@ -386,7 +373,6 @@ function significand{T<:AbstractFloat}(x::T)
386
373
xu = (xu & ~ exponent_mask (T)) | exponent_one (T)
387
374
reinterpret (T,xu)
388
375
end
389
- @vectorize_1arg Real significand
390
376
391
377
"""
392
378
frexp(val)
0 commit comments