-m4_define([CHECK_EXPR_EVAL],
+dnl PSPP - a program for statistical analysis.
+dnl Copyright (C) 2017 Free Software Foundation, Inc.
+dnl
+dnl This program is free software: you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation, either version 3 of the License, or
+dnl (at your option) any later version.
+dnl
+dnl This program is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+dnl GNU General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU General Public License
+dnl along with this program. If not, see <http://www.gnu.org/licenses/>.
+dnl m4_define([CHECK_EXPR_EVAL],
[AT_SETUP([expressions - $1])
AT_DATA([evaluate.sps],
[set mxwarn 1000.
[[trunc(1.9)], [1.00]],
[[trunc(-1.2)], [-1.00]],
[[trunc(-1.9)], [-1.00]],
+ [[trunc(5.06, .1)], [5.00]],
+ [[trunc(-5.06, .1)], [-5.00]],
+ [[trunc(1)], [1.00]],
+ [[trunc(1 - 2**-53)], [1.00]],
+ [[trunc(1 - 2**-52)], [1.00]],
+ [[trunc(1 - 2**-51)], [1.00]],
+ [[trunc(1 - 2**-45)], [0.00]],
+ [[trunc(1 - 2**-45, 1, 10)], [1.00]],
[[trunc('x')], [error],
- [error: DEBUG EVALUATE: Type mismatch invoking TRUNC(number) as trunc(string).]])
+ [error: DEBUG EVALUATE: Function invocation trunc(string) does not match any known function. Candidates are:
+TRUNC(number)
+TRUNC(number, number)
+TRUNC(number, number, number).]])
CHECK_EXPR_EVAL([acos arsin artan cos sin tan],
[[acos(.5) / 3.14159 * 180], [60.00]],