quadmath 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,75 @@
1
+ #ifndef RUBY_QUADMATH_ABI_H
2
+ #define RUBY_QUADMATH_ABI_H 1
3
+
4
+ #if defined(__cplusplus)
5
+ extern "C" {
6
+ #endif
7
+
8
+ // bigdecimal.cより拝借
9
+ #ifdef HAVE_RB_OPTS_EXCEPTION_P
10
+ int rb_opts_exception_p(VALUE opts, int default_value);
11
+ #define opts_exception_p(opts) rb_opts_exception_p((opts), 1)
12
+ #else
13
+ #include "missing/opts_exception_p.c"
14
+ #endif
15
+
16
+ #ifdef USE_GLOBAL_VARIABLE
17
+ # define RUBY_EXT_EXTERN
18
+ # define GLOBAL_VAL(v) = (v)
19
+ #else
20
+ # define RUBY_EXT_EXTERN extern
21
+ # define GLOBAL_VAL(v)
22
+ #endif
23
+
24
+ RUBY_EXT_EXTERN VALUE rb_cFloat128;
25
+ RUBY_EXT_EXTERN VALUE rb_cComplex128;
26
+ RUBY_EXT_EXTERN VALUE rb_mQuadMath;
27
+
28
+ /*
29
+ * C API: rb_float128_cf128(x)
30
+ *
31
+ * Cの__float128型をRubyのFloat128型オブジェクトへ変換する.
32
+ *
33
+ * @x ... __float128型
34
+ * @@retval ... 変換されたRubyのFloat128型
35
+ */
36
+ VALUE rb_float128_cf128(__float128);
37
+
38
+ /*
39
+ * C API: rb_float128_value(x)
40
+ *
41
+ * RubyのFloat128型より実体を取り出し渡す.
42
+ *
43
+ * @x ... Float128型.他の型を渡すとTypeErrorを出す.
44
+ * @@retval ... 取り出されたCの__float128型
45
+ */
46
+ __float128 rb_float128_value(VALUE);
47
+
48
+ /*
49
+ * C API: rb_complex128_cc128(z)
50
+ *
51
+ * Cの__complex128型をRubyのComplex128型オブジェクトへ変換する.
52
+ *
53
+ * @z ... __complex128型
54
+ * @@retval ... 変換されたRubyのComplex128型
55
+ */
56
+ VALUE rb_complex128_cc128(__complex128);
57
+
58
+ /*
59
+ * C API: rb_complex128_value(x)
60
+ *
61
+ * RubyのComplex128型より実体を取り出し渡す.
62
+ *
63
+ * @x ... Complex128型.他の型を渡すとTypeErrorを出す.
64
+ * @@retval ... 取り出されたCの__complex128型
65
+ */
66
+ __complex128 rb_complex128_value(VALUE);
67
+
68
+ #define MAKE_SYM(str) ID2SYM(rb_intern(str))
69
+
70
+ #if defined(__cplusplus)
71
+ }
72
+ #endif
73
+
74
+ #endif /* RUBY_QUADMATH_ABI_H */
75
+
Binary file
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module QuadMath
4
+ VERSION = "0.1.0"
5
+ end
data/lib/quadmath.rb ADDED
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "quadmath/version"
4
+ require_relative "quadmath/quadmath"
5
+
6
+ module QuadMath
7
+ # Your code goes here...
8
+ end
Binary file
@@ -0,0 +1,6 @@
1
+ module Ruby
2
+ module Quadmath
3
+ VERSION: String
4
+ # See the writing guide of rbs: https://github.com/ruby/rbs#guides
5
+ end
6
+ end
metadata ADDED
@@ -0,0 +1,70 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: quadmath
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - tribusonz-2
8
+ bindir: exe
9
+ cert_chain: []
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
+ dependencies: []
12
+ description: Quadmath library for Ruby.
13
+ email:
14
+ - xwisepp62543@gmail.com
15
+ executables: []
16
+ extensions:
17
+ - ext/quadmath/extconf.rb
18
+ extra_rdoc_files: []
19
+ files:
20
+ - CHANGELOG.md
21
+ - CODE_OF_CONDUCT.md
22
+ - LICENSE.txt
23
+ - README.md
24
+ - Rakefile
25
+ - ext/quadmath/complex128.c
26
+ - ext/quadmath/extconf.rb
27
+ - ext/quadmath/float128.c
28
+ - ext/quadmath/internal/rb_quadmath.h
29
+ - ext/quadmath/main.c
30
+ - ext/quadmath/missing/cerfcq.c
31
+ - ext/quadmath/missing/cerfq.c
32
+ - ext/quadmath/missing/cl2norm2q.c
33
+ - ext/quadmath/missing/clgammaq.c
34
+ - ext/quadmath/missing/ctgammaq.c
35
+ - ext/quadmath/missing/ool_quad2str.c
36
+ - ext/quadmath/missing/opts_exception_p.c
37
+ - ext/quadmath/numerable.c
38
+ - ext/quadmath/quadmath.c
39
+ - ext/quadmath/rb_quadmath.h
40
+ - lib/quadmath.rb
41
+ - lib/quadmath/quadmath.so
42
+ - lib/quadmath/version.rb
43
+ - pkg/quadmath-0.1.0.gem
44
+ - sig/ruby/quadmath.rbs
45
+ homepage: https://github.com/tribusonz-2/ruby-quadmath
46
+ licenses:
47
+ - MIT
48
+ metadata:
49
+ allowed_push_host: https://rubygems.org
50
+ homepage_uri: https://github.com/tribusonz-2/ruby-quadmath
51
+ source_code_uri: https://github.com/tribusonz-2/ruby-quadmath
52
+ changelog_uri: https://github.com/tribusonz-2/ruby-quadmath/changelog.md
53
+ rdoc_options: []
54
+ require_paths:
55
+ - lib
56
+ required_ruby_version: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - ">="
59
+ - !ruby/object:Gem::Version
60
+ version: 3.1.0
61
+ required_rubygems_version: !ruby/object:Gem::Requirement
62
+ requirements:
63
+ - - ">="
64
+ - !ruby/object:Gem::Version
65
+ version: '0'
66
+ requirements: []
67
+ rubygems_version: 3.7.2
68
+ specification_version: 4
69
+ summary: Quadmath for Ruby
70
+ test_files: []