floating point tests
This commit is contained in:
parent
aa81b3ea0b
commit
cb0567f1d5
522 changed files with 47766 additions and 235650 deletions
6
float/tests/.generate/combine.py
Normal file
6
float/tests/.generate/combine.py
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
exit()
|
||||
with open('all.tsv', 'w') as out:
|
||||
for i in (1,2,3):
|
||||
with open(f'./combined{i}.txt') as fq, open(f'./combined{i}_ans.txt') as fa:
|
||||
for line in zip(fq, fa):
|
||||
print('\t'.join(map(' '.join, map(str.split, map(str.strip, line)))), file=out)
|
||||
42
float/tests/.generate/split.py
Normal file
42
float/tests/.generate/split.py
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
TYPES = ('half', 'single')
|
||||
TEST_TYPES = ("add", "sub", "div", "mul", "fma", "mad", "prn")
|
||||
ROUND_TYPES = ("to_zero", "to_nearest_even", "to_positive_infinity", "to_negative_infinity")
|
||||
|
||||
fds = {
|
||||
a: {
|
||||
b: {
|
||||
c: open(f'out/{a}/{b}/{c}.tsv', 'w')
|
||||
for c in ROUND_TYPES
|
||||
}
|
||||
for b in TEST_TYPES
|
||||
}
|
||||
for a in TYPES
|
||||
}
|
||||
|
||||
try:
|
||||
with open('all_u.tsv') as f:
|
||||
for line in f:
|
||||
q = line.split('\t')[0].split()
|
||||
ft = 'half' if q[0] == 'h' else 'single'
|
||||
rt = ''
|
||||
op = 'prn' if len(q) == 3 else q[2]
|
||||
match q[1]:
|
||||
case '0':
|
||||
rt = 'to_zero'
|
||||
case '1':
|
||||
rt = 'to_nearest_even'
|
||||
case '2':
|
||||
rt = 'to_positive_infinity'
|
||||
case '3':
|
||||
rt = 'to_negative_infinity'
|
||||
match op:
|
||||
case '+': op = 'add'
|
||||
case '-': op = 'sub'
|
||||
case '*': op = 'mul'
|
||||
case '/': op = 'div'
|
||||
fds[ft][op][rt].write(line)
|
||||
finally:
|
||||
for a in fds:
|
||||
for b in fds[a]:
|
||||
for c in fds[a][b]:
|
||||
fds[a][b][c].close()
|
||||
56
float/tests/.gitattributes
vendored
Normal file
56
float/tests/.gitattributes
vendored
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
single/prn/to_positive_infinity.tsv filter=lfs diff=lfs merge=lfs -text
|
||||
half/fma/to_zero.tsv filter=lfs diff=lfs merge=lfs -text
|
||||
single/add/to_negative_infinity.tsv filter=lfs diff=lfs merge=lfs -text
|
||||
single/div/to_positive_infinity.tsv filter=lfs diff=lfs merge=lfs -text
|
||||
single/fma/to_negative_infinity.tsv filter=lfs diff=lfs merge=lfs -text
|
||||
single/prn/to_nearest_even.tsv filter=lfs diff=lfs merge=lfs -text
|
||||
single/prn/to_zero.tsv filter=lfs diff=lfs merge=lfs -text
|
||||
half/add/to_positive_infinity.tsv filter=lfs diff=lfs merge=lfs -text
|
||||
half/prn/to_negative_infinity.tsv filter=lfs diff=lfs merge=lfs -text
|
||||
single/div/to_nearest_even.tsv filter=lfs diff=lfs merge=lfs -text
|
||||
single/sub/to_nearest_even.tsv filter=lfs diff=lfs merge=lfs -text
|
||||
single/sub/to_negative_infinity.tsv filter=lfs diff=lfs merge=lfs -text
|
||||
single/sub/to_zero.tsv filter=lfs diff=lfs merge=lfs -text
|
||||
half/mad/to_positive_infinity.tsv filter=lfs diff=lfs merge=lfs -text
|
||||
single/fma/to_nearest_even.tsv filter=lfs diff=lfs merge=lfs -text
|
||||
single/fma/to_positive_infinity.tsv filter=lfs diff=lfs merge=lfs -text
|
||||
single/mad/to_positive_infinity.tsv filter=lfs diff=lfs merge=lfs -text
|
||||
single/mul/to_negative_infinity.tsv filter=lfs diff=lfs merge=lfs -text
|
||||
single/prn/to_negative_infinity.tsv filter=lfs diff=lfs merge=lfs -text
|
||||
half/add/to_nearest_even.tsv filter=lfs diff=lfs merge=lfs -text
|
||||
half/div/to_positive_infinity.tsv filter=lfs diff=lfs merge=lfs -text
|
||||
half/div/to_zero.tsv filter=lfs diff=lfs merge=lfs -text
|
||||
half/mad/to_negative_infinity.tsv filter=lfs diff=lfs merge=lfs -text
|
||||
half/mul/to_positive_infinity.tsv filter=lfs diff=lfs merge=lfs -text
|
||||
half/sub/to_zero.tsv filter=lfs diff=lfs merge=lfs -text
|
||||
single/div/to_zero.tsv filter=lfs diff=lfs merge=lfs -text
|
||||
single/fma/to_zero.tsv filter=lfs diff=lfs merge=lfs -text
|
||||
half/add/to_negative_infinity.tsv filter=lfs diff=lfs merge=lfs -text
|
||||
half/add/to_zero.tsv filter=lfs diff=lfs merge=lfs -text
|
||||
half/mul/to_negative_infinity.tsv filter=lfs diff=lfs merge=lfs -text
|
||||
half/prn/to_zero.tsv filter=lfs diff=lfs merge=lfs -text
|
||||
single/mul/to_nearest_even.tsv filter=lfs diff=lfs merge=lfs -text
|
||||
single/sub/to_positive_infinity.tsv filter=lfs diff=lfs merge=lfs -text
|
||||
half/fma/to_positive_infinity.tsv filter=lfs diff=lfs merge=lfs -text
|
||||
half/sub/to_nearest_even.tsv filter=lfs diff=lfs merge=lfs -text
|
||||
single/add/to_nearest_even.tsv filter=lfs diff=lfs merge=lfs -text
|
||||
single/add/to_zero.tsv filter=lfs diff=lfs merge=lfs -text
|
||||
single/mad/to_nearest_even.tsv filter=lfs diff=lfs merge=lfs -text
|
||||
single/mad/to_negative_infinity.tsv filter=lfs diff=lfs merge=lfs -text
|
||||
single/mad/to_zero.tsv filter=lfs diff=lfs merge=lfs -text
|
||||
single/mul/to_positive_infinity.tsv filter=lfs diff=lfs merge=lfs -text
|
||||
half/sub/to_negative_infinity.tsv filter=lfs diff=lfs merge=lfs -text
|
||||
half/sub/to_positive_infinity.tsv filter=lfs diff=lfs merge=lfs -text
|
||||
half/div/to_nearest_even.tsv filter=lfs diff=lfs merge=lfs -text
|
||||
half/div/to_negative_infinity.tsv filter=lfs diff=lfs merge=lfs -text
|
||||
half/fma/to_nearest_even.tsv filter=lfs diff=lfs merge=lfs -text
|
||||
half/fma/to_negative_infinity.tsv filter=lfs diff=lfs merge=lfs -text
|
||||
half/mad/to_zero.tsv filter=lfs diff=lfs merge=lfs -text
|
||||
half/mul/to_nearest_even.tsv filter=lfs diff=lfs merge=lfs -text
|
||||
half/mad/to_nearest_even.tsv filter=lfs diff=lfs merge=lfs -text
|
||||
half/mul/to_zero.tsv filter=lfs diff=lfs merge=lfs -text
|
||||
half/prn/to_nearest_even.tsv filter=lfs diff=lfs merge=lfs -text
|
||||
half/prn/to_positive_infinity.tsv filter=lfs diff=lfs merge=lfs -text
|
||||
single/add/to_positive_infinity.tsv filter=lfs diff=lfs merge=lfs -text
|
||||
single/div/to_negative_infinity.tsv filter=lfs diff=lfs merge=lfs -text
|
||||
single/mul/to_zero.tsv filter=lfs diff=lfs merge=lfs -text
|
||||
BIN
float/tests/half/add/to_nearest_even.tsv
(Stored with Git LFS)
Normal file
BIN
float/tests/half/add/to_nearest_even.tsv
(Stored with Git LFS)
Normal file
Binary file not shown.
|
BIN
float/tests/half/add/to_negative_infinity.tsv
(Stored with Git LFS)
Normal file
BIN
float/tests/half/add/to_negative_infinity.tsv
(Stored with Git LFS)
Normal file
Binary file not shown.
|
BIN
float/tests/half/add/to_positive_infinity.tsv
(Stored with Git LFS)
Normal file
BIN
float/tests/half/add/to_positive_infinity.tsv
(Stored with Git LFS)
Normal file
Binary file not shown.
|
BIN
float/tests/half/add/to_zero.tsv
(Stored with Git LFS)
Normal file
BIN
float/tests/half/add/to_zero.tsv
(Stored with Git LFS)
Normal file
Binary file not shown.
|
BIN
float/tests/half/div/to_nearest_even.tsv
(Stored with Git LFS)
Normal file
BIN
float/tests/half/div/to_nearest_even.tsv
(Stored with Git LFS)
Normal file
Binary file not shown.
|
BIN
float/tests/half/div/to_negative_infinity.tsv
(Stored with Git LFS)
Normal file
BIN
float/tests/half/div/to_negative_infinity.tsv
(Stored with Git LFS)
Normal file
Binary file not shown.
|
BIN
float/tests/half/div/to_positive_infinity.tsv
(Stored with Git LFS)
Normal file
BIN
float/tests/half/div/to_positive_infinity.tsv
(Stored with Git LFS)
Normal file
Binary file not shown.
|
BIN
float/tests/half/div/to_zero.tsv
(Stored with Git LFS)
Normal file
BIN
float/tests/half/div/to_zero.tsv
(Stored with Git LFS)
Normal file
Binary file not shown.
|
BIN
float/tests/half/fma/to_nearest_even.tsv
(Stored with Git LFS)
Normal file
BIN
float/tests/half/fma/to_nearest_even.tsv
(Stored with Git LFS)
Normal file
Binary file not shown.
|
BIN
float/tests/half/fma/to_negative_infinity.tsv
(Stored with Git LFS)
Normal file
BIN
float/tests/half/fma/to_negative_infinity.tsv
(Stored with Git LFS)
Normal file
Binary file not shown.
|
BIN
float/tests/half/fma/to_positive_infinity.tsv
(Stored with Git LFS)
Normal file
BIN
float/tests/half/fma/to_positive_infinity.tsv
(Stored with Git LFS)
Normal file
Binary file not shown.
|
BIN
float/tests/half/fma/to_zero.tsv
(Stored with Git LFS)
Normal file
BIN
float/tests/half/fma/to_zero.tsv
(Stored with Git LFS)
Normal file
Binary file not shown.
|
BIN
float/tests/half/mad/to_nearest_even.tsv
(Stored with Git LFS)
Normal file
BIN
float/tests/half/mad/to_nearest_even.tsv
(Stored with Git LFS)
Normal file
Binary file not shown.
|
BIN
float/tests/half/mad/to_negative_infinity.tsv
(Stored with Git LFS)
Normal file
BIN
float/tests/half/mad/to_negative_infinity.tsv
(Stored with Git LFS)
Normal file
Binary file not shown.
|
BIN
float/tests/half/mad/to_positive_infinity.tsv
(Stored with Git LFS)
Normal file
BIN
float/tests/half/mad/to_positive_infinity.tsv
(Stored with Git LFS)
Normal file
Binary file not shown.
|
BIN
float/tests/half/mad/to_zero.tsv
(Stored with Git LFS)
Normal file
BIN
float/tests/half/mad/to_zero.tsv
(Stored with Git LFS)
Normal file
Binary file not shown.
|
BIN
float/tests/half/mul/to_nearest_even.tsv
(Stored with Git LFS)
Normal file
BIN
float/tests/half/mul/to_nearest_even.tsv
(Stored with Git LFS)
Normal file
Binary file not shown.
|
BIN
float/tests/half/mul/to_negative_infinity.tsv
(Stored with Git LFS)
Normal file
BIN
float/tests/half/mul/to_negative_infinity.tsv
(Stored with Git LFS)
Normal file
Binary file not shown.
|
BIN
float/tests/half/mul/to_positive_infinity.tsv
(Stored with Git LFS)
Normal file
BIN
float/tests/half/mul/to_positive_infinity.tsv
(Stored with Git LFS)
Normal file
Binary file not shown.
|
BIN
float/tests/half/mul/to_zero.tsv
(Stored with Git LFS)
Normal file
BIN
float/tests/half/mul/to_zero.tsv
(Stored with Git LFS)
Normal file
Binary file not shown.
|
BIN
float/tests/half/prn/to_nearest_even.tsv
(Stored with Git LFS)
Normal file
BIN
float/tests/half/prn/to_nearest_even.tsv
(Stored with Git LFS)
Normal file
Binary file not shown.
|
BIN
float/tests/half/prn/to_negative_infinity.tsv
(Stored with Git LFS)
Normal file
BIN
float/tests/half/prn/to_negative_infinity.tsv
(Stored with Git LFS)
Normal file
Binary file not shown.
|
BIN
float/tests/half/prn/to_positive_infinity.tsv
(Stored with Git LFS)
Normal file
BIN
float/tests/half/prn/to_positive_infinity.tsv
(Stored with Git LFS)
Normal file
Binary file not shown.
|
BIN
float/tests/half/prn/to_zero.tsv
(Stored with Git LFS)
Normal file
BIN
float/tests/half/prn/to_zero.tsv
(Stored with Git LFS)
Normal file
Binary file not shown.
|
BIN
float/tests/half/sub/to_nearest_even.tsv
(Stored with Git LFS)
Normal file
BIN
float/tests/half/sub/to_nearest_even.tsv
(Stored with Git LFS)
Normal file
Binary file not shown.
|
BIN
float/tests/half/sub/to_negative_infinity.tsv
(Stored with Git LFS)
Normal file
BIN
float/tests/half/sub/to_negative_infinity.tsv
(Stored with Git LFS)
Normal file
Binary file not shown.
|
BIN
float/tests/half/sub/to_positive_infinity.tsv
(Stored with Git LFS)
Normal file
BIN
float/tests/half/sub/to_positive_infinity.tsv
(Stored with Git LFS)
Normal file
Binary file not shown.
|
BIN
float/tests/half/sub/to_zero.tsv
(Stored with Git LFS)
Normal file
BIN
float/tests/half/sub/to_zero.tsv
(Stored with Git LFS)
Normal file
Binary file not shown.
|
BIN
float/tests/single/add/to_nearest_even.tsv
(Stored with Git LFS)
Normal file
BIN
float/tests/single/add/to_nearest_even.tsv
(Stored with Git LFS)
Normal file
Binary file not shown.
|
BIN
float/tests/single/add/to_negative_infinity.tsv
(Stored with Git LFS)
Normal file
BIN
float/tests/single/add/to_negative_infinity.tsv
(Stored with Git LFS)
Normal file
Binary file not shown.
|
BIN
float/tests/single/add/to_positive_infinity.tsv
(Stored with Git LFS)
Normal file
BIN
float/tests/single/add/to_positive_infinity.tsv
(Stored with Git LFS)
Normal file
Binary file not shown.
|
BIN
float/tests/single/add/to_zero.tsv
(Stored with Git LFS)
Normal file
BIN
float/tests/single/add/to_zero.tsv
(Stored with Git LFS)
Normal file
Binary file not shown.
|
BIN
float/tests/single/div/to_nearest_even.tsv
(Stored with Git LFS)
Normal file
BIN
float/tests/single/div/to_nearest_even.tsv
(Stored with Git LFS)
Normal file
Binary file not shown.
|
BIN
float/tests/single/div/to_negative_infinity.tsv
(Stored with Git LFS)
Normal file
BIN
float/tests/single/div/to_negative_infinity.tsv
(Stored with Git LFS)
Normal file
Binary file not shown.
|
BIN
float/tests/single/div/to_positive_infinity.tsv
(Stored with Git LFS)
Normal file
BIN
float/tests/single/div/to_positive_infinity.tsv
(Stored with Git LFS)
Normal file
Binary file not shown.
|
BIN
float/tests/single/div/to_zero.tsv
(Stored with Git LFS)
Normal file
BIN
float/tests/single/div/to_zero.tsv
(Stored with Git LFS)
Normal file
Binary file not shown.
|
BIN
float/tests/single/fma/to_nearest_even.tsv
(Stored with Git LFS)
Normal file
BIN
float/tests/single/fma/to_nearest_even.tsv
(Stored with Git LFS)
Normal file
Binary file not shown.
|
BIN
float/tests/single/fma/to_negative_infinity.tsv
(Stored with Git LFS)
Normal file
BIN
float/tests/single/fma/to_negative_infinity.tsv
(Stored with Git LFS)
Normal file
Binary file not shown.
|
BIN
float/tests/single/fma/to_positive_infinity.tsv
(Stored with Git LFS)
Normal file
BIN
float/tests/single/fma/to_positive_infinity.tsv
(Stored with Git LFS)
Normal file
Binary file not shown.
|
BIN
float/tests/single/fma/to_zero.tsv
(Stored with Git LFS)
Normal file
BIN
float/tests/single/fma/to_zero.tsv
(Stored with Git LFS)
Normal file
Binary file not shown.
|
BIN
float/tests/single/mad/to_nearest_even.tsv
(Stored with Git LFS)
Normal file
BIN
float/tests/single/mad/to_nearest_even.tsv
(Stored with Git LFS)
Normal file
Binary file not shown.
|
BIN
float/tests/single/mad/to_negative_infinity.tsv
(Stored with Git LFS)
Normal file
BIN
float/tests/single/mad/to_negative_infinity.tsv
(Stored with Git LFS)
Normal file
Binary file not shown.
|
BIN
float/tests/single/mad/to_positive_infinity.tsv
(Stored with Git LFS)
Normal file
BIN
float/tests/single/mad/to_positive_infinity.tsv
(Stored with Git LFS)
Normal file
Binary file not shown.
|
BIN
float/tests/single/mad/to_zero.tsv
(Stored with Git LFS)
Normal file
BIN
float/tests/single/mad/to_zero.tsv
(Stored with Git LFS)
Normal file
Binary file not shown.
|
BIN
float/tests/single/mul/to_nearest_even.tsv
(Stored with Git LFS)
Normal file
BIN
float/tests/single/mul/to_nearest_even.tsv
(Stored with Git LFS)
Normal file
Binary file not shown.
|
BIN
float/tests/single/mul/to_negative_infinity.tsv
(Stored with Git LFS)
Normal file
BIN
float/tests/single/mul/to_negative_infinity.tsv
(Stored with Git LFS)
Normal file
Binary file not shown.
|
BIN
float/tests/single/mul/to_positive_infinity.tsv
(Stored with Git LFS)
Normal file
BIN
float/tests/single/mul/to_positive_infinity.tsv
(Stored with Git LFS)
Normal file
Binary file not shown.
|
BIN
float/tests/single/mul/to_zero.tsv
(Stored with Git LFS)
Normal file
BIN
float/tests/single/mul/to_zero.tsv
(Stored with Git LFS)
Normal file
Binary file not shown.
|
BIN
float/tests/single/prn/to_nearest_even.tsv
(Stored with Git LFS)
Normal file
BIN
float/tests/single/prn/to_nearest_even.tsv
(Stored with Git LFS)
Normal file
Binary file not shown.
|
BIN
float/tests/single/prn/to_negative_infinity.tsv
(Stored with Git LFS)
Normal file
BIN
float/tests/single/prn/to_negative_infinity.tsv
(Stored with Git LFS)
Normal file
Binary file not shown.
|
BIN
float/tests/single/prn/to_positive_infinity.tsv
(Stored with Git LFS)
Normal file
BIN
float/tests/single/prn/to_positive_infinity.tsv
(Stored with Git LFS)
Normal file
Binary file not shown.
|
BIN
float/tests/single/prn/to_zero.tsv
(Stored with Git LFS)
Normal file
BIN
float/tests/single/prn/to_zero.tsv
(Stored with Git LFS)
Normal file
Binary file not shown.
|
BIN
float/tests/single/sub/to_nearest_even.tsv
(Stored with Git LFS)
Normal file
BIN
float/tests/single/sub/to_nearest_even.tsv
(Stored with Git LFS)
Normal file
Binary file not shown.
|
BIN
float/tests/single/sub/to_negative_infinity.tsv
(Stored with Git LFS)
Normal file
BIN
float/tests/single/sub/to_negative_infinity.tsv
(Stored with Git LFS)
Normal file
Binary file not shown.
|
BIN
float/tests/single/sub/to_positive_infinity.tsv
(Stored with Git LFS)
Normal file
BIN
float/tests/single/sub/to_positive_infinity.tsv
(Stored with Git LFS)
Normal file
Binary file not shown.
|
BIN
float/tests/single/sub/to_zero.tsv
(Stored with Git LFS)
Normal file
BIN
float/tests/single/sub/to_zero.tsv
(Stored with Git LFS)
Normal file
Binary file not shown.
|
Loading…
Add table
Add a link
Reference in a new issue