
(FPCore (x y z t a) :precision binary64 (+ x (/ (* y (- z t)) (- z a))))
double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (z - a));
}
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)) / (z - a))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (z - a));
}
def code(x, y, z, t, a): return x + ((y * (z - t)) / (z - a))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y * Float64(z - t)) / Float64(z - a))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y * (z - t)) / (z - a)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - t\right)}{z - a}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (/ (* y (- z t)) (- z a))))
double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (z - a));
}
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)) / (z - a))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (z - a));
}
def code(x, y, z, t, a): return x + ((y * (z - t)) / (z - a))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y * Float64(z - t)) / Float64(z - a))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y * (z - t)) / (z - a)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - t\right)}{z - a}
\end{array}
(FPCore (x y z t a) :precision binary64 (+ x (* (/ (- z t) (- z a)) y)))
double code(double x, double y, double z, double t, double a) {
return x + (((z - t) / (z - a)) * y);
}
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 + (((z - t) / (z - a)) * y)
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((z - t) / (z - a)) * y);
}
def code(x, y, z, t, a): return x + (((z - t) / (z - a)) * y)
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(z - t) / Float64(z - a)) * y)) end
function tmp = code(x, y, z, t, a) tmp = x + (((z - t) / (z - a)) * y); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{z - t}{z - a} \cdot y
\end{array}
Initial program 87.8%
*-commutative87.8%
associate-*l/98.2%
Applied egg-rr98.2%
Final simplification98.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (/ z (- z a))))))
(if (<= z -3.4e+84)
t_1
(if (<= z -5.2e+33)
(- x (/ t (/ z y)))
(if (<= z -3.45e-37)
t_1
(if (<= z -8.6e-42)
(* t (/ (- y) (- z a)))
(if (<= z -1.46e-62)
(+ x (/ y (/ (- z) t)))
(if (<= z 1.65e-95) (+ x (/ y (/ a t))) t_1))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * (z / (z - a)));
double tmp;
if (z <= -3.4e+84) {
tmp = t_1;
} else if (z <= -5.2e+33) {
tmp = x - (t / (z / y));
} else if (z <= -3.45e-37) {
tmp = t_1;
} else if (z <= -8.6e-42) {
tmp = t * (-y / (z - a));
} else if (z <= -1.46e-62) {
tmp = x + (y / (-z / t));
} else if (z <= 1.65e-95) {
tmp = x + (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 = x + (y * (z / (z - a)))
if (z <= (-3.4d+84)) then
tmp = t_1
else if (z <= (-5.2d+33)) then
tmp = x - (t / (z / y))
else if (z <= (-3.45d-37)) then
tmp = t_1
else if (z <= (-8.6d-42)) then
tmp = t * (-y / (z - a))
else if (z <= (-1.46d-62)) then
tmp = x + (y / (-z / t))
else if (z <= 1.65d-95) then
tmp = x + (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 = x + (y * (z / (z - a)));
double tmp;
if (z <= -3.4e+84) {
tmp = t_1;
} else if (z <= -5.2e+33) {
tmp = x - (t / (z / y));
} else if (z <= -3.45e-37) {
tmp = t_1;
} else if (z <= -8.6e-42) {
tmp = t * (-y / (z - a));
} else if (z <= -1.46e-62) {
tmp = x + (y / (-z / t));
} else if (z <= 1.65e-95) {
tmp = x + (y / (a / t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * (z / (z - a))) tmp = 0 if z <= -3.4e+84: tmp = t_1 elif z <= -5.2e+33: tmp = x - (t / (z / y)) elif z <= -3.45e-37: tmp = t_1 elif z <= -8.6e-42: tmp = t * (-y / (z - a)) elif z <= -1.46e-62: tmp = x + (y / (-z / t)) elif z <= 1.65e-95: tmp = x + (y / (a / t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y * Float64(z / Float64(z - a)))) tmp = 0.0 if (z <= -3.4e+84) tmp = t_1; elseif (z <= -5.2e+33) tmp = Float64(x - Float64(t / Float64(z / y))); elseif (z <= -3.45e-37) tmp = t_1; elseif (z <= -8.6e-42) tmp = Float64(t * Float64(Float64(-y) / Float64(z - a))); elseif (z <= -1.46e-62) tmp = Float64(x + Float64(y / Float64(Float64(-z) / t))); elseif (z <= 1.65e-95) tmp = Float64(x + Float64(y / Float64(a / t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y * (z / (z - a))); tmp = 0.0; if (z <= -3.4e+84) tmp = t_1; elseif (z <= -5.2e+33) tmp = x - (t / (z / y)); elseif (z <= -3.45e-37) tmp = t_1; elseif (z <= -8.6e-42) tmp = t * (-y / (z - a)); elseif (z <= -1.46e-62) tmp = x + (y / (-z / t)); elseif (z <= 1.65e-95) tmp = x + (y / (a / t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.4e+84], t$95$1, If[LessEqual[z, -5.2e+33], N[(x - N[(t / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.45e-37], t$95$1, If[LessEqual[z, -8.6e-42], N[(t * N[((-y) / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.46e-62], N[(x + N[(y / N[((-z) / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.65e-95], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z}{z - a}\\
\mathbf{if}\;z \leq -3.4 \cdot 10^{+84}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -5.2 \cdot 10^{+33}:\\
\;\;\;\;x - \frac{t}{\frac{z}{y}}\\
\mathbf{elif}\;z \leq -3.45 \cdot 10^{-37}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -8.6 \cdot 10^{-42}:\\
\;\;\;\;t \cdot \frac{-y}{z - a}\\
\mathbf{elif}\;z \leq -1.46 \cdot 10^{-62}:\\
\;\;\;\;x + \frac{y}{\frac{-z}{t}}\\
\mathbf{elif}\;z \leq 1.65 \cdot 10^{-95}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -3.3999999999999998e84 or -5.1999999999999995e33 < z < -3.4499999999999999e-37 or 1.65e-95 < z Initial program 80.1%
*-commutative80.1%
associate-*l/99.6%
Applied egg-rr99.6%
Taylor expanded in t around 0 90.7%
if -3.3999999999999998e84 < z < -5.1999999999999995e33Initial program 99.9%
Taylor expanded in t around inf 93.3%
associate-*r/93.4%
neg-mul-193.4%
distribute-rgt-neg-in93.4%
distribute-neg-frac93.4%
Simplified93.4%
Taylor expanded in z around inf 93.3%
mul-1-neg93.3%
unsub-neg93.3%
associate-/l*93.3%
Simplified93.3%
if -3.4499999999999999e-37 < z < -8.6000000000000002e-42Initial program 99.5%
Taylor expanded in t around inf 99.5%
associate-*r/100.0%
neg-mul-1100.0%
distribute-rgt-neg-in100.0%
distribute-neg-frac100.0%
Simplified100.0%
Taylor expanded in x around 0 99.5%
mul-1-neg99.5%
associate-*r/100.0%
sub-neg100.0%
associate-*r/99.5%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in x around 0 99.5%
mul-1-neg99.5%
associate-*r/100.0%
*-commutative100.0%
distribute-rgt-neg-in100.0%
Simplified100.0%
if -8.6000000000000002e-42 < z < -1.46e-62Initial program 99.4%
Taylor expanded in a around 0 74.9%
+-commutative74.9%
associate-/l*75.2%
Simplified75.2%
Taylor expanded in z around 0 81.6%
associate-*r/81.6%
neg-mul-181.6%
Simplified81.6%
if -1.46e-62 < z < 1.65e-95Initial program 96.7%
*-commutative96.7%
associate-*l/95.6%
Applied egg-rr95.6%
Taylor expanded in z around 0 81.0%
*-commutative81.0%
clear-num80.9%
un-div-inv81.0%
Applied egg-rr81.0%
Final simplification87.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (/ z (- z a))))))
(if (<= z -1.7e+104)
t_1
(if (<= z -7.8e-64)
(+ x (/ (* (- z t) y) z))
(if (<= z 5.8e-98) (+ x (/ y (/ a t))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * (z / (z - a)));
double tmp;
if (z <= -1.7e+104) {
tmp = t_1;
} else if (z <= -7.8e-64) {
tmp = x + (((z - t) * y) / z);
} else if (z <= 5.8e-98) {
tmp = x + (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 = x + (y * (z / (z - a)))
if (z <= (-1.7d+104)) then
tmp = t_1
else if (z <= (-7.8d-64)) then
tmp = x + (((z - t) * y) / z)
else if (z <= 5.8d-98) then
tmp = x + (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 = x + (y * (z / (z - a)));
double tmp;
if (z <= -1.7e+104) {
tmp = t_1;
} else if (z <= -7.8e-64) {
tmp = x + (((z - t) * y) / z);
} else if (z <= 5.8e-98) {
tmp = x + (y / (a / t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * (z / (z - a))) tmp = 0 if z <= -1.7e+104: tmp = t_1 elif z <= -7.8e-64: tmp = x + (((z - t) * y) / z) elif z <= 5.8e-98: tmp = x + (y / (a / t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y * Float64(z / Float64(z - a)))) tmp = 0.0 if (z <= -1.7e+104) tmp = t_1; elseif (z <= -7.8e-64) tmp = Float64(x + Float64(Float64(Float64(z - t) * y) / z)); elseif (z <= 5.8e-98) tmp = Float64(x + Float64(y / Float64(a / t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y * (z / (z - a))); tmp = 0.0; if (z <= -1.7e+104) tmp = t_1; elseif (z <= -7.8e-64) tmp = x + (((z - t) * y) / z); elseif (z <= 5.8e-98) tmp = x + (y / (a / t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.7e+104], t$95$1, If[LessEqual[z, -7.8e-64], N[(x + N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.8e-98], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z}{z - a}\\
\mathbf{if}\;z \leq -1.7 \cdot 10^{+104}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -7.8 \cdot 10^{-64}:\\
\;\;\;\;x + \frac{\left(z - t\right) \cdot y}{z}\\
\mathbf{elif}\;z \leq 5.8 \cdot 10^{-98}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -1.6999999999999998e104 or 5.8e-98 < z Initial program 77.4%
*-commutative77.4%
associate-*l/99.6%
Applied egg-rr99.6%
Taylor expanded in t around 0 90.9%
if -1.6999999999999998e104 < z < -7.7999999999999994e-64Initial program 99.7%
Taylor expanded in a around 0 84.5%
if -7.7999999999999994e-64 < z < 5.8e-98Initial program 96.7%
*-commutative96.7%
associate-*l/95.6%
Applied egg-rr95.6%
Taylor expanded in z around 0 81.0%
*-commutative81.0%
clear-num80.9%
un-div-inv81.0%
Applied egg-rr81.0%
Final simplification86.4%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.8e+81)
(+ x y)
(if (<= z -2.4e+42)
(* y (- 1.0 (/ t z)))
(if (<= z 4.8e-52) (+ x (* t (/ y a))) (+ x y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.8e+81) {
tmp = x + y;
} else if (z <= -2.4e+42) {
tmp = y * (1.0 - (t / z));
} else if (z <= 4.8e-52) {
tmp = x + (t * (y / a));
} else {
tmp = x + y;
}
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 <= (-1.8d+81)) then
tmp = x + y
else if (z <= (-2.4d+42)) then
tmp = y * (1.0d0 - (t / z))
else if (z <= 4.8d-52) then
tmp = x + (t * (y / a))
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.8e+81) {
tmp = x + y;
} else if (z <= -2.4e+42) {
tmp = y * (1.0 - (t / z));
} else if (z <= 4.8e-52) {
tmp = x + (t * (y / a));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.8e+81: tmp = x + y elif z <= -2.4e+42: tmp = y * (1.0 - (t / z)) elif z <= 4.8e-52: tmp = x + (t * (y / a)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.8e+81) tmp = Float64(x + y); elseif (z <= -2.4e+42) tmp = Float64(y * Float64(1.0 - Float64(t / z))); elseif (z <= 4.8e-52) tmp = Float64(x + Float64(t * Float64(y / a))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.8e+81) tmp = x + y; elseif (z <= -2.4e+42) tmp = y * (1.0 - (t / z)); elseif (z <= 4.8e-52) tmp = x + (t * (y / a)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.8e+81], N[(x + y), $MachinePrecision], If[LessEqual[z, -2.4e+42], N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.8e-52], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.8 \cdot 10^{+81}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq -2.4 \cdot 10^{+42}:\\
\;\;\;\;y \cdot \left(1 - \frac{t}{z}\right)\\
\mathbf{elif}\;z \leq 4.8 \cdot 10^{-52}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -1.80000000000000003e81 or 4.8000000000000003e-52 < z Initial program 77.6%
Taylor expanded in z around inf 80.7%
+-commutative80.7%
Simplified80.7%
if -1.80000000000000003e81 < z < -2.3999999999999999e42Initial program 99.8%
Taylor expanded in a around 0 99.8%
+-commutative99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in y around inf 88.7%
if -2.3999999999999999e42 < z < 4.8000000000000003e-52Initial program 97.4%
Taylor expanded in t around inf 90.0%
associate-*r/88.6%
neg-mul-188.6%
distribute-rgt-neg-in88.6%
distribute-neg-frac88.6%
Simplified88.6%
Taylor expanded in z around 0 75.7%
Final simplification78.6%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.8e+81)
(+ x y)
(if (<= z -2e+40)
(* y (- 1.0 (/ t z)))
(if (<= z 3.8e-48) (+ x (* y (/ t a))) (+ x y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.8e+81) {
tmp = x + y;
} else if (z <= -2e+40) {
tmp = y * (1.0 - (t / z));
} else if (z <= 3.8e-48) {
tmp = x + (y * (t / a));
} else {
tmp = x + y;
}
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 <= (-1.8d+81)) then
tmp = x + y
else if (z <= (-2d+40)) then
tmp = y * (1.0d0 - (t / z))
else if (z <= 3.8d-48) then
tmp = x + (y * (t / a))
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.8e+81) {
tmp = x + y;
} else if (z <= -2e+40) {
tmp = y * (1.0 - (t / z));
} else if (z <= 3.8e-48) {
tmp = x + (y * (t / a));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.8e+81: tmp = x + y elif z <= -2e+40: tmp = y * (1.0 - (t / z)) elif z <= 3.8e-48: tmp = x + (y * (t / a)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.8e+81) tmp = Float64(x + y); elseif (z <= -2e+40) tmp = Float64(y * Float64(1.0 - Float64(t / z))); elseif (z <= 3.8e-48) tmp = Float64(x + Float64(y * Float64(t / a))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.8e+81) tmp = x + y; elseif (z <= -2e+40) tmp = y * (1.0 - (t / z)); elseif (z <= 3.8e-48) tmp = x + (y * (t / a)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.8e+81], N[(x + y), $MachinePrecision], If[LessEqual[z, -2e+40], N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.8e-48], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.8 \cdot 10^{+81}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq -2 \cdot 10^{+40}:\\
\;\;\;\;y \cdot \left(1 - \frac{t}{z}\right)\\
\mathbf{elif}\;z \leq 3.8 \cdot 10^{-48}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -1.80000000000000003e81 or 3.80000000000000002e-48 < z Initial program 77.6%
Taylor expanded in z around inf 80.7%
+-commutative80.7%
Simplified80.7%
if -1.80000000000000003e81 < z < -2.00000000000000006e40Initial program 99.8%
Taylor expanded in a around 0 99.8%
+-commutative99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in y around inf 88.7%
if -2.00000000000000006e40 < z < 3.80000000000000002e-48Initial program 97.4%
*-commutative97.4%
associate-*l/96.3%
Applied egg-rr96.3%
Taylor expanded in z around 0 77.1%
Final simplification79.3%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.8e+81)
(+ x y)
(if (<= z -7.2e+41)
(* y (- 1.0 (/ t z)))
(if (<= z 1.5e-52) (+ x (/ y (/ a t))) (+ x y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.8e+81) {
tmp = x + y;
} else if (z <= -7.2e+41) {
tmp = y * (1.0 - (t / z));
} else if (z <= 1.5e-52) {
tmp = x + (y / (a / t));
} else {
tmp = x + y;
}
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 <= (-1.8d+81)) then
tmp = x + y
else if (z <= (-7.2d+41)) then
tmp = y * (1.0d0 - (t / z))
else if (z <= 1.5d-52) then
tmp = x + (y / (a / t))
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.8e+81) {
tmp = x + y;
} else if (z <= -7.2e+41) {
tmp = y * (1.0 - (t / z));
} else if (z <= 1.5e-52) {
tmp = x + (y / (a / t));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.8e+81: tmp = x + y elif z <= -7.2e+41: tmp = y * (1.0 - (t / z)) elif z <= 1.5e-52: tmp = x + (y / (a / t)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.8e+81) tmp = Float64(x + y); elseif (z <= -7.2e+41) tmp = Float64(y * Float64(1.0 - Float64(t / z))); elseif (z <= 1.5e-52) tmp = Float64(x + Float64(y / Float64(a / t))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.8e+81) tmp = x + y; elseif (z <= -7.2e+41) tmp = y * (1.0 - (t / z)); elseif (z <= 1.5e-52) tmp = x + (y / (a / t)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.8e+81], N[(x + y), $MachinePrecision], If[LessEqual[z, -7.2e+41], N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.5e-52], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.8 \cdot 10^{+81}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq -7.2 \cdot 10^{+41}:\\
\;\;\;\;y \cdot \left(1 - \frac{t}{z}\right)\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{-52}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -1.80000000000000003e81 or 1.5e-52 < z Initial program 77.6%
Taylor expanded in z around inf 80.7%
+-commutative80.7%
Simplified80.7%
if -1.80000000000000003e81 < z < -7.20000000000000051e41Initial program 99.8%
Taylor expanded in a around 0 99.8%
+-commutative99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in y around inf 88.7%
if -7.20000000000000051e41 < z < 1.5e-52Initial program 97.4%
*-commutative97.4%
associate-*l/96.3%
Applied egg-rr96.3%
Taylor expanded in z around 0 77.1%
*-commutative77.1%
clear-num77.1%
un-div-inv77.1%
Applied egg-rr77.1%
Final simplification79.3%
(FPCore (x y z t a)
:precision binary64
(if (<= z -2.5e+85)
(+ x y)
(if (<= z -8.8e-60)
(- x (/ t (/ z y)))
(if (<= z 3.2e-54) (+ x (/ y (/ a t))) (+ x y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.5e+85) {
tmp = x + y;
} else if (z <= -8.8e-60) {
tmp = x - (t / (z / y));
} else if (z <= 3.2e-54) {
tmp = x + (y / (a / t));
} else {
tmp = x + y;
}
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 <= (-2.5d+85)) then
tmp = x + y
else if (z <= (-8.8d-60)) then
tmp = x - (t / (z / y))
else if (z <= 3.2d-54) then
tmp = x + (y / (a / t))
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.5e+85) {
tmp = x + y;
} else if (z <= -8.8e-60) {
tmp = x - (t / (z / y));
} else if (z <= 3.2e-54) {
tmp = x + (y / (a / t));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.5e+85: tmp = x + y elif z <= -8.8e-60: tmp = x - (t / (z / y)) elif z <= 3.2e-54: tmp = x + (y / (a / t)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.5e+85) tmp = Float64(x + y); elseif (z <= -8.8e-60) tmp = Float64(x - Float64(t / Float64(z / y))); elseif (z <= 3.2e-54) tmp = Float64(x + Float64(y / Float64(a / t))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.5e+85) tmp = x + y; elseif (z <= -8.8e-60) tmp = x - (t / (z / y)); elseif (z <= 3.2e-54) tmp = x + (y / (a / t)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.5e+85], N[(x + y), $MachinePrecision], If[LessEqual[z, -8.8e-60], N[(x - N[(t / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.2e-54], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.5 \cdot 10^{+85}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq -8.8 \cdot 10^{-60}:\\
\;\;\;\;x - \frac{t}{\frac{z}{y}}\\
\mathbf{elif}\;z \leq 3.2 \cdot 10^{-54}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -2.5e85 or 3.19999999999999998e-54 < z Initial program 77.4%
Taylor expanded in z around inf 80.6%
+-commutative80.6%
Simplified80.6%
if -2.5e85 < z < -8.7999999999999995e-60Initial program 99.7%
Taylor expanded in t around inf 85.9%
associate-*r/86.2%
neg-mul-186.2%
distribute-rgt-neg-in86.2%
distribute-neg-frac86.2%
Simplified86.2%
Taylor expanded in z around inf 76.6%
mul-1-neg76.6%
unsub-neg76.6%
associate-/l*76.8%
Simplified76.8%
if -8.7999999999999995e-60 < z < 3.19999999999999998e-54Initial program 96.9%
*-commutative96.9%
associate-*l/95.4%
Applied egg-rr95.4%
Taylor expanded in z around 0 80.3%
*-commutative80.3%
clear-num80.3%
un-div-inv80.3%
Applied egg-rr80.3%
Final simplification80.0%
(FPCore (x y z t a) :precision binary64 (if (<= z -2.95e-62) (+ x (/ y (/ z (- z t)))) (if (<= z 4.4e-93) (+ x (/ y (/ a t))) (+ x (* y (/ z (- z a)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.95e-62) {
tmp = x + (y / (z / (z - t)));
} else if (z <= 4.4e-93) {
tmp = x + (y / (a / t));
} else {
tmp = x + (y * (z / (z - a)));
}
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 <= (-2.95d-62)) then
tmp = x + (y / (z / (z - t)))
else if (z <= 4.4d-93) then
tmp = x + (y / (a / t))
else
tmp = x + (y * (z / (z - a)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.95e-62) {
tmp = x + (y / (z / (z - t)));
} else if (z <= 4.4e-93) {
tmp = x + (y / (a / t));
} else {
tmp = x + (y * (z / (z - a)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.95e-62: tmp = x + (y / (z / (z - t))) elif z <= 4.4e-93: tmp = x + (y / (a / t)) else: tmp = x + (y * (z / (z - a))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.95e-62) tmp = Float64(x + Float64(y / Float64(z / Float64(z - t)))); elseif (z <= 4.4e-93) tmp = Float64(x + Float64(y / Float64(a / t))); else tmp = Float64(x + Float64(y * Float64(z / Float64(z - a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.95e-62) tmp = x + (y / (z / (z - t))); elseif (z <= 4.4e-93) tmp = x + (y / (a / t)); else tmp = x + (y * (z / (z - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.95e-62], N[(x + N[(y / N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.4e-93], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.95 \cdot 10^{-62}:\\
\;\;\;\;x + \frac{y}{\frac{z}{z - t}}\\
\mathbf{elif}\;z \leq 4.4 \cdot 10^{-93}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{z - a}\\
\end{array}
\end{array}
if z < -2.9500000000000002e-62Initial program 87.5%
Taylor expanded in a around 0 79.0%
+-commutative79.0%
associate-/l*89.1%
Simplified89.1%
if -2.9500000000000002e-62 < z < 4.39999999999999991e-93Initial program 96.7%
*-commutative96.7%
associate-*l/95.6%
Applied egg-rr95.6%
Taylor expanded in z around 0 81.0%
*-commutative81.0%
clear-num80.9%
un-div-inv81.0%
Applied egg-rr81.0%
if 4.39999999999999991e-93 < z Initial program 78.1%
*-commutative78.1%
associate-*l/99.3%
Applied egg-rr99.3%
Taylor expanded in t around 0 88.4%
Final simplification86.0%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.9e-5) (+ x (* z (/ y (- z a)))) (if (<= a 9.5e+33) (+ x (/ y (/ z (- z t)))) (+ x (* (/ y a) (- t z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.9e-5) {
tmp = x + (z * (y / (z - a)));
} else if (a <= 9.5e+33) {
tmp = x + (y / (z / (z - t)));
} else {
tmp = x + ((y / a) * (t - 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
real(8) :: tmp
if (a <= (-1.9d-5)) then
tmp = x + (z * (y / (z - a)))
else if (a <= 9.5d+33) then
tmp = x + (y / (z / (z - t)))
else
tmp = x + ((y / a) * (t - z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.9e-5) {
tmp = x + (z * (y / (z - a)));
} else if (a <= 9.5e+33) {
tmp = x + (y / (z / (z - t)));
} else {
tmp = x + ((y / a) * (t - z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.9e-5: tmp = x + (z * (y / (z - a))) elif a <= 9.5e+33: tmp = x + (y / (z / (z - t))) else: tmp = x + ((y / a) * (t - z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.9e-5) tmp = Float64(x + Float64(z * Float64(y / Float64(z - a)))); elseif (a <= 9.5e+33) tmp = Float64(x + Float64(y / Float64(z / Float64(z - t)))); else tmp = Float64(x + Float64(Float64(y / a) * Float64(t - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.9e-5) tmp = x + (z * (y / (z - a))); elseif (a <= 9.5e+33) tmp = x + (y / (z / (z - t))); else tmp = x + ((y / a) * (t - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.9e-5], N[(x + N[(z * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 9.5e+33], N[(x + N[(y / N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.9 \cdot 10^{-5}:\\
\;\;\;\;x + z \cdot \frac{y}{z - a}\\
\mathbf{elif}\;a \leq 9.5 \cdot 10^{+33}:\\
\;\;\;\;x + \frac{y}{\frac{z}{z - t}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{a} \cdot \left(t - z\right)\\
\end{array}
\end{array}
if a < -1.9000000000000001e-5Initial program 88.4%
Taylor expanded in t around 0 74.1%
+-commutative74.1%
associate-*l/83.5%
*-commutative83.5%
Simplified83.5%
if -1.9000000000000001e-5 < a < 9.5000000000000003e33Initial program 88.6%
Taylor expanded in a around 0 75.9%
+-commutative75.9%
associate-/l*86.3%
Simplified86.3%
if 9.5000000000000003e33 < a Initial program 84.1%
Taylor expanded in a around inf 77.7%
mul-1-neg77.7%
unsub-neg77.7%
associate-/l*86.7%
Simplified86.7%
associate-/r/93.2%
Applied egg-rr93.2%
Final simplification86.7%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.16e-36) (+ x (/ y (/ z (- z t)))) (if (<= z 2.15e+92) (- x (/ t (/ (- z a) y))) (+ x (/ y (- 1.0 (/ a z)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.16e-36) {
tmp = x + (y / (z / (z - t)));
} else if (z <= 2.15e+92) {
tmp = x - (t / ((z - a) / y));
} else {
tmp = x + (y / (1.0 - (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
real(8) :: tmp
if (z <= (-1.16d-36)) then
tmp = x + (y / (z / (z - t)))
else if (z <= 2.15d+92) then
tmp = x - (t / ((z - a) / y))
else
tmp = x + (y / (1.0d0 - (a / z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.16e-36) {
tmp = x + (y / (z / (z - t)));
} else if (z <= 2.15e+92) {
tmp = x - (t / ((z - a) / y));
} else {
tmp = x + (y / (1.0 - (a / z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.16e-36: tmp = x + (y / (z / (z - t))) elif z <= 2.15e+92: tmp = x - (t / ((z - a) / y)) else: tmp = x + (y / (1.0 - (a / z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.16e-36) tmp = Float64(x + Float64(y / Float64(z / Float64(z - t)))); elseif (z <= 2.15e+92) tmp = Float64(x - Float64(t / Float64(Float64(z - a) / y))); else tmp = Float64(x + Float64(y / Float64(1.0 - Float64(a / z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.16e-36) tmp = x + (y / (z / (z - t))); elseif (z <= 2.15e+92) tmp = x - (t / ((z - a) / y)); else tmp = x + (y / (1.0 - (a / z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.16e-36], N[(x + N[(y / N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.15e+92], N[(x - N[(t / N[(N[(z - a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(1.0 - N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.16 \cdot 10^{-36}:\\
\;\;\;\;x + \frac{y}{\frac{z}{z - t}}\\
\mathbf{elif}\;z \leq 2.15 \cdot 10^{+92}:\\
\;\;\;\;x - \frac{t}{\frac{z - a}{y}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{1 - \frac{a}{z}}\\
\end{array}
\end{array}
if z < -1.16000000000000002e-36Initial program 86.2%
Taylor expanded in a around 0 81.2%
+-commutative81.2%
associate-/l*92.3%
Simplified92.3%
if -1.16000000000000002e-36 < z < 2.1499999999999999e92Initial program 97.0%
Taylor expanded in t around inf 90.0%
associate-*r/89.4%
neg-mul-189.4%
distribute-rgt-neg-in89.4%
distribute-neg-frac89.4%
Simplified89.4%
Taylor expanded in x around 0 90.0%
mul-1-neg90.0%
associate-*r/89.4%
sub-neg89.4%
associate-*r/90.0%
associate-/l*90.1%
Simplified90.1%
if 2.1499999999999999e92 < z Initial program 63.6%
*-commutative63.6%
associate-*l/99.8%
Applied egg-rr99.8%
Taylor expanded in t around 0 61.3%
associate-/l*91.1%
div-sub91.1%
*-inverses91.1%
Simplified91.1%
Final simplification90.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -2.8e+171) (not (<= y 4e+148))) (* y (- 1.0 (/ t z))) (+ x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -2.8e+171) || !(y <= 4e+148)) {
tmp = y * (1.0 - (t / z));
} else {
tmp = x + y;
}
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 ((y <= (-2.8d+171)) .or. (.not. (y <= 4d+148))) then
tmp = y * (1.0d0 - (t / z))
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -2.8e+171) || !(y <= 4e+148)) {
tmp = y * (1.0 - (t / z));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -2.8e+171) or not (y <= 4e+148): tmp = y * (1.0 - (t / z)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -2.8e+171) || !(y <= 4e+148)) tmp = Float64(y * Float64(1.0 - Float64(t / z))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -2.8e+171) || ~((y <= 4e+148))) tmp = y * (1.0 - (t / z)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -2.8e+171], N[Not[LessEqual[y, 4e+148]], $MachinePrecision]], N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.8 \cdot 10^{+171} \lor \neg \left(y \leq 4 \cdot 10^{+148}\right):\\
\;\;\;\;y \cdot \left(1 - \frac{t}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if y < -2.80000000000000004e171 or 4.0000000000000002e148 < y Initial program 61.5%
Taylor expanded in a around 0 36.9%
+-commutative36.9%
associate-/l*64.9%
Simplified64.9%
Taylor expanded in y around inf 63.4%
if -2.80000000000000004e171 < y < 4.0000000000000002e148Initial program 96.4%
Taylor expanded in z around inf 69.3%
+-commutative69.3%
Simplified69.3%
Final simplification67.8%
(FPCore (x y z t a) :precision binary64 (+ x (* (- z t) (/ y (- z a)))))
double code(double x, double y, double z, double t, double a) {
return x + ((z - t) * (y / (z - a)));
}
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 + ((z - t) * (y / (z - a)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((z - t) * (y / (z - a)));
}
def code(x, y, z, t, a): return x + ((z - t) * (y / (z - a)))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(z - t) * Float64(y / Float64(z - a)))) end
function tmp = code(x, y, z, t, a) tmp = x + ((z - t) * (y / (z - a))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(z - t), $MachinePrecision] * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(z - t\right) \cdot \frac{y}{z - a}
\end{array}
Initial program 87.8%
associate-*l/95.0%
Applied egg-rr95.0%
Final simplification95.0%
(FPCore (x y z t a) :precision binary64 (if (<= a -6.8e+223) x (if (<= a 2.95e+119) (+ x y) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -6.8e+223) {
tmp = x;
} else if (a <= 2.95e+119) {
tmp = x + y;
} else {
tmp = x;
}
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 (a <= (-6.8d+223)) then
tmp = x
else if (a <= 2.95d+119) then
tmp = x + y
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -6.8e+223) {
tmp = x;
} else if (a <= 2.95e+119) {
tmp = x + y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -6.8e+223: tmp = x elif a <= 2.95e+119: tmp = x + y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -6.8e+223) tmp = x; elseif (a <= 2.95e+119) tmp = Float64(x + y); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -6.8e+223) tmp = x; elseif (a <= 2.95e+119) tmp = x + y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -6.8e+223], x, If[LessEqual[a, 2.95e+119], N[(x + y), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -6.8 \cdot 10^{+223}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 2.95 \cdot 10^{+119}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -6.7999999999999995e223 or 2.95e119 < a Initial program 83.1%
Taylor expanded in x around inf 75.4%
if -6.7999999999999995e223 < a < 2.95e119Initial program 89.0%
Taylor expanded in z around inf 66.2%
+-commutative66.2%
Simplified66.2%
Final simplification68.1%
(FPCore (x y z t a) :precision binary64 (if (<= y -7.5e+186) y (if (<= y 1.9e+111) x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -7.5e+186) {
tmp = y;
} else if (y <= 1.9e+111) {
tmp = x;
} else {
tmp = y;
}
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 (y <= (-7.5d+186)) then
tmp = y
else if (y <= 1.9d+111) then
tmp = x
else
tmp = y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -7.5e+186) {
tmp = y;
} else if (y <= 1.9e+111) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -7.5e+186: tmp = y elif y <= 1.9e+111: tmp = x else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -7.5e+186) tmp = y; elseif (y <= 1.9e+111) tmp = x; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -7.5e+186) tmp = y; elseif (y <= 1.9e+111) tmp = x; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -7.5e+186], y, If[LessEqual[y, 1.9e+111], x, y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.5 \cdot 10^{+186}:\\
\;\;\;\;y\\
\mathbf{elif}\;y \leq 1.9 \cdot 10^{+111}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if y < -7.4999999999999998e186 or 1.89999999999999988e111 < y Initial program 63.1%
Taylor expanded in a around 0 40.0%
+-commutative40.0%
associate-/l*66.2%
Simplified66.2%
Taylor expanded in y around inf 62.1%
Taylor expanded in t around 0 38.9%
if -7.4999999999999998e186 < y < 1.89999999999999988e111Initial program 97.3%
Taylor expanded in x around inf 68.0%
Final simplification59.9%
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
return 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 = x
end function
public static double code(double x, double y, double z, double t, double a) {
return x;
}
def code(x, y, z, t, a): return x
function code(x, y, z, t, a) return x end
function tmp = code(x, y, z, t, a) tmp = x; end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 87.8%
Taylor expanded in x around inf 53.1%
Final simplification53.1%
(FPCore (x y z t a) :precision binary64 (+ x (/ y (/ (- z a) (- z t)))))
double code(double x, double y, double z, double t, double a) {
return x + (y / ((z - a) / (z - t)));
}
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 - a) / (z - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y / ((z - a) / (z - t)));
}
def code(x, y, z, t, a): return x + (y / ((z - a) / (z - t)))
function code(x, y, z, t, a) return Float64(x + Float64(y / Float64(Float64(z - a) / Float64(z - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y / ((z - a) / (z - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y / N[(N[(z - a), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y}{\frac{z - a}{z - t}}
\end{array}
herbie shell --seed 2023321
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, A"
:precision binary64
:herbie-target
(+ x (/ y (/ (- z a) (- z t))))
(+ x (/ (* y (- z t)) (- z a))))