Skip to content

Commit cf30936

Browse files
committed
fix: fixed lib/index.js example
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent 273bc89 commit cf30936

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

  • lib/node_modules/@stdlib/optimize/base/brentq/lib

lib/node_modules/@stdlib/optimize/base/brentq/lib/index.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,17 @@
2424
* @module @stdlib/optimize/base/brentq
2525
*
2626
* @example
27+
* var sin = require( '@stdlib/math/base/special/sin' );
2728
* var brentq = require( '@stdlib/optimize/base/brentq' );
2829
*
2930
* function f( x ) {
30-
* return Math.sin( x );
31+
* return sin( x );
3132
* }
3233
*
33-
* var root = brentq( f, 3.0, 3.2 );
34-
* // returns ~3.14
34+
* var out = brentq( f, 3.0, 4.0, 100, 1.0e-12, 8.88e-16, [] );
35+
* var root = out.root;
36+
* console.log( root );
37+
* // => ~3.14
3538
*/
3639

3740
// MODULES //

0 commit comments

Comments
 (0)