Module: Numo::DFloat::Math

Defined in:
ext/numo/narray/types/dfloat.c

Class Method Summary collapse

Class Method Details

.acos(x) ⇒ Numo::DFloat

Calculate acos(x).

Parameters:

Returns:



7297
7298
7299
7300
7301
7302
7303
7304
7305
# File 'ext/numo/narray/types/dfloat.c', line 7297

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).

Parameters:

Returns:



7657
7658
7659
7660
7661
7662
7663
7664
7665
# File 'ext/numo/narray/types/dfloat.c', line 7657

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).

Parameters:

Returns:



7237
7238
7239
7240
7241
7242
7243
7244
7245
# File 'ext/numo/narray/types/dfloat.c', line 7237

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).

Parameters:

Returns:



7597
7598
7599
7600
7601
7602
7603
7604
7605
# File 'ext/numo/narray/types/dfloat.c', line 7597

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).

Parameters:

Returns:



7357
7358
7359
7360
7361
7362
7363
7364
7365
# File 'ext/numo/narray/types/dfloat.c', line 7357

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).

Parameters:

Returns:



7815
7816
7817
7818
7819
7820
7821
7822
# File 'ext/numo/narray/types/dfloat.c', line 7815

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).

Parameters:

Returns:



7717
7718
7719
7720
7721
7722
7723
7724
7725
# File 'ext/numo/narray/types/dfloat.c', line 7717

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).

Parameters:

Returns:



6637
6638
6639
6640
6641
6642
6643
6644
6645
# File 'ext/numo/narray/types/dfloat.c', line 6637

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).

Parameters:

Returns:



7117
7118
7119
7120
7121
7122
7123
7124
7125
# File 'ext/numo/narray/types/dfloat.c', line 7117

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).

Parameters:

Returns:



7477
7478
7479
7480
7481
7482
7483
7484
7485
# File 'ext/numo/narray/types/dfloat.c', line 7477

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).

Parameters:

Returns:



7911
7912
7913
7914
7915
7916
7917
7918
7919
# File 'ext/numo/narray/types/dfloat.c', line 7911

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).

Parameters:

Returns:



7971
7972
7973
7974
7975
7976
7977
7978
7979
# File 'ext/numo/narray/types/dfloat.c', line 7971

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).

Parameters:

Returns:



6877
6878
6879
6880
6881
6882
6883
6884
6885
# File 'ext/numo/narray/types/dfloat.c', line 6877

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).

Parameters:

Returns:



6997
6998
6999
7000
7001
7002
7003
7004
7005
# File 'ext/numo/narray/types/dfloat.c', line 6997

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).

Parameters:

Returns:



6937
6938
6939
6940
6941
6942
6943
6944
6945
# File 'ext/numo/narray/types/dfloat.c', line 6937

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).

Parameters:

Returns:



8091
8092
8093
8094
8095
8096
8097
8098
8099
# File 'ext/numo/narray/types/dfloat.c', line 8091

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.

Parameters:

Returns:



8169
8170
8171
8172
8173
8174
8175
8176
# File 'ext/numo/narray/types/dfloat.c', line 8169

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).

Parameters:

Returns:



7852
7853
7854
7855
7856
7857
7858
7859
# File 'ext/numo/narray/types/dfloat.c', line 7852

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).

Parameters:

Returns:



8129
8130
8131
8132
8133
8134
8135
8136
# File 'ext/numo/narray/types/dfloat.c', line 8129

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).

Parameters:

Returns:



6697
6698
6699
6700
6701
6702
6703
6704
6705
# File 'ext/numo/narray/types/dfloat.c', line 6697

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).

Parameters:

Returns:



6817
6818
6819
6820
6821
6822
6823
6824
6825
# File 'ext/numo/narray/types/dfloat.c', line 6817

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).

Parameters:

Returns:



8031
8032
8033
8034
8035
8036
8037
8038
8039
# File 'ext/numo/narray/types/dfloat.c', line 8031

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).

Parameters:

Returns:



6757
6758
6759
6760
6761
6762
6763
6764
6765
# File 'ext/numo/narray/types/dfloat.c', line 6757

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).

Parameters:

Returns:



7057
7058
7059
7060
7061
7062
7063
7064
7065
# File 'ext/numo/narray/types/dfloat.c', line 7057

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).

Parameters:

Returns:



7777
7778
7779
7780
7781
7782
7783
7784
7785
# File 'ext/numo/narray/types/dfloat.c', line 7777

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).

Parameters:

Returns:



7417
7418
7419
7420
7421
7422
7423
7424
7425
# File 'ext/numo/narray/types/dfloat.c', line 7417

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).

Parameters:

Returns:



6577
6578
6579
6580
6581
6582
6583
6584
6585
# File 'ext/numo/narray/types/dfloat.c', line 6577

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).

Parameters:

Returns:



7177
7178
7179
7180
7181
7182
7183
7184
7185
# File 'ext/numo/narray/types/dfloat.c', line 7177

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).

Parameters:

Returns:



7537
7538
7539
7540
7541
7542
7543
7544
7545
# File 'ext/numo/narray/types/dfloat.c', line 7537

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);
}