File: fpe_test.g

package info (click to toggle)
mawk 1.3.3-5
  • links: PTS
  • area: main
  • in suites: potato
  • size: 1,204 kB
  • ctags: 1,530
  • sloc: ansic: 13,023; yacc: 994; awk: 629; sh: 330; makefile: 164
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