Sha256: bb6669bf98f75618a89a241d87d71707dfb4d02b8a086197c2c79b7d75f3de26

Contents?: true

Size: 227 Bytes

Versions: 22

Compression:

Stored size: 227 Bytes

Contents

#!/usr/bin/env ruby
require('gsl')

poly = GSL::Poly.alloc(-1, 0, 0, 0, 0, 1)

w = GSL::Poly::Complex::Workspace.alloc(6)
z = poly.solve(w)

for i in 0...5 do
  printf("z%d = %+.18f %+.18f\n", i, z[i].re, z[i].im)
end

__END__

Version data entries

22 entries across 22 versions & 4 rubygems

Version Path
gsl-2.1.0.3 examples/poly/poly.rb
gsl-2.1.0.2 examples/poly/poly.rb
gsl-2.1.0.1 examples/poly/poly.rb
gsl-2.1.0 examples/poly/poly.rb
gsl-1.16.0.6 examples/poly/poly.rb
rb-gsl-1.16.0.5 examples/poly/poly.rb
rb-gsl-1.16.0.4 examples/poly/poly.rb
rb-gsl-1.16.0.3 examples/poly/poly.rb
rb-gsl-1.16.0.3.rc1 examples/poly/poly.rb
gsl-nmatrix-1.15.3.2 examples/poly/poly.rb
gsl-nmatrix-1.15.3.1 examples/poly/poly.rb
rb-gsl-1.16.0.2 examples/poly/poly.rb
rb-gsl-1.16.0.1 examples/poly/poly.rb
rb-gsl-1.16.0 examples/poly/poly.rb
rb-gsl-1.15.3.2 examples/poly/poly.rb
rb-gsl-1.15.3.1 examples/poly/poly.rb
blackwinter-gsl-1.15.3.2 examples/poly/poly.rb
gsl-nmatrix-1.15.3.0 examples/poly/poly.rb
gsl-1.15.3 examples/poly/poly.rb
gsl-1.14.7 examples/poly/poly.rb