#! /bin/sh

if expr a : '\(a\)' >/dev/null 2>&1; then
  as_expr=expr
else
  as_expr=false
fi


## --------------------- ##
## M4sh Initialization.  ##
## --------------------- ##

# Be Bourne compatible
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
  emulate sh
  NULLCMD=:
elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
  set -o posix
fi

# NLS nuisances.
# Support unset when possible.
if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
  as_unset=unset
else
  as_unset=false
fi

(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
    { $as_unset LANG || test "${LANG+set}" != set; } ||
      { LANG=C; export LANG; }
(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
    { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
      { LC_ALL=C; export LC_ALL; }
(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
    { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
      { LC_TIME=C; export LC_TIME; }
(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
    { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
      { LC_CTYPE=C; export LC_CTYPE; }
(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
    { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
      { LANGUAGE=C; export LANGUAGE; }
(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
    { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
      { LC_COLLATE=C; export LC_COLLATE; }
(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
    { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
      { LC_NUMERIC=C; export LC_NUMERIC; }
(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
    { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
      { LC_MESSAGES=C; export LC_MESSAGES; }


# Name of the executable.
as_me=`(basename "$0") 2>/dev/null ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
	 X"$0" : 'X\(//\)$' \| \
	 X"$0" : 'X\(/\)$' \| \
	 .     : '\(.\)' 2>/dev/null ||
echo X/"$0" |
    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
  	  /^X\/\(\/\/\)$/{ s//\1/; q; }
  	  /^X\/\(\/\).*/{ s//\1/; q; }
  	  s/.*/./; q'`

# PATH needs CR, and LINENO needs CR and PATH.
# Avoid depending upon Character Ranges.
as_cr_letters='abcdefghijklmnopqrstuvwxyz'
as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
as_cr_Letters=$as_cr_letters$as_cr_LETTERS
as_cr_digits='0123456789'
as_cr_alnum=$as_cr_Letters$as_cr_digits

# The user is always right.
if test "${PATH_SEPARATOR+set}" != set; then
  echo "#! /bin/sh" >conftest.sh
  echo  "exit 0"   >>conftest.sh
  chmod +x conftest.sh
  if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
    PATH_SEPARATOR=';'
  else
    PATH_SEPARATOR=:
  fi
  rm -f conftest.sh
fi


  as_lineno_1=$LINENO
  as_lineno_2=$LINENO
  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
  test "x$as_lineno_1" != "x$as_lineno_2" &&
  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
  # Find who we are.  Look in the path if we contain no path at all
  # relative or not.
  case $0 in
    *[\\/]* ) as_myself=$0 ;;
    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
done

       ;;
  esac
  # We did not find ourselves, most probably we were run as `sh COMMAND'
  # in which case we are not to be found in the path.
  if test "x$as_myself" = x; then
    as_myself=$0
  fi
  if test ! -f "$as_myself"; then
    { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
   { (exit 1); exit 1; }; }
  fi
  case $CONFIG_SHELL in
  '')
    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for as_base in sh bash ksh sh5; do
	 case $as_dir in
	 /*)
	   if ("$as_dir/$as_base" -c '
  as_lineno_1=$LINENO
  as_lineno_2=$LINENO
  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
  test "x$as_lineno_1" != "x$as_lineno_2" &&
  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
	     CONFIG_SHELL=$as_dir/$as_base
	     export CONFIG_SHELL
	     exec "$CONFIG_SHELL" "$0" ${1+"$@"}
	   fi;;
	 esac
       done
done
;;
  esac

  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
  # uniformly replaced by the line number.  The first 'sed' inserts a
  # line-number line before each line; the second 'sed' does the real
  # work.  The second script uses 'N' to pair each line-number line
  # with the numbered line, and appends trailing '-' during
  # substitution so that $LINENO is not a special case at line end.
  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
  sed '=' <$as_myself |
    sed '
      N
      s,$,-,
      : loop
      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
      t loop
      s,-$,,
      s,^['$as_cr_digits']*\n,,
    ' >$as_me.lineno &&
  chmod +x $as_me.lineno ||
    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
   { (exit 1); exit 1; }; }

  # Don't try to exec as it changes $[0], causing all sort of problems
  # (the dirname of $[0] is not the place where we might find the
  # original and so on.  Autoconf is especially sensible to this).
  . ./$as_me.lineno
  # Exit status is that of the last command.
  exit
}


case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
  *c*,-n*) ECHO_N= ECHO_C='
' ECHO_T='	' ;;
  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
esac

if expr a : '\(a\)' >/dev/null 2>&1; then
  as_expr=expr
else
  as_expr=false
fi

rm -f conf$$ conf$$.exe conf$$.file
echo >conf$$.file
if ln -s conf$$.file conf$$ 2>/dev/null; then
  # We could just check for DJGPP; but this test a) works b) is more generic
  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
  if test -f conf$$.exe; then
    # Don't use ln at all; we don't have any links
    as_ln_s='cp -p'
  else
    as_ln_s='ln -s'
  fi
elif ln conf$$.file conf$$ 2>/dev/null; then
  as_ln_s=ln
else
  as_ln_s='cp -p'
fi
rm -f conf$$ conf$$.exe conf$$.file

as_executable_p="test -f"

# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"

# Sed expression to map a string onto a valid variable name.
as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"


# IFS
# We need space, tab and new line, in precisely that order.
as_nl='
'
IFS=" 	$as_nl"

# CDPATH.
$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }

SHELL=${CONFIG_SHELL-/bin/sh}

# How were we run?
at_cli_args=${1+"$@"}

# Load the config file.
for at_file in atconfig atlocal
do
  test -r $at_file || continue
  . ./$at_file || { echo "$as_me: error: invalid content: $at_file" >&2
   { (exit 1); exit 1; }; }
done

# atconfig delivers paths relative to the directory the test suite is
# in, but the groups themselves are run in testsuite-dir/group-dir.
if test -n "$at_top_srcdir"; then
  builddir=../..
  for at_dir in srcdir top_srcdir top_builddir
  do
    at_val=`eval echo '${'at_$at_dir'}'`
    eval "$at_dir=$at_val/../.."
  done
fi

# Not all shells have the 'times' builtin; the subshell is needed to make
# sure we discard the 'times: not found' message from the shell.
at_times=:
(times) >/dev/null 2>&1 && at_times=times

# CLI Arguments to pass to the debugging scripts.
at_debug_args=
# -e sets to true
at_errexit_p=false
# Shall we be verbose?
at_verbose=:
at_quiet=echo

# Shall we keep the debug scripts?  Must be `:' when the suite is
# run by a debug script, so that the script doesn't remove itself.
at_debug_p=false
# Display help message?
at_help_p=false
# List test groups?
at_list_p=false
# Test groups to run
at_groups=

# The directory we are in.
at_dir=`pwd`
# The directory the whole suite works in.
# Should be absolutely to let the user `cd' at will.
at_suite_dir=$at_dir/$as_me.dir
# The file containing the location of the last AT_CHECK.
at_check_line_file=$at_suite_dir/at-check-line
# The files containing the output of the tested commands.
at_stdout=$at_suite_dir/at-stdout
at_stder1=$at_suite_dir/at-stder1
at_stderr=$at_suite_dir/at-stderr
# The file containing dates.
at_times_file=$at_suite_dir/at-times

# List of the tested programs.
at_tested=''
# List of the all the test groups.
at_groups_all=' banner-1 1 banner-2 2 banner-3 3 banner-4 4 banner-5 5 banner-6 6'
# As many dots as there are digits in the last test group number.
# Used to normalize the test group numbers so that `ls' lists them in
# numerical order.
at_format='.'
# Description of all the test groups.
at_help_all='1;basics.at:24;Check basics.;
2;constants.at:24;Check constants.;
3;variables.at:24;Check variables.;
4;functions.at:24;Check functions.;
5;un_ops.at:24;Check unary operators.;
6;bin_ops.at:24;Check binary operators.;
'


while test $# -gt 0; do
  case $1 in
    --help | -h )
        at_help_p=:
        ;;

    --list | -l )
        at_list_p=:
        ;;

    --version | -V )
        echo "$as_me (libmatheval 1.0.1)"
        exit 0
        ;;

    --clean | -c )
        rm -rf $at_suite_dir $as_me.log
        exit 0
        ;;

    --debug | -d )
        at_debug_p=:
        ;;

    --errexit | -e )
        at_debug_p=:
        at_errexit_p=:
        ;;

    --verbose | -v )
        at_verbose=echo; at_quiet=:
        ;;

    --trace | -x )
        at_traceon='set -vx'; at_traceoff='set +vx'
        ;;

    [0-9] | [0-9][0-9] | [0-9][0-9][0-9] | [0-9][0-9][0-9][0-9])
        at_groups="$at_groups$1 "
        ;;

    # Ranges
    [0-9]- | [0-9][0-9]- | [0-9][0-9][0-9]- | [0-9][0-9][0-9][0-9]-)
        at_range_start=`echo $1 |tr -d '-'`
        at_range=`echo " $at_groups_all " | \
          sed -e 's,^.* '$at_range_start' ,'$at_range_start' ,'`
        at_groups="$at_groups$at_range "
        ;;

    -[0-9] | -[0-9][0-9] | -[0-9][0-9][0-9] | -[0-9][0-9][0-9][0-9])
        at_range_end=`echo $1 |tr -d '-'`
        at_range=`echo " $at_groups_all " | \
          sed -e 's, '$at_range_end' .*$, '$at_range_end','`
        at_groups="$at_groups$at_range "
        ;;

    [0-9]-[0-9] | [0-9]-[0-9][0-9] | [0-9]-[0-9][0-9][0-9] | \
    [0-9]-[0-9][0-9][0-9][0-9] | [0-9][0-9]-[0-9][0-9] | \
    [0-9][0-9]-[0-9][0-9][0-9] | [0-9][0-9]-[0-9][0-9][0-9][0-9] | \
    [0-9][0-9][0-9]-[0-9][0-9][0-9] | \
    [0-9][0-9][0-9]-[0-9][0-9][0-9][0-9] | \
    [0-9][0-9][0-9][0-9]-[0-9][0-9][0-9][0-9] )
        at_range_start=`echo $1 |sed 's,-.*,,'`
        at_range_end=`echo $1 |sed 's,.*-,,'`
        # FIXME: Maybe test to make sure start <= end?
        at_range=`echo " $at_groups_all " | \
          sed -e 's,^.* '$at_range_start' ,'$at_range_start' ,' \
              -e 's, '$at_range_end' .*$, '$at_range_end','`
        at_groups="$at_groups$at_range "
        ;;

    # Keywords.
    --keywords | -k )
        shift
        at_groups_selected=$at_help_all
        for at_keyword in `IFS=,; set X $1; shift; echo ${1+$@}`
        do
          # It is on purpose that we match the test group titles too.
          at_groups_selected=`echo "$at_groups_selected" |
                             egrep -i "^[^;]*;[^;]*;.*$at_keyword"`
        done
        at_groups_selected=`echo "$at_groups_selected" | sed 's/;.*//'`
	# Smash the end of lines.
	at_groups_selected=`echo $at_groups_selected`
        at_groups="$at_groups$at_groups_selected "
        ;;

    *=*)
  	at_envvar=`expr "x$1" : 'x\([^=]*\)='`
  	# Reject names that are not valid shell variable names.
  	expr "x$at_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
  	  { echo "$as_me: error: invalid variable name: $at_envvar" >&2
   { (exit 1); exit 1; }; }
  	at_value=`expr "x$1" : 'x[^=]*=\(.*\)'`
  	at_value=`echo "$at_value" | sed "s/'/'\\\\\\\\''/g"`
  	eval "$at_envvar='$at_value'"
  	export $at_envvar
	# Propagate to debug scripts.
  	at_debug_args="$at_debug_args $1"
  	;;

     *) echo "$as_me: invalid option: $1" >&2
        echo "Try \`$0 --help' for more information." >&2
        exit 1
        ;;
  esac
  shift
done

# Selected test groups.
test -z "$at_groups" && at_groups=$at_groups_all

# Help message.
if $at_help_p; then
  cat <<_ATEOF
Usage: $0 [OPTION]... [VARIABLE=VALUE]... [TESTS]

Run all the tests, or the selected TESTS, and save a detailed log file.
Upon failure, create debugging scripts.

You should not change environment variables unless explicitly passed
as command line arguments.  Set \`AUTOTEST_PATH' to select the executables
to exercise.  Each relative directory is expanded as build and source
directories relatively to the top level of this distribution.  E.g.,

  $ $0 AUTOTEST_PATH=bin

possibly amounts into

  PATH=/tmp/foo-1.0/bin:/src/foo-1.0/bin:\$PATH

Operation modes:
  -h, --help     print the help message, then exit
  -V, --version  print version number, then exit
  -c, --clean    remove all the files this test suite might create and exit
  -l, --list     describes all the tests, or the selected TESTS

Execution tuning:
  -k, --keywords=KEYWORDS
                 select the tests matching all the comma separated KEYWORDS
                 accumulates
  -e, --errexit  abort as soon as a test fails; implies --debug
  -v, --verbose  force more detailed output
                 default for debugging scripts
  -d, --debug    inhibit clean up and debug script creation
                 default for debugging scripts
  -x, --trace    enable tests shell tracing

Report bugs to <asamardzic@matf.bg.ac.yu>.
_ATEOF
  exit 0
fi

# List of tests.
if $at_list_p; then
  cat <<_ATEOF
libmatheval 1.0.1 test suite test groups:

 NUM: FILENAME:LINE      TEST-GROUP-NAME
      KEYWORDS

_ATEOF
  # "  1 42  45 " => "^(1|42|45);".
  at_groups_pattern=`echo "$at_groups" | sed 's/^  *//;s/  *$//;s/  */|/g'`
  at_groups_pattern="^(${at_groups_pattern});"
  echo "$at_help_all" |
    egrep -e "$at_groups_pattern" |
    awk 'BEGIN { FS = ";" }
         { if ($1) printf " %3d: %-18s %s\n", $1, $2, $3
           if ($4) printf "      %s\n", $4 } '
  exit 0
fi

# Don't take risks: use only absolute directories in PATH.
#
# For stand-alone test suites, AUTOTEST_PATH is relative to `.'.
#
# For embedded test suites, AUTOTEST_PATH is relative to the top level
# of the package.  Then expand it into build/src parts, since users
# may create executables in both places.
#
# There might be directories that don't exist, but don't redirect
# builtins' (eg., cd) stderr directly: Ultrix's sh hates that.
AUTOTEST_PATH=`echo $AUTOTEST_PATH | tr ':' $PATH_SEPARATOR`
at_path=
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $AUTOTEST_PATH $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  case $as_dir in
  [\\/]* | ?:[\\/]* )
    at_path=$at_path$PATH_SEPARATOR$as_dir
    ;;
  * )
    if test -z "$at_top_builddir"; then
      # Stand-alone test suite.
      at_path=$at_path$PATH_SEPARATOR$as_dir
    else
      # Embedded test suite.
      at_path=$at_path$PATH_SEPARATOR$at_top_builddir/$as_dir
      at_path=$at_path$PATH_SEPARATOR$at_top_srcdir/$as_dir
    fi
    ;;
esac
done


# Now build and simplify PATH.
PATH=
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $at_path
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  as_dir=`(cd "$as_dir" && pwd) 2>/dev/null`
test -d "$as_dir" || continue
case $PATH in
                  $as_dir                 | \
                  $as_dir$PATH_SEPARATOR* | \
  *$PATH_SEPARATOR$as_dir                 | \
  *$PATH_SEPARATOR$as_dir$PATH_SEPARATOR* ) ;;

  '') PATH=$as_dir ;;
   *) PATH=$PATH$PATH_SEPARATOR$as_dir ;;
esac
done

export PATH

# Setting up the FDs.
# 5 is stdout conditioned by verbosity.
if test $at_verbose = echo; then
  exec 5>&1
else
  exec 5>/dev/null
fi

# 6 is the log file.  To be preserved if `-d'.

if $at_debug_p; then
  exec 6>/dev/null
else
  exec 6>$as_me.log
fi

# Banners and logs.
cat <<\_ASBOX
## ----------------------------- ##
## libmatheval 1.0.1 test suite. ##
## ----------------------------- ##
_ASBOX
{
  cat <<\_ASBOX
## ----------------------------- ##
## libmatheval 1.0.1 test suite. ##
## ----------------------------- ##
_ASBOX
  echo

  echo "$as_me: command line was:"
  echo "  $ $0 $at_cli_args"
  echo

  # Try to find a few ChangeLogs in case it might help determining the
  # exact version.  Use the relative dir: if the top dir is a symlink,
  # find will not follow it (and options to follow the links are not
  # portable), which would result in no output here.
  if test -n "$at_top_srcdir"; then
    cat <<\_ASBOX
## ----------- ##
## ChangeLogs. ##
## ----------- ##
_ASBOX
    echo
    for at_file in `find "$at_top_srcdir" -name ChangeLog -print`
    do
      echo "$as_me: $at_file:"
      sed 's/^/| /;10q' $at_file
      echo
    done

    {
cat <<_ASUNAME
## --------- ##
## Platform. ##
## --------- ##

hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
uname -m = `(uname -m) 2>/dev/null || echo unknown`
uname -r = `(uname -r) 2>/dev/null || echo unknown`
uname -s = `(uname -s) 2>/dev/null || echo unknown`
uname -v = `(uname -v) 2>/dev/null || echo unknown`

/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`

/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`

_ASUNAME

as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  echo "PATH: $as_dir"
done

}
    echo
  fi

  # Contents of the config files.
  for at_file in atconfig atlocal
  do
    test -r $at_file || continue
    echo "$as_me: $at_file:"
    sed 's/^/| /' $at_file
    echo
  done

  cat <<\_ASBOX
## ---------------- ##
## Tested programs. ##
## ---------------- ##
_ASBOX
  echo
} >&6

# Report what programs are being tested.
for at_program in : $at_tested
do
  test "$at_program" = : && continue
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  test -f $as_dir/$at_program && break
done

  if test -f $as_dir/$at_program; then
    {
      echo "testsuite.at:24: $as_dir/$at_program --version"
      $as_dir/$at_program --version
      echo
    } >&6 2>&1
  else
    { { echo "$as_me:$LINENO: error: cannot find $at_program" >&6
echo "$as_me: error: cannot find $at_program" >&2;}
   { (exit 1); exit 1; }; }
  fi
done

{
  cat <<\_ASBOX
## --------------------------- ##
## Silently running the tests. ##
## --------------------------- ##
_ASBOX
} >&6

at_start_date=`date`
at_start_time=`(date +%s) 2>/dev/null`
echo "$as_me: starting at: $at_start_date" >&6
at_pass_list=
at_fail_list=
at_skip_list=
at_group_count=0

# Create the master directory if it doesn't already exist.
test -d $at_suite_dir ||
  mkdir $at_suite_dir ||
  { { echo "$as_me:$LINENO: error: cannot create $at_suite_dir" >&6
echo "$as_me: error: cannot create $at_suite_dir" >&2;}
   { (exit 1); exit 1; }; }

# Can we diff with `/dev/null'?  DU 5.0 refuses.
if diff /dev/null /dev/null >/dev/null 2>&1; then
  at_devnull=/dev/null
else
  at_devnull=$at_suite_dir/devnull
  cp /dev/null $at_devnull
fi

# Use `diff -u' when possible.
if diff -u $at_devnull $at_devnull >/dev/null 2>&1; then
  at_diff='diff -u'
else
  at_diff=diff
fi


for at_group in $at_groups
do
  # Be sure to come back to the top test directory.
  cd $at_suite_dir

  case $at_group in
    banner-*) ;;
    *)
     # Skip tests we already run (using --keywords makes it easy to get
     # duplication).
     case " $at_pass_test $at_skip_test $at_fail_test " in
       *" $at_group "* ) continue;;
     esac

     # Normalize the test group number.
     at_group_normalized=`expr "00000$at_group" : ".*\($at_format\)"`

     # Create a fresh directory for the next test group, and enter.
     at_group_dir=$at_suite_dir/$at_group_normalized
     rm -rf $at_group_dir
     mkdir $at_group_dir ||
       { { echo "$as_me:$LINENO: error: cannot create $at_group_dir" >&6
echo "$as_me: error: cannot create $at_group_dir" >&2;}
   { (exit 1); exit 1; }; }
     cd $at_group_dir
    ;;
  esac

  at_status=0
  # Clearly separate the test groups when verbose.
  test $at_group_count != 0 && $at_verbose
  case $at_group in

  banner-1 ) # Banner 1. basics.at:22
    cat <<\_ATEOF

Checking basic functionality.

_ATEOF
    ;;

  1 ) # 1. basics.at:24: Check basics.
    at_setup_line='basics.at:24'
    $at_verbose "1. basics.at:24: testing Check basics...."
    $at_quiet $ECHO_N "  1: basics.at:24      $ECHO_C"
    (
      $at_traceon


cat >basics.scm <<'_ATEOF'

(define f (evaluator-create "x+2"))
(define string (make-string (evaluator-calculate-length f)))
(evaluator-write f string)
(display string)
_ATEOF


$at_traceoff
$at_verbose "basics.at:34: matheval.sh basics.scm"
echo basics.at:34 >$at_check_line_file
( $at_traceon; matheval.sh basics.scm ) >$at_stdout 2>$at_stder1
at_status=$?
egrep '^ *\+' $at_stder1 >&2
egrep -v '^ *\+' $at_stder1 >$at_stderr
at_failed=false
(echo stderr:; cat $at_stderr) >&5
echo >>$at_stdout; echo "(x+2)" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   *);;
esac

$at_failed && exit 1
$at_traceon


cat >basics.scm <<'_ATEOF'

(define f (evaluator-create "x^3-4*y+4"))
(display (evaluator-evaluate f 1 '("x") '(1)))
_ATEOF


$at_traceoff
$at_verbose "basics.at:42: matheval.sh basics.scm"
echo basics.at:42 >$at_check_line_file
( $at_traceon; matheval.sh basics.scm ) >$at_stdout 2>$at_stder1
at_status=$?
egrep '^ *\+' $at_stder1 >&2
egrep -v '^ *\+' $at_stder1 >$at_stderr
at_failed=false
(echo stderr:; cat $at_stderr) >&5
echo >>$at_stdout; echo "5.0" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   *);;
esac

