/usr/share/doc/ruby-gsl/examples/math/functions.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 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | #!/usr/bin/env ruby
require("gsl")
puts("gsl_log1p")
p GSL::log1p(0.1)
a = GSL::Vector.alloc(0.1, 1, 2, 3, 4)
p GSL::log1p(a)
b = GSL::Matrix.alloc([1, 2], [3, 4])
p GSL::log1p(b)
exit
puts("gsl_expm1")
p GSL::expm1(0.1)
p Math::exp(0.1) - 1.0
puts("gsl_hypot")
p GSL::hypot(20000, 30000)
p Math::sqrt(20000*20000 + 30000*30000)
puts("gsl_acosh")
p GSL::acosh(1.5)
p Math::acosh(1.5)
puts("gsl_asinh")
p GSL::asinh(1.5)
p Math::asinh(1.5)
puts("gsl_atanh")
p GSL::atanh(0.5)
p Math::atanh(0.5)
puts("gsl_ldexp")
p GSL::ldexp(1.5, 8)
p Math::ldexp(1.5, 8)
puts("gsl_frexp")
p GSL::frexp(100)
p Math::frexp(100)
|