(FPCore (x y z t a) :precision binary64 (+ x (* (- y z) (/ (- t x) (- a z)))))
↓
(FPCore (x y z t a)
:precision binary64
(if (<= z -1e+154)
(+ t (/ (- a y) (/ z (- t x))))
(if (<= z 1.36e+191)
(+ (* t (/ (- y z) (- a z))) (* x (+ 1.0 (/ (- z y) (- a z)))))
(+ t (* x (/ (- y a) z))))))
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 tmp;
if (z <= -1e+154) {
tmp = t + ((a - y) / (z / (t - x)));
} else if (z <= 1.36e+191) {
tmp = (t * ((y - z) / (a - z))) + (x * (1.0 + ((z - y) / (a - z))));
} else {
tmp = t + (x * ((y - a) / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + ((y - z) * ((t - x) / (a - z)))
end function
↓
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-1d+154)) then
tmp = t + ((a - y) / (z / (t - x)))
else if (z <= 1.36d+191) then
tmp = (t * ((y - z) / (a - z))) + (x * (1.0d0 + ((z - y) / (a - z))))
else
tmp = t + (x * ((y - a) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * ((t - x) / (a - z)));
}
↓
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1e+154) {
tmp = t + ((a - y) / (z / (t - x)));
} else if (z <= 1.36e+191) {
tmp = (t * ((y - z) / (a - z))) + (x * (1.0 + ((z - y) / (a - z))));
} else {
tmp = t + (x * ((y - a) / z));
}
return tmp;
}
def code(x, y, z, t, a):
return x + ((y - z) * ((t - x) / (a - z)))
↓
def code(x, y, z, t, a):
tmp = 0
if z <= -1e+154:
tmp = t + ((a - y) / (z / (t - x)))
elif z <= 1.36e+191:
tmp = (t * ((y - z) / (a - z))) + (x * (1.0 + ((z - y) / (a - z))))
else:
tmp = t + (x * ((y - a) / z))
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)
tmp = 0.0
if (z <= -1e+154)
tmp = Float64(t + Float64(Float64(a - y) / Float64(z / Float64(t - x))));
elseif (z <= 1.36e+191)
tmp = Float64(Float64(t * Float64(Float64(y - z) / Float64(a - z))) + Float64(x * Float64(1.0 + Float64(Float64(z - y) / Float64(a - z)))));
else
tmp = Float64(t + Float64(x * Float64(Float64(y - a) / z)));
end
return tmp
end
function tmp = code(x, y, z, t, a)
tmp = x + ((y - z) * ((t - x) / (a - z)));
end
↓
function tmp_2 = code(x, y, z, t, a)
tmp = 0.0;
if (z <= -1e+154)
tmp = t + ((a - y) / (z / (t - x)));
elseif (z <= 1.36e+191)
tmp = (t * ((y - z) / (a - z))) + (x * (1.0 + ((z - y) / (a - z))));
else
tmp = t + (x * ((y - a) / z));
end
tmp_2 = tmp;
end
(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)): 5 points increase in error, 4 points decrease in error
(+.f64 (Rewrite=> associate-*r/_binary64 (/.f64 (*.f64 (-.f64 t x) (-.f64 y z)) (-.f64 a z))) x): 94 points increase in error, 23 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): 38 points increase in error, 95 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 (*.f64 t (/.f64 (-.f64 y z) (-.f64 a z))) (*.f64 x (+.f64 (/.f64 (-.f64 y z) (-.f64 a z)) -1))): 0 points increase in error, 0 points decrease in error
(-.f64 (Rewrite=> associate-*r/_binary64 (/.f64 (*.f64 t (-.f64 y z)) (-.f64 a z))) (*.f64 x (+.f64 (/.f64 (-.f64 y z) (-.f64 a z)) -1))): 60 points increase in error, 13 points decrease in error
(-.f64 (/.f64 (*.f64 t (-.f64 y z)) (-.f64 a z)) (*.f64 x (+.f64 (Rewrite=> div-sub_binary64 (-.f64 (/.f64 y (-.f64 a z)) (/.f64 z (-.f64 a z)))) -1))): 0 points increase in error, 1 points decrease in error
(-.f64 (/.f64 (*.f64 t (-.f64 y z)) (-.f64 a z)) (*.f64 x (+.f64 (-.f64 (/.f64 y (-.f64 a z)) (/.f64 z (-.f64 a z))) (Rewrite<= metadata-eval (neg.f64 1))))): 0 points increase in error, 0 points decrease in error
(-.f64 (/.f64 (*.f64 t (-.f64 y z)) (-.f64 a z)) (*.f64 x (Rewrite<= sub-neg_binary64 (-.f64 (-.f64 (/.f64 y (-.f64 a z)) (/.f64 z (-.f64 a z))) 1)))): 0 points increase in error, 0 points decrease in error
(-.f64 (/.f64 (*.f64 t (-.f64 y z)) (-.f64 a z)) (*.f64 x (Rewrite<= associate--r+_binary64 (-.f64 (/.f64 y (-.f64 a z)) (+.f64 (/.f64 z (-.f64 a z)) 1))))): 1 points increase in error, 18 points decrease in error
(-.f64 (/.f64 (*.f64 t (-.f64 y z)) (-.f64 a z)) (Rewrite<= *-commutative_binary64 (*.f64 (-.f64 (/.f64 y (-.f64 a z)) (+.f64 (/.f64 z (-.f64 a z)) 1)) x))): 0 points increase in error, 0 points decrease in error
(Rewrite<= unsub-neg_binary64 (+.f64 (/.f64 (*.f64 t (-.f64 y z)) (-.f64 a z)) (neg.f64 (*.f64 (-.f64 (/.f64 y (-.f64 a z)) (+.f64 (/.f64 z (-.f64 a z)) 1)) x)))): 0 points increase in error, 0 points decrease in error
(+.f64 (/.f64 (*.f64 t (-.f64 y z)) (-.f64 a z)) (Rewrite<= mul-1-neg_binary64 (*.f64 -1 (*.f64 (-.f64 (/.f64 y (-.f64 a z)) (+.f64 (/.f64 z (-.f64 a z)) 1)) x)))): 0 points increase in error, 0 points decrease in error
(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)): 5 points increase in error, 4 points decrease in error
(+.f64 (Rewrite=> associate-*r/_binary64 (/.f64 (*.f64 (-.f64 t x) (-.f64 y z)) (-.f64 a z))) x): 94 points increase in error, 23 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): 38 points increase in error, 95 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 (-.f64 y a) z) (-.f64 t x))): 0 points increase in error, 0 points decrease in error
(-.f64 t (Rewrite<= associate-/r/_binary64 (/.f64 (-.f64 y a) (/.f64 z (-.f64 t x))))): 22 points increase in error, 33 points decrease in error
(-.f64 t (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 (-.f64 y a) (-.f64 t x)) z))): 43 points increase in error, 18 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 2022325
(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)))))