$at_failed && exit 1
$at_traceon


cat >basics.scm <<'_ATEOF'

(define f (evaluator-create "x+2"))
(define f_prim (evaluator-derivative f "x"))
(define string (make-string (evaluator-calculate-length f_prim)))
(evaluator-write f_prim string)
(display string)
_ATEOF


$at_traceoff
$at_verbose "basics.at:53: matheval.sh basics.scm"
echo basics.at:53 >$at_check_line_file
( $at_traceon; matheval.sh basics.scm ) >$at_stdout 2>$at_stder1
at_status=$?
egrep '^ *\+' $at_stder1 >&2
egrep -v '^ *\+' $at_stder1 >$at_stderr
at_failed=false
(echo stderr:; cat $at_stderr) >&5
echo >>$at_stdout; echo "1" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   *);;
esac

$at_failed && exit 1
$at_traceon


cat >basics.scm <<'_ATEOF'

(define f (evaluator-create "sin(x)*x^3"))
(display (evaluator-evaluate-x f 0.7))
_ATEOF


$at_traceoff
$at_verbose "basics.at:61: matheval.sh basics.scm"
echo basics.at:61 >$at_check_line_file
( $at_traceon; matheval.sh basics.scm ) >$at_stdout 2>$at_stder1
at_status=$?
egrep '^ *\+' $at_stder1 >&2
egrep -v '^ *\+' $at_stder1 >$at_stderr
at_failed=false
(echo stderr:; cat $at_stderr) >&5
echo >>$at_stdout; echo "0.220966666722528" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   *);;
esac

