|
From: | Arun Giridhar |
Subject: | [Octave-bug-tracker] [bug #61312] Extending isprime() with Miller-Rabin test |
Date: | Sun, 17 Oct 2021 14:03:24 -0400 (EDT) |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0 |
Follow-up Comment #8, bug #61312 (project octave): Patch 7 attached. Only edits to documentation this time, not code. New stress test / benchmark and results: n = intmax("uint64") - (0:999); ## 1000 largest 64-bit integers tic; n = n(isprime(n)); toc Unpatched Octave: Elapsed time is 923.134 seconds. (and also takes 3.2 GB of memory.) Patched Octave: Elapsed time is 0.038898 seconds. In both cases the result is the same. There are 21 primes among the 1000 largest 64-bit integers: n = 18446744073709551557 18446744073709551533 18446744073709551521 18446744073709551437 18446744073709551427 18446744073709551359 18446744073709551337 18446744073709551293 18446744073709551263 18446744073709551253 18446744073709551191 18446744073709551163 18446744073709551113 18446744073709550873 18446744073709550791 18446744073709550773 18446744073709550771 18446744073709550719 18446744073709550717 18446744073709550681 18446744073709550671 Patch 7 attached with documentation edits. (file #52114) _______________________________________________________ Additional Item Attachment: File name: patch7.patch Size:9 KB <https://file.savannah.gnu.org/file/patch7.patch?file_id=52114> _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?61312> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/
[Prev in Thread] | Current Thread | [Next in Thread] |