mpfr_lib.mpfr_eint Method |
Set rop to the exponential integral of op rounded in the direction rnd.
Namespace:
Math.Mpfr.Native
Assembly:
Math.Mpfr.Native (in Math.Mpfr.Native.dll) Version: 1.0.0.0 (1.0.0.0)
Syntaxpublic static int mpfr_eint(
mpfr_t rop,
mpfr_t op,
mpfr_rnd_t rnd
)
Public Shared Function mpfr_eint (
rop As mpfr_t,
op As mpfr_t,
rnd As mpfr_rnd_t
) As Integer
public:
static int mpfr_eint(
mpfr_t^ rop,
mpfr_t^ op,
mpfr_rnd_t rnd
)
static member mpfr_eint :
rop : mpfr_t *
op : mpfr_t *
rnd : mpfr_rnd_t -> int
Parameters
- rop
- Type: Math.Mpfr.Native.mpfr_t
The result floating-point number. - op
- Type: Math.Mpfr.Native.mpfr_t
The operand floating-point number. - rnd
- Type: Math.Mpfr.Native.mpfr_rnd_t
The rounding direction.
Return Value
Type:
Int32Return zero, a positive, or a negative value if
rop is respectively equal to, greater than, or lower than the exact result. See
GNU MPFR - Rounding Modes for details.
Remarks
This is the sum of Euler’s constant, of the logarithm of the absolute value of op,
and of the sum for k from 1 to infinity of (op^k)/(k · k!).
For positive op, it corresponds to the Ei function at op (see formula 5.1.10 from
the Handbook of Mathematical Functions from Abramowitz and Stegun), and for negative op,
to the opposite of the E1 function (sometimes called eint1) at −op (formula 5.1.1 from the same reference).
Examples
mpfr_t op = new mpfr_t();
mpfr_lib.mpfr_init2(op, 64U);
Assert.IsTrue(mpfr_lib.mpfr_set_si(op, 1, mpfr_rnd_t.MPFR_RNDN) == 0);
mpfr_t rop = new mpfr_t();
mpfr_lib.mpfr_init2(rop, 64U);
Assert.IsTrue(mpfr_lib.mpfr_eint(rop, op, mpfr_rnd_t.MPFR_RNDN) == 1);
Assert.IsTrue(rop.ToString() == "0.189511781635593675550e1");
mpfr_lib.mpfr_clears(rop, op, null);
Dim op As mpfr_t = New mpfr_t()
mpfr_lib.mpfr_init2(op, 64U)
Assert.IsTrue(mpfr_lib.mpfr_set_si(op, 1, mpfr_rnd_t.MPFR_RNDN) = 0)
Dim rop As mpfr_t = New mpfr_t()
mpfr_lib.mpfr_init2(rop, 64U)
Assert.IsTrue(mpfr_lib.mpfr_eint(rop, op, mpfr_rnd_t.MPFR_RNDN) = 1)
Assert.IsTrue(rop.ToString() = "0.189511781635593675550e1")
mpfr_lib.mpfr_clears(rop, op, Nothing)
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
See Also