$at_failed && exit 1
$at_traceon


cat >basics.scm <<'_ATEOF'

(define f (evaluator-create "y/3+log(x)"))
(display (evaluator-evaluate-x-y f 0.4 -0.7))
_ATEOF


$at_traceoff
$at_verbose "basics.at:69: matheval.sh basics.scm"
echo basics.at:69 >$at_check_line_file
( $at_traceon; matheval.sh basics.scm ) >$at_stdout 2>$at_stder1
at_status=$?
egrep '^ *\+' $at_stder1 >&2
egrep -v '^ *\+' $at_stder1 >$at_stderr
at_failed=false
(echo stderr:; cat $at_stderr) >&5
echo >>$at_stdout; echo "-1.14962406520749" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   *);;
esac

$at_failed && exit 1
$at_traceon


cat >basics.scm <<'_ATEOF'

(define f (evaluator-create "x*sin(y)+0.6*tan(z)"))
(display (evaluator-evaluate-x-y-z f 11.2 0.41 -0.66))
_ATEOF


$at_traceoff
$at_verbose "basics.at:77: matheval.sh basics.scm"
echo basics.at:77 >$at_check_line_file
( $at_traceon; matheval.sh basics.scm ) >$at_stdout 2>$at_stder1
at_status=$?
egrep '^ *\+' $at_stder1 >&2
egrep -v '^ *\+' $at_stder1 >$at_stderr
at_failed=false
(echo stderr:; cat $at_stderr) >&5
echo >>$at_stdout; echo "3.99876152571934" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   *);;
esac

$at_failed && exit 1
$at_traceon


cat >basics.scm <<'_ATEOF'

(define f (evaluator-create "tan(x)/cos(x)"))
(define f_prim (evaluator-derivative-x f))
(define string (make-string (evaluator-calculate-length f_prim)))
(evaluator-write f_prim string)
(display string)
_ATEOF


$at_traceoff
$at_verbose "basics.at:88: matheval.sh basics.scm"
echo basics.at:88 >$at_check_line_file
( $at_traceon; matheval.sh basics.scm ) >$at_stdout 2>$at_stder1
at_status=$?
egrep '^ *\+' $at_stder1 >&2
egrep -v '^ *\+' $at_stder1 >$at_stderr
at_failed=false
(echo stderr:; cat $at_stderr) >&5
echo >>$at_stdout; echo "((((1/(cos(x)^2))*cos(x))-(tan(x)*(-sin(x))))/(cos(x)^2))" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   *);;
esac

$at_failed && exit 1
$at_traceon


cat >basics.scm <<'_ATEOF'

(define f (evaluator-create "x+0.7*log(y)"))
(define f_prim (evaluator-derivative-y f))
(define string (make-string (evaluator-calculate-length f_prim)))
(evaluator-write f_prim string)
(display string)
_ATEOF


$at_traceoff
$at_verbose "basics.at:99: matheval.sh basics.scm"
echo basics.at:99 >$at_check_line_file
( $at_traceon; matheval.sh basics.scm ) >$at_stdout 2>$at_stder1
at_status=$?
egrep '^ *\+' $at_stder1 >&2
egrep -v '^ *\+' $at_stder1 >$at_stderr
at_failed=false
(echo stderr:; cat $at_stderr) >&5
echo >>$at_stdout; echo "((0*log(y))+(0.7*(1/y)))" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   *);;
esac

$at_failed && exit 1
$at_traceon


cat >basics.scm <<'_ATEOF'

(define f (evaluator-create "x*z+y^3/z^2"))
(define f_prim (evaluator-derivative-z f))
(define string (make-string (evaluator-calculate-length f_prim)))
(evaluator-write f_prim string)
(display string)
_ATEOF


$at_traceoff
$at_verbose "basics.at:110: matheval.sh basics.scm"
echo basics.at:110 >$at_check_line_file
( $at_traceon; matheval.sh basics.scm ) >$at_stdout 2>$at_stder1
at_status=$?
egrep '^ *\+' $at_stder1 >&2
egrep -v '^ *\+' $at_stder1 >$at_stderr
at_failed=false
(echo stderr:; cat $at_stderr) >&5
echo >>$at_stdout; echo "(((0*z)+x)+((((0*(y^2))*(z^2))-((y^3)*(2*z)))/((z^2)^2)))" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   *);;
esac

$at_failed && exit 1
$at_traceon


    $at_times >$at_times_file
    )
    at_status=$?
    ;;


  banner-2 ) # Banner 2. constants.at:22
    cat <<\_ATEOF

Checking evaluating constants.

_ATEOF
    ;;

  2 ) # 2. constants.at:24: Check constants.
    at_setup_line='constants.at:24'
    $at_verbose "2. constants.at:24: testing Check constants...."
    $at_quiet $ECHO_N "  2: constants.at:24   $ECHO_C"
    (
      $at_traceon


cat >constant.scm <<'_ATEOF'

(define f (evaluator-create "42"))
(display (evaluator-evaluate-x f 0))
_ATEOF


$at_traceoff
$at_verbose "constants.at:32: matheval.sh constant.scm"
echo constants.at:32 >$at_check_line_file
( $at_traceon; matheval.sh constant.scm ) >$at_stdout 2>$at_stder1
at_status=$?
egrep '^ *\+' $at_stder1 >&2
egrep -v '^ *\+' $at_stder1 >$at_stderr
at_failed=false
(echo stderr:; cat $at_stderr) >&5
echo >>$at_stdout; echo "42.0" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   *);;
esac

$at_failed && exit 1
$at_traceon


cat >constant.scm <<'_ATEOF'

(define f (evaluator-create "-2"))
(display (evaluator-evaluate-x f 0))
_ATEOF


$at_traceoff
$at_verbose "constants.at:40: matheval.sh constant.scm"
echo constants.at:40 >$at_check_line_file
( $at_traceon; matheval.sh constant.scm ) >$at_stdout 2>$at_stder1
at_status=$?
egrep '^ *\+' $at_stder1 >&2
egrep -v '^ *\+' $at_stder1 >$at_stderr
at_failed=false
(echo stderr:; cat $at_stderr) >&5
echo >>$at_stdout; echo "-2.0" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   *);;
esac

$at_failed && exit 1
$at_traceon


cat >constant.scm <<'_ATEOF'

(define f (evaluator-create "2+2"))
(display (evaluator-evaluate-x f 0))
_ATEOF


$at_traceoff
$at_verbose "constants.at:48: matheval.sh constant.scm"
echo constants.at:48 >$at_check_line_file
( $at_traceon; matheval.sh constant.scm ) >$at_stdout 2>$at_stder1
at_status=$?
egrep '^ *\+' $at_stder1 >&2
egrep -v '^ *\+' $at_stder1 >$at_stderr
at_failed=false
(echo stderr:; cat $at_stderr) >&5
echo >>$at_stdout; echo "4.0" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   *);;
esac

$at_failed && exit 1
$at_traceon


cat >constant.scm <<'_ATEOF'

(define f (evaluator-create "3^(-0.4)"))
(display (evaluator-evaluate-x f 0))
_ATEOF


$at_traceoff
$at_verbose "constants.at:56: matheval.sh constant.scm"
echo constants.at:56 >$at_check_line_file
( $at_traceon; matheval.sh constant.scm ) >$at_stdout 2>$at_stder1
at_status=$?
egrep '^ *\+' $at_stder1 >&2
egrep -v '^ *\+' $at_stder1 >$at_stderr
at_failed=false
(echo stderr:; cat $at_stderr) >&5
echo >>$at_stdout; echo "0.644394014977254" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   *);;
esac

$at_failed && exit 1
$at_traceon


    $at_times >$at_times_file
    )
    at_status=$?
    ;;


  banner-3 ) # Banner 3. variables.at:22
    cat <<\_ATEOF

Checking evaluating variables.

