Module: Numo::DFloat::Math
- Defined in:
- ext/numo/narray/types/dfloat.c
Class Method Summary collapse
-
.acos(x) ⇒ Numo::DFloat
Calculate acos(x).
-
.acosh(x) ⇒ Numo::DFloat
Calculate acosh(x).
-
.asin(x) ⇒ Numo::DFloat
Calculate asin(x).
-
.asinh(x) ⇒ Numo::DFloat
Calculate asinh(x).
-
.atan(x) ⇒ Numo::DFloat
Calculate atan(x).
-
.atan2(a1, a2) ⇒ Numo::DFloat
Calculate atan2(a1,a2).
-
.atanh(x) ⇒ Numo::DFloat
Calculate atanh(x).
-
.cbrt(x) ⇒ Numo::DFloat
Calculate cbrt(x).
-
.cos(x) ⇒ Numo::DFloat
Calculate cos(x).
-
.cosh(x) ⇒ Numo::DFloat
Calculate cosh(x).
-
.erf(x) ⇒ Numo::DFloat
Calculate erf(x).
-
.erfc(x) ⇒ Numo::DFloat
Calculate erfc(x).
-
.exp(x) ⇒ Numo::DFloat
Calculate exp(x).
-
.exp10(x) ⇒ Numo::DFloat
Calculate exp10(x).
-
.exp2(x) ⇒ Numo::DFloat
Calculate exp2(x).
-
.expm1(x) ⇒ Numo::DFloat
Calculate expm1(x).
-
.frexp(x) ⇒ Numo::DFloat, Numo::Int32
split the number x into a normalized fraction and an exponent.
-
.hypot(a1, a2) ⇒ Numo::DFloat
Calculate hypot(a1,a2).
-
.ldexp(a1, a2) ⇒ Numo::DFloat
Calculate ldexp(a1,a2).
-
.log(x) ⇒ Numo::DFloat
Calculate log(x).
-
.log10(x) ⇒ Numo::DFloat
Calculate log10(x).
-
.log1p(x) ⇒ Numo::DFloat
Calculate log1p(x).
-
.log2(x) ⇒ Numo::DFloat
Calculate log2(x).
-
.sin(x) ⇒ Numo::DFloat
Calculate sin(x).
-
.sinc(x) ⇒ Numo::DFloat
Calculate sinc(x).
-
.sinh(x) ⇒ Numo::DFloat
Calculate sinh(x).
-
.sqrt(x) ⇒ Numo::DFloat
Calculate sqrt(x).
-
.tan(x) ⇒ Numo::DFloat
Calculate tan(x).
-
.tanh(x) ⇒ Numo::DFloat
Calculate tanh(x).
Class Method Details
.acos(x) ⇒ Numo::DFloat
Calculate acos(x).
7957 7958 7959 7960 7961 7962 7963 7964 7965 |
# File 'ext/numo/narray/types/dfloat.c', line 7957
static VALUE
dfloat_math_s_acos(VALUE mod, VALUE a1)
{
ndfunc_arg_in_t ain[1] = {{cT,0}};
ndfunc_arg_out_t aout[1] = {{cT,0}};
ndfunc_t ndf = { iter_dfloat_math_s_acos, FULL_LOOP, 1, 1, ain, aout };
return na_ndloop(&ndf, 1, a1);
}
|
.acosh(x) ⇒ Numo::DFloat
Calculate acosh(x).
8317 8318 8319 8320 8321 8322 8323 8324 8325 |
# File 'ext/numo/narray/types/dfloat.c', line 8317
static VALUE
dfloat_math_s_acosh(VALUE mod, VALUE a1)
{
ndfunc_arg_in_t ain[1] = {{cT,0}};
ndfunc_arg_out_t aout[1] = {{cT,0}};
ndfunc_t ndf = { iter_dfloat_math_s_acosh, FULL_LOOP, 1, 1, ain, aout };
return na_ndloop(&ndf, 1, a1);
}
|
.asin(x) ⇒ Numo::DFloat
Calculate asin(x).
7897 7898 7899 7900 7901 7902 7903 7904 7905 |
# File 'ext/numo/narray/types/dfloat.c', line 7897
static VALUE
dfloat_math_s_asin(VALUE mod, VALUE a1)
{
ndfunc_arg_in_t ain[1] = {{cT,0}};
ndfunc_arg_out_t aout[1] = {{cT,0}};
ndfunc_t ndf = { iter_dfloat_math_s_asin, FULL_LOOP, 1, 1, ain, aout };
return na_ndloop(&ndf, 1, a1);
}
|
.asinh(x) ⇒ Numo::DFloat
Calculate asinh(x).
8257 8258 8259 8260 8261 8262 8263 8264 8265 |
# File 'ext/numo/narray/types/dfloat.c', line 8257
static VALUE
dfloat_math_s_asinh(VALUE mod, VALUE a1)
{
ndfunc_arg_in_t ain[1] = {{cT,0}};
ndfunc_arg_out_t aout[1] = {{cT,0}};
ndfunc_t ndf = { iter_dfloat_math_s_asinh, FULL_LOOP, 1, 1, ain, aout };
return na_ndloop(&ndf, 1, a1);
}
|
.atan(x) ⇒ Numo::DFloat
Calculate atan(x).
8017 8018 8019 8020 8021 8022 8023 8024 8025 |
# File 'ext/numo/narray/types/dfloat.c', line 8017
static VALUE
dfloat_math_s_atan(VALUE mod, VALUE a1)
{
ndfunc_arg_in_t ain[1] = {{cT,0}};
ndfunc_arg_out_t aout[1] = {{cT,0}};
ndfunc_t ndf = { iter_dfloat_math_s_atan, FULL_LOOP, 1, 1, ain, aout };
return na_ndloop(&ndf, 1, a1);
}
|
.atan2(a1, a2) ⇒ Numo::DFloat
Calculate atan2(a1,a2).
8475 8476 8477 8478 8479 8480 8481 8482 |
# File 'ext/numo/narray/types/dfloat.c', line 8475
static VALUE
dfloat_math_s_atan2(VALUE mod, VALUE a1, VALUE a2)
{
ndfunc_arg_in_t ain[2] = {{cT,0},{cT,0}};
ndfunc_arg_out_t aout[1] = {{cT,0}};
ndfunc_t ndf = { iter_dfloat_math_s_atan2, STRIDE_LOOP, 2, 1, ain, aout };
return na_ndloop(&ndf, 2, a1, a2);
}
|
.atanh(x) ⇒ Numo::DFloat
Calculate atanh(x).
8377 8378 8379 8380 8381 8382 8383 8384 8385 |
# File 'ext/numo/narray/types/dfloat.c', line 8377
static VALUE
dfloat_math_s_atanh(VALUE mod, VALUE a1)
{
ndfunc_arg_in_t ain[1] = {{cT,0}};
ndfunc_arg_out_t aout[1] = {{cT,0}};
ndfunc_t ndf = { iter_dfloat_math_s_atanh, FULL_LOOP, 1, 1, ain, aout };
return na_ndloop(&ndf, 1, a1);
}
|
.cbrt(x) ⇒ Numo::DFloat
Calculate cbrt(x).
7297 7298 7299 7300 7301 7302 7303 7304 7305 |
# File 'ext/numo/narray/types/dfloat.c', line 7297
static VALUE
dfloat_math_s_cbrt(VALUE mod, VALUE a1)
{
ndfunc_arg_in_t ain[1] = {{cT,0}};
ndfunc_arg_out_t aout[1] = {{cT,0}};
ndfunc_t ndf = { iter_dfloat_math_s_cbrt, FULL_LOOP, 1, 1, ain, aout };
return na_ndloop(&ndf, 1, a1);
}
|
.cos(x) ⇒ Numo::DFloat
Calculate cos(x).
7777 7778 7779 7780 7781 7782 7783 7784 7785 |
# File 'ext/numo/narray/types/dfloat.c', line 7777
static VALUE
dfloat_math_s_cos(VALUE mod, VALUE a1)
{
ndfunc_arg_in_t ain[1] = {{cT,0}};
ndfunc_arg_out_t aout[1] = {{cT,0}};
ndfunc_t ndf = { iter_dfloat_math_s_cos, FULL_LOOP, 1, 1, ain, aout };
return na_ndloop(&ndf, 1, a1);
}
|
.cosh(x) ⇒ Numo::DFloat
Calculate cosh(x).
8137 8138 8139 8140 8141 8142 8143 8144 8145 |
# File 'ext/numo/narray/types/dfloat.c', line 8137
static VALUE
dfloat_math_s_cosh(VALUE mod, VALUE a1)
{
ndfunc_arg_in_t ain[1] = {{cT,0}};
ndfunc_arg_out_t aout[1] = {{cT,0}};
ndfunc_t ndf = { iter_dfloat_math_s_cosh, FULL_LOOP, 1, 1, ain, aout };
return na_ndloop(&ndf, 1, a1);
}
|
.erf(x) ⇒ Numo::DFloat
Calculate erf(x).
8571 8572 8573 8574 8575 8576 8577 8578 8579 |
# File 'ext/numo/narray/types/dfloat.c', line 8571
static VALUE
dfloat_math_s_erf(VALUE mod, VALUE a1)
{
ndfunc_arg_in_t ain[1] = {{cT,0}};
ndfunc_arg_out_t aout[1] = {{cT,0}};
ndfunc_t ndf = { iter_dfloat_math_s_erf, FULL_LOOP, 1, 1, ain, aout };
return na_ndloop(&ndf, 1, a1);
}
|
.erfc(x) ⇒ Numo::DFloat
Calculate erfc(x).
8631 8632 8633 8634 8635 8636 8637 8638 8639 |
# File 'ext/numo/narray/types/dfloat.c', line 8631
static VALUE
dfloat_math_s_erfc(VALUE mod, VALUE a1)
{
ndfunc_arg_in_t ain[1] = {{cT,0}};
ndfunc_arg_out_t aout[1] = {{cT,0}};
ndfunc_t ndf = { iter_dfloat_math_s_erfc, FULL_LOOP, 1, 1, ain, aout };
return na_ndloop(&ndf, 1, a1);
}
|
.exp(x) ⇒ Numo::DFloat
Calculate exp(x).
7537 7538 7539 7540 7541 7542 7543 7544 7545 |
# File 'ext/numo/narray/types/dfloat.c', line 7537
static VALUE
dfloat_math_s_exp(VALUE mod, VALUE a1)
{
ndfunc_arg_in_t ain[1] = {{cT,0}};
ndfunc_arg_out_t aout[1] = {{cT,0}};
ndfunc_t ndf = { iter_dfloat_math_s_exp, FULL_LOOP, 1, 1, ain, aout };
return na_ndloop(&ndf, 1, a1);
}
|
.exp10(x) ⇒ Numo::DFloat
Calculate exp10(x).
7657 7658 7659 7660 7661 7662 7663 7664 7665 |
# File 'ext/numo/narray/types/dfloat.c', line 7657
static VALUE
dfloat_math_s_exp10(VALUE mod, VALUE a1)
{
ndfunc_arg_in_t ain[1] = {{cT,0}};
ndfunc_arg_out_t aout[1] = {{cT,0}};
ndfunc_t ndf = { iter_dfloat_math_s_exp10, FULL_LOOP, 1, 1, ain, aout };
return na_ndloop(&ndf, 1, a1);
}
|
.exp2(x) ⇒ Numo::DFloat
Calculate exp2(x).
7597 7598 7599 7600 7601 7602 7603 7604 7605 |
# File 'ext/numo/narray/types/dfloat.c', line 7597
static VALUE
dfloat_math_s_exp2(VALUE mod, VALUE a1)
{
ndfunc_arg_in_t ain[1] = {{cT,0}};
ndfunc_arg_out_t aout[1] = {{cT,0}};
ndfunc_t ndf = { iter_dfloat_math_s_exp2, FULL_LOOP, 1, 1, ain, aout };
return na_ndloop(&ndf, 1, a1);
}
|
.expm1(x) ⇒ Numo::DFloat
Calculate expm1(x).
8751 8752 8753 8754 8755 8756 8757 8758 8759 |
# File 'ext/numo/narray/types/dfloat.c', line 8751
static VALUE
dfloat_math_s_expm1(VALUE mod, VALUE a1)
{
ndfunc_arg_in_t ain[1] = {{cT,0}};
ndfunc_arg_out_t aout[1] = {{cT,0}};
ndfunc_t ndf = { iter_dfloat_math_s_expm1, FULL_LOOP, 1, 1, ain, aout };
return na_ndloop(&ndf, 1, a1);
}
|
.frexp(x) ⇒ Numo::DFloat, Numo::Int32
split the number x into a normalized fraction and an exponent. Returns [mantissa, exponent], where x = mantissa * 2**exponent.
8829 8830 8831 8832 8833 8834 8835 8836 |
# File 'ext/numo/narray/types/dfloat.c', line 8829
static VALUE
dfloat_math_s_frexp(VALUE mod, VALUE a1)
{
ndfunc_arg_in_t ain[1] = {{cT,0}};
ndfunc_arg_out_t aout[2] = {{cT,0},{numo_cInt32,0}};
ndfunc_t ndf = { iter_dfloat_math_s_frexp, STRIDE_LOOP, 1,2, ain,aout };
return na_ndloop(&ndf, 1, a1);
}
|
.hypot(a1, a2) ⇒ Numo::DFloat
Calculate hypot(a1,a2).
8512 8513 8514 8515 8516 8517 8518 8519 |
# File 'ext/numo/narray/types/dfloat.c', line 8512
static VALUE
dfloat_math_s_hypot(VALUE mod, VALUE a1, VALUE a2)
{
ndfunc_arg_in_t ain[2] = {{cT,0},{cT,0}};
ndfunc_arg_out_t aout[1] = {{cT,0}};
ndfunc_t ndf = { iter_dfloat_math_s_hypot, STRIDE_LOOP, 2, 1, ain, aout };
return na_ndloop(&ndf, 2, a1, a2);
}
|
.ldexp(a1, a2) ⇒ Numo::DFloat
Calculate ldexp(a1,a2).
8789 8790 8791 8792 8793 8794 8795 8796 |
# File 'ext/numo/narray/types/dfloat.c', line 8789
static VALUE
dfloat_math_s_ldexp(VALUE mod, VALUE a1, VALUE a2)
{
ndfunc_arg_in_t ain[2] = {{cT,0},{cT,0}};
ndfunc_arg_out_t aout[1] = {{cT,0}};
ndfunc_t ndf = { iter_dfloat_math_s_ldexp, STRIDE_LOOP, 2, 1, ain, aout };
return na_ndloop(&ndf, 2, a1, a2);
}
|
.log(x) ⇒ Numo::DFloat
Calculate log(x).
7357 7358 7359 7360 7361 7362 7363 7364 7365 |
# File 'ext/numo/narray/types/dfloat.c', line 7357
static VALUE
dfloat_math_s_log(VALUE mod, VALUE a1)
{
ndfunc_arg_in_t ain[1] = {{cT,0}};
ndfunc_arg_out_t aout[1] = {{cT,0}};
ndfunc_t ndf = { iter_dfloat_math_s_log, FULL_LOOP, 1, 1, ain, aout };
return na_ndloop(&ndf, 1, a1);
}
|
.log10(x) ⇒ Numo::DFloat
Calculate log10(x).
7477 7478 7479 7480 7481 7482 7483 7484 7485 |
# File 'ext/numo/narray/types/dfloat.c', line 7477
static VALUE
dfloat_math_s_log10(VALUE mod, VALUE a1)
{
ndfunc_arg_in_t ain[1] = {{cT,0}};
ndfunc_arg_out_t aout[1] = {{cT,0}};
ndfunc_t ndf = { iter_dfloat_math_s_log10, FULL_LOOP, 1, 1, ain, aout };
return na_ndloop(&ndf, 1, a1);
}
|
.log1p(x) ⇒ Numo::DFloat
Calculate log1p(x).
8691 8692 8693 8694 8695 8696 8697 8698 8699 |
# File 'ext/numo/narray/types/dfloat.c', line 8691
static VALUE
dfloat_math_s_log1p(VALUE mod, VALUE a1)
{
ndfunc_arg_in_t ain[1] = {{cT,0}};
ndfunc_arg_out_t aout[1] = {{cT,0}};
ndfunc_t ndf = { iter_dfloat_math_s_log1p, FULL_LOOP, 1, 1, ain, aout };
return na_ndloop(&ndf, 1, a1);
}
|
.log2(x) ⇒ Numo::DFloat
Calculate log2(x).
7417 7418 7419 7420 7421 7422 7423 7424 7425 |
# File 'ext/numo/narray/types/dfloat.c', line 7417
static VALUE
dfloat_math_s_log2(VALUE mod, VALUE a1)
{
ndfunc_arg_in_t ain[1] = {{cT,0}};
ndfunc_arg_out_t aout[1] = {{cT,0}};
ndfunc_t ndf = { iter_dfloat_math_s_log2, FULL_LOOP, 1, 1, ain, aout };
return na_ndloop(&ndf, 1, a1);
}
|
.sin(x) ⇒ Numo::DFloat
Calculate sin(x).
7717 7718 7719 7720 7721 7722 7723 7724 7725 |
# File 'ext/numo/narray/types/dfloat.c', line 7717
static VALUE
dfloat_math_s_sin(VALUE mod, VALUE a1)
{
ndfunc_arg_in_t ain[1] = {{cT,0}};
ndfunc_arg_out_t aout[1] = {{cT,0}};
ndfunc_t ndf = { iter_dfloat_math_s_sin, FULL_LOOP, 1, 1, ain, aout };
return na_ndloop(&ndf, 1, a1);
}
|
.sinc(x) ⇒ Numo::DFloat
Calculate sinc(x).
8437 8438 8439 8440 8441 8442 8443 8444 8445 |
# File 'ext/numo/narray/types/dfloat.c', line 8437
static VALUE
dfloat_math_s_sinc(VALUE mod, VALUE a1)
{
ndfunc_arg_in_t ain[1] = {{cT,0}};
ndfunc_arg_out_t aout[1] = {{cT,0}};
ndfunc_t ndf = { iter_dfloat_math_s_sinc, FULL_LOOP, 1, 1, ain, aout };
return na_ndloop(&ndf, 1, a1);
}
|
.sinh(x) ⇒ Numo::DFloat
Calculate sinh(x).
8077 8078 8079 8080 8081 8082 8083 8084 8085 |
# File 'ext/numo/narray/types/dfloat.c', line 8077
static VALUE
dfloat_math_s_sinh(VALUE mod, VALUE a1)
{
ndfunc_arg_in_t ain[1] = {{cT,0}};
ndfunc_arg_out_t aout[1] = {{cT,0}};
ndfunc_t ndf = { iter_dfloat_math_s_sinh, FULL_LOOP, 1, 1, ain, aout };
return na_ndloop(&ndf, 1, a1);
}
|
.sqrt(x) ⇒ Numo::DFloat
Calculate sqrt(x).
7237 7238 7239 7240 7241 7242 7243 7244 7245 |
# File 'ext/numo/narray/types/dfloat.c', line 7237
static VALUE
dfloat_math_s_sqrt(VALUE mod, VALUE a1)
{
ndfunc_arg_in_t ain[1] = {{cT,0}};
ndfunc_arg_out_t aout[1] = {{cT,0}};
ndfunc_t ndf = { iter_dfloat_math_s_sqrt, FULL_LOOP, 1, 1, ain, aout };
return na_ndloop(&ndf, 1, a1);
}
|
.tan(x) ⇒ Numo::DFloat
Calculate tan(x).
7837 7838 7839 7840 7841 7842 7843 7844 7845 |
# File 'ext/numo/narray/types/dfloat.c', line 7837
static VALUE
dfloat_math_s_tan(VALUE mod, VALUE a1)
{
ndfunc_arg_in_t ain[1] = {{cT,0}};
ndfunc_arg_out_t aout[1] = {{cT,0}};
ndfunc_t ndf = { iter_dfloat_math_s_tan, FULL_LOOP, 1, 1, ain, aout };
return na_ndloop(&ndf, 1, a1);
}
|
.tanh(x) ⇒ Numo::DFloat
Calculate tanh(x).
8197 8198 8199 8200 8201 8202 8203 8204 8205 |
# File 'ext/numo/narray/types/dfloat.c', line 8197
static VALUE
dfloat_math_s_tanh(VALUE mod, VALUE a1)
{
ndfunc_arg_in_t ain[1] = {{cT,0}};
ndfunc_arg_out_t aout[1] = {{cT,0}};
ndfunc_t ndf = { iter_dfloat_math_s_tanh, FULL_LOOP, 1, 1, ain, aout };
return na_ndloop(&ndf, 1, a1);
}
|