[#408634] How do I make lots of classes aware of each other? — "Andrew S." <lists@...>

I'm apparently missing something fundamental in my knowledge of classes

10 messages 2013/07/02

[#408712] Ruby web service with REST support — "Shubhada S." <lists@...>

Hi All,

17 messages 2013/07/05

[#408812] create variables depending on counter — stefan heinrich <lists@...>

Hi community,

21 messages 2013/07/09

[#408854] execute commands within SMTP email code: send content in variables and not actual variables — dJD col <lists@...>

I am trying to send an email using the code below. I am able to send the

9 messages 2013/07/10

[#409031] tap { break } idiom deserves its own Kernel method? — Andy Lowry <lists@...>

I use this idiom from time to time:

13 messages 2013/07/22

[#409072] Link To Masses Of External Data In Openoffice? — "Austin J." <lists@...>

This is what I want to do.

19 messages 2013/07/23
[#409102] Re: Link To Masses Of External Data In Openoffice? — Tamara Temple <tamouse.lists@...> 2013/07/24

[#409103] Re: Link To Masses Of External Data In Openoffice? — "Austin J." <lists@...> 2013/07/25

tamouse m. wrote in post #1116598:

[#409122] Re: Link To Masses Of External Data In Openoffice? — Tamara Temple <tamouse.lists@...> 2013/07/26

[#409142] Re: Link To Masses Of External Data In Openoffice? — "Austin J." <lists@...> 2013/07/26

tamouse m. wrote in post #1116750:

[#409073] class <=> module — Bráulio Bhavamitra <lists@...>

Hello all,

17 messages 2013/07/23

[#409104] Ruby newbie question on Methods (NoMethoderror) — "Crispian A." <lists@...>

I have recently started learning ruby and so I am writing a small little

10 messages 2013/07/25

[#409170] Working through Ch.10 for learning to program 2.0 (Chris Pine) — JD JD <lists@...>

So, I have been working through this book, and have been doing ok up

33 messages 2013/07/28
[#409195] Re: Working through Ch.10 for learning to program 2.0 (Chris Pine) — Harry Kakueki <list.push@...> 2013/07/29

I tried this and came up with a one-liner that seems to do it. It sorts the

[#409258] WATIR - ScriptError popup on IE - Unable to get rid of! — Graeme Halls <lists@...>

I am new to Ruby & Watir, and I am having a nightmare with IE and Script

11 messages 2013/07/31

Re: Faster primality testing and factorization methods in Ruby

From: Kiswono Prayogo <kiswono@...>
Date: 2013-07-30 04:25:56 UTC
List: ruby-talk #409217
hmm.. when i tried your code from your github link, this shows up:

$ ruby /tmp/primeszp.rb
/tmp/primeszp.rb:44: warning: assigned but unused variable - rescnt
/tmp/primeszp.rb:85: warning: assigned but unused variable - rescnt
/tmp/primeszp.rb:119: warning: assigned but unused variable - rescnt
/tmp/primeszp.rb:159: warning: assigned but unused variable - rescnt
/tmp/primeszp.rb:165: warning: assigned but unused variable - modk
/tmp/primeszp.rb:212: warning: shadowing outer local variable - p
Rehearsal
-------------------------------------------------------------------------
prime tests for P = 20000000000000003   0.000000   0.000000   0.000000 (
 0.000011)
Miller-Rabin                            0.000000   0.000000   0.000000 (
 0.009361)
primzp7?                             ^C

$ jruby /tmp/primeszp.rb
Rehearsal
-------------------------------------------------------------------------
prime tests for P = 20000000000000003   0.020000   0.000000   0.020000 (
 0.002000)
Miller-Rabin                            0.490000   0.030000   0.520000 (
 0.744000)
primzp7?                             ^C

---> hangs or too slow on both ruby 2.0 and jruby 1.7.4, so i ctrl+C it
after 10 seconds...

i'm using archlinux, amd c-60

On Thu, Jun 27, 2013 at 10:48 AM, Jabari Z. <lists@ruby-forum.com> wrote:

> I have created various implementations of methods to replace prime? and
> prime_division (from the standard lib file prime.rb) based on a class of
> mathematical operators I've developed called prime generators (PG).Using
> a special form of these PG I term Strictly Prime (SP) prime generators I
> have created extremely simple and fast algorithms that can find all the
> primes up to some number n, determine the primality of n, or
> factorization.
>
> Below are links to the paper which provides the mathematical basis for
> the proposed methods with two tables of benchmark results comparing the
> performance of the library methods prime? and prime_division with my
> proposed methods. I provide test results on 32-bit and 64-bit Linux
> systems using 5 reference primes of 17 to 19 digits.
>
> My paper, 'Improved Primality Testing and Factorization in Ruby'
>
> http://www.scribd.com/doc/150217723/Improved-Primality-Testing-and-Factorization-in-Ruby
>
> The code rile 'primeszp.rb' is available in my github repository:
> https://gist.github.com/jzakiya/455f2357cdb08f4ee1c4
>
> Attachments:
>
> http://www.ruby-forum.com/attachment/8542/Improved_Primality_Testing_and_Factorization_in_Ruby.pdf
> http://www.ruby-forum.com/attachment/8543/primeszp.rb
>
>
>

In This Thread