_ATEOF
    ;;

  3 ) # 3. variables.at:24: Check variables.
    at_setup_line='variables.at:24'
    $at_verbose "3. variables.at:24: testing Check variables...."
    $at_quiet $ECHO_N "  3: variables.at:24   $ECHO_C"
    (
      $at_traceon


cat >variable.scm <<'_ATEOF'

(define f (evaluator-create "1/x"))
(define string (make-string (evaluator-calculate-length f)))
(evaluator-write f string)
(display string)
_ATEOF


$at_traceoff
$at_verbose "variables.at:34: matheval.sh variable.scm"
echo variables.at:34 >$at_check_line_file
( $at_traceon; matheval.sh variable.scm ) >$at_stdout 2>$at_stder1
at_status=$?
egrep '^ *\+' $at_stder1 >&2
egrep -v '^ *\+' $at_stder1 >$at_stderr
at_failed=false
(echo stderr:; cat $at_stderr) >&5
echo >>$at_stdout; echo "(1/x)" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   *);;
esac

$at_failed && exit 1
$at_traceon


cat >variable.scm <<'_ATEOF'

(define f (evaluator-create "_222+5"))
(display (evaluator-evaluate f 1 '("_222") '(1)))
_ATEOF


$at_traceoff
$at_verbose "variables.at:42: matheval.sh variable.scm"
echo variables.at:42 >$at_check_line_file
( $at_traceon; matheval.sh variable.scm ) >$at_stdout 2>$at_stder1
at_status=$?
egrep '^ *\+' $at_stder1 >&2
egrep -v '^ *\+' $at_stder1 >$at_stderr
at_failed=false
(echo stderr:; cat $at_stderr) >&5
echo >>$at_stdout; echo "6.0" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   *);;
esac

$at_failed && exit 1
$at_traceon


cat >variable.scm <<'_ATEOF'

(define f (evaluator-create "a+2*aa+3*aaa^2"))
(display (evaluator-evaluate f 3 '("a" "aa" "aaa") '(1 2 3)))
_ATEOF


$at_traceoff
$at_verbose "variables.at:50: matheval.sh variable.scm"
echo variables.at:50 >$at_check_line_file
( $at_traceon; matheval.sh variable.scm ) >$at_stdout 2>$at_stder1
at_status=$?
egrep '^ *\+' $at_stder1 >&2
egrep -v '^ *\+' $at_stder1 >$at_stderr
at_failed=false
(echo stderr:; cat $at_stderr) >&5
echo >>$at_stdout; echo "32.0" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   *);;
esac

$at_failed && exit 1
$at_traceon


cat >variable.scm <<'_ATEOF'

(define f (evaluator-create "asin(a141^3)*log(b12)"))
(define f_prim (evaluator-derivative f "a141"))
(define string (make-string (evaluator-calculate-length f_prim)))
(evaluator-write f_prim string)
(display string)
_ATEOF


$at_traceoff
$at_verbose "variables.at:61: matheval.sh variable.scm"
echo variables.at:61 >$at_check_line_file
( $at_traceon; matheval.sh variable.scm ) >$at_stdout 2>$at_stder1
at_status=$?
egrep '^ *\+' $at_stder1 >&2
egrep -v '^ *\+' $at_stder1 >$at_stderr
at_failed=false
(echo stderr:; cat $at_stderr) >&5
echo >>$at_stdout; echo "((((3*(a141^2))/sqrt((1-((a141^3)^2))))*log(b12))+(asin((a141^3))*(0/b12)))" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   *);;
esac

$at_failed && exit 1
$at_traceon


    $at_times >$at_times_file
    )
    at_status=$?
    ;;


  banner-4 ) # Banner 4. functions.at:22
    cat <<\_ATEOF

Checking evaluating functions.

_ATEOF
    ;;

  4 ) # 4. functions.at:24: Check functions.
    at_setup_line='functions.at:24'
    $at_verbose "4. functions.at:24: testing Check functions...."
    $at_quiet $ECHO_N "  4: functions.at:24   $ECHO_C"
    (
      $at_traceon


cat >function.scm <<'_ATEOF'

(define f (evaluator-create "exp(x)"))
(display (evaluator-evaluate-x f 1))
_ATEOF


$at_traceoff
$at_verbose "functions.at:32: matheval.sh function.scm"
echo functions.at:32 >$at_check_line_file
( $at_traceon; matheval.sh function.scm ) >$at_stdout 2>$at_stder1
at_status=$?
egrep '^ *\+' $at_stder1 >&2
egrep -v '^ *\+' $at_stder1 >$at_stderr
at_failed=false
(echo stderr:; cat $at_stderr) >&5
echo >>$at_stdout; echo "2.71828182845905" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   *);;
esac

$at_failed && exit 1
$at_traceon


cat >function.scm <<'_ATEOF'

(define f (evaluator-create "exp(x)"))
(define f_prim (evaluator-derivative-x f))
(define string (make-string (evaluator-calculate-length f_prim)))
(evaluator-write f_prim string)
(display string)
_ATEOF


$at_traceoff
$at_verbose "functions.at:43: matheval.sh function.scm"
echo functions.at:43 >$at_check_line_file
( $at_traceon; matheval.sh function.scm ) >$at_stdout 2>$at_stder1
at_status=$?
egrep '^ *\+' $at_stder1 >&2
egrep -v '^ *\+' $at_stder1 >$at_stderr
at_failed=false
(echo stderr:; cat $at_stderr) >&5
echo >>$at_stdout; echo "exp(x)" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   *);;
esac

$at_failed && exit 1
$at_traceon


cat >function.scm <<'_ATEOF'

(define f (evaluator-create "log(x)"))
(display (evaluator-evaluate-x f 1))
_ATEOF


$at_traceoff
$at_verbose "functions.at:51: matheval.sh function.scm"
echo functions.at:51 >$at_check_line_file
( $at_traceon; matheval.sh function.scm ) >$at_stdout 2>$at_stder1
at_status=$?
egrep '^ *\+' $at_stder1 >&2
egrep -v '^ *\+' $at_stder1 >$at_stderr
at_failed=false
(echo stderr:; cat $at_stderr) >&5
echo >>$at_stdout; echo "0.0" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   *);;
esac

$at_failed && exit 1
$at_traceon


cat >function.scm <<'_ATEOF'

(define f (evaluator-create "log(x)"))
(define f_prim (evaluator-derivative-x f))
(define string (make-string (evaluator-calculate-length f_prim)))
(evaluator-write f_prim string)
(display string)
_ATEOF


$at_traceoff
$at_verbose "functions.at:62: matheval.sh function.scm"
echo functions.at:62 >$at_check_line_file
( $at_traceon; matheval.sh function.scm ) >$at_stdout 2>$at_stder1
at_status=$?
egrep '^ *\+' $at_stder1 >&2
egrep -v '^ *\+' $at_stder1 >$at_stderr
at_failed=false
(echo stderr:; cat $at_stderr) >&5
echo >>$at_stdout; echo "(1/x)" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   *);;
esac

$at_failed && exit 1
$at_traceon


cat >function.scm <<'_ATEOF'

(define f (evaluator-create "sqrt(x)"))
(display (evaluator-evaluate-x f 1))
_ATEOF


$at_traceoff
$at_verbose "functions.at:70: matheval.sh function.scm"
echo functions.at:70 >$at_check_line_file
( $at_traceon; matheval.sh function.scm ) >$at_stdout 2>$at_stder1
at_status=$?
egrep '^ *\+' $at_stder1 >&2
egrep -v '^ *\+' $at_stder1 >$at_stderr
at_failed=false
(echo stderr:; cat $at_stderr) >&5
echo >>$at_stdout; echo "1.0" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   *);;
esac

$at_failed && exit 1
$at_traceon


cat >function.scm <<'_ATEOF'

(define f (evaluator-create "sqrt(x)"))
(define f_prim (evaluator-derivative-x f))
(define string (make-string (evaluator-calculate-length f_prim)))
(evaluator-write f_prim string)
(display string)
_ATEOF


$at_traceoff
$at_verbose "functions.at:81: matheval.sh function.scm"
echo functions.at:81 >$at_check_line_file
( $at_traceon; matheval.sh function.scm ) >$at_stdout 2>$at_stder1
at_status=$?
egrep '^ *\+' $at_stder1 >&2
egrep -v '^ *\+' $at_stder1 >$at_stderr
at_failed=false
(echo stderr:; cat $at_stderr) >&5
echo >>$at_stdout; echo "(1/(2*sqrt(x)))" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   *);;
esac

$at_failed && exit 1
$at_traceon


cat >function.scm <<'_ATEOF'

(define f (evaluator-create "sin(x)"))
(display (evaluator-evaluate-x f 1))
_ATEOF


$at_traceoff
$at_verbose "functions.at:89: matheval.sh function.scm"
echo functions.at:89 >$at_check_line_file
( $at_traceon; matheval.sh function.scm ) >$at_stdout 2>$at_stder1
at_status=$?
egrep '^ *\+' $at_stder1 >&2
egrep -v '^ *\+' $at_stder1 >$at_stderr
at_failed=false
(echo stderr:; cat $at_stderr) >&5
echo >>$at_stdout; echo "0.841470984807897" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   *);;
esac

$at_failed && exit 1
$at_traceon


cat >function.scm <<'_ATEOF'

(define f (evaluator-create "sin(x)"))
(define f_prim (evaluator-derivative-x f))
(define string (make-string (evaluator-calculate-length f_prim)))
(evaluator-write f_prim string)
(display string)
_ATEOF


$at_traceoff
$at_verbose "functions.at:100: matheval.sh function.scm"
echo functions.at:100 >$at_check_line_file
( $at_traceon; matheval.sh function.scm ) >$at_stdout 2>$at_stder1
at_status=$?
egrep '^ *\+' $at_stder1 >&2
egrep -v '^ *\+' $at_stder1 >$at_stderr
at_failed=false
(echo stderr:; cat $at_stderr) >&5
echo >>$at_stdout; echo "cos(x)" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   *);;
esac

$at_failed && exit 1
$at_traceon


cat >function.scm <<'_ATEOF'

(define f (evaluator-create "cos(x)"))
(display (evaluator-evaluate-x f 1))
_ATEOF


$at_traceoff
$at_verbose "functions.at:108: matheval.sh function.scm"
echo functions.at:108 >$at_check_line_file
( $at_traceon; matheval.sh function.scm ) >$at_stdout 2>$at_stder1
at_status=$?
egrep '^ *\+' $at_stder1 >&2
egrep -v '^ *\+' $at_stder1 >$at_stderr
at_failed=false
(echo stderr:; cat $at_stderr) >&5
echo >>$at_stdout; echo "0.54030230586814" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   *);;
esac

