Search Results for

    Show / Hide Table of Contents

    Class CommonBits

    Determines the maximum number of common most-significant bits in the mantissa of one or numbers. Can be used to compute the double-precision number which is represented by the common bits. If there are no common bits, the number computed is 0.0.

    Inheritance
    object
    CommonBits
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: NetTopologySuite.Precision
    Assembly: NetTopologySuite.dll
    Syntax
    public class CommonBits

    Properties

    | Edit this page View Source

    Common

    Declaration
    public double Common { get; }
    Property Value
    Type Description
    double

    Methods

    | Edit this page View Source

    Add(double)

    Declaration
    public void Add(double num)
    Parameters
    Type Name Description
    double num
    | Edit this page View Source

    GetBit(long, int)

    Extracts the i'th bit of a bitstring.

    Declaration
    public static int GetBit(long bits, int i)
    Parameters
    Type Name Description
    long bits

    The bitstring to extract from.

    int i

    The bit to extract.

    Returns
    Type Description
    int

    The value of the extracted bit.

    | Edit this page View Source

    NumCommonMostSigMantissaBits(long, long)

    This computes the number of common most-significant bits in the mantissas of two double-precision numbers. It does not count the hidden bit, which is always 1. It does not determine whether the numbers have the same exponent - if they do not, the value computed by this function is meaningless.

    Declaration
    public static int NumCommonMostSigMantissaBits(long num1, long num2)
    Parameters
    Type Name Description
    long num1
    long num2
    Returns
    Type Description
    int

    The number of common most-significant mantissa bits.

    | Edit this page View Source

    SignExpBits(long)

    Computes the bit pattern for the sign and exponent of a double-precision number.

    Declaration
    public static long SignExpBits(long num)
    Parameters
    Type Name Description
    long num
    Returns
    Type Description
    long

    The bit pattern for the sign and exponent.

    | Edit this page View Source

    ToString(long)

    A representation of the Double bits formatted for easy readability

    Declaration
    public string ToString(long bits)
    Parameters
    Type Name Description
    long bits
    Returns
    Type Description
    string
    | Edit this page View Source

    ZeroLowerBits(long, int)

    Zeroes the lower n bits of a bitstring.

    Declaration
    public static long ZeroLowerBits(long bits, int nBits)
    Parameters
    Type Name Description
    long bits

    The bitstring to alter.

    int nBits

    the number of bits to zero.

    Returns
    Type Description
    long

    The zeroed bitstring.

    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX