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:



9521
9522
9523
9524
9525
9526
9527
9528
9529
# File 'ext/numo/narray/types/dfloat.c', line 9521

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:



10061
10062
10063
10064
10065
10066
10067
10068
10069
# File 'ext/numo/narray/types/dfloat.c', line 10061

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:



9431
9432
9433
9434
9435
9436
9437
9438
9439
# File 'ext/numo/narray/types/dfloat.c', line 9431

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:



9971
9972
9973
9974
9975
9976
9977
9978
9979
# File 'ext/numo/narray/types/dfloat.c', line 9971

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:



9611
9612
9613
9614
9615
9616
9617
9618
9619
# File 'ext/numo/narray/types/dfloat.c', line 9611

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:



10279
10280
10281
10282
10283
10284
10285
10286
# File 'ext/numo/narray/types/dfloat.c', line 10279

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:



10151
10152
10153
10154
10155
10156
10157
10158
10159
# File 'ext/numo/narray/types/dfloat.c', line 10151

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:



8531
8532
8533
8534
8535
8536
8537
8538
8539
# File 'ext/numo/narray/types/dfloat.c', line 8531

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:



9251
9252
9253
9254
9255
9256
9257
9258
9259
# File 'ext/numo/narray/types/dfloat.c', line 9251

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:



9791
9792
9793
9794
9795
9796
9797
9798
9799
# File 'ext/numo/narray/types/dfloat.c', line 9791

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:



10405
10406
10407
10408
10409
10410
10411
10412
10413
# File 'ext/numo/narray/types/dfloat.c', line 10405

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:



10495
10496
10497
10498
10499
10500
10501
10502
10503
# File 'ext/numo/narray/types/dfloat.c', line 10495

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:



8891
8892
8893
8894
8895
8896
8897
8898
8899
# File 'ext/numo/narray/types/dfloat.c', line 8891

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:



9071
9072
9073
9074
9075
9076
9077
9078
9079
# File 'ext/numo/narray/types/dfloat.c', line 9071

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:



8981
8982
8983
8984
8985
8986
8987
8988
8989
# File 'ext/numo/narray/types/dfloat.c', line 8981

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:



10675
10676
10677
10678
10679
10680
10681
10682
10683
# File 'ext/numo/narray/types/dfloat.c', line 10675

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:



10753
10754
10755
10756
10757
10758
10759
10760
# File 'ext/numo/narray/types/dfloat.c', line 10753

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:



10316
10317
10318
10319
10320
10321
10322
10323
# File 'ext/numo/narray/types/dfloat.c', line 10316

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:



10713
10714
10715
10716
10717
10718
10719
10720
# File 'ext/numo/narray/types/dfloat.c', line 10713

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:



8621
8622
8623
8624
8625
8626
8627
8628
8629
# File 'ext/numo/narray/types/dfloat.c', line 8621

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:



8801
8802
8803
8804
8805
8806
8807
8808
8809
# File 'ext/numo/narray/types/dfloat.c', line 8801

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:



10585
10586
10587
10588
10589
10590
10591
10592
10593
# File 'ext/numo/narray/types/dfloat.c', line 10585

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:



8711
8712
8713
8714
8715
8716
8717
8718
8719
# File 'ext/numo/narray/types/dfloat.c', line 8711

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:



9161
9162
9163
9164
9165
9166
9167
9168
9169
# File 'ext/numo/narray/types/dfloat.c', line 9161

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:



10241
10242
10243
10244
10245
10246
10247
10248
10249
# File 'ext/numo/narray/types/dfloat.c', line 10241

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:



9701
9702
9703
9704
9705
9706
9707
9708
9709
# File 'ext/numo/narray/types/dfloat.c', line 9701

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:



8441
8442
8443
8444
8445
8446
8447
8448
8449
# File 'ext/numo/narray/types/dfloat.c', line 8441

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:



9341
9342
9343
9344
9345
9346
9347
9348
9349
# File 'ext/numo/narray/types/dfloat.c', line 9341

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:



9881
9882
9883
9884
9885
9886
9887
9888
9889
# File 'ext/numo/narray/types/dfloat.c', line 9881

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