/usr/share/doc/ruby-gsl/examples/complex/mul.rb is in ruby-gsl 1.16.0.6+dfsg1-2build1.
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 | #!/usr/bin/env ruby
require 'gsl'
a = GSL::Complex.rect(1, 2)
b = GSL::Complex[3, 4]
p a*b # -5 + 10i
p a.mul(b)
p a
p a.div(b)
p a
a *= b
p a
a /= b
p a
p a.mul(2)
p a.mul_real(2)
p a.div_real(2)
p a.conjugate
p a.inverse
p 1.0/a
p a.negative
p -a
|