Sha256: 58a54f50386bb48691ead75bc7f9216fa1c6d9ac7bf8bba9025624bac4ea4705
Contents?: true
Size: 272 Bytes
Versions: 16
Compression:
Stored size: 272 Bytes
Contents
#!/usr/bin/env ruby require("gsl") include GSL include Math f = Function.alloc { |x| Math::sin(x)/x } p f.qng(0, 2.0*Math::PI) # Singular at x = 0 f2 = Function.alloc { |x| exp(-x)/sqrt(x) } # This will fail... #p f2.qng(0, 1) p Integration.qng(f, [0, 2*Math::PI])
Version data entries
16 entries across 16 versions & 4 rubygems