$at_failed && exit 1
$at_traceon


cat >function.scm <<'_ATEOF'

(define f (evaluator-create "cos(x)"))
(define f_prim (evaluator-derivative-x f))
(define string (make-string (evaluator-calculate-length f_prim)))
(evaluator-write f_prim string)
(display string)
_ATEOF


$at_traceoff
$at_verbose "functions.at:119: matheval.sh function.scm"
echo functions.at:119 >$at_check_line_file
( $at_traceon; matheval.sh function.scm ) >$at_stdout 2>$at_stder1
at_status=$?
egrep '^ *\+' $at_stder1 >&2
egrep -v '^ *\+' $at_stder1 >$at_stderr
at_failed=false
(echo stderr:; cat $at_stderr) >&5
echo >>$at_stdout; echo "(-sin(x))" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   *);;
esac

$at_failed && exit 1
$at_traceon


cat >function.scm <<'_ATEOF'

(define f (evaluator-create "tan(x)"))
(display (evaluator-evaluate-x f 1))
_ATEOF


$at_traceoff
$at_verbose "functions.at:127: matheval.sh function.scm"
echo functions.at:127 >$at_check_line_file
( $at_traceon; matheval.sh function.scm ) >$at_stdout 2>$at_stder1
at_status=$?
egrep '^ *\+' $at_stder1 >&2
egrep -v '^ *\+' $at_stder1 >$at_stderr
at_failed=false
(echo stderr:; cat $at_stderr) >&5
echo >>$at_stdout; echo "1.5574077246549" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   *);;
esac

$at_failed && exit 1
$at_traceon


cat >function.scm <<'_ATEOF'

(define f (evaluator-create "tan(x)"))
(define f_prim (evaluator-derivative-x f))
(define string (make-string (evaluator-calculate-length f_prim)))
(evaluator-write f_prim string)
(display string)
_ATEOF


$at_traceoff
$at_verbose "functions.at:138: matheval.sh function.scm"
echo functions.at:138 >$at_check_line_file
( $at_traceon; matheval.sh function.scm ) >$at_stdout 2>$at_stder1
at_status=$?
egrep '^ *\+' $at_stder1 >&2
egrep -v '^ *\+' $at_stder1 >$at_stderr
at_failed=false
(echo stderr:; cat $at_stderr) >&5
echo >>$at_stdout; echo "(1/(cos(x)^2))" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   *);;
esac

$at_failed && exit 1
$at_traceon


cat >function.scm <<'_ATEOF'

(define f (evaluator-create "ctan(x)"))
(display (evaluator-evaluate-x f 1))
_ATEOF


$at_traceoff
$at_verbose "functions.at:146: matheval.sh function.scm"
echo functions.at:146 >$at_check_line_file
( $at_traceon; matheval.sh function.scm ) >$at_stdout 2>$at_stder1
at_status=$?
egrep '^ *\+' $at_stder1 >&2
egrep -v '^ *\+' $at_stder1 >$at_stderr
at_failed=false
(echo stderr:; cat $at_stderr) >&5
echo >>$at_stdout; echo "0.642092615934331" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   *);;
esac

$at_failed && exit 1
$at_traceon


cat >function.scm <<'_ATEOF'

(define f (evaluator-create "ctan(x)"))
(define f_prim (evaluator-derivative-x f))
(define string (make-string (evaluator-calculate-length f_prim)))
(evaluator-write f_prim string)
(display string)
_ATEOF


$at_traceoff
$at_verbose "functions.at:157: matheval.sh function.scm"
echo functions.at:157 >$at_check_line_file
( $at_traceon; matheval.sh function.scm ) >$at_stdout 2>$at_stder1
at_status=$?
egrep '^ *\+' $at_stder1 >&2
egrep -v '^ *\+' $at_stder1 >$at_stderr
at_failed=false
(echo stderr:; cat $at_stderr) >&5
echo >>$at_stdout; echo "(-(1/(sin(x)^2)))" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   *);;
esac

$at_failed && exit 1
$at_traceon


cat >function.scm <<'_ATEOF'

(define f (evaluator-create "asin(x)"))
(display (evaluator-evaluate-x f 1))
_ATEOF


$at_traceoff
$at_verbose "functions.at:165: matheval.sh function.scm"
echo functions.at:165 >$at_check_line_file
( $at_traceon; matheval.sh function.scm ) >$at_stdout 2>$at_stder1
at_status=$?
egrep '^ *\+' $at_stder1 >&2
egrep -v '^ *\+' $at_stder1 >$at_stderr
at_failed=false
(echo stderr:; cat $at_stderr) >&5
echo >>$at_stdout; echo "1.5707963267949" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   *);;
esac

$at_failed && exit 1
$at_traceon


cat >function.scm <<'_ATEOF'

(define f (evaluator-create "asin(x)"))
(define f_prim (evaluator-derivative-x f))
(define string (make-string (evaluator-calculate-length f_prim)))
(evaluator-write f_prim string)
(display string)
_ATEOF


$at_traceoff
$at_verbose "functions.at:176: matheval.sh function.scm"
echo functions.at:176 >$at_check_line_file
( $at_traceon; matheval.sh function.scm ) >$at_stdout 2>$at_stder1
at_status=$?
egrep '^ *\+' $at_stder1 >&2
egrep -v '^ *\+' $at_stder1 >$at_stderr
at_failed=false
(echo stderr:; cat $at_stderr) >&5
echo >>$at_stdout; echo "(1/sqrt((1-(x^2))))" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   *);;
esac

$at_failed && exit 1
$at_traceon

cat >function.scm <<'_ATEOF'

(define f (evaluator-create "acos(x)"))
(display (evaluator-evaluate-x f 1))
_ATEOF


$at_traceoff
$at_verbose "functions.at:183: matheval.sh function.scm"
echo functions.at:183 >$at_check_line_file
( $at_traceon; matheval.sh function.scm ) >$at_stdout 2>$at_stder1
at_status=$?
egrep '^ *\+' $at_stder1 >&2
egrep -v '^ *\+' $at_stder1 >$at_stderr
at_failed=false
(echo stderr:; cat $at_stderr) >&5
echo >>$at_stdout; echo "0.0" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   *);;
esac

$at_failed && exit 1
$at_traceon


cat >function.scm <<'_ATEOF'

(define f (evaluator-create "acos(x)"))
(define f_prim (evaluator-derivative-x f))
(define string (make-string (evaluator-calculate-length f_prim)))
(evaluator-write f_prim string)
(display string)
_ATEOF


$at_traceoff
$at_verbose "functions.at:194: matheval.sh function.scm"
echo functions.at:194 >$at_check_line_file
( $at_traceon; matheval.sh function.scm ) >$at_stdout 2>$at_stder1
at_status=$?
egrep '^ *\+' $at_stder1 >&2
egrep -v '^ *\+' $at_stder1 >$at_stderr
at_failed=false
(echo stderr:; cat $at_stderr) >&5
echo >>$at_stdout; echo "(-(1/sqrt((1-(x^2)))))" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   *);;
esac

$at_failed && exit 1
$at_traceon


cat >function.scm <<'_ATEOF'

(define f (evaluator-create "atan(x)"))
(display (evaluator-evaluate-x f 1))
_ATEOF


$at_traceoff
$at_verbose "functions.at:202: matheval.sh function.scm"
echo functions.at:202 >$at_check_line_file
( $at_traceon; matheval.sh function.scm ) >$at_stdout 2>$at_stder1
at_status=$?
egrep '^ *\+' $at_stder1 >&2
egrep -v '^ *\+' $at_stder1 >$at_stderr
at_failed=false
(echo stderr:; cat $at_stderr) >&5
echo >>$at_stdout; echo "0.785398163397448" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   *);;
esac

$at_failed && exit 1
$at_traceon


cat >function.scm <<'_ATEOF'

(define f (evaluator-create "atan(x)"))
(define f_prim (evaluator-derivative-x f))
(define string (make-string (evaluator-calculate-length f_prim)))
(evaluator-write f_prim string)
(display string)
_ATEOF


$at_traceoff
$at_verbose "functions.at:213: matheval.sh function.scm"
echo functions.at:213 >$at_check_line_file
( $at_traceon; matheval.sh function.scm ) >$at_stdout 2>$at_stder1
at_status=$?
egrep '^ *\+' $at_stder1 >&2
egrep -v '^ *\+' $at_stder1 >$at_stderr
at_failed=false
(echo stderr:; cat $at_stderr) >&5
echo >>$at_stdout; echo "(1/(1+(x^2)))" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   *);;
esac

$at_failed && exit 1
$at_traceon


cat >function.scm <<'_ATEOF'

(define f (evaluator-create "actan(x)"))
(display (evaluator-evaluate-x f 1))
_ATEOF


$at_traceoff
$at_verbose "functions.at:221: matheval.sh function.scm"
echo functions.at:221 >$at_check_line_file
( $at_traceon; matheval.sh function.scm ) >$at_stdout 2>$at_stder1
at_status=$?
egrep '^ *\+' $at_stder1 >&2
egrep -v '^ *\+' $at_stder1 >$at_stderr
at_failed=false
(echo stderr:; cat $at_stderr) >&5
echo >>$at_stdout; echo "0.785398163397448" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   *);;
esac

$at_failed && exit 1
$at_traceon


cat >function.scm <<'_ATEOF'

(define f (evaluator-create "actan(x)"))
(define f_prim (evaluator-derivative-x f))
(define string (make-string (evaluator-calculate-length f_prim)))
(evaluator-write f_prim string)
(display string)
_ATEOF


$at_traceoff
$at_verbose "functions.at:232: matheval.sh function.scm"
echo functions.at:232 >$at_check_line_file
( $at_traceon; matheval.sh function.scm ) >$at_stdout 2>$at_stder1
at_status=$?
egrep '^ *\+' $at_stder1 >&2
egrep -v '^ *\+' $at_stder1 >$at_stderr
at_failed=false
(echo stderr:; cat $at_stderr) >&5
echo >>$at_stdout; echo "(-(1/(1+(x^2))))" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   *);;
esac

$at_failed && exit 1
$at_traceon


cat >function.scm <<'_ATEOF'

(define f (evaluator-create "sinh(x)"))
(display (evaluator-evaluate-x f 1))
_ATEOF


$at_traceoff
$at_verbose "functions.at:240: matheval.sh function.scm"
echo functions.at:240 >$at_check_line_file
( $at_traceon; matheval.sh function.scm ) >$at_stdout 2>$at_stder1
at_status=$?
egrep '^ *\+' $at_stder1 >&2
egrep -v '^ *\+' $at_stder1 >$at_stderr
at_failed=false
(echo stderr:; cat $at_stderr) >&5
echo >>$at_stdout; echo "1.1752011936438" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   *);;
esac

