Category:Wren-ecm: Difference between revisions

From Rosetta Code
Content added Content deleted
(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 [https://rosettacode.org/wiki/Category:Wren-gmp ''Wren-gmp''] to run and so is only currently available in embedded scripts and does not run under Wren-cli.
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 [https://rosettacode.org/wiki/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.
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 [https://rosettacode.org/wiki/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.
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

Library
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.

Pages in category "Wren-ecm"

This category contains only the following page.