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 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