Module: Numo::SFloat::Math

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

Class Method Summary collapse

Class Method Details

.acos(x) ⇒ Numo::SFloat

Calculate acos(x).

Parameters:

Returns:



9462
9463
9464
9465
9466
9467
9468
9469
9470
# File 'ext/numo/narray/types/sfloat.c', line 9462

static VALUE
sfloat_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_sfloat_math_s_acos, FULL_LOOP, 1, 1, ain, aout };

    return na_ndloop(&ndf, 1, a1);
}

.acosh(x) ⇒ Numo::SFloat

Calculate acosh(x).

Parameters:

Returns:



10002
10003
10004
10005
10006
10007
10008
10009
10010
# File 'ext/numo/narray/types/sfloat.c', line 10002

static VALUE
sfloat_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_sfloat_math_s_acosh, FULL_LOOP, 1, 1, ain, aout };

    return na_ndloop(&ndf, 1, a1);
}

.asin(x) ⇒ Numo::SFloat

Calculate asin(x).

Parameters:

Returns:



9372
9373
9374
9375
9376
9377
9378
9379
9380
# File 'ext/numo/narray/types/sfloat.c', line 9372

static VALUE
sfloat_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_sfloat_math_s_asin, FULL_LOOP, 1, 1, ain, aout };

    return na_ndloop(&ndf, 1, a1);
}

.asinh(x) ⇒ Numo::SFloat

Calculate asinh(x).

Parameters:

Returns:



9912
9913
9914
9915
9916
9917
9918
9919
9920
# File 'ext/numo/narray/types/sfloat.c', line 9912

static VALUE
sfloat_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_sfloat_math_s_asinh, FULL_LOOP, 1, 1, ain, aout };

    return na_ndloop(&ndf, 1, a1);
}

.atan(x) ⇒ Numo::SFloat

Calculate atan(x).

Parameters:

Returns:



9552
9553
9554
9555
9556
9557
9558
9559
9560
# File 'ext/numo/narray/types/sfloat.c', line 9552

static VALUE
sfloat_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_sfloat_math_s_atan, FULL_LOOP, 1, 1, ain, aout };

    return na_ndloop(&ndf, 1, a1);
}

.atan2(a1, a2) ⇒ Numo::SFloat

Calculate atan2(a1,a2).

Parameters:

Returns:



10220
10221
10222
10223
10224
10225
10226
10227
# File 'ext/numo/narray/types/sfloat.c', line 10220

static VALUE
sfloat_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_sfloat_math_s_atan2, STRIDE_LOOP, 2, 1, ain, aout };
    return na_ndloop(&ndf, 2, a1, a2);
}

.atanh(x) ⇒ Numo::SFloat

Calculate atanh(x).

Parameters:

Returns:



10092
10093
10094
10095
10096
10097
10098
10099
10100
# File 'ext/numo/narray/types/sfloat.c', line 10092

static VALUE
sfloat_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_sfloat_math_s_atanh, FULL_LOOP, 1, 1, ain, aout };

    return na_ndloop(&ndf, 1, a1);
}

.cbrt(x) ⇒ Numo::SFloat

Calculate cbrt(x).

Parameters:

Returns:



8472
8473
8474
8475
8476
8477
8478
8479
8480
# File 'ext/numo/narray/types/sfloat.c', line 8472

static VALUE
sfloat_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_sfloat_math_s_cbrt, FULL_LOOP, 1, 1, ain, aout };

    return na_ndloop(&ndf, 1, a1);
}

.cos(x) ⇒ Numo::SFloat

Calculate cos(x).

Parameters:

Returns:



9192
9193
9194
9195
9196
9197
9198
9199
9200
# File 'ext/numo/narray/types/sfloat.c', line 9192

static VALUE
sfloat_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_sfloat_math_s_cos, FULL_LOOP, 1, 1, ain, aout };

    return na_ndloop(&ndf, 1, a1);
}

.cosh(x) ⇒ Numo::SFloat

Calculate cosh(x).

Parameters:

Returns:



9732
9733
9734
9735
9736
9737
9738
9739
9740
# File 'ext/numo/narray/types/sfloat.c', line 9732