$at_failed && exit 1
$at_traceon


cat >function.scm <<'_ATEOF'

(define f (evaluator-create "sinh(x)"))
(define f_prim (evaluator-derivative-x f))
(define string (make-string (evaluator-calculate-length f_prim)))
(evaluator-write f_prim string)
(display string)
_ATEOF


$at_traceoff
$at_verbose "functions.at:251: matheval.sh function.scm"
echo functions.at:251 >$at_check_line_file
( $at_traceon; matheval.sh function.scm ) >$at_stdout 2>$at_stder1
at_status=$?
egrep '^ *\+' $at_stder1 >&2
egrep -v '^ *\+' $at_stder1 >$at_stderr
at_failed=false
(echo stderr:; cat $at_stderr) >&5
echo >>$at_stdout; echo "cosh(x)" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   *);;
esac

$at_failed && exit 1
$at_traceon


cat >function.scm <<'_ATEOF'

(define f (evaluator-create "cosh(x)"))
(display (evaluator-evaluate-x f 1))
_ATEOF


$at_traceoff
$at_verbose "functions.at:259: matheval.sh function.scm"
echo functions.at:259 >$at_check_line_file
( $at_traceon; matheval.sh function.scm ) >$at_stdout 2>$at_stder1
at_status=$?
egrep '^ *\+' $at_stder1 >&2
egrep -v '^ *\+' $at_stder1 >$at_stderr
at_failed=false
(echo stderr:; cat $at_stderr) >&5
echo >>$at_stdout; echo "1.54308063481524" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   *);;
esac

$at_failed && exit 1
$at_traceon


cat >function.scm <<'_ATEOF'

(define f (evaluator-create "cosh(x)"))
(define f_prim (evaluator-derivative-x f))
(define string (make-string (evaluator-calculate-length f_prim)))
(evaluator-write f_prim string)
(display string)
_ATEOF


$at_traceoff
$at_verbose "functions.at:270: matheval.sh function.scm"
echo functions.at:270 >$at_check_line_file
( $at_traceon; matheval.sh function.scm ) >$at_stdout 2>$at_stder1
at_status=$?
egrep '^ *\+' $at_stder1 >&2
egrep -v '^ *\+' $at_stder1 >$at_stderr
at_failed=false
(echo stderr:; cat $at_stderr) >&5
echo >>$at_stdout; echo "sinh(x)" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   *);;
esac

$at_failed && exit 1
$at_traceon


cat >function.scm <<'_ATEOF'

(define f (evaluator-create "tanh(x)"))
(display (evaluator-evaluate-x f 1))
_ATEOF


$at_traceoff
$at_verbose "functions.at:278: matheval.sh function.scm"
echo functions.at:278 >$at_check_line_file
( $at_traceon; matheval.sh function.scm ) >$at_stdout 2>$at_stder1
at_status=$?
egrep '^ *\+' $at_stder1 >&2
egrep -v '^ *\+' $at_stder1 >$at_stderr
at_failed=false
(echo stderr:; cat $at_stderr) >&5
echo >>$at_stdout; echo "0.761594155955765" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   *);;
esac

$at_failed && exit 1
$at_traceon


cat >function.scm <<'_ATEOF'

(define f (evaluator-create "tanh(x)"))
(define f_prim (evaluator-derivative-x f))
(define string (make-string (evaluator-calculate-length f_prim)))
(evaluator-write f_prim string)
(display string)
_ATEOF


$at_traceoff
$at_verbose "functions.at:289: matheval.sh function.scm"
echo functions.at:289 >$at_check_line_file
( $at_traceon; matheval.sh function.scm ) >$at_stdout 2>$at_stder1
at_status=$?
egrep '^ *\+' $at_stder1 >&2
egrep -v '^ *\+' $at_stder1 >$at_stderr
at_failed=false
(echo stderr:; cat $at_stderr) >&5
echo >>$at_stdout; echo "(1/(cosh(x)^2))" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   *);;
esac

$at_failed && exit 1
$at_traceon


cat >function.scm <<'_ATEOF'

(define f (evaluator-create "ctanh(x)"))
(display (evaluator-evaluate-x f 1))
_ATEOF


$at_traceoff
$at_verbose "functions.at:297: matheval.sh function.scm"
echo functions.at:297 >$at_check_line_file
( $at_traceon; matheval.sh function.scm ) >$at_stdout 2>$at_stder1
at_status=$?
egrep '^ *\+' $at_stder1 >&2
egrep -v '^ *\+' $at_stder1 >$at_stderr
at_failed=false
(echo stderr:; cat $at_stderr) >&5
echo >>$at_stdout; echo "1.31303528549933" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   *);;
esac

$at_failed && exit 1
$at_traceon


cat >function.scm <<'_ATEOF'

(define f (evaluator-create "ctanh(x)"))
(define f_prim (evaluator-derivative-x f))
(define string (make-string (evaluator-calculate-length f_prim)))
(evaluator-write f_prim string)
(display string)
_ATEOF


$at_traceoff
$at_verbose "functions.at:308: matheval.sh function.scm"
echo functions.at:308 >$at_check_line_file
( $at_traceon; matheval.sh function.scm ) >$at_stdout 2>$at_stder1
at_status=$?
egrep '^ *\+' $at_stder1 >&2
egrep -v '^ *\+' $at_stder1 >$at_stderr
at_failed=false
(echo stderr:; cat $at_stderr) >&5
echo >>$at_stdout; echo "(-(1/(sinh(x)^2)))" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   *);;
esac

$at_failed && exit 1
$at_traceon


cat >function.scm <<'_ATEOF'

(define f (evaluator-create "asinh(x)"))
(display (evaluator-evaluate-x f 1))
_ATEOF


$at_traceoff
$at_verbose "functions.at:316: matheval.sh function.scm"
echo functions.at:316 >$at_check_line_file
( $at_traceon; matheval.sh function.scm ) >$at_stdout 2>$at_stder1
at_status=$?
egrep '^ *\+' $at_stder1 >&2
egrep -v '^ *\+' $at_stder1 >$at_stderr
at_failed=false
(echo stderr:; cat $at_stderr) >&5
echo >>$at_stdout; echo "0.881373587019543" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   *);;
esac

$at_failed && exit 1
$at_traceon


cat >function.scm <<'_ATEOF'

(define f (evaluator-create "asinh(x)"))
(define f_prim (evaluator-derivative-x f))
(define string (make-string (evaluator-calculate-length f_prim)))
(evaluator-write f_prim string)
(display string)
_ATEOF


$at_traceoff
$at_verbose "functions.at:327: matheval.sh function.scm"
echo functions.at:327 >$at_check_line_file
( $at_traceon; matheval.sh function.scm ) >$at_stdout 2>$at_stder1
at_status=$?
egrep '^ *\+' $at_stder1 >&2
egrep -v '^ *\+' $at_stder1 >$at_stderr
at_failed=false
(echo stderr:; cat $at_stderr) >&5
echo >>$at_stdout; echo "(1/sqrt((1-(x^2))))" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   *);;
esac

$at_failed && exit 1
$at_traceon


cat >function.scm <<'_ATEOF'

(define f (evaluator-create "acosh(x)"))
(display (evaluator-evaluate-x f 1))
_ATEOF


$at_traceoff
$at_verbose "functions.at:335: matheval.sh function.scm"
echo functions.at:335 >$at_check_line_file
( $at_traceon; matheval.sh function.scm ) >$at_stdout 2>$at_stder1
at_status=$?
egrep '^ *\+' $at_stder1 >&2
egrep -v '^ *\+' $at_stder1 >$at_stderr
at_failed=false
(echo stderr:; cat $at_stderr) >&5
echo >>$at_stdout; echo "0.0" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   *);;
esac

$at_failed && exit 1
$at_traceon


cat >function.scm <<'_ATEOF'

(define f (evaluator-create "acosh(x)"))
(define f_prim (evaluator-derivative-x f))
(define string (make-string (evaluator-calculate-length f_prim)))
(evaluator-write f_prim string)
(display string)
_ATEOF


$at_traceoff
$at_verbose "functions.at:346: matheval.sh function.scm"
echo functions.at:346 >$at_check_line_file
( $at_traceon; matheval.sh function.scm ) >$at_stdout 2>$at_stder1
at_status=$?
egrep '^ *\+' $at_stder1 >&2
egrep -v '^ *\+' $at_stder1 >$at_stderr
at_failed=false
(echo stderr:; cat $at_stderr) >&5
echo >>$at_stdout; echo "(1/sqrt(((x^2)-1)))" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   *);;
esac

$at_failed && exit 1
$at_traceon


cat >function.scm <<'_ATEOF'

(define f (evaluator-create "atanh(x)"))
(display (evaluator-evaluate-x f 1))
_ATEOF


$at_traceoff
$at_verbose "functions.at:354: matheval.sh function.scm"
echo functions.at:354 >$at_check_line_file
( $at_traceon; matheval.sh function.scm ) >$at_stdout 2>$at_stder1
at_status=$?
egrep '^ *\+' $at_stder1 >&2
egrep -v '^ *\+' $at_stder1 >$at_stderr
at_failed=false
(echo stderr:; cat $at_stderr) >&5
echo >>$at_stdout; echo "+#.#" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   *);;
esac

$at_failed && exit 1
$at_traceon


cat >function.scm <<'_ATEOF'

(define f (evaluator-create "atanh(x)"))
(define f_prim (evaluator-derivative-x f))
(define string (make-string (evaluator-calculate-length f_prim)))
(evaluator-write f_prim string)
(display string)
_ATEOF


$at_traceoff
$at_verbose "functions.at:365: matheval.sh function.scm"
echo functions.at:365 >$at_check_line_file
( $at_traceon; matheval.sh function.scm ) >$at_stdout 2>$at_stder1
at_status=$?
egrep '^ *\+' $at_stder1 >&2
egrep -v '^ *\+' $at_stder1 >$at_stderr
at_failed=false
(echo stderr:; cat $at_stderr) >&5
echo >>$at_stdout; echo "(1/(1-(x^2)))" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   *);;
esac

$at_failed && exit 1
$at_traceon


cat >function.scm <<'_ATEOF'

(define f (evaluator-create "actanh(x)"))
(display (evaluator-evaluate-x f 1))
_ATEOF


