@@ -73,17 +73,6 @@ define_language! {
7373 "<=" = LessEq ( [ Id ; 2 ] ) ,
7474 ">=" = GreaterEq ( [ Id ; 2 ] ) ,
7575
76- // complex operators not from FPCore
77- "re" = Re ( Id ) ,
78- "im" = Im ( Id ) ,
79- "complex" = Complex ( [ Id ; 2 ] ) ,
80- "conj" = Conj ( Id ) ,
81- "+.c" = Addc ( [ Id ; 2 ] ) ,
82- "-.c" = Subc ( [ Id ; 2 ] ) ,
83- "neg.c" = Negc ( Id ) ,
84- "/.c" = Divc ( [ Id ; 2 ] ) ,
85- "*.c" = Mulc ( [ Id ; 2 ] ) ,
86-
8776 // FPCore operations
8877 "erf" = Erf ( Id ) ,
8978 "erfc" = Erfc ( Id ) ,
@@ -134,11 +123,84 @@ define_language! {
134123 "expm1" = Expm1 ( Id ) ,
135124 "hypot" = Hypot ( [ Id ; 2 ] ) ,
136125
137- "+.p16" = PositAdd ( [ Id ; 2 ] ) ,
138- "-.p16" = PositSub ( [ Id ; 2 ] ) ,
139- "*.p16" = PositMul ( [ Id ; 2 ] ) ,
140- "/.p16" = PositDiv ( [ Id ; 2 ] ) ,
141- "real->posit" = RealToPosit ( Id ) ,
126+ // Complex numbers
127+
128+ "+.c" = Addc ( [ Id ; 2 ] ) ,
129+ "neg.c" = Negc ( Id ) ,
130+ "-.c" = Subc ( [ Id ; 2 ] ) ,
131+ "*.c" = Mulc ( [ Id ; 2 ] ) ,
132+ "/.c" = Divc ( [ Id ; 2 ] ) ,
133+ "exp.c" = Expc ( Id ) ,
134+ "log.c" = Logc ( Id ) ,
135+ "pow.c" = Powc ( [ Id ; 2 ] ) ,
136+ "sqrt.c" = Sqrtc ( Id ) ,
137+ "complex" = Complex ( [ Id ; 2 ] ) ,
138+ "re" = Re ( Id ) ,
139+ "im" = Im ( Id ) ,
140+ "conj" = Conj ( Id ) ,
141+
142+ // 8-bit posit numbers
143+
144+ "+.p8" = Posit8Add ( [ Id ; 2 ] ) ,
145+ "neg.p8" = Posit8Neg ( Id ) ,
146+ "-.p8" = Posit8Sub ( [ Id ; 2 ] ) ,
147+ "*.p8" = Posit8Mul ( [ Id ; 2 ] ) ,
148+ "/.p8" = Posit8Div ( [ Id ; 2 ] ) ,
149+ "sqrt.p8" = Posit8Sqrt ( Id ) ,
150+ "<.p8" = Posit8Lt ( [ Id ; 2 ] ) ,
151+ ">.p8" = Posit8Gt ( [ Id ; 2 ] ) ,
152+ "<=.p8" = Posit8Lte ( [ Id ; 2 ] ) ,
153+ ">=.p8" = Posit8Gte ( [ Id ; 2 ] ) ,
154+ "real->posit8" = RealToPosit8 ( Id ) ,
155+ "posit8->real" = Posit8ToReal ( Id ) ,
156+ "real->quire8" = RealToQuire8 ( Id ) ,
157+ "quire8->real" = Quire8ToReal ( Id ) ,
158+ "quire8-mul-add" = Quire8MulAdd ( [ Id ; 3 ] ) ,
159+ "quire8-mul-sub" = Quire8MulSub ( [ Id ; 3 ] ) ,
160+ "posit8->quire8" = Posit8ToQuire8 ( Id ) ,
161+ "quire8->posit8" = Quire8ToPosit8 ( Id ) ,
162+
163+ // 16-bit posit numbers
164+
165+ "+.p16" = Posit16Add ( [ Id ; 2 ] ) ,
166+ "neg.p16" = Posit16Neg ( Id ) ,
167+ "-.p16" = Posit16Sub ( [ Id ; 2 ] ) ,
168+ "*.p16" = Posit16Mul ( [ Id ; 2 ] ) ,
169+ "/.p16" = Posit16Div ( [ Id ; 2 ] ) ,
170+ "sqrt.p16" = Posit16Sqrt ( Id ) ,
171+ "<.p16" = Posit16Lt ( [ Id ; 2 ] ) ,
172+ ">.p16" = Posit16Gt ( [ Id ; 2 ] ) ,
173+ "<=.p16" = Posit16Lte ( [ Id ; 2 ] ) ,
174+ ">=.p16" = Posit16Gte ( [ Id ; 2 ] ) ,
175+ "real->posit16" = RealToPosit16 ( Id ) ,
176+ "posit16->real" = Posit16ToReal ( Id ) ,
177+ "real->quire16" = RealToQuire16 ( Id ) ,
178+ "quire16->real" = Quire16ToReal ( Id ) ,
179+ "quire16-mul-add" = Quire16MulAdd ( [ Id ; 3 ] ) ,
180+ "quire16-mul-sub" = Quire16MulSub ( [ Id ; 3 ] ) ,
181+ "posit16->quire16" = Posit16ToQuire16 ( Id ) ,
182+ "quire16->posit16" = Quire16ToPosit16 ( Id ) ,
183+
184+ // 32-bit posit numbers
185+
186+ "+.p32" = Posit32Add ( [ Id ; 2 ] ) ,
187+ "neg.p32" = Posit32Neg ( Id ) ,
188+ "-.p32" = Posit32Sub ( [ Id ; 2 ] ) ,
189+ "*.p32" = Posit32Mul ( [ Id ; 2 ] ) ,
190+ "/.p32" = Posit32Div ( [ Id ; 2 ] ) ,
191+ "sqrt.p32" = Posit32Sqrt ( Id ) ,
192+ "<.p32" = Posit32Lt ( [ Id ; 2 ] ) ,
193+ ">.p32" = Posit32Gt ( [ Id ; 2 ] ) ,
194+ "<=.p32" = Posit32Lte ( [ Id ; 2 ] ) ,
195+ ">=.p32" = Posit32Gte ( [ Id ; 2 ] ) ,
196+ "real->posit32" = RealToPosit32 ( Id ) ,
197+ "posit32->real" = Posit32ToReal ( Id ) ,
198+ "real->quire32" = RealToQuire32 ( Id ) ,
199+ "quire32->real" = Quire32ToReal ( Id ) ,
200+ "quire32-mul-add" = Quire32MulAdd ( [ Id ; 3 ] ) ,
201+ "quire32-mul-sub" = Quire32MulSub ( [ Id ; 3 ] ) ,
202+ "posit32->quire32" = Posit32ToQuire32 ( Id ) ,
203+ "quire32->posit32" = Quire32ToPosit32 ( Id ) ,
142204
143205 Constant ( Constant ) ,
144206 Variable ( egg:: Symbol ) ,
0 commit comments