Package com.singularsys.jepexamples.diagnostics

# Class Utils

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

public class Utils extends Object
Some common utility methods

Since:
  Jep 3.5
Author:
  Richard Morris

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Utils()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static String`
  `hornerExpression(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 String`
  `lnExpression(String varName, int nDeriv)`
  Generate string giving approximation to log
  `static String`
  `recursiveHornerExpression(String varName, String lastVar, int nTerms)`

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

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

- ## Constructor Details

  - ### Utils

    public Utils()

- ## Method Details

  - ### hornerExpression

    public static String hornerExpression(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 String recursiveHornerExpression(String varName, String lastVar, int nTerms)

  - ### lnExpression

    public static String lnExpression(String varName, int nDeriv)
    Generate string giving approximation to log