Skip to content

Commit e8b56e0

Browse files
authored
Merge pull request #1346 from herbie-fp/add-bang-underscore-to-fpcore
Add `(! ... _)` to `#:fpcore`
2 parents 5057d16 + 9fc7f1c commit e8b56e0

File tree

9 files changed

+72
-75
lines changed

9 files changed

+72
-75
lines changed

infra/softposit.rkt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -176,11 +176,11 @@
176176
[<=.p8 #:spec (<= x y) #:impl posit8<= #:cost 1]
177177
[>=.p8 #:spec (>= x y) #:impl posit8>= #:cost 1])
178178

179-
(define-operations ([x <posit8>]) <posit8> #:fpcore (:precision posit8)
179+
(define-operations ([x <posit8>]) <posit8> #:fpcore (! :precision posit8 _)
180180
[neg.p8 #:spec (neg x) #:impl posit8-neg #:fpcore (- x) #:cost 1]
181181
[sqrt.p8 #:spec (sqrt x) #:impl posit8-sqrt #:cost 1])
182182

183-
(define-operations ([x <posit8>] [y <posit8>]) <posit8> #:fpcore (:precision posit8)
183+
(define-operations ([x <posit8>] [y <posit8>]) <posit8> #:fpcore (! :precision posit8 _)
184184
[+.p8 #:spec (+ x y) #:impl posit8-add #:cost 1]
185185
[-.p8 #:spec (- x y) #:impl posit8-sub #:cost 1]
186186
[*.p8 #:spec (* x y) #:impl posit8-mul #:cost 1]
@@ -193,11 +193,11 @@
193193
[<=.p16 #:spec (<= x y) #:impl posit16<= #:cost 1]
194194
[>=.p16 #:spec (>= x y) #:impl posit16>= #:cost 1])
195195

196-
(define-operations ([x <posit16>]) <posit16> #:fpcore (:precision posit16)
196+
(define-operations ([x <posit16>]) <posit16> #:fpcore (! :precision posit16 _)
197197
[neg.p16 #:spec (neg x) #:impl posit16-neg #:fpcore (- x) #:cost 1]
198198
[sqrt.p16 #:spec (sqrt x) #:impl posit16-sqrt #:cost 1])
199199

200-
(define-operations ([x <posit16>] [y <posit16>]) <posit16> #:fpcore (:precision posit16)
200+
(define-operations ([x <posit16>] [y <posit16>]) <posit16> #:fpcore (! :precision posit16 _)
201201
[+.p16 #:spec (+ x y) #:impl posit16-add #:cost 1]
202202
[-.p16 #:spec (- x y) #:impl posit16-sub #:cost 1]
203203
[*.p16 #:spec (* x y) #:impl posit16-mul #:cost 1]
@@ -210,11 +210,11 @@
210210
[<=.p32 #:spec (<= x y) #:impl posit32<= #:cost 1]
211211
[>=.p32 #:spec (>= x y) #:impl posit32>= #:cost 1])
212212

213-
(define-operations ([x <posit32>]) <posit32> #:fpcore (:precision posit32)
213+
(define-operations ([x <posit32>]) <posit32> #:fpcore (! :precision posit32 _)
214214
[neg.p32 #:spec (neg x) #:impl posit32-neg #:fpcore (- x) #:cost 1]
215215
[sqrt.p32 #:spec (sqrt x) #:impl posit32-sqrt #:cost 1])
216216

217-
(define-operations ([x <posit32>] [y <posit32>]) <posit32> #:fpcore (:precision posit32)
217+
(define-operations ([x <posit32>] [y <posit32>]) <posit32> #:fpcore (! :precision posit32 _)
218218
[+.p32 #:spec (+ x y) #:impl posit32-add #:cost 1]
219219
[-.p32 #:spec (- x y) #:impl posit32-sub #:cost 1]
220220
[*.p32 #:spec (* x y) #:impl posit32-mul #:cost 1]
@@ -226,15 +226,15 @@
226226
(define-representation <quire16> #:cost 1)
227227
(define-representation <quire32> #:cost 1)
228228

229-
(define-operations ([x <quire8>] [y <posit8>] [z <posit8>]) <quire8> #:fpcore (:precision quire8)
229+
(define-operations ([x <quire8>] [y <posit8>] [z <posit8>]) <quire8> #:fpcore (! :precision quire8 _)
230230
[quire8-mul-add #:spec (+ x (* y z)) #:impl quire8-fdp-add #:fpcore (fdp x y z) #:cost 1]
231231
[quire8-mul-sub #:spec (- x (* y z)) #:impl quire8-fdp-sub #:fpcore (fds x y z) #:cost 1])
232232

233-
(define-operations ([x <quire16>] [y <posit16>] [z <posit16>]) <quire16> #:fpcore (:precision quire16)
233+
(define-operations ([x <quire16>] [y <posit16>] [z <posit16>]) <quire16> #:fpcore (! :precision quire16 _)
234234
[quire16-mul-add #:spec (+ x (* y z)) #:impl quire16-fdp-add #:fpcore (fdp x y z) #:cost 1]
235235
[quire16-mul-sub #:spec (- x (* y z)) #:impl quire16-fdp-sub #:fpcore (fds x y z) #:cost 1])
236236

237-
(define-operations ([x <quire32>] [y <posit32>] [z <posit32>]) <quire32> #:fpcore (:precision quire32)
237+
(define-operations ([x <quire32>] [y <posit32>] [z <posit32>]) <quire32> #:fpcore (! :precision quire32 _)
238238
[quire32-mul-add #:spec (+ x (* y z)) #:impl quire32-fdp-add #:fpcore (fdp x y z) #:cost 1]
239239
[quire32-mul-sub #:spec (- x (* y z)) #:impl quire32-fdp-sub #:fpcore (fds x y z) #:cost 1])
240240

src/platforms/c-windows.rkt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
[<=.f32 #:spec (<= x y) #:impl <= #:cost 32bit-move-cost]
4141
[>=.f32 #:spec (>= x y) #:impl >= #:cost 32bit-move-cost])
4242

43-
(define-operations () <binary32> #:fpcore (:precision binary32)
43+
(define-operations () <binary32> #:fpcore (! :precision binary32 _)
4444
[PI.f32 #:spec (PI) #:impl (const (flsingle pi)) #:fpcore PI #:cost 32bit-move-cost]
4545
[E.f32 #:spec (E) #:impl (const (flsingle (exp 1))) #:fpcore E #:cost 32bit-move-cost]
4646
[INFINITY.f32 #:spec (INFINITY) #:impl (const +inf.0) #:fpcore INFINITY #:cost 32bit-move-cost]
@@ -50,13 +50,13 @@
5050
#:spec (neg x) #:impl (compose flsingle -)
5151
#:fpcore (! :precision binary32 (- x)) #:cost 0.125)
5252

53-
(define-operations ([x <binary32>] [y <binary32>]) <binary32> #:fpcore (:precision binary32)
53+
(define-operations ([x <binary32>] [y <binary32>]) <binary32> #:fpcore (! :precision binary32 _)
5454
[+.f32 #:spec (+ x y) #:impl (compose flsingle +) #:cost 0.200]
5555
[-.f32 #:spec (- x y) #:impl (compose flsingle -) #:cost 0.200]
5656
[*.f32 #:spec (* x y) #:impl (compose flsingle *) #:cost 0.250]
5757
[/.f32 #:spec (/ x y) #:impl (compose flsingle /) #:cost 0.350])
5858

59-
(define-operations ([x <binary32>]) <binary32> #:fpcore (:precision binary32)
59+
(define-operations ([x <binary32>]) <binary32> #:fpcore (! :precision binary32 _)
6060
[sin.f32 #:spec (sin x) #:impl (from-libm 'sinf) #:cost 4.250]
6161
[cos.f32 #:spec (cos x) #:impl (from-libm 'cosf) #:cost 4.250]
6262
[tan.f32 #:spec (tan x) #:impl (from-libm 'tanf) #:cost 4.750]
@@ -86,7 +86,7 @@
8686
[tgamma.f32 #:spec (tgamma x) #:impl (from-libm 'tgammaf) #:cost 2.625]
8787
[trunc.f32 #:spec (trunc x) #:impl (from-libm 'truncf) #:cost 0.275])
8888

89-
(define-operations ([x <binary32>] [y <binary32>]) <binary32> #:fpcore (:precision binary32)
89+
(define-operations ([x <binary32>] [y <binary32>]) <binary32> #:fpcore (! :precision binary32 _)
9090
[pow.f32 #:spec (pow x y) #:impl (from-libm 'powf) #:cost 2.000]
9191
[atan2.f32 #:spec (atan2 x y) #:impl (from-libm 'atan2f) #:cost 2.000]
9292
[copysign.f32 #:spec (copysign x y) #:impl (from-libm 'copysignf) #:cost 0.200]
@@ -96,7 +96,7 @@
9696
[fmod.f32 #:spec (fmod x y) #:impl (from-libm 'fmodf) #:cost 1.750]
9797
[remainder.f32 #:spec (remainder x y) #:impl (from-libm 'remainderf) #:cost 1.000])
9898

99-
(define-operations ([x <binary32>]) <binary32> #:fpcore (:precision binary32)
99+
(define-operations ([x <binary32>]) <binary32> #:fpcore (! :precision binary32 _)
100100
[erfc.f32 #:spec (- 1 (erf x)) #:impl (from-libm 'erfcf) #:fpcore (erfc x) #:cost 0.900]
101101
[expm1.f32 #:spec (- (exp x) 1) #:impl (from-libm 'expm1f) #:fpcore (expm1 x) #:cost 0.900]
102102
[log1p.f32 #:spec (log (+ 1 x)) #:impl (from-libm 'log1pf) #:fpcore (log1p x) #:cost 1.300])
@@ -115,7 +115,7 @@
115115
[*.f64 #:spec (* x y) #:impl * #:cost 0.250]
116116
[/.f64 #:spec (/ x y) #:impl / #:cost 0.350])
117117

118-
(define-operations () <binary64> #:fpcore (:precision binary64)
118+
(define-operations () <binary64> #:fpcore (! :precision binary64 _)
119119
[PI.f64 #:spec (PI) #:impl (const pi) #:fpcore PI #:cost 64bit-move-cost]
120120
[E.f64 #:spec (E) #:impl (const (exp 1)) #:fpcore E #:cost 64bit-move-cost]
121121
[INFINITY #:spec (INFINITY) #:impl (const +inf.0) #:fpcore INFINITY #:cost 64bit-move-cost]
@@ -133,7 +133,7 @@
133133
[<=.f64 #:spec (<= x y) #:impl <= #:cost 64bit-move-cost]
134134
[>=.f64 #:spec (>= x y) #:impl >= #:cost 64bit-move-cost])
135135

136-
(define-operations ([x <binary64>]) <binary64> #:fpcore (:precision binary64)
136+
(define-operations ([x <binary64>]) <binary64> #:fpcore (! :precision binary64 _)
137137
[fabs.f64 #:spec (fabs x) #:impl (from-libm 'fabs) #:cost 0.125]
138138
[sin.f64 #:spec (sin x) #:impl (from-libm 'sin) #:cost 4.200]
139139
[cos.f64 #:spec (cos x) #:impl (from-libm 'cos) #:cost 4.200]
@@ -164,7 +164,7 @@
164164
[tgamma.f64 #:spec (tgamma x) #:impl (from-libm 'tgamma) #:cost 2.625]
165165
[trunc.f64 #:spec (trunc x) #:impl (from-libm 'trunc) #:cost 0.250])
166166

167-
(define-operations ([x <binary64>] [y <binary64>]) <binary64> #:fpcore (:precision binary64)
167+
(define-operations ([x <binary64>] [y <binary64>]) <binary64> #:fpcore (! :precision binary64 _)
168168
[pow.f64 #:spec (pow x y) #:impl (from-libm 'pow) #:cost 2.000]
169169
[atan2.f64 #:spec (atan2 x y) #:impl (from-libm 'atan2) #:cost 2.000]
170170
[copysign.f64 #:spec (copysign x y) #:impl (from-libm 'copysign) #:cost 0.200]
@@ -174,7 +174,7 @@
174174
[fmod.f64 #:spec (fmod x y) #:impl (from-libm 'fmod) #:cost 1.750]
175175
[remainder.f64 #:spec (remainder x y) #:impl (from-libm 'remainder) #:cost 1.000])
176176

177-
(define-operations ([x <binary64>]) <binary64> #:fpcore (:precision binary64)
177+
(define-operations ([x <binary64>]) <binary64> #:fpcore (! :precision binary64 _)
178178
[erfc.f64 #:spec (- 1 (erf x)) #:impl (from-libm 'erfc) #:fpcore (erfc x) #:cost 0.900]
179179
[expm1.f64 #:spec (- (exp x) 1) #:impl (from-libm 'expm1) #:fpcore (expm1 x) #:cost 0.900]
180180
[log1p.f64 #:spec (log (+ 1 x)) #:impl (from-libm 'log1p) #:fpcore (log1p x) #:cost 1.300])

src/platforms/c.rkt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
[<=.f32 #:spec (<= x y) #:impl <= #:cost 32bit-move-cost]
4141
[>=.f32 #:spec (>= x y) #:impl >= #:cost 32bit-move-cost])
4242

43-
(define-operations () <binary32> #:fpcore (:precision binary32)
43+
(define-operations () <binary32> #:fpcore (! :precision binary32 _)
4444
[PI.f32 #:spec (PI) #:impl (const (flsingle pi)) #:fpcore PI #:cost 32bit-move-cost]
4545
[E.f32 #:spec (E) #:impl (const (flsingle (exp 1))) #:fpcore E #:cost 32bit-move-cost]
4646
[INFINITY.f32 #:spec (INFINITY) #:impl (const +inf.0) #:fpcore INFINITY #:cost 32bit-move-cost]
@@ -50,13 +50,13 @@
5050
#:spec (neg x) #:impl (compose flsingle -)
5151
#:fpcore (! :precision binary32 (- x)) #:cost 0.125)
5252

53-
(define-operations ([x <binary32>] [y <binary32>]) <binary32> #:fpcore (:precision binary32)
53+
(define-operations ([x <binary32>] [y <binary32>]) <binary32> #:fpcore (! :precision binary32 _)
5454
[+.f32 #:spec (+ x y) #:impl (compose flsingle +) #:cost 0.200]
5555
[-.f32 #:spec (- x y) #:impl (compose flsingle -) #:cost 0.200]
5656
[*.f32 #:spec (* x y) #:impl (compose flsingle *) #:cost 0.250]
5757
[/.f32 #:spec (/ x y) #:impl (compose flsingle /) #:cost 0.350])
5858

59-
(define-operations ([x <binary32>]) <binary32> #:fpcore (:precision binary32)
59+
(define-operations ([x <binary32>]) <binary32> #:fpcore (! :precision binary32 _)
6060
[fabs.f32 #:spec (fabs x) #:impl (from-libm 'fabsf) #:cost 0.125]
6161
[sin.f32 #:spec (sin x) #:impl (from-libm 'sinf) #:cost 4.250]
6262
[cos.f32 #:spec (cos x) #:impl (from-libm 'cosf) #:cost 4.250]
@@ -87,7 +87,7 @@
8787
[tgamma.f32 #:spec (tgamma x) #:impl (from-libm 'tgammaf) #:cost 2.625]
8888
[trunc.f32 #:spec (trunc x) #:impl (from-libm 'truncf) #:cost 0.275])
8989

90-
(define-operations ([x <binary32>] [y <binary32>]) <binary32> #:fpcore (:precision binary32)
90+
(define-operations ([x <binary32>] [y <binary32>]) <binary32> #:fpcore (! :precision binary32 _)
9191
[pow.f32 #:spec (pow x y) #:impl (from-libm 'powf) #:cost 2.000]
9292
[atan2.f32 #:spec (atan2 x y) #:impl (from-libm 'atan2f) #:cost 2.000]
9393
[copysign.f32 #:spec (copysign x y) #:impl (from-libm 'copysignf) #:cost 0.200]
@@ -97,7 +97,7 @@
9797
[fmod.f32 #:spec (fmod x y) #:impl (from-libm 'fmodf) #:cost 1.750]
9898
[remainder.f32 #:spec (remainder x y) #:impl (from-libm 'remainderf) #:cost 1.000])
9999

100-
(define-operations ([x <binary32>]) <binary32> #:fpcore (:precision binary32)
100+
(define-operations ([x <binary32>]) <binary32> #:fpcore (! :precision binary32 _)
101101
[erfc.f32 #:spec (- 1 (erf x)) #:impl (from-libm 'erfcf) #:fpcore (erfc x) #:cost 0.900]
102102
[expm1.f32 #:spec (- (exp x) 1) #:impl (from-libm 'expm1f) #:fpcore (expm1 x) #:cost 0.900]
103103
[log1p.f32 #:spec (log (+ 1 x)) #:impl (from-libm 'log1pf) #:fpcore (log1p x) #:cost 1.300])
@@ -126,7 +126,7 @@
126126
[<=.f64 #:spec (<= x y) #:impl <= #:cost 64bit-move-cost]
127127
[>=.f64 #:spec (>= x y) #:impl >= #:cost 64bit-move-cost])
128128

129-
(define-operations () <binary64> #:fpcore (:precision binary64)
129+
(define-operations () <binary64> #:fpcore (! :precision binary64 _)
130130
[PI.f64 #:spec (PI) #:impl (const pi) #:fpcore PI #:cost 64bit-move-cost]
131131
[E.f64 #:spec (E) #:impl (const (exp 1)) #:fpcore E #:cost 64bit-move-cost]
132132
[INFINITY #:spec (INFINITY) #:impl (const +inf.0) #:fpcore INFINITY #:cost 64bit-move-cost]
@@ -135,13 +135,13 @@
135135
(define-operation (neg.f64 [x <binary64>]) <binary64>
136136
#:spec (neg x) #:impl - #:fpcore (! :precision binary64 (- x)) #:cost 0.125)
137137

138-
(define-operations ([x <binary64>] [y <binary64>]) <binary64> #:fpcore (:precision binary64)
138+
(define-operations ([x <binary64>] [y <binary64>]) <binary64> #:fpcore (! :precision binary64 _)
139139
[+.f64 #:spec (+ x y) #:impl + #:cost 0.200]
140140
[-.f64 #:spec (- x y) #:impl - #:cost 0.200]
141141
[*.f64 #:spec (* x y) #:impl * #:cost 0.250]
142142
[/.f64 #:spec (/ x y) #:impl / #:cost 0.350])
143143

144-
(define-operations ([x <binary64>]) <binary64> #:fpcore (:precision binary64)
144+
(define-operations ([x <binary64>]) <binary64> #:fpcore (! :precision binary64 _)
145145
[fabs.f64 #:spec (fabs x) #:impl (from-libm 'fabs) #:cost 0.125]
146146
[sin.f64 #:spec (sin x) #:impl (from-libm 'sin) #:cost 4.200]
147147
[cos.f64 #:spec (cos x) #:impl (from-libm 'cos) #:cost 4.200]
@@ -172,7 +172,7 @@
172172
[tgamma.f64 #:spec (tgamma x) #:impl (from-libm 'tgamma) #:cost 2.625]
173173
[trunc.f64 #:spec (trunc x) #:impl (from-libm 'trunc) #:cost 0.250])
174174

175-
(define-operations ([x <binary64>] [y <binary64>]) <binary64> #:fpcore (:precision binary64)
175+
(define-operations ([x <binary64>] [y <binary64>]) <binary64> #:fpcore (! :precision binary64 _)
176176
[pow.f64 #:spec (pow x y) #:impl (from-libm 'pow) #:cost 2.000]
177177
[atan2.f64 #:spec (atan2 x y) #:impl (from-libm 'atan2) #:cost 2.000]
178178
[copysign.f64 #:spec (copysign x y) #:impl (from-libm 'copysign) #:cost 0.200]
@@ -182,7 +182,7 @@
182182
[fmod.f64 #:spec (fmod x y) #:impl (from-libm 'fmod) #:cost 1.750]
183183
[remainder.f64 #:spec (remainder x y) #:impl (from-libm 'remainder) #:cost 1.000])
184184

185-
(define-operations ([x <binary64>]) <binary64> #:fpcore (:precision binary64)
185+
(define-operations ([x <binary64>]) <binary64> #:fpcore (! :precision binary64 _)
186186
[erfc.f64 #:spec (- 1 (erf x)) #:impl (from-libm 'erfc) #:fpcore (erfc x) #:cost 0.900]
187187
[expm1.f64 #:spec (- (exp x) 1) #:impl (from-libm 'expm1) #:fpcore (expm1 x) #:cost 0.900]
188188
[log1p.f64 #:spec (log (+ 1 x)) #:impl (from-libm 'log1p) #:fpcore (log1p x) #:cost 1.300])

src/platforms/herbie10.rkt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
[<=.f32 #:spec (<= x y) #:impl <= #:cost 0]
3737
[>=.f32 #:spec (>= x y) #:impl >= #:cost 0])
3838

39-
(define-operations () <binary32> #:fpcore (:precision binary32)
39+
(define-operations () <binary32> #:fpcore (! :precision binary32 _)
4040
[PI.f32 #:spec (PI) #:impl (const (flsingle pi)) #:fpcore PI #:cost 0]
4141
[E.f32 #:spec (E) #:impl (const (flsingle (exp 1))) #:fpcore E #:cost 0]
4242
[INFINITY.f32 #:spec (INFINITY) #:impl (const +inf.0) #:fpcore INFINITY #:cost 0]
@@ -46,13 +46,13 @@
4646
#:spec (neg x) #:impl (compose flsingle -)
4747
#:fpcore (! :precision binary32 (- x)) #:cost 0)
4848

49-
(define-operations ([x <binary32>] [y <binary32>]) <binary32> #:fpcore (:precision binary32)
49+
(define-operations ([x <binary32>] [y <binary32>]) <binary32> #:fpcore (! :precision binary32 _)
5050
[+.f32 #:spec (+ x y) #:impl (compose flsingle +) #:cost 0]
5151
[-.f32 #:spec (- x y) #:impl (compose flsingle -) #:cost 0]
5252
[*.f32 #:spec (* x y) #:impl (compose flsingle *) #:cost 0]
5353
[/.f32 #:spec (/ x y) #:impl (compose flsingle /) #:cost 0])
5454

55-
(define-operations ([x <binary32>]) <binary32> #:fpcore (:precision binary32)
55+
(define-operations ([x <binary32>]) <binary32> #:fpcore (! :precision binary32 _)
5656
[fabs.f32 #:spec (fabs x) #:impl (from-libm 'fabsf) #:cost 0]
5757
[sin.f32 #:spec (sin x) #:impl (from-libm 'sinf) #:cost 0]
5858
[cos.f32 #:spec (cos x) #:impl (from-libm 'cosf) #:cost 0]
@@ -83,7 +83,7 @@
8383
[tgamma.f32 #:spec (tgamma x) #:impl (from-libm 'tgammaf) #:cost 0]
8484
[trunc.f32 #:spec (trunc x) #:impl (from-libm 'truncf) #:cost 0])
8585

86-
(define-operations ([x <binary32>] [y <binary32>]) <binary32> #:fpcore (:precision binary32)
86+
(define-operations ([x <binary32>] [y <binary32>]) <binary32> #:fpcore (! :precision binary32 _)
8787
[pow.f32 #:spec (pow x y) #:impl (from-libm 'powf) #:cost 0]
8888
[atan2.f32 #:spec (atan2 x y) #:impl (from-libm 'atan2f) #:cost 0]
8989
[copysign.f32 #:spec (copysign x y) #:impl (from-libm 'copysignf) #:cost 0]
@@ -93,7 +93,7 @@
9393
[fmod.f32 #:spec (fmod x y) #:impl (from-libm 'fmodf) #:cost 0]
9494
[remainder.f32 #:spec (remainder x y) #:impl (from-libm 'remainderf) #:cost 0])
9595

96-
(define-operations ([x <binary32>]) <binary32> #:fpcore (:precision binary32)
96+
(define-operations ([x <binary32>]) <binary32> #:fpcore (! :precision binary32 _)
9797
[erfc.f32 #:spec (- 1 (erf x)) #:impl (from-libm 'erfcf) #:fpcore (erfc x) #:cost 0]
9898
[expm1.f32 #:spec (- (exp x) 1) #:impl (from-libm 'expm1f) #:fpcore (expm1 x) #:cost 0]
9999
[log1p.f32 #:spec (log (+ 1 x)) #:impl (from-libm 'log1pf) #:fpcore (log1p x) #:cost 0])
@@ -122,13 +122,13 @@
122122
[<=.f64 #:spec (<= x y) #:impl <= #:cost 0]
123123
[>=.f64 #:spec (>= x y) #:impl >= #:cost 0])
124124

125-
(define-operations () <binary64> #:fpcore (:precision binary64)
125+
(define-operations () <binary64> #:fpcore (! :precision binary64 _)
126126
[PI.f64 #:spec (PI) #:impl (const pi) #:fpcore PI #:cost 0]
127127
[E.f64 #:spec (E) #:impl (const (exp 1)) #:fpcore E #:cost 0]
128128
[INFINITY #:spec (INFINITY) #:impl (const +inf.0) #:fpcore INFINITY #:cost 0]
129129
[NAN.f64 #:spec (NAN) #:impl (const +nan.0) #:fpcore NAN #:cost 0])
130130

131-
(define-operations ([x <binary64>] [y <binary64>]) <binary64> #:fpcore (:precision binary64)
131+
(define-operations ([x <binary64>] [y <binary64>]) <binary64> #:fpcore (! :precision binary64 _)
132132
[+.f64 #:spec (+ x y) #:impl + #:cost 0]
133133
[-.f64 #:spec (- x y) #:impl - #:cost 0]
134134
[*.f64 #:spec (* x y) #:impl * #:cost 0]
@@ -138,7 +138,7 @@
138138
#:spec (neg x) #:impl -
139139
#:fpcore (! :precision binary64 (- x)) #:cost 0)
140140

141-
(define-operations ([x <binary64>]) <binary64> #:fpcore (:precision binary64)
141+
(define-operations ([x <binary64>]) <binary64> #:fpcore (! :precision binary64 _)
142142
[fabs.f64 #:spec (fabs x) #:impl (from-libm 'fabs) #:cost 0]
143143
[sin.f64 #:spec (sin x) #:impl (from-libm 'sin) #:cost 0]
144144
[cos.f64 #:spec (cos x) #:impl (from-libm 'cos) #:cost 0]
@@ -169,7 +169,7 @@
169169
[tgamma.f64 #:spec (tgamma x) #:impl (from-libm 'tgamma) #:cost 0]
170170
[trunc.f64 #:spec (trunc x) #:impl (from-libm 'trunc) #:cost 0])
171171

172-
(define-operations ([x <binary64>] [y <binary64>]) <binary64> #:fpcore (:precision binary64)
172+
(define-operations ([x <binary64>] [y <binary64>]) <binary64> #:fpcore (! :precision binary64 _)
173173
[pow.f64 #:spec (pow x y) #:impl (from-libm 'pow) #:cost 0]
174174
[atan2.f64 #:spec (atan2 x y) #:impl (from-libm 'atan2) #:cost 0]
175175
[copysign.f64 #:spec (copysign x y) #:impl (from-libm 'copysign) #:cost 0]
@@ -179,7 +179,7 @@
179179
[fmod.f64 #:spec (fmod x y) #:impl (from-libm 'fmod) #:cost 0]
180180
[remainder.f64 #:spec (remainder x y) #:impl (from-libm 'remainder) #:cost 0])
181181

182-
(define-operations ([x <binary64>]) <binary64> #:fpcore (:precision binary64)
182+
(define-operations ([x <binary64>]) <binary64> #:fpcore (! :precision binary64 _)
183183
[erfc.f64 #:spec (- 1 (erf x)) #:impl (from-libm 'erfc) #:fpcore (erfc x) #:cost 0]
184184
[expm1.f64 #:spec (- (exp x) 1) #:impl (from-libm 'expm1) #:fpcore (expm1 x) #:cost 0]
185185
[log1p.f64 #:spec (log (+ 1 x)) #:impl (from-libm 'log1p) #:fpcore (log1p x) #:cost 0])

0 commit comments

Comments
 (0)