Skip to content

Commit

Permalink
build: add backslashes and always include a sign
Browse files Browse the repository at this point in the history
  • Loading branch information
Planeshifter committed Aug 4, 2023
1 parent bf4e05f commit f816a7a
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 7 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/scripts/run_tests_coverage
Original file line number Diff line number Diff line change
Expand Up @@ -122,18 +122,18 @@ compare_cov() {

if [ "$old_cov_value" == 0 ]; then
new_cov_percentage=$(awk "BEGIN {printf \"%.2f\", $new_cov_value*100}")
echo "\$\\\\\\\\color{green}+$new_cov_percentage\\\\\\\\%\$"
echo "\$\\\\\\\\color{green}+$new_cov_percentage\\\\\\\\\\\\\\\\%\$"
else
percentage_change=$(awk "BEGIN {printf \"%.2f\", (($new_cov_value - $old_cov_value) / $old_cov_value) * 100}")
color="green"
sign=""
if [ $(awk "BEGIN {if ($percentage_change > 0) print 1; else print 0}") -eq 1 ]; then
if [ $(awk "BEGIN {if ($percentage_change >= 0) print 1; else print 0}") -eq 1 ]; then
sign="+"
elif [ $(awk "BEGIN {if ($percentage_change < 0) print 1; else print 0}") -eq 1 ]; then
sign="-"
color="red"
fi
echo "\$\\\\\\\\color{$color}$sign$percentage_change\\\\\\\\%\$"
echo "\$\\\\\\\\color{$color}$sign$percentage_change\\\\\\\\\\\\\\\\%\$"
fi
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ var ln = require( '@stdlib/math/base/special/ln' );
*
* which proves that \\(N\\) is a geometric random variable.
*
*
* @private
* @param {PRNG} rand - PRNG for uniformly distributed numbers
* @param {Probability} p - success probability
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ var factory = require( './factory.js' );
*
* The basic Ziggurat method works as follows:
*
*
* ```tex
* x_{C-1}(r) \left[ f(0) - f\left( x_{C-1}(r) \right) \right] - V(r) = 0
* ```
Expand Down Expand Up @@ -61,7 +60,6 @@ var factory = require( './factory.js' );
* - Marsaglia, George, and Wai Wan Tsang. 2000. "The Ziggurat Method for Generating Random Variables." _Journal of Statistical Software_ 5 (1): 1–7. doi:[10.18637/jss.v005.i08](http://dx.doi.org/10.18637/jss.v005.i08).
* - Marsaglia, George. 1964. "Generating a Variable from the Tail of the Normal Distribution." _Technometrics_ 6 (1): 101–2. doi:[10.1080/00401706.1964.10490150](http://dx.doi.org/10.1080/00401706.1964.10490150).
*
*
* @name randn
* @type {PRNG}
* @returns {number} pseudorandom number
Expand Down
1 change: 0 additions & 1 deletion lib/node_modules/@stdlib/random/base/invgamma/lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ var factory = require( './factory.js' );
*
* Hence, to generate a draw from an inverse gamma distribution with parameters \\( \alpha \\) and \\( \beta \\), sample `X` from a \\( \operatorname{Gamma}\left( \alpha, \tfrac{1}{\beta} \right) \\) distribution and return `1/X`.
*
*
* @name invgamma
* @type {PRNG}
* @param {PositiveNumber} alpha - shape parameter
Expand Down

1 comment on commit f816a7a

@stdlib-bot
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage Report

Package Statements Branches Functions Lines
random/base/geometric $\color{red}472/475$
$\color{green}+99.37\%$
$\color{red}47/48$
$\color{green}+97.92\%$
$\color{green}11/11$
$\color{green}+100.00\%$
$\color{red}472/475$
$\color{green}+99.37\%$
random/base/improved-ziggurat $\color{green}647/647$
$\color{green}+100.00\%$
$\color{green}58/58$
$\color{green}+100.00\%$
$\color{green}13/13$
$\color{green}+100.00\%$
$\color{green}647/647$
$\color{green}+100.00\%$
random/base/invgamma $\color{green}462/462$
$\color{green}+100.00\%$
$\color{green}53/53$
$\color{green}+100.00\%$
$\color{green}11/11$
$\color{green}+100.00\%$
$\color{green}462/462$
$\color{green}+100.00\%$

The above coverage report was generated for the changes in this push.

Please sign in to comment.