Sha256: 3bf42a8dbff13d2c8023d63516e707c28811a9342bb75aceada38c3d7d81dd6f

Contents?: true

Size: 614 Bytes

Versions: 9

Compression:

Stored size: 614 Bytes

Contents

#!/usr/bin/env ruby
# Ruby/GSL implementation of GSL "const/test.c"
require("gsl")
require("./gsl_test.rb")
include GSL::Test
include Math
include GSL::CONST

GSL::IEEE::env_setup()

c = MKSA::SPEED_OF_LIGHT
eps = MKSA::VACUUM_PERMITTIVITY
mu = MKSA::VACUUM_PERMEABILITY
GSL::Test.test_rel(c, 1.0/sqrt(eps*mu), 1e-6, "speed of light (mks)")

ly = CGSM::LIGHT_YEAR
c = CGSM::SPEED_OF_LIGHT
y = 365.2425 * CGSM::DAY
GSL::Test.test_rel(ly, c * y, 1e-6, "light year (cgs)")

micro = NUM::MICRO
mega = NUM::MEGA
kilo = NUM::KILO
GSL::Test.test_rel(mega/kilo, 1/(micro*kilo), 1e-10, "kilo (mega/kilo, 1/(micro*kilo))");

Version data entries

9 entries across 9 versions & 4 rubygems

Version Path
gsl-nmatrix-1.15.3.2 tests/const.rb
gsl-nmatrix-1.15.3.1 tests/const.rb
rb-gsl-1.15.3.1 tests/const.rb
blackwinter-gsl-1.15.3.2 tests/const.rb
gsl-nmatrix-1.15.3.0 tests/const.rb
gsl-1.15.3 tests/const.rb
gsl-1.14.7 tests/const.rb
gsl-1.14.6 tests/const.rb
gsl-1.14.5 tests/const.rb