Methods
C
E
N
Q
Attributes
[R] q
[R] r
[R] s
[R] t
Class Public methods
new(q, r, s, t)
# File benchmark/bm_so_pidigits.rb, line 41
def initialize (q, r, s, t)
    @q,@r,@s,@t,@k = q,r,s,t,0
end
Instance Public methods
compose(a)
# File benchmark/bm_so_pidigits.rb, line 57
def compose(a)
    self.class.new( @q * a.q,
                    @q * a.r + r * a.t,
                    @s * a.q + t * a.s,
                    @s * a.r + t * a.t
                )
end
extract(j)
# File benchmark/bm_so_pidigits.rb, line 53
def extract(j)
    (@q * j + @r) / (@s * j + @t)
end
next!()
# File benchmark/bm_so_pidigits.rb, line 45
def next!()
    @q = @k = @k + 1
    @r = 4 * @k + 2
    @s = 0
    @t = 2 * @k + 1
    self
end
qrst(*args)
# File benchmark/bm_so_pidigits.rb, line 65
def qrst *args
    initialize *args
    self
end