Skip to content

Commit c462391

Browse files
committed
docs: update comments acc to stdlib conventions
--- 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: passed - 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: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent 5d55055 commit c462391

File tree

2 files changed

+4
-22
lines changed
  • lib/node_modules/@stdlib/math/base/special/kernel-tanf

2 files changed

+4
-22
lines changed

lib/node_modules/@stdlib/math/base/special/kernel-tanf/lib/main.js

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -93,18 +93,9 @@ function kernelTanf( x, iy ) {
9393
z = x * x;
9494

9595
/*
96-
* Split up the polynomial into small independent terms to give
97-
* opportunities for parallel evaluation. The chosen splitting is
98-
* micro-optimized for Athlons (XP, X64). It costs 2 multiplications
99-
* relative to Horner's method on sequential machines.
96+
* Split up the polynomial into small independent terms to give opportunities for parallel evaluation. The chosen splitting is a micro-optimization for specific hardware, as originally documented in FreeBSD's fdlibm. The splitting costs 2 multiplications relative to Horner's method on sequential machines.
10097
*
101-
* We add the small terms from lowest degree up for efficiency on
102-
* non-sequential machines (the lowest degree termstend to be ready
103-
* earlier). Apart from this, we don't care about order of
104-
* operations, and don't need to care since we have precision to
105-
* spare. However, the chosen splitting is good for accuracy too,
106-
* and would give results as accurate as Horner's method if the
107-
* small terms were added from highest degree down.
98+
* We add the small terms from lowest degree up for efficiency on non-sequential machines (the lowest degree terms tend to be ready earlier). Apart from this, we don't care about order of operations, and don't need to care since we have precision to spare. However, the chosen splitting is good for accuracy, too, and would give results as accurate as Horner's method if the small terms were added from highest degree down.
10899
*/
109100
r = T[ 4 ] + ( z * T[ 5 ] );
110101
t = T[ 2 ] + ( z * T[ 3 ] );

lib/node_modules/@stdlib/math/base/special/kernel-tanf/src/main.c

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -68,18 +68,9 @@ float stdlib_base_kernel_tanf( const double x, const int32_t iy ) {
6868
z = x * x;
6969

7070
/*
71-
* Split up the polynomial into small independent terms to give
72-
* opportunities for parallel evaluation. The chosen splitting is
73-
* micro-optimized for Athlons (XP, X64). It costs 2 multiplications
74-
* relative to Horner's method on sequential machines.
71+
* Split up the polynomial into small independent terms to give opportunities for parallel evaluation. The chosen splitting is a micro-optimization for specific hardware, as originally documented in FreeBSD's fdlibm. The splitting costs 2 multiplications relative to Horner's method on sequential machines.
7572
*
76-
* We add the small terms from lowest degree up for efficiency on
77-
* non-sequential machines (the lowest degree termstend to be ready
78-
* earlier). Apart from this, we don't care about order of
79-
* operations, and don't need to care since we have precision to
80-
* spare. However, the chosen splitting is good for accuracy too,
81-
* and would give results as accurate as Horner's method if the
82-
* small terms were added from highest degree down.
73+
* We add the small terms from lowest degree up for efficiency on non-sequential machines (the lowest degree terms tend to be ready earlier). Apart from this, we don't care about order of operations, and don't need to care since we have precision to spare. However, the chosen splitting is good for accuracy, too, and would give results as accurate as Horner's method if the small terms were added from highest degree down.
8374
*/
8475
r = T[ 4 ] + ( z * T[ 5 ] );
8576
t = T[ 2 ] + ( z * T[ 3 ] );

0 commit comments

Comments
 (0)