-
-
Notifications
You must be signed in to change notification settings - Fork 813
/
Copy pathrepl.txt
47 lines (35 loc) · 1.24 KB
/
repl.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
{{alias}}( fcn, nargs, ctor )
Wraps a function accepting complex number arguments to support providing
both real and complex numbers.
The returned function *assumes* that the wrapped function accepts *only*
complex number input arguments (i.e., every argument must be a complex
number).
The returned function *assumes* that, if an input argument is non-numeric
(i.e., not of type `number`), then the input argument is a complex number.
The returned function does *not* verify that non-numeric input arguments
are, in fact, complex number objects.
The returned function passes non-numeric input arguments to the wrapped
function without modification.
Parameters
----------
fcn: Function
Function to wrap.
nargs: integer
Number of arguments.
ctor: Function
Complex number constructor.
Returns
-------
f: Function
Wrapped function.
Examples
--------
> var f = {{alias}}( {{alias:@stdlib/math/base/ops/caddf}}, 2, {{alias:@stdlib/complex/float32}} );
> var z = f( 3.0, 4.0 )
<Complex64>
> var re = {{alias:@stdlib/complex/realf}}( z )
7.0
> var im = {{alias:@stdlib/complex/imagf}}( z )
0.0
See Also
--------