File: fpe_test.g

package info (click to toggle)
mawk 1.3.3-17
  • links: PTS, VCS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, stretch, wheezy
  • size: 1,484 kB
  • ctags: 1,506
  • sloc: ansic: 13,008; yacc: 994; awk: 629; makefile: 113; sh: 107
file content (21 lines) | stat: -rw-r--r-- 579 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#  tests if mawk has been compiled to correctly handle
#  floating point exceptions

echo testing division by zero
mawk -f fpetest1.awk
echo ========================== status = $status ==========================

echo testing overflow
mawk -f fpetest2.awk
echo ========================== status = $status ==========================

echo testing domain error
cat fpetest3.awk
mawk -f fpetest3.awk >temp
echo ========================== status = $status ==========================

cat temp

echo  the returns should  be 1 0 1
echo  note on the atari it cannot be 1 1 1
# rm  temp