Sha256: 4ba048b4c626123b2c86741feca3cd98f3b3f59e6265f2a75d0881a43704ee34

Contents?: true

Size: 630 Bytes

Versions: 26

Compression:

Stored size: 630 Bytes

Contents

#!/usr/bin/env ruby

require 'gmp'

pi = GMP::F.new(1).asin * 2

a = GMP::F.new 0
b = pi / 4
c = pi / 2
d = -pi / 2

print "cos:\n"
[a,b,c,d].map{|x| p x.cos}

print "sin:\n"
[a,b,c,d].map{|x| p x.sin}

print "tan:\n"
[a,b,c,d].map{|x| p x.tan}

print "cosh:\n"
[a,b,c,d].map{|x| p x.cosh}

print "sinh:\n"
[a,b,c,d].map{|x| p x.sinh}

print "tanh:\n"
[a,b,c,d].map{|x| p x.tanh}


print "inverses:\n"
[a,b,c,d].map{|x| p [x,x.cos.acos] }
[a,b,c,d].map{|x| p [x,x.sin.asin] }
[a,b,c,d].map{|x| p [x,x.tan.atan] }
[a,b,c,d].map{|x| p [x,x.cosh.acosh] }
[a,b,c,d].map{|x| p [x,x.sinh.asinh] }
[a,b,c,d].map{|x| p [x,x.tanh.atanh] }

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
gmp-0.7.43 test/test-21.rb
gmp-0.7.19 test/test-21.rb
gmp-0.6.47 test/test-21.rb
gmp-0.6.43 test/test-21.rb
gmp-0.6.41 test/test-21.rb
gmp-0.6.31 test/test-21.rb
gmp-0.6.19 test/test-21.rb
gmp-0.6.17 test/test-21.rb
gmp-0.6.13 test/test-21.rb
gmp-0.6.7 test/test-21.rb
gmp-0.5.47 test/test-21.rb
gmp-0.5.41 test/test-21.rb
gmp-0.5.41-x86-mingw32 test/test-21.rb
gmp-0.5.23 test/test-21.rb
gmp-0.5.23-x86-mingw32 test/test-21.rb
gmp-0.5.3 test/test-21.rb
gmp-0.5.3-x86-mingw32 test/test-21.rb
gmp-0.4.7-x86_64-linux test/test-21.rb
gmp-0.4.7 test/test-21.rb
gmp-0.4.7-x86-mingw32 test/test-21.rb