Sha256: 545699f47f032f442b29c0052859e1775db8a61b046fd27cfb95d5efe850ac3c

Contents?: true

Size: 127 Bytes

Versions: 22

Compression:

Stored size: 127 Bytes

Contents

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

a = GSL::Complex.rect(1, 2)

p 2 + a
p 2 - a
p 2*a

p a - 3
p a * 3

p 2.0/a  # 0.4 - 0.8i

Version data entries

22 entries across 22 versions & 4 rubygems

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