static VALUE
sfloat_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_sfloat_math_s_cosh, FULL_LOOP, 1, 1, ain, aout };

    return na_ndloop(&ndf, 1, a1);
}

.erf(x) ⇒ Numo::SFloat

Calculate erf(x).

Parameters:

Returns:



10346
10347
10348
10349
10350
10351
10352
10353
10354
# File 'ext/numo/narray/types/sfloat.c', line 10346

static VALUE
sfloat_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_sfloat_math_s_erf, FULL_LOOP, 1, 1, ain, aout };

    return na_ndloop(&ndf, 1, a1);
}

.erfc(x) ⇒ Numo::SFloat

Calculate erfc(x).

Parameters:

Returns:



10436
10437
10438
10439
10440
10441
10442
10443
10444
# File 'ext/numo/narray/types/sfloat.c', line 10436

static VALUE
sfloat_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_sfloat_math_s_erfc, FULL_LOOP, 1, 1, ain, aout };

    return na_ndloop(&ndf, 1, a1);
}

.exp(x) ⇒ Numo::SFloat

Calculate exp(x).

Parameters:

Returns:



8832
8833
8834
8835
8836
8837
8838
8839
8840
# File 'ext/numo/narray/types/sfloat.c', line 8832

static VALUE
sfloat_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_sfloat_math_s_exp, FULL_LOOP, 1, 1, ain, aout };

    return na_ndloop(&ndf, 1, a1);
}

.exp10(x) ⇒ Numo::SFloat

Calculate exp10(x).

Parameters:

Returns:



9012
9013
9014
9015
9016
9017
9018
9019
9020
# File 'ext/numo/narray/types/sfloat.c', line 9012

static VALUE
sfloat_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_sfloat_math_s_exp10, FULL_LOOP, 1, 1, ain, aout };

    return na_ndloop(&ndf, 1, a1);
}

.exp2(x) ⇒ Numo::SFloat

Calculate exp2(x).

Parameters:

Returns:



8922
8923
8924
8925
8926
8927
8928
8929
8930
# File 'ext/numo/narray/types/sfloat.c', line 8922

static VALUE
sfloat_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_sfloat_math_s_exp2, FULL_LOOP, 1, 1, ain, aout };

    return na_ndloop(&ndf, 1, a1);
}

.expm1(x) ⇒ Numo::SFloat

Calculate expm1(x).

Parameters:

Returns:



10616
10617
10618
10619
10620
10621
10622
10623
10624
# File 'ext/numo/narray/types/sfloat.c', line 10616

static VALUE
sfloat_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_sfloat_math_s_expm1, FULL_LOOP, 1, 1, ain, aout };

    return na_ndloop(&ndf, 1, a1);
}

.frexp(x) ⇒ Numo::SFloat, Numo::Int32

split the number x into a normalized fraction and an exponent. Returns [mantissa, exponent], where x = mantissa * 2**exponent.

Parameters:

Returns:



10694
10695
10696
10697
10698
10699
10700
10701
# File 'ext/numo/narray/types/sfloat.c', line 10694

static VALUE
sfloat_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_sfloat_math_s_frexp, STRIDE_LOOP, 1,2, ain,aout };
    return na_ndloop(&ndf, 1, a1);
}

.hypot(a1, a2) ⇒ Numo::SFloat

Calculate hypot(a1,a2).

Parameters:

Returns:



10257
10258
10259
10260
10261
10262
10263
10264
# File 'ext/numo/narray/types/sfloat.c', line 10257

static VALUE
sfloat_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_sfloat_math_s_hypot, STRIDE_LOOP, 2, 1, ain, aout };
    return na_ndloop(&ndf, 2, a1, a2);
}

.ldexp(a1, a2) ⇒ Numo::SFloat

Calculate ldexp(a1,a2).

Parameters:

Returns:



10654
10655
10656
10657
10658
10659
10660
10661
# File 'ext/numo/narray/types/sfloat.c', line 10654

static VALUE
sfloat_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_sfloat_math_s_ldexp, STRIDE_LOOP, 2, 1, ain, aout };
    return na_ndloop(&ndf, 2, a1, a2);
}

.log(x) ⇒ Numo::SFloat

