Search Results for

    Show / Hide Table of Contents

    Class SignificantDigits

    Utility class to round double variables to a given nubmer of signficant digits.

    Inheritance
    object
    SignificantDigits
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: TimeSeriesAnalysis.Utility
    Assembly: TimeSeriesAnalysis.dll
    Syntax
    public static class SignificantDigits

    Methods

    | Edit this page View Source

    Format(double, int)

    Rounds scalar down to number of significant digits (26->20 if digits=1 for instance)

    Declaration
    public static double Format(double number, int digits)
    Parameters
    Type Name Description
    double number
    int digits
    Returns
    Type Description
    double
    | Edit this page View Source

    Format(double, int, out int)

    Rounds down to number of significant digits (26->20 if digits=1 for instance)

    Declaration
    public static double Format(double number, int digits, out int exponent)
    Parameters
    Type Name Description
    double number
    int digits
    int exponent
    Returns
    Type Description
    double
    | Edit this page View Source

    Format(double[], int)

    Rounds array down to number of significant digits (26->20 if digits=1 for instance)

    Declaration
    public static double[] Format(double[] numbers, int digits)
    Parameters
    Type Name Description
    double[] numbers
    int digits
    Returns
    Type Description
    double[]
    | Edit this page View Source

    GetSciFormat(double, out double, out int)

    Returns number in scientific format with coefficient and exponential paramters

    Declaration
    public static void GetSciFormat(double number, out double coeff, out int exp)
    Parameters
    Type Name Description
    double number
    double coeff
    int exp
    | Edit this page View Source

    SciToDouble(double, int)

    Converts a scientific number on the format coeff*10^exp to a double

    Declaration
    public static double SciToDouble(double coeff, int exp)
    Parameters
    Type Name Description
    double coeff

    coefficient

    int exp

    exponent

    Returns
    Type Description
    double

    converted double

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