Sha256: 29aefcda22d140274456222f6a41b8ec5d65d5c4e86a9addcc0b76fb9c608e83

Contents?: true

Size: 417 Bytes

Versions: 1

Compression:

Stored size: 417 Bytes

Contents

# -*- coding: utf-8 -*-
require "sixarm_ruby_ramp_test"
require "sixarm_ruby_ramp/math"

class MathTest < Minitest::Test

  def test_ln
    assert_equal(0.0,Math.ln(1.0))
    assert_equal(1.0,Math.ln(Math.exp(1.0)))
  end

  def test_logn
    assert_equal(1.0,Math.logn(3,3),'log of 3 base 3')
    assert_equal(2.0,Math.logn(9,3),'log of 9 base 3')
    assert_equal(3.0,Math.logn(27,3),'log of 27 base 3')
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sixarm_ruby_ramp-4.2.4 test/sixarm_ruby_ramp_test/math_test.rb