The Great Computer Language Shootout shootout.alioth.debian.org/
contributed by Gabriele Renzi
Methods
Class Public methods
new()
Link
Source: show
# File benchmark/bm_so_pidigits.rb, line 8 def initialize() @z = Transformation.new 1,0,0,1 @x = Transformation.new 0,0,0,0 @inverse = Transformation.new 0,0,0,0 end
Instance Public methods
consume(a)
Link
Source: show
# File benchmark/bm_so_pidigits.rb, line 33 def consume(a) @z.compose(a) end
next!()
Link
Source: show
# File benchmark/bm_so_pidigits.rb, line 14 def next! @y = @z.extract(3) if safe? @y @z = produce(@y) @y else @z = consume @x.next!() next!() end end