Skip to content

Commit e1e508e

Browse files
committed
Add example and accelerator
1 parent c7785e8 commit e1e508e

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

example.fpcore

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

src/platforms/herbie20.rkt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,3 +199,7 @@
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 (81-cosz0PI190 [z0 <binary64>]) <binary64>
204+
#:spec (cos (* (* z0 (PI)) -1/180)) #:impl (from-rival)
205+
#:fpcore (! :precision binary64 (81-cosz0PI190 z0)) #:cost 1000)

0 commit comments

Comments
 (0)