#!/bin/sh

D=../sanity

sed 's/^T(//;s/,//;s/)//' functions.h | while read N T
do
	case $T in
	'') continue ;;

	d_*|f_*|l_*) ./gen $N >$D/$N.h <<EOF
-8.06684839057968126823036836721962107
+4.34523984933830528860918339265097582
-8.38143342755524846875570469976848365
-6.53167358191348375502677177380274565
+9.26705696697258528046907106996633473
+0.66198589809950443806520229507072615
-0.40660392238535529519351490505650392
+0.56175974622072409170769641066459813
+0.77415229659130372834006997382367211
-0.67876370263940246316802166606111153
EOF
	;;
	di_*|fi_*|li_*) ./gen $N >$D/$N.h <<EOF
-8.06684839057968126823036836721962107 -2
+4.34523984933830528860918339265097582 -1
-8.38143342755524846875570469976848365 0
-6.53167358191348375502677177380274565 1
+9.26705696697258528046907106996633473 2
+0.66198589809950443806520229507072615 3
-0.40660392238535529519351490505650392 4
+0.56175974622072409170769641066459813 5
+0.77415229659130372834006997382367211 6
-0.67876370263940246316802166606111153 7
EOF
	;;
	dd_*|ff_*|[dfl]l_*) ./gen $N >$D/$N.h <<EOF
-8.06684839057968126823036836721962107 +4.53566256067686864057537788388811764
+4.34523984933830528860918339265097582 -8.88799136300345123622768770110757083
-8.38143342755524846875570469976848365 -2.76360733737958805493258686740202557
-6.53167358191348375502677177380274565 +4.56753527684274348416184388263831508
+9.26705696697258528046907106996633473 +4.81139208435979589730560859417420750
-6.45004555606023597579444426311945845 +0.66207179233767389593411946503559251
+7.85889025304169636815211127446301636 +0.05215452675006224789817853073306709
-0.79205451198489594412029014134600873 +7.67640268511754002832536318951411755
+0.61570267319792408792325107549103713 +2.01190257903248027376896111888376742
-0.55875868236091523814033056701077708 +0.03223983060263803856752696457418850
EOF
	;;
	ddd_*|fff_*|lll_*) ./gen $N >$D/$N.h <<EOF
-8.06684839057968126823036836721962107 +4.53566256067686864057537788388811764 +0.66207179233767389593411946503559251
+4.34523984933830528860918339265097582 -8.88799136300345123622768770110757083 +0.05215452675006224789817853073306709
-8.38143342755524846875570469976848365 -2.76360733737958805493258686740202557 +7.67640268511754002832536318951411755
-6.53167358191348375502677177380274565 +4.56753527684274348416184388263831508 -0.79205451198489594412029014134600873
+9.26705696697258528046907106996633473 +4.81139208435979589730560859417420750 -0.55875868236091523814033056701077708
EOF
	;;
	*) echo "bad type: $T"
	;;
	esac
done

