Commit Graph

21 Commits (master)

Author SHA1 Message Date
Zaahir Moolla 28d2459d4b
Factors & Prime Factors: Limit input size to <= 1M (#4669)
* Limit input size to Factors IA

* Limit input size of PrimeFactors Goodie
2018-11-28 13:02:26 -05:00
Kyle Daruwalla 9e44abe1b4 PrimeFactors: Improve triggering (#4149)
* PrimeFactors: Improve triggering
- Added check to regex guard if query matches form "is <number> prime"
- Strips all preceeding non-digit characters from remainder

Fixes #2799

* Added support for new triggers:
- 'is <number> a prime'
- 'is <number> a prime number'
- 'is <number> prime number'
2017-05-05 17:57:48 -04:00
Ben Moon 83b9bbd6b7 Fix newline at end of file 2016-05-16 14:19:39 +01:00
Ben Moon 5f85cf4121 Update Goodies to use Test::Deep
* Ensure Test::Deep is imported.

* Replace '-ANY-' with ignore()

* Replace regexes with re(...)
2016-05-16 14:07:57 +01:00
Zaahir Moolla 621a5f4f71 Remove bignum from is_cached in PrimeFactors.t 2016-03-29 22:17:31 -04:00
Zach Thompson 73d8f72fc0 Remove id/name from Perl modules and tests 2016-03-18 11:49:33 -06:00
Zach Thompson c30042a504 Use the same bignum/int pragmas in the tests for Test::Deep 2016-01-21 10:22:36 -07:00
ettienne abb04e311e Output altered 2015-07-23 10:12:14 +00:00
ettienne 087596eeb3 Subtitle and tests altered and html removed 2015-07-22 10:30:28 +00:00
ettienne 9163eca0bd Error fixed 2015-07-21 07:08:08 +00:00
ettienne 66cf1f87a5 Templates used and tests altered 2015-07-21 06:36:54 +00:00
Matt Miller da70710f7d EOL: remove trailing whitespace. 2014-10-28 20:36:15 +02:00
Matt Miller c7dcd15801 PrimeFactors: add 'factorize'and 'prime factorize' triggers.
Intended to resolve issue #383.

- Add 'factorize' and 'prime factorize' triggers.
- Use 'factorize 128' as a secondary example query.
- Add minimal tests for new triggers.
2014-04-20 09:46:51 +08:00
Jag Talon 51824d2766 PrimeFactors: Added new features:
- Use `factor_exp` instead of `factor`.
- Add commify to format the input.
- Add exponents to the primes. It's much easier to read.
2014-03-30 13:40:57 -04:00
Jag Talon 03d95d156f PrimeFactors: Add additional triggers.
Add "factorization of n", "prime factorization of", and "prime factorization".
2014-03-26 23:28:17 -04:00
Jag Talon 005effeb55 PrimeFactors: Change the wording of the result.
- If there are more than one factors say, "The prime factors of __ are __."
- If there is only one factor say, "The number __ is a prime."
2014-03-26 00:43:19 -04:00
Jag Talon 7a2fb40f63 PrimeFactors: Change colon to 'is'. 2014-03-26 00:27:34 -04:00
Jag Talon 8e2b76d551 t/PrimeFactors.t: Update tests. 2014-03-26 00:14:40 -04:00
Eric Johnson 9c29b27338 Added tests for example queries which are not currently tested.
Conflicts:

	t/TimezoneConverter.t
2014-02-10 21:36:14 +00:00
austinheimark b6c9ff764d Added link to wiki page of prime factors 2013-05-19 12:33:53 -04:00
austinheimark 85e961be1d Inital commit of prime factors goodie 2013-05-15 11:15:50 -04:00