summaryrefslogtreecommitdiff
path: root/checks/187.eval
blob: aa10aa2c92b536c271b72a30b640ab8ace1cad9d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
dnl @ ../doc/m4.texi:6336: Origin of test
dnl @ expected status: 0
dnl @ extra options: 
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
dnl @ Foundation, Inc.
dnl @ This file is free software; the Free Software Foundation
dnl @ gives unlimited permission to copy and/or distribute it
dnl @ with or without modifications, as long as this notice
dnl @ is preserved.
eval(`2 ** 3 ** 2')
dnl @result{}512
eval(`(2 ** 3) ** 2')
dnl @result{}64
eval(`0 ** 1')
dnl @result{}0
eval(`2 ** 0')
dnl @result{}1
eval(`0 ** 0')
dnl @result{}
dnl @error{}m4:stdin:5: divide by zero in eval: 0 ** 0
eval(`4 ** -2')
dnl @error{}m4:stdin:6: negative exponent in eval: 4 ** -2
dnl @result{}