/usr/share/doc/ruby-gsl/examples/sf/laguerre.rb is in ruby-gsl 2.1.0.3+dfsg1-1build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | #!/usr/bin/env ruby
require("gsl")
x = GSL::Vector.linspace(0, 5, 40)
e = GSL::Sf::exp(-x/2)
a = 0
IO.popen("graph -T X -C -g 3 -L 'Laguerre functions'", "w") do |io|
for n in 0..5 do
for i in 0...20 do
y = GSL::Sf::laguerre_n(n, a, x[i])*e[i]
io.printf("%e %e\n", x[i], y)
end
io.printf("\n")
end
end
|