-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Expand file tree
/
Copy pathrepl.txt
More file actions
44 lines (31 loc) · 1.09 KB
/
repl.txt
File metadata and controls
44 lines (31 loc) · 1.09 KB
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
{{alias}}( c[, options] )
Compiles a C function string for evaluating a polynomial having
coefficients `c`.
The coefficients should be ordered in ascending degree, thus matching
summation notation.
By default, the function assumes double-precision floating-point arithmetic.
To emulate single-precision floating-point arithmetic, set the `dtype`
option to `'float'`.
The function is intended for non-browser environments for the purpose of
generating C source files.
Parameters
----------
c: Array<number>
Polynomial coefficients sorted in ascending degree.
options: Object (optional)
Function options.
options.dtype: string (optional)
Input value floating-point data type. Must be either 'double' or
'float'. Default: 'double'.
options.name: string (optional)
Function name. Default: 'evalpoly'.
Returns
-------
out: string
Function string for evaluating a polynomial.
Examples
--------
> var str = {{alias}}( [ 3.0, 2.0, 1.0 ] )
<string>
See Also
--------