$at_traceoff
$at_verbose "functions.at:373: matheval.sh function.scm"
echo functions.at:373 >$at_check_line_file
( $at_traceon; matheval.sh function.scm ) >$at_stdout 2>$at_stder1
at_status=$?
egrep '^ *\+' $at_stder1 >&2
egrep -v '^ *\+' $at_stder1 >$at_stderr
at_failed=false
(echo stderr:; cat $at_stderr) >&5
echo >>$at_stdout; echo "+#.#" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   *);;
esac

$at_failed && exit 1
$at_traceon


cat >function.scm <<'_ATEOF'

(define f (evaluator-create "actanh(x)"))
(define f_prim (evaluator-derivative-x f))
(define string (make-string (evaluator-calculate-length f_prim)))
(evaluator-write f_prim string)
(display string)
_ATEOF


$at_traceoff
$at_verbose "functions.at:384: matheval.sh function.scm"
echo functions.at:384 >$at_check_line_file
( $at_traceon; matheval.sh function.scm ) >$at_stdout 2>$at_stder1
at_status=$?
egrep '^ *\+' $at_stder1 >&2
egrep -v '^ *\+' $at_stder1 >$at_stderr
at_failed=false
(echo stderr:; cat $at_stderr) >&5
echo >>$at_stdout; echo "(1/((x^2)-1))" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   *);;
esac

$at_failed && exit 1
$at_traceon


cat >function.scm <<'_ATEOF'

(define f (evaluator-create "fabs(x)"))
(display (evaluator-evaluate-x f 1))
_ATEOF


$at_traceoff
$at_verbose "functions.at:392: matheval.sh function.scm"
echo functions.at:392 >$at_check_line_file
( $at_traceon; matheval.sh function.scm ) >$at_stdout 2>$at_stder1
at_status=$?
egrep '^ *\+' $at_stder1 >&2
egrep -v '^ *\+' $at_stder1 >$at_stderr
at_failed=false
(echo stderr:; cat $at_stderr) >&5
echo >>$at_stdout; echo "1.0" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   *);;
esac

$at_failed && exit 1
$at_traceon


cat >function.scm <<'_ATEOF'

(define f (evaluator-create "fabs(x)"))
(define f_prim (evaluator-derivative-x f))
(define string (make-string (evaluator-calculate-length f_prim)))
(evaluator-write f_prim string)
(display string)
_ATEOF


$at_traceoff
$at_verbose "functions.at:403: matheval.sh function.scm"
echo functions.at:403 >$at_check_line_file
( $at_traceon; matheval.sh function.scm ) >$at_stdout 2>$at_stder1
at_status=$?
egrep '^ *\+' $at_stder1 >&2
egrep -v '^ *\+' $at_stder1 >$at_stderr
at_failed=false
(echo stderr:; cat $at_stderr) >&5
echo >>$at_stdout; echo "(x/sqrt((x^2)))" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   *);;
esac

$at_failed && exit 1
$at_traceon


    $at_times >$at_times_file
    )
    at_status=$?
    ;;


  banner-5 ) # Banner 5. un_ops.at:22
    cat <<\_ATEOF

Checking evaluating unary operators.

_ATEOF
    ;;

  5 ) # 5. un_ops.at:24: Check unary operators.
    at_setup_line='un_ops.at:24'
    $at_verbose "5. un_ops.at:24: testing Check unary operators...."
    $at_quiet $ECHO_N "  5: un_ops.at:24      $ECHO_C"
    (
      $at_traceon


cat >un_op.scm <<'_ATEOF'

(define f (evaluator-create "-5"))
(display (evaluator-evaluate-x f 0))
_ATEOF


$at_traceoff
$at_verbose "un_ops.at:32: matheval.sh un_op.scm"
echo un_ops.at:32 >$at_check_line_file
( $at_traceon; matheval.sh un_op.scm ) >$at_stdout 2>$at_stder1
at_status=$?
egrep '^ *\+' $at_stder1 >&2
egrep -v '^ *\+' $at_stder1 >$at_stderr
at_failed=false
(echo stderr:; cat $at_stderr) >&5
echo >>$at_stdout; echo "-5.0" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   *);;
esac

$at_failed && exit 1
$at_traceon


cat >un_op.scm <<'_ATEOF'

(define f (evaluator-create "-x"))
(display (evaluator-evaluate-x f 1))
_ATEOF


$at_traceoff
$at_verbose "un_ops.at:40: matheval.sh un_op.scm"
echo un_ops.at:40 >$at_check_line_file
( $at_traceon; matheval.sh un_op.scm ) >$at_stdout 2>$at_stder1
at_status=$?
egrep '^ *\+' $at_stder1 >&2
egrep -v '^ *\+' $at_stder1 >$at_stderr
at_failed=false
(echo stderr:; cat $at_stderr) >&5
echo >>$at_stdout; echo "-1.0" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   *);;
esac

$at_failed && exit 1
$at_traceon


cat >un_op.scm <<'_ATEOF'

(define f (evaluator-create "(-x)^3+4*-x"))
(define f_prim (evaluator-derivative-x f))
(define string (make-string (evaluator-calculate-length f_prim)))
(evaluator-write f_prim string)
(display string)
_ATEOF


$at_traceoff
$at_verbose "un_ops.at:51: matheval.sh un_op.scm"
echo un_ops.at:51 >$at_check_line_file
( $at_traceon; matheval.sh un_op.scm ) >$at_stdout 2>$at_stder1
at_status=$?
egrep '^ *\+' $at_stder1 >&2
egrep -v '^ *\+' $at_stder1 >$at_stderr
at_failed=false
(echo stderr:; cat $at_stderr) >&5
echo >>$at_stdout; echo "(((-3)*((-x)^2))+((0*(-x))+(-4)))" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   *);;
esac

$at_failed && exit 1
$at_traceon


    $at_times >$at_times_file
    )
    at_status=$?
    ;;


  banner-6 ) # Banner 6. bin_ops.at:22
    cat <<\_ATEOF

Checking evaluating binary operators.

_ATEOF
    ;;

  6 ) # 6. bin_ops.at:24: Check binary operators.
    at_setup_line='bin_ops.at:24'
    $at_verbose "6. bin_ops.at:24: testing Check binary operators...."
    $at_quiet $ECHO_N "  6: bin_ops.at:24     $ECHO_C"
    (
      $at_traceon


cat >function.scm <<'_ATEOF'

(define f (evaluator-create "4+x"))
(display (evaluator-evaluate-x f 1))
_ATEOF


$at_traceoff
$at_verbose "bin_ops.at:32: matheval.sh function.scm"
echo bin_ops.at:32 >$at_check_line_file
( $at_traceon; matheval.sh function.scm ) >$at_stdout 2>$at_stder1
at_status=$?
egrep '^ *\+' $at_stder1 >&2
egrep -v '^ *\+' $at_stder1 >$at_stderr
at_failed=false
(echo stderr:; cat $at_stderr) >&5
echo >>$at_stdout; echo "5.0" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   *);;
esac

$at_failed && exit 1
$at_traceon


cat >function.scm <<'_ATEOF'

(define f (evaluator-create "4+x"))
(define f_prim (evaluator-derivative-x f))
(define string (make-string (evaluator-calculate-length f_prim)))
(evaluator-write f_prim string)
(display string)
_ATEOF


$at_traceoff
$at_verbose "bin_ops.at:43: matheval.sh function.scm"
echo bin_ops.at:43 >$at_check_line_file
( $at_traceon; matheval.sh function.scm ) >$at_stdout 2>$at_stder1
at_status=$?
egrep '^ *\+' $at_stder1 >&2
egrep -v '^ *\+' $at_stder1 >$at_stderr
at_failed=false
(echo stderr:; cat $at_stderr) >&5
echo >>$at_stdout; echo "1" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   *);;
esac

$at_failed && exit 1
$at_traceon


cat >function.scm <<'_ATEOF'

(define f (evaluator-create "4-x"))
(display (evaluator-evaluate-x f 1))
_ATEOF


$at_traceoff
$at_verbose "bin_ops.at:51: matheval.sh function.scm"
echo bin_ops.at:51 >$at_check_line_file
( $at_traceon; matheval.sh function.scm ) >$at_stdout 2>$at_stder1
at_status=$?
egrep '^ *\+' $at_stder1 >&2
egrep -v '^ *\+' $at_stder1 >$at_stderr
at_failed=false
(echo stderr:; cat $at_stderr) >&5
echo >>$at_stdout; echo "3.0" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   *);;
esac

$at_failed && exit 1
$at_traceon


cat >function.scm <<'_ATEOF'

(define f (evaluator-create "4-x"))
(define f_prim (evaluator-derivative-x f))
(define string (make-string (evaluator-calculate-length f_prim)))
(evaluator-write f_prim string)
(display string)
_ATEOF


$at_traceoff
$at_verbose "bin_ops.at:62: matheval.sh function.scm"
echo bin_ops.at:62 >$at_check_line_file
( $at_traceon; matheval.sh function.scm ) >$at_stdout 2>$at_stder1
at_status=$?
egrep '^ *\+' $at_stder1 >&2
egrep -v '^ *\+' $at_stder1 >$at_stderr
at_failed=false
(echo stderr:; cat $at_stderr) >&5
echo >>$at_stdout; echo "(-1)" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   *);;
esac

$at_failed && exit 1
$at_traceon


cat >function.scm <<'_ATEOF'

(define f (evaluator-create "4*x"))
(display (evaluator-evaluate-x f 1))
_ATEOF


$at_traceoff
$at_verbose "bin_ops.at:70: matheval.sh function.scm"
echo bin_ops.at:70 >$at_check_line_file
( $at_traceon; matheval.sh function.scm ) >$at_stdout 2>$at_stder1
at_status=$?
egrep '^ *\+' $at_stder1 >&2
egrep -v '^ *\+' $at_stder1 >$at_stderr
at_failed=false
(echo stderr:; cat $at_stderr) >&5
echo >>$at_stdout; echo "4.0" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   *);;
esac

$at_failed && exit 1
$at_traceon


cat >function.scm <<'_ATEOF'

(define f (evaluator-create "4*x"))
(define f_prim (evaluator-derivative-x f))
(define string (make-string (evaluator-calculate-length f_prim)))
(evaluator-write f_prim string)
(display string)
_ATEOF


$at_traceoff
$at_verbose "bin_ops.at:81: matheval.sh function.scm"
echo bin_ops.at:81 >$at_check_line_file
( $at_traceon; matheval.sh function.scm ) >$at_stdout 2>$at_stder1
at_status=$?
egrep '^ *\+' $at_stder1 >&2
egrep -v '^ *\+' $at_stder1 >$at_stderr
at_failed=false
(echo stderr:; cat $at_stderr) >&5
echo >>$at_stdout; echo "((0*x)+4)" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   *);;
esac

$at_failed && exit 1
$at_traceon


