Click or drag to resize
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)
Syntax
public static int mpfr_eint(
	mpfr_t rop,
	mpfr_t op,
	mpfr_rnd_t rnd
)

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: Int32
Return 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
// Create, initialize, and set a new floating-point number op to 1.
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);

// Create and initialize a new floating-point number rop.
mpfr_t rop = new mpfr_t();
mpfr_lib.mpfr_init2(rop, 64U);

// Set rop to exponential integral of op.
Assert.IsTrue(mpfr_lib.mpfr_eint(rop, op, mpfr_rnd_t.MPFR_RNDN) == 1);

// Assert the value of rop.
Assert.IsTrue(rop.ToString() == "0.189511781635593675550e1");

// Release unmanaged memory allocated for rop and op.
mpfr_lib.mpfr_clears(rop, op, null);
See Also