/*
* This script compiles modules for evaluating polynomial functions. If any polynomial coefficients change, this script should be rerun to update the compiled files.
*/
'use strict';

// MODULES //

var writeFileSync = require( 'fs' ).writeFileSync;
var resolve = require( 'path' ).resolve;
var compile = require( '@stdlib/math/base/tools/evalpoly' ).compile;


// VARIABLES //

// Polynomial coefficients ordered in ascending degree...
var P = [
	2.39423741207388267439e3,
	4.06717289936872725516e2,
	1.17452732554344059015e1,
	4.09962519798587023075e-2
];
var Q = [
	2.07960819286001865907e3,
	1.27209271178345121210e3,
	8.50936160849306532625e1,
	1.0
];

// Header line to add to output files:
var header = '/* This is a generated file. Do not edit directly. */\n';


// MAIN //

/**
* Main execution sequence.
*/
function main() {
	var fpath;
	var opts;
	var str;

	opts = {
		'encoding': 'utf8'
	};

	fpath = resolve( __dirname, '..', 'lib', 'polyval_p.js' );
	str = header + compile( P );
	writeFileSync( fpath, str, opts );

	fpath = resolve( __dirname, '..', 'lib', 'polyval_q.js' );
	str = header + compile( Q );
	writeFileSync( fpath, str, opts );
} // end FUNCTION main()

main();

/*
* This script compiles modules for evaluating polynomial functions. If any polynomial coefficients change, this script should be rerun to update the compiled files.
*/
'use strict';

// MODULES //

var writeFileSync = require( 'fs' ).writeFileSync;
var resolve = require( 'path' ).resolve;
var compile = require( '@stdlib/math/base/tools/evalpoly-compile' );


// VARIABLES //

// Polynomial coefficients ordered in ascending degree...
var P = [
	2.39423741207388267439e3,
	4.06717289936872725516e2,
	1.17452732554344059015e1,
	4.09962519798587023075e-2
];
var Q = [
	2.07960819286001865907e3,
	1.27209271178345121210e3,
	8.50936160849306532625e1,
	1.0
];

// Header line to add to output files:
var header = '/* This is a generated file. Do not edit directly. */\n';


// MAIN //

/**
* Main execution sequence.
*/
function main() {
	var fpath;
	var opts;
	var str;

	opts = {
		'encoding': 'utf8'
	};

	fpath = resolve( __dirname, '..', 'lib', 'polyval_p.js' );
	str = header + compile( P );
	writeFileSync( fpath, str, opts );

	fpath = resolve( __dirname, '..', 'lib', 'polyval_q.js' );
	str = header + compile( Q );
	writeFileSync( fpath, str, opts );
} // end FUNCTION main()

main();

Update require path