Skip to content
This repository has been archived by the owner on Sep 29, 2023. It is now read-only.

Commit

Permalink
Fixed a few typos
Browse files Browse the repository at this point in the history
  • Loading branch information
b3s23love committed Nov 3, 2021
1 parent f56a2b9 commit 2a0318b
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 10 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/primesieve-master
git-commit.sh
/source.zip
/node_modules
File renamed without changes.
6 changes: 3 additions & 3 deletions deleglise-rivat/S0.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
Copyright © 2021 Jakub Drozd
For full notice see pi.js */
// Module import
const { mobiustabulator } = require('./utilities.js');
const { mobiustabulator } = require('../JSprimesieve/utilities.js');
// Function
const S0 = (x, y) => {
console.log('Calculating S0')
console.log('Calculating S0');
let mobiustable = mobiustabulator(y);
let total = 0;
for (let i = 0; i < y; i++) {
total += mobiustable[i] * Math.floor(x / (i + 1));
}
console.log('S0 calculated!');
return total;
}
};
// Module export
module.exports = S0;
2 changes: 1 addition & 1 deletion deleglise-rivat/U.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Copyright © 2021 Jakub Drozd
For full notice see pi.js */
// Module import
const { pitabulator, ersieve } = require('./utilities.js');
const { pitabulator, ersieve } = require('../JSprimesieve/utilities.js');
// Function
const U = (x, y) => {
console.log('Computing U...');
Expand Down
Empty file added deleglise-rivat/pi.js
Empty file.
8 changes: 6 additions & 2 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see https://www.gnu.org/licenses/.
E-mail: Kuba.drozd09@wp.pl */
// Import of modules
const pi = require('./deleglise-rivat/utilities.js');
const { pismall } = require('./JSprimesieve/utilities.js');
const { hideBin } = require('yargs/helpers');
const yargs = require('yargs');
const validators = require('./cmdvalidators.js');
Expand All @@ -30,6 +30,10 @@ const options = yargs(hideBin(process.argv))
}, argv => {
validators.xValidator(argv.x);
})
.option('n', {
alias: 'nth-prime',
description: 'Compute the n-th prime'
})
.help()
.alias('help', 'h')
.alias('version', 'v')
Expand All @@ -41,4 +45,4 @@ console.log('JSprimecount Copyright © 2021 Jakub Drozd');
console.log('This program comes with ABSOLUTELY NO WARRANTY; for details see https://github.com/JakubDrozd/JSprimecount/blob/main/LICENSE.txt.');
console.log('This is free software, and you are welcome to redistribute it under certain conditions; see the above link for details.');

console.log(pi.pismall(options.x));
console.log(pismall(options.x));
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Copyright © 2021 Jakub Drozd
For full notice see pi.js */
const assert = require('assert');
const utilities = require('../deleglise-rivat/utilities.js');
const utilities = require('../JSprimesieve/utilities.js');
const S0 = require('../deleglise-rivat/S0.js');
const S1 = require('../deleglise-rivat/S1.js');
const U = require('../deleglise-rivat/U.js');
Expand Down

0 comments on commit 2a0318b

Please sign in to comment.