We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 3a28493 + f3c58ab commit cf6404cCopy full SHA for cf6404c
bench/demo.fpcore
@@ -40,3 +40,12 @@
40
:name "jeff quadratic root 2"
41
(let ((d (sqrt (- (* b b) (* (* 4 a) c)))))
42
(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