Calculate log(x).

Parameters:

Returns:



8562
8563
8564
8565
8566
8567
8568
8569
8570
# File 'ext/numo/narray/types/sfloat.c', line 8562

static VALUE
sfloat_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_sfloat_math_s_log, FULL_LOOP, 1, 1, ain, aout };

    return na_ndloop(&ndf, 1, a1);
}

.log10(x) ⇒ Numo::SFloat

Calculate log10(x).

Parameters:

Returns:



8742
8743
8744
8745
8746
8747
8748
8749
8750
# File 'ext/numo/narray/types/sfloat.c', line 8742

static VALUE
sfloat_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_sfloat_math_s_log10, FULL_LOOP, 1, 1, ain, aout };

    return na_ndloop(&ndf, 1, a1);
}

.log1p(x) ⇒ Numo::SFloat

Calculate log1p(x).

Parameters:

Returns:



10526
10527
10528
10529
10530
10531
10532
10533
10534
# File 'ext/numo/narray/types/sfloat.c', line 10526

static VALUE
sfloat_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_sfloat_math_s_log1p, FULL_LOOP, 1, 1, ain, aout };

    return na_ndloop(&ndf, 1, a1);
}

.log2(x) ⇒ Numo::SFloat

Calculate log2(x).

Parameters:

Returns:



8652
8653
8654
8655
8656
8657
8658
8659
8660
# File 'ext/numo/narray/types/sfloat.c', line 8652

static VALUE
sfloat_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_sfloat_math_s_log2, FULL_LOOP, 1, 1, ain, aout };

    return na_ndloop(&ndf, 1, a1);
}

.sin(x) ⇒ Numo::SFloat

Calculate sin(x).

Parameters:

Returns:



9102
9103
9104
9105
9106
9107
9108
9109
9110
# File 'ext/numo/narray/types/sfloat.c', line 9102

static VALUE
sfloat_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_sfloat_math_s_sin, FULL_LOOP, 1, 1, ain, aout };

    return na_ndloop(&ndf, 1, a1);
}

.sinc(x) ⇒ Numo::SFloat

Calculate sinc(x).

Parameters:

Returns:



10182
10183
10184
10185
10186
10187
10188
10189
10190
# File 'ext/numo/narray/types/sfloat.c', line 10182

static VALUE
sfloat_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_sfloat_math_s_sinc, FULL_LOOP, 1, 1, ain, aout };

    return na_ndloop(&ndf, 1, a1);
}

.sinh(x) ⇒ Numo::SFloat

Calculate sinh(x).

Parameters:

Returns:



9642
9643
9644
9645
9646
9647
9648
9649
9650
# File 'ext/numo/narray/types/sfloat.c', line 9642

static VALUE
sfloat_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_sfloat_math_s_sinh, FULL_LOOP, 1, 1, ain, aout };

    return na_ndloop(&ndf, 1, a1);
}

.sqrt(x) ⇒ Numo::SFloat

Calculate sqrt(x).

Parameters:

Returns:



8382
8383
8384
8385
8386
8387
8388
8389
8390
# File 'ext/numo/narray/types/sfloat.c', line 8382

static VALUE
sfloat_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_sfloat_math_s_sqrt, FULL_LOOP, 1, 1, ain, aout };

    return na_ndloop(&ndf, 1, a1);
}

.tan(x) ⇒ Numo::SFloat

Calculate tan(x).

Parameters:

Returns:



9282
9283
9284
9285
9286
9287
9288
9289
9290
# File 'ext/numo/narray/types/sfloat.c', line 9282

static VALUE
sfloat_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_sfloat_math_s_tan, FULL_LOOP, 1, 1, ain, aout };

    return na_ndloop(&ndf, 1, a1);
}

.tanh(x) ⇒ Numo::SFloat

Calculate tanh(x).

Parameters:

Returns:



9822
9823
9824
9825
9826
9827
9828
9829
9830
# File 'ext/numo/narray/types/sfloat.c', line 9822

static VALUE
sfloat_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_sfloat_math_s_tanh, FULL_LOOP, 1, 1, ain, aout };

    return na_ndloop(&ndf, 1, a1);
}