Skip to content

Commit cf6404c

Browse files
authored
Merge pull request #1285 from herbie-fp/new-target-benchmark
updated demo.fpcore
2 parents 3a28493 + f3c58ab commit cf6404c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

bench/demo.fpcore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,12 @@
4040
:name "jeff quadratic root 2"
4141
(let ((d (sqrt (- (* b b) (* (* 4 a) c)))))
4242
(if (>= b 0) (/ (* 2 c) (- (- b) d)) (/ (+ (- b) d) (* 2 a)))))
43+
44+
(FPCore (p)
45+
:name "peicewise-defined"
46+
:pre (and (>= p -1.79e308) (<= p 1.79e308))
47+
:alt
48+
(if (and (>= p -1e-6) (<= p 0))
49+
(- (+ p 1) (/ (* p p) (- p 1)))
50+
(- p (fma (/ p (- p 1)) p -1)))
51+
(- (+ p 1.0) (/ (pow (fmin p 0.0) 2.0) (- (fmin p 0.0) 1.0))))

0 commit comments

Comments
 (0)