(FPCore (x y z t a) :precision binary64 (+ x (* (- y z) (/ (- t x) (- a z)))))
↓
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (- t x) (/ (- y z) (- a z)) x))
(t_2 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (<= t_2 -1e-307)
t_1
(if (<= t_2 0.0) (- t (/ (- y a) (/ z (- t x)))) t_1))))
double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * ((t - x) / (a - z)));
}
↓
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((t - x), ((y - z) / (a - z)), x);
double t_2 = x + ((y - z) * ((t - x) / (a - z)));
double tmp;
if (t_2 <= -1e-307) {
tmp = t_1;
} else if (t_2 <= 0.0) {
tmp = t - ((y - a) / (z / (t - x)));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a)
return Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z))))
end
↓
function code(x, y, z, t, a)
t_1 = fma(Float64(t - x), Float64(Float64(y - z) / Float64(a - z)), x)
t_2 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z))))
tmp = 0.0
if (t_2 <= -1e-307)
tmp = t_1;
elseif (t_2 <= 0.0)
tmp = Float64(t - Float64(Float64(y - a) / Float64(z / Float64(t - x))));
else
tmp = t_1;
end
return tmp
end
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -9.99999999999999909e-308 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z))))
(fma.f64 (-.f64 t x) (/.f64 (-.f64 y z) (-.f64 a z)) x): 0 points increase in error, 0 points decrease in error
(Rewrite<= fma-def_binary64 (+.f64 (*.f64 (-.f64 t x) (/.f64 (-.f64 y z) (-.f64 a z))) x)): 2 points increase in error, 3 points decrease in error
(+.f64 (Rewrite=> associate-*r/_binary64 (/.f64 (*.f64 (-.f64 t x) (-.f64 y z)) (-.f64 a z))) x): 80 points increase in error, 16 points decrease in error
(+.f64 (/.f64 (Rewrite<= *-commutative_binary64 (*.f64 (-.f64 y z) (-.f64 t x))) (-.f64 a z)) x): 0 points increase in error, 0 points decrease in error
(+.f64 (Rewrite<= associate-*r/_binary64 (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) x): 31 points increase in error, 84 points decrease in error
(Rewrite<= +-commutative_binary64 (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z))))): 0 points increase in error, 0 points decrease in error
if -9.99999999999999909e-308 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0
(fma.f64 (-.f64 t x) (/.f64 (-.f64 y z) (-.f64 a z)) x): 0 points increase in error, 0 points decrease in error
(Rewrite<= fma-def_binary64 (+.f64 (*.f64 (-.f64 t x) (/.f64 (-.f64 y z) (-.f64 a z))) x)): 2 points increase in error, 3 points decrease in error
(+.f64 (Rewrite=> associate-*r/_binary64 (/.f64 (*.f64 (-.f64 t x) (-.f64 y z)) (-.f64 a z))) x): 80 points increase in error, 16 points decrease in error
(+.f64 (/.f64 (Rewrite<= *-commutative_binary64 (*.f64 (-.f64 y z) (-.f64 t x))) (-.f64 a z)) x): 0 points increase in error, 0 points decrease in error
(+.f64 (Rewrite<= associate-*r/_binary64 (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) x): 31 points increase in error, 84 points decrease in error
(Rewrite<= +-commutative_binary64 (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z))))): 0 points increase in error, 0 points decrease in error
(-.f64 t (/.f64 (-.f64 y a) (/.f64 z (-.f64 t x)))): 0 points increase in error, 0 points decrease in error
(-.f64 t (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 (-.f64 y a) (-.f64 t x)) z))): 45 points increase in error, 29 points decrease in error
(Rewrite<= unsub-neg_binary64 (+.f64 t (neg.f64 (/.f64 (*.f64 (-.f64 y a) (-.f64 t x)) z)))): 0 points increase in error, 0 points decrease in error
(+.f64 t (Rewrite=> distribute-neg-frac_binary64 (/.f64 (neg.f64 (*.f64 (-.f64 y a) (-.f64 t x))) z))): 0 points increase in error, 0 points decrease in error
(+.f64 t (/.f64 (Rewrite<= mul-1-neg_binary64 (*.f64 -1 (*.f64 (-.f64 y a) (-.f64 t x)))) z)): 0 points increase in error, 0 points decrease in error
(+.f64 t (/.f64 (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 -1 (-.f64 y a)) (-.f64 t x))) z)): 0 points increase in error, 0 points decrease in error
(+.f64 t (/.f64 (*.f64 (Rewrite<= distribute-lft-out--_binary64 (-.f64 (*.f64 -1 y) (*.f64 -1 a))) (-.f64 t x)) z)): 0 points increase in error, 0 points decrease in error
(Rewrite<= +-commutative_binary64 (+.f64 (/.f64 (*.f64 (-.f64 (*.f64 -1 y) (*.f64 -1 a)) (-.f64 t x)) z) t)): 0 points increase in error, 0 points decrease in error
herbie shell --seed 2022291
(FPCore (x y z t a)
:name "Numeric.Signal:interpolate from hsignal-0.2.7.1"
:precision binary64
(+ x (* (- y z) (/ (- t x) (- a z)))))