/usr/share/doc/ruby-gsl/examples/math/test.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 | #!/usr/bin/env ruby
require("gsl")
puts("sign of 5.0")
p GSL::SIGN(5.0)
puts("sign of -2.0")
p GSL::SIGN(-2.0)
puts("sign of 0: positive")
p GSL::SIGN(0)
puts("Is 1 odd?")
p GSL::IS_ODD(1)
p GSL::IS_ODD?(1)
puts("Is 1 even?")
p GSL::IS_EVEN(1)
p GSL::IS_EVEN?(1)
puts("Is 4 odd?")
p GSL::IS_ODD(4)
p GSL::IS_ODD?(4)
puts("Is 4 even?")
p GSL::IS_EVEN(4)
p GSL::IS_EVEN?(4)
puts("frcmp")
p GSL::fcmp(1.0, 1.0, 1e-10)
p GSL::fcmp(1.1, 1.0, 1e-10)
p GSL::fcmp(1.0, 1.1, 1e-10)
|