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:



7294
7295
7296
7297
7298
7299
7300
7301
7302
# File 'ext/numo/narray/types/dfloat.c', line 7294

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:



7654
7655
7656
7657
7658
7659
7660
7661
7662
# File 'ext/numo/narray/types/dfloat.c', line 7654

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:



7234
7235
7236
7237
7238
7239
7240
7241
7242
# File 'ext/numo/narray/types/dfloat.c', line 7234

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:



7594
7595
7596
7597
7598
7599
7600
7601
7602
# File 'ext/numo/narray/types/dfloat.c', line 7594

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:



7354
7355
7356
7357
7358
7359
7360
7361
7362
# File 'ext/numo/narray/types/dfloat.c', line 7354

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:



7812
7813
7814
7815
7816
7817
7818
7819
# File 'ext/numo/narray/types/dfloat.c', line 7812

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:



7714
7715
7716
7717
7718
7719
7720
7721
7722
# File 'ext/numo/narray/types/dfloat.c', line 7714

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:



6634
6635
6636
6637
6638
6639
6640
6641
6642
# File 'ext/numo/narray/types/dfloat.c', line 6634

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:



7114
7115
7116
7117
7118
7119
7120
7121
7122
# File 'ext/numo/narray/types/dfloat.c', line 7114

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:



7474
7475
7476
7477
7478
7479
7480
7481
7482
# File 'ext/numo/narray/types/dfloat.c', line 7474

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:



7908
7909
7910
7911
7912
7913
7914
7915
7916
# File 'ext/numo/narray/types/dfloat.c', line 7908

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:



7968
7969
7970
7971
7972
7973
7974
7975
7976
# File 'ext/numo/narray/types/dfloat.c', line 7968

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:



6874
6875
6876
6877
6878
6879
6880
6881
6882
# File 'ext/numo/narray/types/dfloat.c', line 6874

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:



6994
6995
6996
6997
6998
6999
7000
7001
7002
# File 'ext/numo/narray/types/dfloat.c', line 6994

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:



6934
6935
6936
6937
6938
6939
6940
6941
6942
# File 'ext/numo/narray/types/dfloat.c', line 6934

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:



8088
8089
8090
8091
8092
8093
8094
8095
8096
# File 'ext/numo/narray/types/dfloat.c', line 8088

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:



8166
8167
8168
8169
8170
8171
8172
8173
# File 'ext/numo/narray/types/dfloat.c', line 8166

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:



7849
7850
7851
7852
7853
7854
7855
7856
# File 'ext/numo/narray/types/dfloat.c', line 7849

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:



8126
8127
8128
8129
8130
8131
8132
8133
# File 'ext/numo/narray/types/dfloat.c', line 8126

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:



6694
6695
6696
6697
6698
6699
6700
6701
6702
# File 'ext/numo/narray/types/dfloat.c', line 6694

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:



6814
6815
6816
6817
6818
6819
6820
6821
6822
# File 'ext/numo/narray/types/dfloat.c', line 6814

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:



8028
8029
8030
8031
8032
8033
8034
8035
8036
# File 'ext/numo/narray/types/dfloat.c', line 8028

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:



6754
6755
6756
6757
6758
6759
6760
6761
6762
# File 'ext/numo/narray/types/dfloat.c', line 6754

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:



7054
7055
7056
7057
7058
7059
7060
7061
7062
# File 'ext/numo/narray/types/dfloat.c', line 7054

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:



7774
7775
7776
7777
7778
7779
7780
7781
7782
# File 'ext/numo/narray/types/dfloat.c', line 7774

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:



7414
7415
7416
7417
7418
7419
7420
7421
7422
# File 'ext/numo/narray/types/dfloat.c', line 7414

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:



6574
6575
6576
6577
6578
6579
6580
6581
6582
# File 'ext/numo/narray/types/dfloat.c', line 6574

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:



7174
7175
7176
7177
7178
7179
7180
7181
7182
# File 'ext/numo/narray/types/dfloat.c', line 7174

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:



7534
7535
7536
7537
7538
7539
7540
7541
7542
# File 'ext/numo/narray/types/dfloat.c', line 7534

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