Skip to content

Commit 9c2a920

Browse files
committed
Add accelerator and fpcore
1 parent 4dceae1 commit 9c2a920

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

repro.fpcore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
(FPCore (z0) (- 1/2 (* (cos (+ z0 z0)) 1/2)))

src/platforms/herbie20.rkt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,3 +199,10 @@
199199

200200
(define-operation (binary32->binary64 [x <binary32>]) <binary64>
201201
#:spec x #:fpcore (! :precision binary64 (cast x)) #:impl identity #:cost 64)
202+
203+
(define-operation (test [z0 <binary64>])
204+
<binary64>
205+
#:spec (- 1/2 (* (cos (+ z0 z0)) 1/2))
206+
#:impl (from-rival)
207+
#:fpcore (! :precision binary64 (test z0))
208+
#:cost 0)

0 commit comments

Comments
 (0)