Skip to content

Commit

Permalink
Update artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
stdlib-bot committed Nov 17, 2024
1 parent 28ffb36 commit 50b1145
Show file tree
Hide file tree
Showing 7 changed files with 61 additions and 30 deletions.
33 changes: 24 additions & 9 deletions math/base/special/gcdf/binary_gcd.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ <h1><a href="../../../../../index.html">All files</a> / <a href="index.html">mat
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>81/81</span>
<span class='fraction'>86/86</span>
</div>


Expand All @@ -46,7 +46,7 @@ <h1><a href="../../../../../index.html">All files</a> / <a href="index.html">mat
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>81/81</span>
<span class='fraction'>86/86</span>
</div>


Expand Down Expand Up @@ -144,7 +144,12 @@ <h1><a href="../../../../../index.html">All files</a> / <a href="index.html">mat
<a name='L79'></a><a href='#L79'>79</a>
<a name='L80'></a><a href='#L80'>80</a>
<a name='L81'></a><a href='#L81'>81</a>
<a name='L82'></a><a href='#L82'>82</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">1x</span>
<a name='L82'></a><a href='#L82'>82</a>
<a name='L83'></a><a href='#L83'>83</a>
<a name='L84'></a><a href='#L84'>84</a>
<a name='L85'></a><a href='#L85'>85</a>
<a name='L86'></a><a href='#L86'>86</a>
<a name='L87'></a><a href='#L87'>87</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
Expand Down Expand Up @@ -194,23 +199,27 @@ <h1><a href="../../../../../index.html">All files</a> / <a href="index.html">mat
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">4x</span>
<span class="cline-any cline-yes">4x</span>
<span class="cline-any cline-yes">6x</span>
<span class="cline-any cline-yes">59x</span>
<span class="cline-any cline-yes">59x</span>
<span class="cline-any cline-yes">59x</span>
<span class="cline-any cline-yes">59x</span>
<span class="cline-any cline-yes">4x</span>
<span class="cline-any cline-yes">4x</span>
<span class="cline-any cline-yes">6x</span>
<span class="cline-any cline-yes">244x</span>
<span class="cline-any cline-yes">244x</span>
<span class="cline-any cline-yes">4x</span>
<span class="cline-any cline-yes">4x</span>
<span class="cline-any cline-yes">6x</span>
<span class="cline-any cline-yes">38x</span>
<span class="cline-any cline-yes">38x</span>
<span class="cline-any cline-yes">149x</span>
<span class="cline-any cline-yes">149x</span>
<span class="cline-any cline-yes">38x</span>
<span class="cline-any cline-yes">38x</span>
<span class="cline-any cline-yes">38x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
Expand All @@ -219,6 +228,7 @@ <h1><a href="../../../../../index.html">All files</a> / <a href="index.html">mat
<span class="cline-any cline-yes">38x</span>
<span class="cline-any cline-yes">4x</span>
<span class="cline-any cline-yes">4x</span>
<span class="cline-any cline-yes">4x</span>
<span class="cline-any cline-yes">6x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
Expand Down Expand Up @@ -246,7 +256,7 @@ <h1><a href="../../../../../index.html">All files</a> / <a href="index.html">mat
'use strict';
&nbsp;
/**
* Computes the greatest common divisor (gcd) of two single-precision floating point numbers using the binary GCD algorithm.
* Computes the greatest common divisor (gcd) of two single-precision floating-point numbers using the binary GCD algorithm.
*
* ## References
*
Expand All @@ -260,7 +270,7 @@ <h1><a href="../../../../../index.html">All files</a> / <a href="index.html">mat
* @returns {integer} greatest common divisor
*
* @example
* var v = gcdf( 16777216.0, 65536.0 );
* var v = gcdf( 16777216, 65536 );
* // returns 65536
*/
function gcdf( a, b ) {
Expand All @@ -274,22 +284,26 @@ <h1><a href="../../../../../index.html">All files</a> / <a href="index.html">mat
if ( b === 0 ) {
return a;
}
&nbsp;
// Reduce `a` and/or `b` to odd numbers and keep track of the greatest power of 2 dividing both `a` and `b`...
while ( a%2 === 0 &amp;&amp; b%2 === 0 ) {
while ( a % 2 === 0 &amp;&amp; b % 2 === 0 ) {
a /= 2; // right shift
b /= 2; // right shift
k *= 2; // left shift
}
&nbsp;
// Reduce `a` to an odd number...
while ( a%2 === 0 ) {
while ( a % 2 === 0 ) {
a /= 2; // right shift
}
&nbsp;
// Henceforth, `a` is always odd...
while ( b ) {
// Remove all factors of 2 in `b`, as they are not common...
while ( b%2 === 0 ) {
while ( b % 2 === 0 ) {
b /= 2; // right shift
}
&nbsp;
// `a` and `b` are both odd. Swap values such that `b` is the larger of the two values, and then set `b` to the difference (which is even)...
if ( a &gt; b ) {
t = b;
Expand All @@ -298,6 +312,7 @@ <h1><a href="../../../../../index.html">All files</a> / <a href="index.html">mat
}
b -= a; // b=0 iff b=a
}
&nbsp;
// Restore common factors of 2...
return k * a;
}
Expand All @@ -313,7 +328,7 @@ <h1><a href="../../../../../index.html">All files</a> / <a href="index.html">mat
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2024-11-11T15:20:25.784Z
at 2024-11-17T09:32:57.284Z
</div>
<script src="../../../../../prettify.js"></script>
<script>
Expand Down
31 changes: 23 additions & 8 deletions math/base/special/gcdf/bitwise_binary_gcd.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ <h1><a href="../../../../../index.html">All files</a> / <a href="index.html">mat
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>81/81</span>
<span class='fraction'>86/86</span>
</div>


Expand All @@ -46,7 +46,7 @@ <h1><a href="../../../../../index.html">All files</a> / <a href="index.html">mat
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>81/81</span>
<span class='fraction'>86/86</span>
</div>


Expand Down Expand Up @@ -144,7 +144,12 @@ <h1><a href="../../../../../index.html">All files</a> / <a href="index.html">mat
<a name='L79'></a><a href='#L79'>79</a>
<a name='L80'></a><a href='#L80'>80</a>
<a name='L81'></a><a href='#L81'>81</a>
<a name='L82'></a><a href='#L82'>82</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">1x</span>
<a name='L82'></a><a href='#L82'>82</a>
<a name='L83'></a><a href='#L83'>83</a>
<a name='L84'></a><a href='#L84'>84</a>
<a name='L85'></a><a href='#L85'>85</a>
<a name='L86'></a><a href='#L86'>86</a>
<a name='L87'></a><a href='#L87'>87</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
Expand Down Expand Up @@ -194,23 +199,27 @@ <h1><a href="../../../../../index.html">All files</a> / <a href="index.html">mat
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">7x</span>
<span class="cline-any cline-yes">7x</span>
<span class="cline-any cline-yes">10x</span>
<span class="cline-any cline-yes">4x</span>
<span class="cline-any cline-yes">4x</span>
<span class="cline-any cline-yes">4x</span>
<span class="cline-any cline-yes">4x</span>
<span class="cline-any cline-yes">7x</span>
<span class="cline-any cline-yes">7x</span>
<span class="cline-any cline-yes">10x</span>
<span class="cline-any cline-yes">5x</span>
<span class="cline-any cline-yes">5x</span>
<span class="cline-any cline-yes">7x</span>
<span class="cline-any cline-yes">7x</span>
<span class="cline-any cline-yes">10x</span>
<span class="cline-any cline-yes">15x</span>
<span class="cline-any cline-yes">15x</span>
<span class="cline-any cline-yes">13x</span>
<span class="cline-any cline-yes">13x</span>
<span class="cline-any cline-yes">15x</span>
<span class="cline-any cline-yes">15x</span>
<span class="cline-any cline-yes">15x</span>
<span class="cline-any cline-yes">6x</span>
<span class="cline-any cline-yes">6x</span>
<span class="cline-any cline-yes">6x</span>
Expand All @@ -219,6 +228,7 @@ <h1><a href="../../../../../index.html">All files</a> / <a href="index.html">mat
<span class="cline-any cline-yes">15x</span>
<span class="cline-any cline-yes">7x</span>
<span class="cline-any cline-yes">7x</span>
<span class="cline-any cline-yes">7x</span>
<span class="cline-any cline-yes">10x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
Expand Down Expand Up @@ -246,7 +256,7 @@ <h1><a href="../../../../../index.html">All files</a> / <a href="index.html">mat
'use strict';
&nbsp;
/**
* Computes the greatest common divisor (gcd) of two single-precision floating point numbers using the binary GCD algorithm and bitwise operations.
* Computes the greatest common divisor (gcd) of two single-precision floating-point numbers using the binary GCD algorithm and bitwise operations.
*
* ## References
*
Expand Down Expand Up @@ -274,22 +284,26 @@ <h1><a href="../../../../../index.html">All files</a> / <a href="index.html">mat
if ( b === 0 ) {
return a;
}
&nbsp;
// Reduce `a` and/or `b` to odd numbers and keep track of the greatest power of 2 dividing both `a` and `b`...
while ( (a &amp; 1) === 0 &amp;&amp; (b &amp; 1) === 0 ) {
while ( ( a &amp; 1 ) === 0 &amp;&amp; ( b &amp; 1 ) === 0 ) {
a &gt;&gt;&gt;= 1; // right shift
b &gt;&gt;&gt;= 1; // right shift
k += 1;
}
&nbsp;
// Reduce `a` to an odd number...
while ( (a &amp; 1) === 0 ) {
while ( ( a &amp; 1 ) === 0 ) {
a &gt;&gt;&gt;= 1; // right shift
}
&nbsp;
// Henceforth, `a` is always odd...
while ( b ) {
// Remove all factors of 2 in `b`, as they are not common...
while ( (b &amp; 1) === 0 ) {
while ( ( b &amp; 1 ) === 0 ) {
b &gt;&gt;&gt;= 1; // right shift
}
&nbsp;
// `a` and `b` are both odd. Swap values such that `b` is the larger of the two values, and then set `b` to the difference (which is even)...
if ( a &gt; b ) {
t = b;
Expand All @@ -298,6 +312,7 @@ <h1><a href="../../../../../index.html">All files</a> / <a href="index.html">mat
}
b -= a; // b=0 iff b=a
}
&nbsp;
// Restore common factors of 2...
return a &lt;&lt; k;
}
Expand All @@ -313,7 +328,7 @@ <h1><a href="../../../../../index.html">All files</a> / <a href="index.html">mat
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2024-11-11T15:20:25.784Z
at 2024-11-17T09:32:57.284Z
</div>
<script src="../../../../../prettify.js"></script>
<script>
Expand Down
1 change: 1 addition & 0 deletions math/base/special/gcdf/coverage.ndjson
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
[336,336,100,53,53,100,4,4,100,336,336,100,"f8bcfd832483d46068c710b6854d5f97bcb778fd","2024-11-11 10:18:16 -0500"]
[346,346,100,53,53,100,4,4,100,346,346,100,"163a3e7fa2c7429f88b2dd69df42572f9ff0af9d","2024-11-17 01:29:47 -0800"]
14 changes: 7 additions & 7 deletions math/base/special/gcdf/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ <h1><a href="../../../../../index.html">All files</a> math/base/special/gcdf/lib
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>336/336</span>
<span class='fraction'>346/346</span>
</div>


Expand All @@ -46,7 +46,7 @@ <h1><a href="../../../../../index.html">All files</a> math/base/special/gcdf/lib
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>336/336</span>
<span class='fraction'>346/346</span>
</div>


Expand Down Expand Up @@ -84,13 +84,13 @@ <h1><a href="../../../../../index.html">All files</a> math/base/special/gcdf/lib
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="81" class="abs high">81/81</td>
<td data-value="86" class="abs high">86/86</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="15" class="abs high">15/15</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="1" class="abs high">1/1</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="81" class="abs high">81/81</td>
<td data-value="86" class="abs high">86/86</td>
</tr>

<tr>
Expand All @@ -99,13 +99,13 @@ <h1><a href="../../../../../index.html">All files</a> math/base/special/gcdf/lib
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="81" class="abs high">81/81</td>
<td data-value="86" class="abs high">86/86</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="15" class="abs high">15/15</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="1" class="abs high">1/1</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="81" class="abs high">81/81</td>
<td data-value="86" class="abs high">86/86</td>
</tr>

<tr>
Expand Down Expand Up @@ -161,7 +161,7 @@ <h1><a href="../../../../../index.html">All files</a> math/base/special/gcdf/lib
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2024-11-11T15:20:25.784Z
at 2024-11-17T09:32:57.284Z
</div>
<script src="../../../../../prettify.js"></script>
<script>
Expand Down
4 changes: 2 additions & 2 deletions math/base/special/gcdf/index.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ <h1><a href="../../../../../index.html">All files</a> / <a href="index.html">mat
'use strict';
&nbsp;
/**
* Compute the greatest common divisor (gcd) of two single-precision floating point numbers.
* Compute the greatest common divisor (gcd) of two single-precision floating-point numbers.
*
* @module @stdlib/math/base/special/gcdf
*
Expand All @@ -190,7 +190,7 @@ <h1><a href="../../../../../index.html">All files</a> / <a href="index.html">mat
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2024-11-11T15:20:25.784Z
at 2024-11-17T09:32:57.284Z
</div>
<script src="../../../../../prettify.js"></script>
<script>
Expand Down
4 changes: 2 additions & 2 deletions math/base/special/gcdf/main.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ <h1><a href="../../../../../index.html">All files</a> / <a href="index.html">mat
// MAIN //
&nbsp;
/**
* Computes the greatest common divisor (gcd) of two single-precision floating point numbers.
* Computes the greatest common divisor (gcd) of two single-precision floating-point numbers.
*
* @param {integer} a - first number
* @param {integer} b - second number
Expand Down Expand Up @@ -319,7 +319,7 @@ <h1><a href="../../../../../index.html">All files</a> / <a href="index.html">mat
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2024-11-11T15:20:25.784Z
at 2024-11-17T09:32:57.284Z
</div>
<script src="../../../../../prettify.js"></script>
<script>
Expand Down
4 changes: 2 additions & 2 deletions math/base/special/gcdf/native.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ <h1><a href="../../../../../index.html">All files</a> / <a href="index.html">mat
// MAIN //
&nbsp;
/**
* Computes the greatest common divisor (gcd) of two single-precision floating point numbers.
* Computes the greatest common divisor (gcd) of two single-precision floating-point numbers.
*
* @private
* @param {number} a - first number
Expand Down Expand Up @@ -223,7 +223,7 @@ <h1><a href="../../../../../index.html">All files</a> / <a href="index.html">mat
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2024-11-11T15:20:25.784Z
at 2024-11-17T09:32:57.284Z
</div>
<script src="../../../../../prettify.js"></script>
<script>
Expand Down

0 comments on commit 50b1145

Please sign in to comment.