/// <summary> /// Returns the gamma function of x. /// </summary> /// <param name="x">Parameter for the gamma function.</param> /// <returns>Gamma function of x.</returns> public static Decimal64 Tgamma(Decimal64 x) { return(new Decimal64(NativeImpl.bid64Tgamma(x.Bits))); }
/// <summary> /// The function compute the quantum exponent of a finite argument. The numerical value of a finite number /// is given by: (-1)^sign x coefficient x 10^exponent. The quantum of a finite number is given by /// 1 x 10^exponent and represents the value of a unit in the least significant position of the coefficient /// of a finite number. The quantum exponent is the exponent of the quantum (represented by exponent above). /// </summary> /// <param name="x">The value for operation.</param> /// <returns>The quantum exponent.</returns> public static int QuantExp(Decimal64 x) { return(NativeImpl.bid64Quantexp(x.Bits)); }
/// <summary> /// The function compute the quantum exponent of a finite argument. The numerical value of a finite number /// is given by: (-1)^sign x coefficient x 10^exponent. The quantum of a finite number is given by /// 1 x 10^exponent and represents the value of a unit in the least significant position of the coefficient /// of a finite number. The quantum exponent is the exponent of the quantum (represented by exponent above). /// </summary> /// <param name="x">The value for operation.</param> /// <returns>The quantum.</returns> public static Decimal64 Quantum(Decimal64 x) { return(new Decimal64(NativeImpl.bid64Quantum(x.Bits))); }
/// <summary> /// Returns the result of multiplying x (the significand) by 10 raised to the power of exp (the exponent). /// </summary> /// <param name="x">Floating point value representing the significand.</param> /// <param name="n">Value of the exponent.</param> /// <returns>The x*10^exp value.</returns> public static Decimal64 Ldexp(Decimal64 x, int n) { return(new Decimal64(NativeImpl.bid64Ldexp(x.Bits, n))); }
/// <summary> /// Convert 64-bit decimal floating-point value (binary encoding) /// to 64-bit binary floating-point format. /// </summary> /// <returns>The converted value.</returns> public static double ToBinary64(this Decimal64 x) { return(NativeImpl.bid64ToBinary64(x.Bits)); }
/// <summary> /// sameQuantum(x, y) is <c>true</c> if the exponents of x and y are the same, /// and <c>false</c> otherwise; sameQuantum(NaN, NaN) and sameQuantum(inf, inf) are /// <c>true</c>; if exactly one operand is infinite or exactly one operand is NaN, /// sameQuantum is <c>false</c>. /// </summary> /// <param name="x">First decimal value.</param> /// <param name="y">Second decimal value.</param> /// <returns>Comparison flag.</returns> public static bool IsSameQuantum(Decimal64 x, Decimal64 y) { return(NativeImpl.bid64SameQuantum(x.Bits, y.Bits)); }
/// <summary> /// Return the radix b of the format of x, 2 or 10. /// </summary> /// <param name="x">The test value.</param> /// <returns>The value radix.</returns> public static int Radix(Decimal64 x) { return(NativeImpl.bid64Radix(x.Bits)); }
/// <summary> /// Round 64-bit decimal floating-point value to integral-valued decimal /// floating-point value in the same format, using the rounding-to-nearest-away mode; /// </summary> /// <param name="x">Rounding number.</param> /// <returns>The rounded value.</returns> public static Decimal64 RoundIntegralNearestAway(Decimal64 x) { return(new Decimal64(NativeImpl.bid64RoundIntegralNearestAway(x.Bits))); }
public static Decimal64 NextUp(Decimal64 x) { return(new Decimal64(NativeImpl.bid64Nextup(x.Bits))); }
/// <summary> /// Returns e raised to the power x minus one. /// </summary> /// <param name="x">Value of the exponent.</param> /// <returns>e raised to the power of x, minus one.</returns> public static Decimal64 Expm1(Decimal64 x) { return(new Decimal64(NativeImpl.bid64Expm1(x.Bits))); }
/// <summary> /// Round 64-bit decimal floating-point value to integral-valued decimal /// floating-point value in the same format, using the rounding-to-zero mode; /// </summary> /// <param name="x">Rounding number.</param> /// <returns>The rounded value.</returns> public static Decimal64 RoundIntegralZero(Decimal64 x) { return(new Decimal64(NativeImpl.bid64RoundIntegralZero(x.Bits))); }
/// <summary> /// These function return a <c>true</c> value if either argument is NaN, otherwise <c>false</c>. /// </summary> /// <param name="y">Second decimal number.</param> /// <returns><c>true</c> if either argument is NaN.</returns> public static bool IsUnordered(this Decimal64 x, Decimal64 y) { return(NativeImpl.bid64QuietUnordered(x.Bits, y.Bits)); }
/// <summary> /// Compare 64-bit decimal floating-point numbers for specified relation. /// </summary> /// <param name="y">Second decimal number.</param> /// <returns>The comparison sign.</returns> public static bool IsNotLess(this Decimal64 x, Decimal64 y) { return(NativeImpl.bid64QuietNotLess(x.Bits, y.Bits)); }
//public static Decimal64 Add(Decimal64 x, Decimal64 y) { return new Decimal64(NativeImpl.bid64Add(x.Bits, y.Bits)); } //public static Decimal64 Sub(Decimal64 x, Decimal64 y) { return new Decimal64(NativeImpl.bid64Sub(x.Bits, y.Bits)); } //public static Decimal64 Mul(Decimal64 x, Decimal64 y) { return new Decimal64(NativeImpl.bid64Mul(x.Bits, y.Bits)); } //public static Decimal64 Div(Decimal64 x, Decimal64 y) { return new Decimal64(NativeImpl.bid64Div(x.Bits, y.Bits)); } /// <summary> /// Decimal floating-point fused multiply-add: x*y+z /// </summary> /// <param name="x">Values to be multiplied.</param> /// <param name="y">Values to be multiplied.</param> /// <param name="z">Value to be added.</param> /// <returns>The result of x*y+z</returns> public static Decimal64 Fma(Decimal64 x, Decimal64 y, Decimal64 z) { return(new Decimal64(NativeImpl.bid64Fma(x.Bits, y.Bits, z.Bits))); }
public static bool IsInf(Decimal64 x) { return(NativeImpl.bid64IsInf(x.Bits)); }
public static Decimal64 NextDown(Decimal64 x) { return(new Decimal64(NativeImpl.bid64Nextdown(x.Bits))); }
/// <summary> /// Tells which of the following ten classes x falls into (details in /// the IEEE Standard 754-2008): signalingNaN, quietNaN, negativeInfinity, /// negativeNormal, negativeSubnormal, negativeZero, positiveZero, /// positiveSubnormal, positiveNormal, positiveInfinity. /// </summary> /// <param name="x">Test value.</param> /// <returns>The value class.</returns> public static int ClassOfValue(Decimal64 x) { return(NativeImpl.bid64Class(x.Bits)); }
/// <summary> /// Returns the next 64-bit decimal floating-point number that neighbors /// the first operand in the direction toward the second operand. /// </summary> /// <param name="x">Starting point.</param> /// <param name="y">Direction.</param> /// <returns>Starting point value adjusted in Direction way.</returns> public static Decimal64 NextAfter(Decimal64 x, Decimal64 y) { return(new Decimal64(NativeImpl.bid64Nextafter(x.Bits, y.Bits))); }
/// <summary> /// Return <c>true</c> if the absolute values of x and y are ordered /// (see the IEEE Standard 754-2008) /// </summary> /// <param name="x">First decimal value.</param> /// <param name="y">Second decimal value.</param> /// <returns>Comparison flag.</returns> public static bool IsTotalOrderMag(Decimal64 x, Decimal64 y) { return(NativeImpl.bid64TotalOrderMag(x.Bits, y.Bits)); }
/// <summary> /// Returns the canonicalized floating-point number x if x < y, /// y if y < x, the canonicalized floating-point number if one operand is /// a floating-point number and the other a quiet NaN. /// </summary> /// <param name="x">First decimal number.</param> /// <param name="y">Second decimal number.</param> /// <returns>The minimal value.</returns> public static Decimal64 MinNum(Decimal64 x, Decimal64 y) { return(new Decimal64(NativeImpl.bid64Minnum(x.Bits, y.Bits))); }
/// <summary> /// Returns the exponent e of x, a signed integral value, determined /// as though x were represented with infinite range and minimum exponent. /// </summary> /// <param name="x">Value whose ilogb is returned.</param> /// <returns>The integral part of the logarithm of |x|.</returns> public static int Ilogb(Decimal64 x) { return(NativeImpl.bid64Ilogb(x.Bits)); }
/// <summary> /// Returns the canonicalized floating-point number x if |x| > |y|, /// y if |y| > |x|, otherwise this function is identical to <see cref="MaxNum(Decimal64, Decimal64)"/>. /// </summary> /// <param name="x">First decimal number.</param> /// <param name="y">Second decimal number.</param> /// <returns>The value with maximal magnitude.</returns> public static Decimal64 MaxNumMag(Decimal64 x, Decimal64 y) { return(new Decimal64(NativeImpl.bid64MaxnumMag(x.Bits, y.Bits))); }
/// <summary> /// Convert 64-bit decimal floating-point value (binary encoding) /// to 32-bit binary floating-point format. /// </summary> /// <returns>The converted value.</returns> public static float ToBinary32(this Decimal64 x) { return(NativeImpl.bid64ToBinary32(x.Bits)); }
/// <summary> /// Return <c>true</c> if and only if x is subnormal. /// </summary> /// <returns>The check flag.</returns> public static bool IsSubnormal(this Decimal64 x) { return(NativeImpl.bid64IsSubnormal(x.Bits)); }
/// <summary> /// Rounds the floating-point argument arg to an integer value in floating-point format, using the current rounding mode. /// </summary> /// <param name="x">Value to round.</param> /// <returns>The rounded value.</returns> public static Decimal64 NearByInt(Decimal64 x) { return(new Decimal64(NativeImpl.bid64Nearbyint(x.Bits))); }
/// <summary> /// Return <c>true</c> if and only if x is a signaling NaN. /// </summary> /// <returns>The check flag.</returns> public static bool IsSignaling(this Decimal64 x) { return(NativeImpl.bid64IsSignaling(x.Bits)); }
/// <summary> /// Returns the natural logarithm of one plus x: log(1+x). /// </summary> /// <param name="x">Value whose logarithm is calculated.</param> /// <returns>The natural logarithm of (1+x).</returns> public static Decimal64 Log1p(Decimal64 x) { return(new Decimal64(NativeImpl.bid64Log1p(x.Bits))); }
/// <summary> /// Return <c>true</c> if and only if x is a finite number, infinity, or /// NaN that is canonical. /// </summary> /// <returns>The check flag.</returns> public static bool IsCanonical(this Decimal64 x) { return(NativeImpl.bid64IsCanonical(x.Bits)); }
/// <summary> /// Returns base raised to the power exponent. /// </summary> /// <param name="x">Base value.</param> /// <param name="y">Exponent value.</param> /// <returns>The result of raising base to the power exponent.</returns> public static Decimal64 Pow(Decimal64 x, Decimal64 y) { return(new Decimal64(NativeImpl.bid64Pow(x.Bits, y.Bits))); }
/// <summary> /// Returns the area hyperbolic tangent of x. /// </summary> /// <param name="x">Value whose area hyperbolic tangent is computed, in the interval [-1,+1].</param> /// <returns>Area hyperbolic tangent of x.</returns> public static Decimal64 Atanh(Decimal64 x) { return(new Decimal64(NativeImpl.bid64Atanh(x.Bits))); }