Files
news.gitea.happylizard.me/bin/gems/facets-3.1.0/test/standard/math/test_cosech.rb
T
pizza2d1 4cee170d66
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 9s
Add bin and edit workflow
2026-09-16 13:11:16 -06:00

20 lines
512 B
Ruby

require 'facets/math/cosech'
test_case Math do
class_method :cosech do
test do
Math.cosech(-1.0).assert == 1.0 / Math.sinh(-1.0)
Math.cosech( 1.0).assert == 1.0 / Math.sinh( 1.0)
end
test "check complementarity of cosech and sinh" do
(Math.cosech(-2.0) * Math.sinh(-2.0)).assert == 1.0
(Math.cosech(-1.0) * Math.sinh(-1.0)).assert == 1.0
(Math.cosech( 1.0) * Math.sinh( 1.0)).assert == 1.0
(Math.cosech( 2.0) * Math.sinh( 2.0)).assert == 1
end
end
end