-
-
Notifications
You must be signed in to change notification settings - Fork 804
/
Copy pathrepl.txt
56 lines (41 loc) · 1.12 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
47
48
49
50
51
52
53
54
55
{{alias}}( c, x )
Evaluates a polynomial using single-precision floating-point arithmetic.
Parameters
----------
c: Array<number>
Polynomial coefficients sorted in ascending degree.
x: number
Value at which to evaluate the polynomial.
Returns
-------
out: number
Evaluated polynomial.
Examples
--------
> var arr = new {{alias:@stdlib/array/float32}}( [ 3.0, 2.0, 1.0 ] );
// 3*10^0 + 2*10^1 + 1*10^2
> var v = {{alias}}( arr, 10.0 )
123.0
{{alias}}.factory( c )
Returns a function for evaluating a polynomial using single-precision
floating-point arithmetic.
Parameters
----------
c: Array<number>
Polynomial coefficients sorted in ascending degree.
Returns
-------
fcn: Function
Function for evaluating a polynomial.
Examples
--------
> var c = new {{alias:@stdlib/array/float32}}( [ 3.0, 2.0, 1.0 ] );
> var f = {{alias}}.factory( c );
// 3*10^0 + 2*10^1 + 1*10^2
> var v = f( 10.0 )
123.0
// 3*5^0 + 2*5^1 + 1*5^2
> v = f( 5.0 )
38.0
See Also
--------