com.singularsys.jepexamples.diagnostics

## Class Utils

- java.lang.Object
- - com.singularsys.jepexamples.diagnostics.Utils

-     public class Utils
      extends java.lang.Object

  Some common utility methods
  Since:
    Jep 3.5
  Author:
    Richard Morris

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Utils()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static java.lang.String` | `hornerExpression(java.lang.String varName, int nTerms)` Generate a string giving an approximation to log using Horner expression of the form "x*(1/1-x*(1/2-x*(1/3-x*(1/4 ...))))"
    `static java.lang.String` | `lnExpression(java.lang.String varName, int nDeriv)` Generate string giving approximation to log
    `static java.lang.String` | `recursiveHornerExpression(java.lang.String varName, java.lang.String lastVar, int nTerms)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Utils

          public Utils()

  - ### Method Detail

    - #### hornerExpression

          public static java.lang.String hornerExpression(java.lang.String varName,
                                                          int nTerms)

      Generate a string giving an approximation to log using Horner expression of the form "x*(1/1-x*(1/2-x*(1/3-x*(1/4 ...))))"
      Parameters:
        `varName` -
        `nTerms` -
      Returns:
        a string containing the expression

    - #### recursiveHornerExpression

          public static java.lang.String recursiveHornerExpression(java.lang.String varName,
                                                                   java.lang.String lastVar,
                                                                   int nTerms)

    - #### lnExpression

          public static java.lang.String lnExpression(java.lang.String varName,
                                                      int nDeriv)

      Generate string giving approximation to log

Copyright © 2018 Singular Systems http://www.singularsys.com/jep