cat >function.scm <<'_ATEOF'

(define f (evaluator-create "4/x"))
(display (evaluator-evaluate-x f 1))
_ATEOF


$at_traceoff
$at_verbose "bin_ops.at:89: matheval.sh function.scm"
echo bin_ops.at:89 >$at_check_line_file
( $at_traceon; matheval.sh function.scm ) >$at_stdout 2>$at_stder1
at_status=$?
egrep '^ *\+' $at_stder1 >&2
egrep -v '^ *\+' $at_stder1 >$at_stderr
at_failed=false
(echo stderr:; cat $at_stderr) >&5
echo >>$at_stdout; echo "4.0" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   *);;
esac

$at_failed && exit 1
$at_traceon


cat >function.scm <<'_ATEOF'

(define f (evaluator-create "4/x"))
(define f_prim (evaluator-derivative-x f))
(define string (make-string (evaluator-calculate-length f_prim)))
(evaluator-write f_prim string)
(display string)
_ATEOF


$at_traceoff
$at_verbose "bin_ops.at:100: matheval.sh function.scm"
echo bin_ops.at:100 >$at_check_line_file
( $at_traceon; matheval.sh function.scm ) >$at_stdout 2>$at_stder1
at_status=$?
egrep '^ *\+' $at_stder1 >&2
egrep -v '^ *\+' $at_stder1 >$at_stderr
at_failed=false
(echo stderr:; cat $at_stderr) >&5
echo >>$at_stdout; echo "(((0*x)-4)/(x^2))" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   *);;
esac

$at_failed && exit 1
$at_traceon


cat >function.scm <<'_ATEOF'

(define f (evaluator-create "4^x"))
(display (evaluator-evaluate-x f 1))
_ATEOF


$at_traceoff
$at_verbose "bin_ops.at:108: matheval.sh function.scm"
echo bin_ops.at:108 >$at_check_line_file
( $at_traceon; matheval.sh function.scm ) >$at_stdout 2>$at_stder1
at_status=$?
egrep '^ *\+' $at_stder1 >&2
egrep -v '^ *\+' $at_stder1 >$at_stderr
at_failed=false
(echo stderr:; cat $at_stderr) >&5
echo >>$at_stdout; echo "4.0" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   *);;
esac

$at_failed && exit 1
$at_traceon


cat >function.scm <<'_ATEOF'

(define f (evaluator-create "4^x"))
(define f_prim (evaluator-derivative-x f))
(define string (make-string (evaluator-calculate-length f_prim)))
(evaluator-write f_prim string)
(display string)
_ATEOF


$at_traceoff
$at_verbose "bin_ops.at:119: matheval.sh function.scm"
echo bin_ops.at:119 >$at_check_line_file
( $at_traceon; matheval.sh function.scm ) >$at_stdout 2>$at_stder1
at_status=$?
egrep '^ *\+' $at_stder1 >&2
egrep -v '^ *\+' $at_stder1 >$at_stderr
at_failed=false
(echo stderr:; cat $at_stderr) >&5
echo >>$at_stdout; echo "((4^x)*(1.38629+(x*0)))" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   *);;
esac

$at_failed && exit 1
$at_traceon


cat >function.scm <<'_ATEOF'

(define f (evaluator-create "x^4"))
(display (evaluator-evaluate-x f 1))
_ATEOF


$at_traceoff
$at_verbose "bin_ops.at:127: matheval.sh function.scm"
echo bin_ops.at:127 >$at_check_line_file
( $at_traceon; matheval.sh function.scm ) >$at_stdout 2>$at_stder1
at_status=$?
egrep '^ *\+' $at_stder1 >&2
egrep -v '^ *\+' $at_stder1 >$at_stderr
at_failed=false
(echo stderr:; cat $at_stderr) >&5
echo >>$at_stdout; echo "1.0" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   *);;
esac

$at_failed && exit 1
$at_traceon


cat >function.scm <<'_ATEOF'

(define f (evaluator-create "x^4"))
(define f_prim (evaluator-derivative-x f))
(define string (make-string (evaluator-calculate-length f_prim)))
(evaluator-write f_prim string)
(display string)
_ATEOF


$at_traceoff
$at_verbose "bin_ops.at:138: matheval.sh function.scm"
echo bin_ops.at:138 >$at_check_line_file
( $at_traceon; matheval.sh function.scm ) >$at_stdout 2>$at_stder1
at_status=$?
egrep '^ *\+' $at_stder1 >&2
egrep -v '^ *\+' $at_stder1 >$at_stderr
at_failed=false
(echo stderr:; cat $at_stderr) >&5
echo >>$at_stdout; echo "(4*(x^3))" | $at_diff - $at_stdout >&5 || at_failed=:
case $at_status in
   77) exit 77;;
   *);;
esac

$at_failed && exit 1
$at_traceon


    $at_times >$at_times_file
    )
    at_status=$?
    ;;


  * )
    echo "$as_me: no such test group: $at_group" >&2
    continue
    ;;
  esac

  # Be sure to come back to the suite directory, in particular
  # since below we might `rm' the group directory we are in currently.
  cd $at_suite_dir

  case $at_group in
    banner-*) ;;
    *)
      if test ! -f $at_check_line_file; then
        sed "s/^ */$as_me: warning: /" <<_ATEOF
        A failure happened in a test group before any test could be
        run. This means that test suite is improperly designed.  Please
        report this failure to <asamardzic@matf.bg.ac.yu>.
_ATEOF
    	echo "$at_setup_line" >$at_check_line_file
      fi
      at_group_count=`expr 1 + $at_group_count`
      $at_verbose $ECHO_N "$at_group. $at_setup_line: $ECHO_C"
      case $at_status in
        0)  at_msg="ok"
            at_pass_list="$at_pass_list $at_group"
            # Cleanup the group directory, unless the user wants the files.
            $at_debug_p || rm -rf $at_group_dir
            ;;
        77) at_msg="ok (skipped near \``cat $at_check_line_file`')"
            at_skip_list="$at_skip_list $at_group"
            # Cleanup the group directory, unless the user wants the files.
            $at_debug_p || rm -rf $at_group_dir
            ;;
        *)  at_msg="FAILED near \``cat $at_check_line_file`'"
            at_fail_list="$at_fail_list $at_group"
            # Up failure, keep the group directory for autopsy.
            # Create the debugging script.
            {
              echo "#! /bin/sh"
              echo "cd $at_dir"
              echo 'exec ${CONFIG_SHELL-'"$SHELL"'}' "$0" \
                   '-v -d' "$at_debug_args" "$at_group" '${1+"$@"}'
              echo 'exit 1'
            } >$at_group_dir/run
            chmod +x $at_group_dir/run
            ;;
      esac
      echo $at_msg
      at_log_msg="$at_group. $at_setup_line: $at_msg"
      # If the group failed, $at_times_file is not available.
      test -f $at_times_file &&
        at_log_msg="$at_log_msg	(`sed 1d $at_times_file`)"
      echo "$at_log_msg" >&6
      $at_errexit_p && test -n "$at_fail_list" && break
      ;;
  esac
done

# Back to the top directory, in particular because we might
# rerun the suite verbosely.
cd $at_dir

# Compute the duration of the suite.
at_stop_date=`date`
at_stop_time=`(date +%s) 2>/dev/null`
echo "$as_me: ending at: $at_stop_date" >&6
at_duration_s=`(expr $at_stop_time - $at_start_time) 2>/dev/null`
at_duration_m=`(expr $at_duration_s / 60) 2>/dev/null`
at_duration_h=`(expr $at_duration_m / 60) 2>/dev/null`
at_duration_s=`(expr $at_duration_s % 60) 2>/dev/null`
at_duration_m=`(expr $at_duration_m % 60) 2>/dev/null`
at_duration="${at_duration_h}h ${at_duration_m}m ${at_duration_s}s"
if test "$at_duration" != "h m s"; then
  echo "$as_me: test suite duration: $at_duration" >&6
fi

# Wrap up the test suite with summary statistics.
at_skip_count=`set dummy $at_skip_list; shift; echo $#`
at_fail_count=`set dummy $at_fail_list; shift; echo $#`
if test $at_fail_count = 0; then
  if test $at_skip_count = 0; then
    sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
## All $at_group_count tests were successful. ##
_ASBOX
  else
    sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
## All $at_group_count tests were successful ($at_skip_count skipped). ##
_ASBOX
  fi
elif test $at_debug_p = false; then
  if $at_errexit_p; then
    cat <<\_ASBOX
## ------------------------------------------------------------ ##
## ERROR: One of the tests failed, inhibiting subsequent tests. ##
## ------------------------------------------------------------ ##
_ASBOX
  else
    sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
## ERROR: Suite unsuccessful, $at_fail_count of $at_group_count tests failed. ##
_ASBOX
  fi

  # Normalize the names so that `ls' lists them in order.
  echo 'You may investigate any problem if you feel able to do so, in which'
  echo 'case the test suite provides a good starting point.'
  echo
  echo 'Now, failed tests will be executed again, verbosely, and logged'
  echo 'in the file '$as_me'.log.'

  {
    echo
    echo
    cat <<\_ASBOX
## ------------------------ ##
## Summary of the failures. ##
## ------------------------ ##
_ASBOX

    # Summary of failed and skipped tests.
    if test $at_fail_count != 0; then
      echo "Failed tests:"
      $SHELL $0 $at_fail_list --list
      echo
    fi
    if test $at_skip_count != 0; then
      echo "Skipped tests:"
      $SHELL $0 $at_skip_list --list
      echo
    fi
    echo

    cat <<\_ASBOX
## --------------------------------------- ##
## Verbosely re-running the failing tests. ##
## --------------------------------------- ##
_ASBOX
    echo
  } >&6

  exec 6>/dev/null
  $SHELL $0 -v -d $at_debug_args $at_fail_list 2>&1 | tee -a $as_me.log
  exec 6>>$as_me.log

  {
    echo
    if test -n "$at_top_srcdir"; then
      cat <<\_ASBOX
## ------------------- ##
## Configuration logs. ##
## ------------------- ##
_ASBOX
      echo
      for at_file in `find "$at_top_srcdir" -name config.log -print`
      do
  	echo "$as_me: $at_file:"
  	sed 's/^/| /' $at_file
  	echo
      done
    fi
  } >&6


  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
## $as_me.log is created. ##
_ASBOX

  echo
  echo "Please send \`$as_me.log' and all information you think might help:"
  echo
  echo "   To: <asamardzic@matf.bg.ac.yu>"
  echo "   Subject: [libmatheval 1.0.1] $as_me.log: $at_fail_count failures"
  echo
  exit 1
fi

exit 0

