Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@

{{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
--------

Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@

{{alias}}( c[, options] )
Compiles a module string containing an exported function 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 `'float32'`.

The function is intended for non-browser environments for the purpose of
generating module 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 'float64' or
'float32'. Default: 'float64'.

Returns
-------
out: string
Module string exporting a function for evaluating a polynomial.

Examples
--------
> var str = {{alias}}( [ 3.0, 2.0, 1.0 ] )
<string>


See Also
--------

Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@

{{alias}}( P, Q[, options] )
Compiles a C function string for evaluating a rational function having
numerator coefficients `P` and denominator coefficients `Q`.

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
----------
P: Array<number>
Numerator polynomial coefficients sorted in ascending degree.

Q: Array<number>
Denominator 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: 'evalrational'.

Returns
-------
out: string
Function string for evaluating a rational function.

Examples
--------
> var P = [ -6.0, -5.0 ];
> var Q = [ 3.0, 0.5 ];
> var str = {{alias}}( P, Q )
<string>


See Also
--------

Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@

{{alias}}( P, Q[, options] )
Compiles a module string containing an exported function for evaluating a
rational function having numerator coefficients `P` and denominator
coefficients `Q`.

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 `'float32'`.

The function is intended for non-browser environments for the purpose of
generating module files.

Parameters
----------
P: Array<number>
Numerator polynomial coefficients sorted in ascending degree.

Q: Array<number>
Denominator polynomial coefficients sorted in ascending degree.

options: Object (optional)
Function options.

options.dtype: string (optional)
Input value floating-point data type. Must be either 'float64' or
'float32'. Default: 'float64'.

Returns
-------
out: string
Module string exporting a function for evaluating a rational function.

Examples
--------
> var P = [ -6.0, -5.0 ];
> var Q = [ 3.0, 0.5 ];
> var str = {{alias}}( P, Q )
<string>


See Also
--------