Category:Wren-ecm: Difference between revisions
(Created page for 'Wren-ecm' module.) |
m (Now using internal links to related pages.) |
||
Line 2: | Line 2: | ||
'''Wren-ecm''' is a module which adds support for factorizing integers using [https://en.wikipedia.org/wiki/Lenstra_elliptic-curve_factorization Lenstra's elliptical curve method (ECM)] to the Wren programming language. It consists of a single class: Ecm whose methods are all static, plus some supporting constants. |
'''Wren-ecm''' is a module which adds support for factorizing integers using [https://en.wikipedia.org/wiki/Lenstra_elliptic-curve_factorization Lenstra's elliptical curve method (ECM)] to the Wren programming language. It consists of a single class: Ecm whose methods are all static, plus some supporting constants. |
||
It requires [ |
It requires [[:Category:Wren-gmp|''Wren-gmp'']] to run and so is only currently available in embedded scripts and does not run under Wren-cli. |
||
It is the thirtieth in a series of modules (listed on the language's [ |
It is the thirtieth in a series of modules (listed on the language's [[:Category:Wren|main page]]) designed to assist with writing Rosetta Code tasks so the same code does not have to be written or copy/pasted time and time again thereby bloating a task's script code unnecessarily. |
||
To use it you need to copy the source code (in the [ |
To use it you need to copy the source code (in the [[:Category_talk:Wren-ecm|talk page]]) to a text file called ''ecm.wren'' and place this in the same directory as the importing script so the Wren-gmp executable can find it. |
||
As intimated earlier there is a dependency on the ''Wren-gmp'' (and hence ''Wren-trait'') modules which also need to be copied to the same directory. Although you will certainly need to use ''Wren-gmp'''s Mpz class with this module it can in fact be imported via Wren-ecm itself. |
As intimated earlier there is a dependency on the ''Wren-gmp'' (and hence ''Wren-trait'') modules which also need to be copied to the same directory. Although you will certainly need to use ''Wren-gmp'''s Mpz class with this module it can in fact be imported via Wren-ecm itself. |
Latest revision as of 15:32, 9 May 2023
This is an example of a library. You may see a list of other libraries used on Rosetta Code at Category:Solutions by Library.
Wren-ecm is a module which adds support for factorizing integers using Lenstra's elliptical curve method (ECM) to the Wren programming language. It consists of a single class: Ecm whose methods are all static, plus some supporting constants.
It requires Wren-gmp to run and so is only currently available in embedded scripts and does not run under Wren-cli.
It is the thirtieth in a series of modules (listed on the language's main page) designed to assist with writing Rosetta Code tasks so the same code does not have to be written or copy/pasted time and time again thereby bloating a task's script code unnecessarily.
To use it you need to copy the source code (in the talk page) to a text file called ecm.wren and place this in the same directory as the importing script so the Wren-gmp executable can find it.
As intimated earlier there is a dependency on the Wren-gmp (and hence Wren-trait) modules which also need to be copied to the same directory. Although you will certainly need to use Wren-gmp's Mpz class with this module it can in fact be imported via Wren-ecm itself.
Wren-ecm also has a dependency on the Random module which is an optional part of Wren's standard library.