
(FPCore (x y z t a) :precision binary64 (+ x (* (- y z) (/ (- t x) (- a z)))))
double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * ((t - x) / (a - z)));
}
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
public static double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * ((t - x) / (a - z)));
}
def code(x, y, z, t, a): return x + ((y - z) * ((t - x) / (a - z)))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y - z) * ((t - x) / (a - z))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - z\right) \cdot \frac{t - x}{a - z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 20 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (* (- y z) (/ (- t x) (- a z)))))
double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * ((t - x) / (a - z)));
}
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
public static double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * ((t - x) / (a - z)));
}
def code(x, y, z, t, a): return x + ((y - z) * ((t - x) / (a - z)))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y - z) * ((t - x) / (a - z))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - z\right) \cdot \frac{t - x}{a - z}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (/ (- z y) (- z a)) (- t x) x))
(t_2 (- x (* (/ (- x t) (- a z)) (- y z)))))
(if (<= t_2 -5e-290)
t_1
(if (<= t_2 5e-258) (fma (fma t -1.0 x) (/ (- y a) z) t) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((z - y) / (z - a)), (t - x), x);
double t_2 = x - (((x - t) / (a - z)) * (y - z));
double tmp;
if (t_2 <= -5e-290) {
tmp = t_1;
} else if (t_2 <= 5e-258) {
tmp = fma(fma(t, -1.0, x), ((y - a) / z), t);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(z - y) / Float64(z - a)), Float64(t - x), x) t_2 = Float64(x - Float64(Float64(Float64(x - t) / Float64(a - z)) * Float64(y - z))) tmp = 0.0 if (t_2 <= -5e-290) tmp = t_1; elseif (t_2 <= 5e-258) tmp = fma(fma(t, -1.0, x), Float64(Float64(y - a) / z), t); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(z - y), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(N[(N[(x - t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e-290], t$95$1, If[LessEqual[t$95$2, 5e-258], N[(N[(t * -1.0 + x), $MachinePrecision] * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{z - y}{z - a}, t - x, x\right)\\
t_2 := x - \frac{x - t}{a - z} \cdot \left(y - z\right)\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{-290}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{-258}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(t, -1, x\right), \frac{y - a}{z}, t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -5.0000000000000001e-290 or 4.9999999999999999e-258 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 90.8%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
lift--.f64N/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-fma.f64N/A
lower-/.f6494.9
Applied rewrites94.9%
if -5.0000000000000001e-290 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 4.9999999999999999e-258Initial program 4.0%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites96.4%
Final simplification95.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (/ (- x t) (- z a)) (- y z) x))
(t_2 (- x (* (/ (- x t) (- a z)) (- y z)))))
(if (<= t_2 -5e-290)
t_1
(if (<= t_2 5e-258) (fma (fma t -1.0 x) (/ (- y a) z) t) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((x - t) / (z - a)), (y - z), x);
double t_2 = x - (((x - t) / (a - z)) * (y - z));
double tmp;
if (t_2 <= -5e-290) {
tmp = t_1;
} else if (t_2 <= 5e-258) {
tmp = fma(fma(t, -1.0, x), ((y - a) / z), t);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(x - t) / Float64(z - a)), Float64(y - z), x) t_2 = Float64(x - Float64(Float64(Float64(x - t) / Float64(a - z)) * Float64(y - z))) tmp = 0.0 if (t_2 <= -5e-290) tmp = t_1; elseif (t_2 <= 5e-258) tmp = fma(fma(t, -1.0, x), Float64(Float64(y - a) / z), t); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(x - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision] * N[(y - z), $MachinePrecision] + x), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(N[(N[(x - t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e-290], t$95$1, If[LessEqual[t$95$2, 5e-258], N[(N[(t * -1.0 + x), $MachinePrecision] * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{x - t}{z - a}, y - z, x\right)\\
t_2 := x - \frac{x - t}{a - z} \cdot \left(y - z\right)\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{-290}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{-258}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(t, -1, x\right), \frac{y - a}{z}, t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -5.0000000000000001e-290 or 4.9999999999999999e-258 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 90.8%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6490.8
lift-/.f64N/A
frac-2negN/A
lower-/.f64N/A
neg-sub0N/A
lift--.f64N/A
sub-negN/A
+-commutativeN/A
associate--r+N/A
neg-sub0N/A
remove-double-negN/A
lower--.f64N/A
neg-sub0N/A
lift--.f64N/A
sub-negN/A
+-commutativeN/A
associate--r+N/A
neg-sub0N/A
remove-double-negN/A
lower--.f6490.8
Applied rewrites90.8%
if -5.0000000000000001e-290 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 4.9999999999999999e-258Initial program 4.0%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites96.4%
Final simplification91.4%
(FPCore (x y z t a)
:precision binary64
(if (<= z -4.6e+226)
(* (/ (- z y) z) t)
(if (<= z -4e+76)
(* (- x t) (/ y (- z a)))
(if (<= z 7.5e+69) (fma (/ y a) (- t x) x) (* (/ t (- z a)) (- z y))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4.6e+226) {
tmp = ((z - y) / z) * t;
} else if (z <= -4e+76) {
tmp = (x - t) * (y / (z - a));
} else if (z <= 7.5e+69) {
tmp = fma((y / a), (t - x), x);
} else {
tmp = (t / (z - a)) * (z - y);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -4.6e+226) tmp = Float64(Float64(Float64(z - y) / z) * t); elseif (z <= -4e+76) tmp = Float64(Float64(x - t) * Float64(y / Float64(z - a))); elseif (z <= 7.5e+69) tmp = fma(Float64(y / a), Float64(t - x), x); else tmp = Float64(Float64(t / Float64(z - a)) * Float64(z - y)); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4.6e+226], N[(N[(N[(z - y), $MachinePrecision] / z), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[z, -4e+76], N[(N[(x - t), $MachinePrecision] * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.5e+69], N[(N[(y / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision], N[(N[(t / N[(z - a), $MachinePrecision]), $MachinePrecision] * N[(z - y), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.6 \cdot 10^{+226}:\\
\;\;\;\;\frac{z - y}{z} \cdot t\\
\mathbf{elif}\;z \leq -4 \cdot 10^{+76}:\\
\;\;\;\;\left(x - t\right) \cdot \frac{y}{z - a}\\
\mathbf{elif}\;z \leq 7.5 \cdot 10^{+69}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a}, t - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{z - a} \cdot \left(z - y\right)\\
\end{array}
\end{array}
if z < -4.5999999999999999e226Initial program 41.5%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6430.4
Applied rewrites30.4%
Taylor expanded in a around 0
Applied rewrites57.2%
if -4.5999999999999999e226 < z < -4.0000000000000002e76Initial program 72.1%
Taylor expanded in y around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6447.7
Applied rewrites47.7%
if -4.0000000000000002e76 < z < 7.49999999999999939e69Initial program 90.0%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
lift--.f64N/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-fma.f64N/A
lower-/.f6494.2
Applied rewrites94.2%
Taylor expanded in z around 0
lower-/.f6479.0
Applied rewrites79.0%
if 7.49999999999999939e69 < z Initial program 75.9%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6467.8
Applied rewrites67.8%
Final simplification71.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (/ (- z y) z) t)))
(if (<= z -4.6e+226)
t_1
(if (<= z -4e+76)
(* (- x t) (/ y (- z a)))
(if (<= z 8.2e+69) (fma (/ y a) (- t x) x) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = ((z - y) / z) * t;
double tmp;
if (z <= -4.6e+226) {
tmp = t_1;
} else if (z <= -4e+76) {
tmp = (x - t) * (y / (z - a));
} else if (z <= 8.2e+69) {
tmp = fma((y / a), (t - x), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(Float64(z - y) / z) * t) tmp = 0.0 if (z <= -4.6e+226) tmp = t_1; elseif (z <= -4e+76) tmp = Float64(Float64(x - t) * Float64(y / Float64(z - a))); elseif (z <= 8.2e+69) tmp = fma(Float64(y / a), Float64(t - x), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(z - y), $MachinePrecision] / z), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[z, -4.6e+226], t$95$1, If[LessEqual[z, -4e+76], N[(N[(x - t), $MachinePrecision] * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.2e+69], N[(N[(y / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z - y}{z} \cdot t\\
\mathbf{if}\;z \leq -4.6 \cdot 10^{+226}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -4 \cdot 10^{+76}:\\
\;\;\;\;\left(x - t\right) \cdot \frac{y}{z - a}\\
\mathbf{elif}\;z \leq 8.2 \cdot 10^{+69}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a}, t - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -4.5999999999999999e226 or 8.1999999999999998e69 < z Initial program 67.0%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6458.0
Applied rewrites58.0%
Taylor expanded in a around 0
Applied rewrites63.7%
if -4.5999999999999999e226 < z < -4.0000000000000002e76Initial program 72.1%
Taylor expanded in y around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6447.7
Applied rewrites47.7%
if -4.0000000000000002e76 < z < 8.1999999999999998e69Initial program 90.0%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
lift--.f64N/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-fma.f64N/A
lower-/.f6494.2
Applied rewrites94.2%
Taylor expanded in z around 0
lower-/.f6479.0
Applied rewrites79.0%
Final simplification70.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (fma t -1.0 x) (/ (- y a) z) t)))
(if (<= z -7.2e+145)
t_1
(if (<= z 3.05e+109) (+ (* (- x t) (/ y (- z a))) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(fma(t, -1.0, x), ((y - a) / z), t);
double tmp;
if (z <= -7.2e+145) {
tmp = t_1;
} else if (z <= 3.05e+109) {
tmp = ((x - t) * (y / (z - a))) + x;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(fma(t, -1.0, x), Float64(Float64(y - a) / z), t) tmp = 0.0 if (z <= -7.2e+145) tmp = t_1; elseif (z <= 3.05e+109) tmp = Float64(Float64(Float64(x - t) * Float64(y / Float64(z - a))) + x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(t * -1.0 + x), $MachinePrecision] * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[z, -7.2e+145], t$95$1, If[LessEqual[z, 3.05e+109], N[(N[(N[(x - t), $MachinePrecision] * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\mathsf{fma}\left(t, -1, x\right), \frac{y - a}{z}, t\right)\\
\mathbf{if}\;z \leq -7.2 \cdot 10^{+145}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.05 \cdot 10^{+109}:\\
\;\;\;\;\left(x - t\right) \cdot \frac{y}{z - a} + x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -7.19999999999999948e145 or 3.05000000000000004e109 < z Initial program 61.6%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites81.1%
if -7.19999999999999948e145 < z < 3.05000000000000004e109Initial program 89.2%
Taylor expanded in y around inf
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6483.5
Applied rewrites83.5%
Final simplification82.8%
(FPCore (x y z t a) :precision binary64 (if (<= z -7.2e+145) (- t (/ (* (- a y) (- x t)) z)) (if (<= z 1.9e+112) (+ (* (- x t) (/ y (- z a))) x) (* (/ (- z y) z) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -7.2e+145) {
tmp = t - (((a - y) * (x - t)) / z);
} else if (z <= 1.9e+112) {
tmp = ((x - t) * (y / (z - a))) + x;
} else {
tmp = ((z - y) / z) * t;
}
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
real(8) :: tmp
if (z <= (-7.2d+145)) then
tmp = t - (((a - y) * (x - t)) / z)
else if (z <= 1.9d+112) then
tmp = ((x - t) * (y / (z - a))) + x
else
tmp = ((z - y) / z) * t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -7.2e+145) {
tmp = t - (((a - y) * (x - t)) / z);
} else if (z <= 1.9e+112) {
tmp = ((x - t) * (y / (z - a))) + x;
} else {
tmp = ((z - y) / z) * t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -7.2e+145: tmp = t - (((a - y) * (x - t)) / z) elif z <= 1.9e+112: tmp = ((x - t) * (y / (z - a))) + x else: tmp = ((z - y) / z) * t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -7.2e+145) tmp = Float64(t - Float64(Float64(Float64(a - y) * Float64(x - t)) / z)); elseif (z <= 1.9e+112) tmp = Float64(Float64(Float64(x - t) * Float64(y / Float64(z - a))) + x); else tmp = Float64(Float64(Float64(z - y) / z) * t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -7.2e+145) tmp = t - (((a - y) * (x - t)) / z); elseif (z <= 1.9e+112) tmp = ((x - t) * (y / (z - a))) + x; else tmp = ((z - y) / z) * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -7.2e+145], N[(t - N[(N[(N[(a - y), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.9e+112], N[(N[(N[(x - t), $MachinePrecision] * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(N[(N[(z - y), $MachinePrecision] / z), $MachinePrecision] * t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.2 \cdot 10^{+145}:\\
\;\;\;\;t - \frac{\left(a - y\right) \cdot \left(x - t\right)}{z}\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{+112}:\\
\;\;\;\;\left(x - t\right) \cdot \frac{y}{z - a} + x\\
\mathbf{else}:\\
\;\;\;\;\frac{z - y}{z} \cdot t\\
\end{array}
\end{array}
if z < -7.19999999999999948e145Initial program 52.2%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
lift--.f64N/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-fma.f64N/A
lower-/.f6460.9
Applied rewrites60.9%
Taylor expanded in z around inf
associate--l+N/A
associate-*r/N/A
associate-*r/N/A
mul-1-negN/A
div-subN/A
mul-1-negN/A
distribute-lft-out--N/A
associate-*r/N/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
Applied rewrites67.7%
if -7.19999999999999948e145 < z < 1.90000000000000004e112Initial program 89.2%
Taylor expanded in y around inf
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6483.5
Applied rewrites83.5%
if 1.90000000000000004e112 < z Initial program 69.3%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6471.1
Applied rewrites71.1%
Taylor expanded in a around 0
Applied rewrites73.4%
Final simplification79.9%
(FPCore (x y z t a)
:precision binary64
(if (<= z -8.8e+120)
(- t (/ (* (- a y) (- x t)) z))
(if (<= z 7.5e+69)
(fma (/ (- y z) a) (- t x) x)
(* (/ t (- z a)) (- z y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -8.8e+120) {
tmp = t - (((a - y) * (x - t)) / z);
} else if (z <= 7.5e+69) {
tmp = fma(((y - z) / a), (t - x), x);
} else {
tmp = (t / (z - a)) * (z - y);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -8.8e+120) tmp = Float64(t - Float64(Float64(Float64(a - y) * Float64(x - t)) / z)); elseif (z <= 7.5e+69) tmp = fma(Float64(Float64(y - z) / a), Float64(t - x), x); else tmp = Float64(Float64(t / Float64(z - a)) * Float64(z - y)); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -8.8e+120], N[(t - N[(N[(N[(a - y), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.5e+69], N[(N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision], N[(N[(t / N[(z - a), $MachinePrecision]), $MachinePrecision] * N[(z - y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.8 \cdot 10^{+120}:\\
\;\;\;\;t - \frac{\left(a - y\right) \cdot \left(x - t\right)}{z}\\
\mathbf{elif}\;z \leq 7.5 \cdot 10^{+69}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y - z}{a}, t - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{z - a} \cdot \left(z - y\right)\\
\end{array}
\end{array}
if z < -8.8000000000000005e120Initial program 53.4%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
lift--.f64N/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-fma.f64N/A
lower-/.f6460.8
Applied rewrites60.8%
Taylor expanded in z around inf
associate--l+N/A
associate-*r/N/A
associate-*r/N/A
mul-1-negN/A
div-subN/A
mul-1-negN/A
distribute-lft-out--N/A
associate-*r/N/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
Applied rewrites66.8%
if -8.8000000000000005e120 < z < 7.49999999999999939e69Initial program 89.3%
Taylor expanded in a around inf
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6478.4
Applied rewrites78.4%
if 7.49999999999999939e69 < z Initial program 75.9%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6467.8
Applied rewrites67.8%
Final simplification74.5%
(FPCore (x y z t a)
:precision binary64
(if (<= z -9.6e+246)
(* (/ (- z y) z) t)
(if (<= z 7.5e+69)
(fma (/ (- y z) a) (- t x) x)
(* (/ t (- z a)) (- z y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -9.6e+246) {
tmp = ((z - y) / z) * t;
} else if (z <= 7.5e+69) {
tmp = fma(((y - z) / a), (t - x), x);
} else {
tmp = (t / (z - a)) * (z - y);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -9.6e+246) tmp = Float64(Float64(Float64(z - y) / z) * t); elseif (z <= 7.5e+69) tmp = fma(Float64(Float64(y - z) / a), Float64(t - x), x); else tmp = Float64(Float64(t / Float64(z - a)) * Float64(z - y)); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -9.6e+246], N[(N[(N[(z - y), $MachinePrecision] / z), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[z, 7.5e+69], N[(N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision], N[(N[(t / N[(z - a), $MachinePrecision]), $MachinePrecision] * N[(z - y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.6 \cdot 10^{+246}:\\
\;\;\;\;\frac{z - y}{z} \cdot t\\
\mathbf{elif}\;z \leq 7.5 \cdot 10^{+69}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y - z}{a}, t - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{z - a} \cdot \left(z - y\right)\\
\end{array}
\end{array}
if z < -9.6e246Initial program 20.4%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6428.2
Applied rewrites28.2%
Taylor expanded in a around 0
Applied rewrites68.4%
if -9.6e246 < z < 7.49999999999999939e69Initial program 86.5%
Taylor expanded in a around inf
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6473.2
Applied rewrites73.2%
if 7.49999999999999939e69 < z Initial program 75.9%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6467.8
Applied rewrites67.8%
Final simplification71.9%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* (/ (- z y) z) t))) (if (<= z -2.2e+92) t_1 (if (<= z 8.2e+69) (fma (/ y a) (- t x) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = ((z - y) / z) * t;
double tmp;
if (z <= -2.2e+92) {
tmp = t_1;
} else if (z <= 8.2e+69) {
tmp = fma((y / a), (t - x), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(Float64(z - y) / z) * t) tmp = 0.0 if (z <= -2.2e+92) tmp = t_1; elseif (z <= 8.2e+69) tmp = fma(Float64(y / a), Float64(t - x), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(z - y), $MachinePrecision] / z), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[z, -2.2e+92], t$95$1, If[LessEqual[z, 8.2e+69], N[(N[(y / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z - y}{z} \cdot t\\
\mathbf{if}\;z \leq -2.2 \cdot 10^{+92}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 8.2 \cdot 10^{+69}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a}, t - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.19999999999999992e92 or 8.1999999999999998e69 < z Initial program 68.1%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6453.7
Applied rewrites53.7%
Taylor expanded in a around 0
Applied rewrites55.2%
if -2.19999999999999992e92 < z < 8.1999999999999998e69Initial program 89.4%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
lift--.f64N/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-fma.f64N/A
lower-/.f6494.1
Applied rewrites94.1%
Taylor expanded in z around 0
lower-/.f6477.2
Applied rewrites77.2%
Final simplification68.9%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* (/ z (- z a)) t))) (if (<= z -9.6e+246) t_1 (if (<= z 4.1e+109) (fma (/ y a) (- t x) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (z / (z - a)) * t;
double tmp;
if (z <= -9.6e+246) {
tmp = t_1;
} else if (z <= 4.1e+109) {
tmp = fma((y / a), (t - x), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(z / Float64(z - a)) * t) tmp = 0.0 if (z <= -9.6e+246) tmp = t_1; elseif (z <= 4.1e+109) tmp = fma(Float64(y / a), Float64(t - x), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[z, -9.6e+246], t$95$1, If[LessEqual[z, 4.1e+109], N[(N[(y / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z}{z - a} \cdot t\\
\mathbf{if}\;z \leq -9.6 \cdot 10^{+246}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 4.1 \cdot 10^{+109}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a}, t - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -9.6e246 or 4.0999999999999997e109 < z Initial program 58.0%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6461.2
Applied rewrites61.2%
Taylor expanded in y around 0
Applied rewrites65.2%
if -9.6e246 < z < 4.0999999999999997e109Initial program 87.3%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
lift--.f64N/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-fma.f64N/A
lower-/.f6491.4
Applied rewrites91.4%
Taylor expanded in z around 0
lower-/.f6467.6
Applied rewrites67.6%
Final simplification67.1%
(FPCore (x y z t a) :precision binary64 (if (<= z -9.6e+246) (* (/ (- t) x) (- x)) (if (<= z 1.12e+110) (fma (/ y a) (- t x) x) (* (/ t (- z)) (- z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -9.6e+246) {
tmp = (-t / x) * -x;
} else if (z <= 1.12e+110) {
tmp = fma((y / a), (t - x), x);
} else {
tmp = (t / -z) * -z;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -9.6e+246) tmp = Float64(Float64(Float64(-t) / x) * Float64(-x)); elseif (z <= 1.12e+110) tmp = fma(Float64(y / a), Float64(t - x), x); else tmp = Float64(Float64(t / Float64(-z)) * Float64(-z)); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -9.6e+246], N[(N[((-t) / x), $MachinePrecision] * (-x)), $MachinePrecision], If[LessEqual[z, 1.12e+110], N[(N[(y / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision], N[(N[(t / (-z)), $MachinePrecision] * (-z)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.6 \cdot 10^{+246}:\\
\;\;\;\;\frac{-t}{x} \cdot \left(-x\right)\\
\mathbf{elif}\;z \leq 1.12 \cdot 10^{+110}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a}, t - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{-z} \cdot \left(-z\right)\\
\end{array}
\end{array}
if z < -9.6e246Initial program 20.4%
Taylor expanded in x around -inf
mul-1-negN/A
distribute-lft-neg-inN/A
lower-*.f64N/A
lower-neg.f64N/A
+-commutativeN/A
associate--r+N/A
sub-negN/A
Applied rewrites44.0%
Taylor expanded in z around inf
Applied rewrites60.7%
if -9.6e246 < z < 1.1200000000000001e110Initial program 87.3%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
lift--.f64N/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-fma.f64N/A
lower-/.f6491.4
Applied rewrites91.4%
Taylor expanded in z around 0
lower-/.f6467.6
Applied rewrites67.6%
if 1.1200000000000001e110 < z Initial program 69.3%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6471.1
Applied rewrites71.1%
Taylor expanded in a around 0
Applied rewrites68.6%
Taylor expanded in z around inf
Applied rewrites59.2%
Final simplification66.0%
(FPCore (x y z t a) :precision binary64 (if (<= z -9.6e+246) (* (/ (- t) x) (- x)) (if (<= z 1.12e+110) (fma (/ (- t x) a) y x) (* (/ t (- z)) (- z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -9.6e+246) {
tmp = (-t / x) * -x;
} else if (z <= 1.12e+110) {
tmp = fma(((t - x) / a), y, x);
} else {
tmp = (t / -z) * -z;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -9.6e+246) tmp = Float64(Float64(Float64(-t) / x) * Float64(-x)); elseif (z <= 1.12e+110) tmp = fma(Float64(Float64(t - x) / a), y, x); else tmp = Float64(Float64(t / Float64(-z)) * Float64(-z)); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -9.6e+246], N[(N[((-t) / x), $MachinePrecision] * (-x)), $MachinePrecision], If[LessEqual[z, 1.12e+110], N[(N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] * y + x), $MachinePrecision], N[(N[(t / (-z)), $MachinePrecision] * (-z)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.6 \cdot 10^{+246}:\\
\;\;\;\;\frac{-t}{x} \cdot \left(-x\right)\\
\mathbf{elif}\;z \leq 1.12 \cdot 10^{+110}:\\
\;\;\;\;\mathsf{fma}\left(\frac{t - x}{a}, y, x\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{-z} \cdot \left(-z\right)\\
\end{array}
\end{array}
if z < -9.6e246Initial program 20.4%
Taylor expanded in x around -inf
mul-1-negN/A
distribute-lft-neg-inN/A
lower-*.f64N/A
lower-neg.f64N/A
+-commutativeN/A
associate--r+N/A
sub-negN/A
Applied rewrites44.0%
Taylor expanded in z around inf
Applied rewrites60.7%
if -9.6e246 < z < 1.1200000000000001e110Initial program 87.3%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6466.7
Applied rewrites66.7%
if 1.1200000000000001e110 < z Initial program 69.3%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6471.1
Applied rewrites71.1%
Taylor expanded in a around 0
Applied rewrites68.6%
Taylor expanded in z around inf
Applied rewrites59.2%
Final simplification65.2%
(FPCore (x y z t a) :precision binary64 (if (<= z -9.6e+246) (* (/ (- t) x) (- x)) (if (<= z 4.2e+109) (fma y (/ t a) x) (* (/ t (- z)) (- z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -9.6e+246) {
tmp = (-t / x) * -x;
} else if (z <= 4.2e+109) {
tmp = fma(y, (t / a), x);
} else {
tmp = (t / -z) * -z;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -9.6e+246) tmp = Float64(Float64(Float64(-t) / x) * Float64(-x)); elseif (z <= 4.2e+109) tmp = fma(y, Float64(t / a), x); else tmp = Float64(Float64(t / Float64(-z)) * Float64(-z)); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -9.6e+246], N[(N[((-t) / x), $MachinePrecision] * (-x)), $MachinePrecision], If[LessEqual[z, 4.2e+109], N[(y * N[(t / a), $MachinePrecision] + x), $MachinePrecision], N[(N[(t / (-z)), $MachinePrecision] * (-z)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.6 \cdot 10^{+246}:\\
\;\;\;\;\frac{-t}{x} \cdot \left(-x\right)\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{+109}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{t}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{-z} \cdot \left(-z\right)\\
\end{array}
\end{array}
if z < -9.6e246Initial program 20.4%
Taylor expanded in x around -inf
mul-1-negN/A
distribute-lft-neg-inN/A
lower-*.f64N/A
lower-neg.f64N/A
+-commutativeN/A
associate--r+N/A
sub-negN/A
Applied rewrites44.0%
Taylor expanded in z around inf
Applied rewrites60.7%
if -9.6e246 < z < 4.2000000000000003e109Initial program 87.3%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
lift--.f64N/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-fma.f64N/A
lower-/.f6491.4
Applied rewrites91.4%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6466.7
Applied rewrites66.7%
Taylor expanded in t around inf
Applied rewrites55.5%
if 4.2000000000000003e109 < z Initial program 69.3%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6471.1
Applied rewrites71.1%
Taylor expanded in a around 0
Applied rewrites68.6%
Taylor expanded in z around inf
Applied rewrites59.2%
Final simplification56.3%
(FPCore (x y z t a) :precision binary64 (if (<= y -1.4e+210) (* (/ y (- z a)) x) (if (<= y 2.5e+92) (fma y (/ t a) x) (* (/ y (- a z)) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.4e+210) {
tmp = (y / (z - a)) * x;
} else if (y <= 2.5e+92) {
tmp = fma(y, (t / a), x);
} else {
tmp = (y / (a - z)) * t;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (y <= -1.4e+210) tmp = Float64(Float64(y / Float64(z - a)) * x); elseif (y <= 2.5e+92) tmp = fma(y, Float64(t / a), x); else tmp = Float64(Float64(y / Float64(a - z)) * t); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -1.4e+210], N[(N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[y, 2.5e+92], N[(y * N[(t / a), $MachinePrecision] + x), $MachinePrecision], N[(N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.4 \cdot 10^{+210}:\\
\;\;\;\;\frac{y}{z - a} \cdot x\\
\mathbf{elif}\;y \leq 2.5 \cdot 10^{+92}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{t}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a - z} \cdot t\\
\end{array}
\end{array}
if y < -1.4000000000000001e210Initial program 84.3%
lift-*.f64N/A
lift-/.f64N/A
associate-*r/N/A
frac-2negN/A
lower-/.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-*.f64N/A
neg-sub0N/A
lift--.f64N/A
sub-negN/A
+-commutativeN/A
associate--r+N/A
neg-sub0N/A
remove-double-negN/A
lower--.f64N/A
neg-sub0N/A
lift--.f64N/A
sub-negN/A
+-commutativeN/A
associate--r+N/A
neg-sub0N/A
remove-double-negN/A
lower--.f6455.7
Applied rewrites55.7%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
div-subN/A
*-commutativeN/A
lower-fma.f64N/A
div-subN/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6461.3
Applied rewrites61.3%
Taylor expanded in y around inf
Applied rewrites72.3%
if -1.4000000000000001e210 < y < 2.50000000000000011e92Initial program 80.0%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
lift--.f64N/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-fma.f64N/A
lower-/.f6484.3
Applied rewrites84.3%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6457.1
Applied rewrites57.1%
Taylor expanded in t around inf
Applied rewrites51.5%
if 2.50000000000000011e92 < y Initial program 86.4%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6458.3
Applied rewrites58.3%
Taylor expanded in y around inf
Applied rewrites55.6%
Final simplification53.8%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* -1.0 (- x)))) (if (<= a -1.82e+155) t_1 (if (<= a 1.8e+67) (* (/ y a) t) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -1.0 * -x;
double tmp;
if (a <= -1.82e+155) {
tmp = t_1;
} else if (a <= 1.8e+67) {
tmp = (y / a) * t;
} else {
tmp = t_1;
}
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
real(8) :: t_1
real(8) :: tmp
t_1 = (-1.0d0) * -x
if (a <= (-1.82d+155)) then
tmp = t_1
else if (a <= 1.8d+67) then
tmp = (y / a) * t
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = -1.0 * -x;
double tmp;
if (a <= -1.82e+155) {
tmp = t_1;
} else if (a <= 1.8e+67) {
tmp = (y / a) * t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -1.0 * -x tmp = 0 if a <= -1.82e+155: tmp = t_1 elif a <= 1.8e+67: tmp = (y / a) * t else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(-1.0 * Float64(-x)) tmp = 0.0 if (a <= -1.82e+155) tmp = t_1; elseif (a <= 1.8e+67) tmp = Float64(Float64(y / a) * t); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = -1.0 * -x; tmp = 0.0; if (a <= -1.82e+155) tmp = t_1; elseif (a <= 1.8e+67) tmp = (y / a) * t; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(-1.0 * (-x)), $MachinePrecision]}, If[LessEqual[a, -1.82e+155], t$95$1, If[LessEqual[a, 1.8e+67], N[(N[(y / a), $MachinePrecision] * t), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -1 \cdot \left(-x\right)\\
\mathbf{if}\;a \leq -1.82 \cdot 10^{+155}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.8 \cdot 10^{+67}:\\
\;\;\;\;\frac{y}{a} \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -1.81999999999999989e155 or 1.7999999999999999e67 < a Initial program 90.0%
Taylor expanded in x around -inf
mul-1-negN/A
distribute-lft-neg-inN/A
lower-*.f64N/A
lower-neg.f64N/A
+-commutativeN/A
associate--r+N/A
sub-negN/A
Applied rewrites83.5%
Taylor expanded in a around inf
Applied rewrites61.3%
if -1.81999999999999989e155 < a < 1.7999999999999999e67Initial program 76.4%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6454.1
Applied rewrites54.1%
Taylor expanded in z around 0
Applied rewrites29.4%
Final simplification40.9%
(FPCore (x y z t a) :precision binary64 (if (<= z 4.2e+109) (fma y (/ t a) x) (* (/ t (- z)) (- z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= 4.2e+109) {
tmp = fma(y, (t / a), x);
} else {
tmp = (t / -z) * -z;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= 4.2e+109) tmp = fma(y, Float64(t / a), x); else tmp = Float64(Float64(t / Float64(-z)) * Float64(-z)); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, 4.2e+109], N[(y * N[(t / a), $MachinePrecision] + x), $MachinePrecision], N[(N[(t / (-z)), $MachinePrecision] * (-z)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq 4.2 \cdot 10^{+109}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{t}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{-z} \cdot \left(-z\right)\\
\end{array}
\end{array}
if z < 4.2000000000000003e109Initial program 83.5%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
lift--.f64N/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-fma.f64N/A
lower-/.f6488.7
Applied rewrites88.7%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6463.2
Applied rewrites63.2%
Taylor expanded in t around inf
Applied rewrites52.7%
if 4.2000000000000003e109 < z Initial program 69.3%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6471.1
Applied rewrites71.1%
Taylor expanded in a around 0
Applied rewrites68.6%
Taylor expanded in z around inf
Applied rewrites59.2%
Final simplification53.7%
(FPCore (x y z t a) :precision binary64 (if (<= z 5.6e+112) (fma y (/ t a) x) (+ (- t x) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= 5.6e+112) {
tmp = fma(y, (t / a), x);
} else {
tmp = (t - x) + x;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= 5.6e+112) tmp = fma(y, Float64(t / a), x); else tmp = Float64(Float64(t - x) + x); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, 5.6e+112], N[(y * N[(t / a), $MachinePrecision] + x), $MachinePrecision], N[(N[(t - x), $MachinePrecision] + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq 5.6 \cdot 10^{+112}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{t}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;\left(t - x\right) + x\\
\end{array}
\end{array}
if z < 5.6000000000000003e112Initial program 83.5%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
lift--.f64N/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-fma.f64N/A
lower-/.f6488.7
Applied rewrites88.7%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6463.2
Applied rewrites63.2%
Taylor expanded in t around inf
Applied rewrites52.7%
if 5.6000000000000003e112 < z Initial program 69.3%
Taylor expanded in z around inf
lower--.f6445.4
Applied rewrites45.4%
Final simplification51.6%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* -1.0 (- x)))) (if (<= a -3.4e+100) t_1 (if (<= a 64000000000000.0) (+ (- t x) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -1.0 * -x;
double tmp;
if (a <= -3.4e+100) {
tmp = t_1;
} else if (a <= 64000000000000.0) {
tmp = (t - x) + x;
} else {
tmp = t_1;
}
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
real(8) :: t_1
real(8) :: tmp
t_1 = (-1.0d0) * -x
if (a <= (-3.4d+100)) then
tmp = t_1
else if (a <= 64000000000000.0d0) then
tmp = (t - x) + x
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = -1.0 * -x;
double tmp;
if (a <= -3.4e+100) {
tmp = t_1;
} else if (a <= 64000000000000.0) {
tmp = (t - x) + x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -1.0 * -x tmp = 0 if a <= -3.4e+100: tmp = t_1 elif a <= 64000000000000.0: tmp = (t - x) + x else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(-1.0 * Float64(-x)) tmp = 0.0 if (a <= -3.4e+100) tmp = t_1; elseif (a <= 64000000000000.0) tmp = Float64(Float64(t - x) + x); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = -1.0 * -x; tmp = 0.0; if (a <= -3.4e+100) tmp = t_1; elseif (a <= 64000000000000.0) tmp = (t - x) + x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(-1.0 * (-x)), $MachinePrecision]}, If[LessEqual[a, -3.4e+100], t$95$1, If[LessEqual[a, 64000000000000.0], N[(N[(t - x), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -1 \cdot \left(-x\right)\\
\mathbf{if}\;a \leq -3.4 \cdot 10^{+100}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 64000000000000:\\
\;\;\;\;\left(t - x\right) + x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -3.39999999999999994e100 or 6.4e13 < a Initial program 88.6%
Taylor expanded in x around -inf
mul-1-negN/A
distribute-lft-neg-inN/A
lower-*.f64N/A
lower-neg.f64N/A
+-commutativeN/A
associate--r+N/A
sub-negN/A
Applied rewrites82.2%
Taylor expanded in a around inf
Applied rewrites55.1%
if -3.39999999999999994e100 < a < 6.4e13Initial program 76.0%
Taylor expanded in z around inf
lower--.f6421.6
Applied rewrites21.6%
Final simplification35.7%
(FPCore (x y z t a) :precision binary64 (+ (- t x) x))
double code(double x, double y, double z, double t, double a) {
return (t - x) + x;
}
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 = (t - x) + x
end function
public static double code(double x, double y, double z, double t, double a) {
return (t - x) + x;
}
def code(x, y, z, t, a): return (t - x) + x
function code(x, y, z, t, a) return Float64(Float64(t - x) + x) end
function tmp = code(x, y, z, t, a) tmp = (t - x) + x; end
code[x_, y_, z_, t_, a_] := N[(N[(t - x), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}
\\
\left(t - x\right) + x
\end{array}
Initial program 81.3%
Taylor expanded in z around inf
lower--.f6416.6
Applied rewrites16.6%
Final simplification16.6%
(FPCore (x y z t a) :precision binary64 0.0)
double code(double x, double y, double z, double t, double a) {
return 0.0;
}
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 = 0.0d0
end function
public static double code(double x, double y, double z, double t, double a) {
return 0.0;
}
def code(x, y, z, t, a): return 0.0
function code(x, y, z, t, a) return 0.0 end
function tmp = code(x, y, z, t, a) tmp = 0.0; end
code[x_, y_, z_, t_, a_] := 0.0
\begin{array}{l}
\\
0
\end{array}
Initial program 81.3%
lift-*.f64N/A
lift-/.f64N/A
associate-*r/N/A
frac-2negN/A
lower-/.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-*.f64N/A
neg-sub0N/A
lift--.f64N/A
sub-negN/A
+-commutativeN/A
associate--r+N/A
neg-sub0N/A
remove-double-negN/A
lower--.f64N/A
neg-sub0N/A
lift--.f64N/A
sub-negN/A
+-commutativeN/A
associate--r+N/A
neg-sub0N/A
remove-double-negN/A
lower--.f6469.2
Applied rewrites69.2%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
div-subN/A
*-commutativeN/A
lower-fma.f64N/A
div-subN/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6445.7
Applied rewrites45.7%
Taylor expanded in z around inf
Applied rewrites2.8%
herbie shell --seed 2024255
(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)))))