
(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 14 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 (fma y (/ (- z t) (- z a)) x))
double code(double x, double y, double z, double t, double a) {
return fma(y, ((z - t) / (z - a)), x);
}
function code(x, y, z, t, a) return fma(y, Float64(Float64(z - t) / Float64(z - a)), x) end
code[x_, y_, z_, t_, a_] := N[(y * N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(y, \frac{z - t}{z - a}, x\right)
\end{array}
Initial program 85.1%
+-commutative85.1%
associate-*r/98.7%
fma-def98.7%
Simplified98.7%
Final simplification98.7%
(FPCore (x y z t a)
:precision binary64
(if (or (<= a -4.5e-35)
(not (or (<= a 9e-106) (and (not (<= a 6e-78)) (<= a 8.6e+36)))))
(+ x (* (/ y a) (- t z)))
(+ x (/ y (/ z (- z t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -4.5e-35) || !((a <= 9e-106) || (!(a <= 6e-78) && (a <= 8.6e+36)))) {
tmp = x + ((y / a) * (t - z));
} else {
tmp = x + (y / (z / (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 ((a <= (-4.5d-35)) .or. (.not. (a <= 9d-106) .or. (.not. (a <= 6d-78)) .and. (a <= 8.6d+36))) then
tmp = x + ((y / a) * (t - z))
else
tmp = x + (y / (z / (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 ((a <= -4.5e-35) || !((a <= 9e-106) || (!(a <= 6e-78) && (a <= 8.6e+36)))) {
tmp = x + ((y / a) * (t - z));
} else {
tmp = x + (y / (z / (z - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -4.5e-35) or not ((a <= 9e-106) or (not (a <= 6e-78) and (a <= 8.6e+36))): tmp = x + ((y / a) * (t - z)) else: tmp = x + (y / (z / (z - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -4.5e-35) || !((a <= 9e-106) || (!(a <= 6e-78) && (a <= 8.6e+36)))) tmp = Float64(x + Float64(Float64(y / a) * Float64(t - z))); else tmp = Float64(x + Float64(y / Float64(z / Float64(z - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -4.5e-35) || ~(((a <= 9e-106) || (~((a <= 6e-78)) && (a <= 8.6e+36))))) tmp = x + ((y / a) * (t - z)); else tmp = x + (y / (z / (z - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -4.5e-35], N[Not[Or[LessEqual[a, 9e-106], And[N[Not[LessEqual[a, 6e-78]], $MachinePrecision], LessEqual[a, 8.6e+36]]]], $MachinePrecision]], N[(x + N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.5 \cdot 10^{-35} \lor \neg \left(a \leq 9 \cdot 10^{-106} \lor \neg \left(a \leq 6 \cdot 10^{-78}\right) \land a \leq 8.6 \cdot 10^{+36}\right):\\
\;\;\;\;x + \frac{y}{a} \cdot \left(t - z\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{z}{z - t}}\\
\end{array}
\end{array}
if a < -4.5000000000000001e-35 or 8.99999999999999911e-106 < a < 5.99999999999999975e-78 or 8.6000000000000001e36 < a Initial program 84.8%
+-commutative84.8%
associate-*r/99.6%
fma-def99.7%
Simplified99.7%
Taylor expanded in a around inf 77.2%
+-commutative77.2%
*-commutative77.2%
mul-1-neg77.2%
unsub-neg77.2%
*-commutative77.2%
associate-/l*83.7%
Simplified83.7%
Taylor expanded in z around 0 75.6%
*-commutative75.6%
associate-*r/78.6%
mul-1-neg78.6%
sub-neg78.6%
*-commutative78.6%
associate-*r/82.9%
distribute-rgt-out--83.7%
Simplified83.7%
if -4.5000000000000001e-35 < a < 8.99999999999999911e-106 or 5.99999999999999975e-78 < a < 8.6000000000000001e36Initial program 85.4%
+-commutative85.4%
associate-*r/97.6%
fma-def97.7%
Simplified97.7%
Taylor expanded in a around 0 71.4%
+-commutative71.4%
*-commutative71.4%
associate-/l*85.3%
Simplified85.3%
Final simplification84.5%
(FPCore (x y z t a)
:precision binary64
(if (<= z -4.6e+198)
(+ y x)
(if (<= z -1.02e+107)
(+ x (/ (* y (- z t)) z))
(if (or (<= z -6.8e-21) (not (<= z 3.7e-135)))
(+ x (* y (/ z (- z a))))
(+ x (* y (/ t a)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4.6e+198) {
tmp = y + x;
} else if (z <= -1.02e+107) {
tmp = x + ((y * (z - t)) / z);
} else if ((z <= -6.8e-21) || !(z <= 3.7e-135)) {
tmp = x + (y * (z / (z - a)));
} else {
tmp = x + (y * (t / 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 <= (-4.6d+198)) then
tmp = y + x
else if (z <= (-1.02d+107)) then
tmp = x + ((y * (z - t)) / z)
else if ((z <= (-6.8d-21)) .or. (.not. (z <= 3.7d-135))) then
tmp = x + (y * (z / (z - a)))
else
tmp = x + (y * (t / 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 <= -4.6e+198) {
tmp = y + x;
} else if (z <= -1.02e+107) {
tmp = x + ((y * (z - t)) / z);
} else if ((z <= -6.8e-21) || !(z <= 3.7e-135)) {
tmp = x + (y * (z / (z - a)));
} else {
tmp = x + (y * (t / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -4.6e+198: tmp = y + x elif z <= -1.02e+107: tmp = x + ((y * (z - t)) / z) elif (z <= -6.8e-21) or not (z <= 3.7e-135): tmp = x + (y * (z / (z - a))) else: tmp = x + (y * (t / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -4.6e+198) tmp = Float64(y + x); elseif (z <= -1.02e+107) tmp = Float64(x + Float64(Float64(y * Float64(z - t)) / z)); elseif ((z <= -6.8e-21) || !(z <= 3.7e-135)) tmp = Float64(x + Float64(y * Float64(z / Float64(z - a)))); else tmp = Float64(x + Float64(y * Float64(t / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -4.6e+198) tmp = y + x; elseif (z <= -1.02e+107) tmp = x + ((y * (z - t)) / z); elseif ((z <= -6.8e-21) || ~((z <= 3.7e-135))) tmp = x + (y * (z / (z - a))); else tmp = x + (y * (t / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4.6e+198], N[(y + x), $MachinePrecision], If[LessEqual[z, -1.02e+107], N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -6.8e-21], N[Not[LessEqual[z, 3.7e-135]], $MachinePrecision]], N[(x + N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.6 \cdot 10^{+198}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;z \leq -1.02 \cdot 10^{+107}:\\
\;\;\;\;x + \frac{y \cdot \left(z - t\right)}{z}\\
\mathbf{elif}\;z \leq -6.8 \cdot 10^{-21} \lor \neg \left(z \leq 3.7 \cdot 10^{-135}\right):\\
\;\;\;\;x + y \cdot \frac{z}{z - a}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\end{array}
\end{array}
if z < -4.6000000000000001e198Initial program 44.9%
+-commutative44.9%
associate-*r/99.8%
fma-def99.8%
Simplified99.8%
Taylor expanded in z around inf 89.5%
if -4.6000000000000001e198 < z < -1.01999999999999994e107Initial program 95.2%
associate-*l/86.9%
Simplified86.9%
Taylor expanded in a around 0 91.1%
if -1.01999999999999994e107 < z < -6.8e-21 or 3.6999999999999997e-135 < z Initial program 83.6%
+-commutative83.6%
associate-*r/99.9%
fma-def99.9%
Simplified99.9%
fma-udef99.9%
Applied egg-rr99.9%
Taylor expanded in t around 0 82.6%
if -6.8e-21 < z < 3.6999999999999997e-135Initial program 92.2%
+-commutative92.2%
associate-*r/96.8%
fma-def96.8%
Simplified96.8%
fma-udef96.8%
Applied egg-rr96.8%
Taylor expanded in z around 0 78.6%
Final simplification82.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (/ z (- z a))))))
(if (<= z -1.05e+41)
(+ x (/ y (/ z (- z t))))
(if (<= z -4.3e-59)
t_1
(if (<= z -3.2e-75)
(+ x (/ (* y (- z t)) z))
(if (<= z 6.5e-135) (+ x (* y (/ t a))) 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.05e+41) {
tmp = x + (y / (z / (z - t)));
} else if (z <= -4.3e-59) {
tmp = t_1;
} else if (z <= -3.2e-75) {
tmp = x + ((y * (z - t)) / z);
} else if (z <= 6.5e-135) {
tmp = x + (y * (t / a));
} 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.05d+41)) then
tmp = x + (y / (z / (z - t)))
else if (z <= (-4.3d-59)) then
tmp = t_1
else if (z <= (-3.2d-75)) then
tmp = x + ((y * (z - t)) / z)
else if (z <= 6.5d-135) then
tmp = x + (y * (t / a))
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.05e+41) {
tmp = x + (y / (z / (z - t)));
} else if (z <= -4.3e-59) {
tmp = t_1;
} else if (z <= -3.2e-75) {
tmp = x + ((y * (z - t)) / z);
} else if (z <= 6.5e-135) {
tmp = x + (y * (t / a));
} 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.05e+41: tmp = x + (y / (z / (z - t))) elif z <= -4.3e-59: tmp = t_1 elif z <= -3.2e-75: tmp = x + ((y * (z - t)) / z) elif z <= 6.5e-135: tmp = x + (y * (t / a)) 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.05e+41) tmp = Float64(x + Float64(y / Float64(z / Float64(z - t)))); elseif (z <= -4.3e-59) tmp = t_1; elseif (z <= -3.2e-75) tmp = Float64(x + Float64(Float64(y * Float64(z - t)) / z)); elseif (z <= 6.5e-135) tmp = Float64(x + Float64(y * Float64(t / a))); 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.05e+41) tmp = x + (y / (z / (z - t))); elseif (z <= -4.3e-59) tmp = t_1; elseif (z <= -3.2e-75) tmp = x + ((y * (z - t)) / z); elseif (z <= 6.5e-135) tmp = x + (y * (t / a)); 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.05e+41], N[(x + N[(y / N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4.3e-59], t$95$1, If[LessEqual[z, -3.2e-75], N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.5e-135], N[(x + N[(y * N[(t / a), $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.05 \cdot 10^{+41}:\\
\;\;\;\;x + \frac{y}{\frac{z}{z - t}}\\
\mathbf{elif}\;z \leq -4.3 \cdot 10^{-59}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -3.2 \cdot 10^{-75}:\\
\;\;\;\;x + \frac{y \cdot \left(z - t\right)}{z}\\
\mathbf{elif}\;z \leq 6.5 \cdot 10^{-135}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -1.05e41Initial program 75.6%
+-commutative75.6%
associate-*r/99.9%
fma-def99.9%
Simplified99.9%
Taylor expanded in a around 0 68.6%
+-commutative68.6%
*-commutative68.6%
associate-/l*93.1%
Simplified93.1%
if -1.05e41 < z < -4.3000000000000003e-59 or 6.50000000000000056e-135 < z Initial program 83.7%
+-commutative83.7%
associate-*r/99.9%
fma-def99.9%
Simplified99.9%
fma-udef99.9%
Applied egg-rr99.9%
Taylor expanded in t around 0 82.8%
if -4.3000000000000003e-59 < z < -3.19999999999999977e-75Initial program 100.0%
associate-*l/99.7%
Simplified99.7%
Taylor expanded in a around 0 88.9%
if -3.19999999999999977e-75 < z < 6.50000000000000056e-135Initial program 91.7%
+-commutative91.7%
associate-*r/97.3%
fma-def97.3%
Simplified97.3%
fma-udef97.3%
Applied egg-rr97.3%
Taylor expanded in z around 0 79.9%
Final simplification84.3%
(FPCore (x y z t a)
:precision binary64
(if (<= z -2.35e+41)
(+ x (/ y (/ z (- z t))))
(if (<= z -7.2e-59)
(+ x (* y (/ z (- z a))))
(if (<= z -2.8e-88)
(+ x (/ (* y (- z t)) z))
(if (<= z 3.7e-135) (+ x (* y (/ t a))) (+ x (/ y (/ (- z a) z))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.35e+41) {
tmp = x + (y / (z / (z - t)));
} else if (z <= -7.2e-59) {
tmp = x + (y * (z / (z - a)));
} else if (z <= -2.8e-88) {
tmp = x + ((y * (z - t)) / z);
} else if (z <= 3.7e-135) {
tmp = x + (y * (t / a));
} else {
tmp = x + (y / ((z - 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 <= (-2.35d+41)) then
tmp = x + (y / (z / (z - t)))
else if (z <= (-7.2d-59)) then
tmp = x + (y * (z / (z - a)))
else if (z <= (-2.8d-88)) then
tmp = x + ((y * (z - t)) / z)
else if (z <= 3.7d-135) then
tmp = x + (y * (t / a))
else
tmp = x + (y / ((z - 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 <= -2.35e+41) {
tmp = x + (y / (z / (z - t)));
} else if (z <= -7.2e-59) {
tmp = x + (y * (z / (z - a)));
} else if (z <= -2.8e-88) {
tmp = x + ((y * (z - t)) / z);
} else if (z <= 3.7e-135) {
tmp = x + (y * (t / a));
} else {
tmp = x + (y / ((z - a) / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.35e+41: tmp = x + (y / (z / (z - t))) elif z <= -7.2e-59: tmp = x + (y * (z / (z - a))) elif z <= -2.8e-88: tmp = x + ((y * (z - t)) / z) elif z <= 3.7e-135: tmp = x + (y * (t / a)) else: tmp = x + (y / ((z - a) / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.35e+41) tmp = Float64(x + Float64(y / Float64(z / Float64(z - t)))); elseif (z <= -7.2e-59) tmp = Float64(x + Float64(y * Float64(z / Float64(z - a)))); elseif (z <= -2.8e-88) tmp = Float64(x + Float64(Float64(y * Float64(z - t)) / z)); elseif (z <= 3.7e-135) tmp = Float64(x + Float64(y * Float64(t / a))); else tmp = Float64(x + Float64(y / Float64(Float64(z - a) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.35e+41) tmp = x + (y / (z / (z - t))); elseif (z <= -7.2e-59) tmp = x + (y * (z / (z - a))); elseif (z <= -2.8e-88) tmp = x + ((y * (z - t)) / z); elseif (z <= 3.7e-135) tmp = x + (y * (t / a)); else tmp = x + (y / ((z - a) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.35e+41], N[(x + N[(y / N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -7.2e-59], N[(x + N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.8e-88], N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.7e-135], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(N[(z - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.35 \cdot 10^{+41}:\\
\;\;\;\;x + \frac{y}{\frac{z}{z - t}}\\
\mathbf{elif}\;z \leq -7.2 \cdot 10^{-59}:\\
\;\;\;\;x + y \cdot \frac{z}{z - a}\\
\mathbf{elif}\;z \leq -2.8 \cdot 10^{-88}:\\
\;\;\;\;x + \frac{y \cdot \left(z - t\right)}{z}\\
\mathbf{elif}\;z \leq 3.7 \cdot 10^{-135}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{z - a}{z}}\\
\end{array}
\end{array}
if z < -2.35e41Initial program 75.6%
+-commutative75.6%
associate-*r/99.9%
fma-def99.9%
Simplified99.9%
Taylor expanded in a around 0 68.6%
+-commutative68.6%
*-commutative68.6%
associate-/l*93.1%
Simplified93.1%
if -2.35e41 < z < -7.20000000000000001e-59Initial program 89.9%
+-commutative89.9%
associate-*r/99.9%
fma-def99.9%
Simplified99.9%
fma-udef99.9%
Applied egg-rr99.9%
Taylor expanded in t around 0 90.4%
if -7.20000000000000001e-59 < z < -2.79999999999999976e-88Initial program 100.0%
associate-*l/99.7%
Simplified99.7%
Taylor expanded in a around 0 88.9%
if -2.79999999999999976e-88 < z < 3.6999999999999997e-135Initial program 91.7%
+-commutative91.7%
associate-*r/97.3%
fma-def97.3%
Simplified97.3%
fma-udef97.3%
Applied egg-rr97.3%
Taylor expanded in z around 0 79.9%
if 3.6999999999999997e-135 < z Initial program 82.3%
+-commutative82.3%
associate-*r/99.9%
fma-def99.9%
Simplified99.9%
Taylor expanded in t around 0 67.4%
associate-/l*81.1%
Simplified81.1%
Final simplification84.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ y (/ z (- z t))))) (t_2 (+ x (* (/ y a) (- t z)))))
(if (<= a -1.65e-34)
t_2
(if (<= a 9e-106)
t_1
(if (<= a 5.4e-78)
t_2
(if (<= a 78000.0) t_1 (+ x (/ (- t z) (/ a y)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y / (z / (z - t)));
double t_2 = x + ((y / a) * (t - z));
double tmp;
if (a <= -1.65e-34) {
tmp = t_2;
} else if (a <= 9e-106) {
tmp = t_1;
} else if (a <= 5.4e-78) {
tmp = t_2;
} else if (a <= 78000.0) {
tmp = t_1;
} else {
tmp = x + ((t - z) / (a / 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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + (y / (z / (z - t)))
t_2 = x + ((y / a) * (t - z))
if (a <= (-1.65d-34)) then
tmp = t_2
else if (a <= 9d-106) then
tmp = t_1
else if (a <= 5.4d-78) then
tmp = t_2
else if (a <= 78000.0d0) then
tmp = t_1
else
tmp = x + ((t - z) / (a / y))
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 - t)));
double t_2 = x + ((y / a) * (t - z));
double tmp;
if (a <= -1.65e-34) {
tmp = t_2;
} else if (a <= 9e-106) {
tmp = t_1;
} else if (a <= 5.4e-78) {
tmp = t_2;
} else if (a <= 78000.0) {
tmp = t_1;
} else {
tmp = x + ((t - z) / (a / y));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y / (z / (z - t))) t_2 = x + ((y / a) * (t - z)) tmp = 0 if a <= -1.65e-34: tmp = t_2 elif a <= 9e-106: tmp = t_1 elif a <= 5.4e-78: tmp = t_2 elif a <= 78000.0: tmp = t_1 else: tmp = x + ((t - z) / (a / y)) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y / Float64(z / Float64(z - t)))) t_2 = Float64(x + Float64(Float64(y / a) * Float64(t - z))) tmp = 0.0 if (a <= -1.65e-34) tmp = t_2; elseif (a <= 9e-106) tmp = t_1; elseif (a <= 5.4e-78) tmp = t_2; elseif (a <= 78000.0) tmp = t_1; else tmp = Float64(x + Float64(Float64(t - z) / Float64(a / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y / (z / (z - t))); t_2 = x + ((y / a) * (t - z)); tmp = 0.0; if (a <= -1.65e-34) tmp = t_2; elseif (a <= 9e-106) tmp = t_1; elseif (a <= 5.4e-78) tmp = t_2; elseif (a <= 78000.0) tmp = t_1; else tmp = x + ((t - z) / (a / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y / N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.65e-34], t$95$2, If[LessEqual[a, 9e-106], t$95$1, If[LessEqual[a, 5.4e-78], t$95$2, If[LessEqual[a, 78000.0], t$95$1, N[(x + N[(N[(t - z), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y}{\frac{z}{z - t}}\\
t_2 := x + \frac{y}{a} \cdot \left(t - z\right)\\
\mathbf{if}\;a \leq -1.65 \cdot 10^{-34}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq 9 \cdot 10^{-106}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 5.4 \cdot 10^{-78}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq 78000:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t - z}{\frac{a}{y}}\\
\end{array}
\end{array}
if a < -1.64999999999999991e-34 or 8.99999999999999911e-106 < a < 5.39999999999999987e-78Initial program 85.5%
+-commutative85.5%
associate-*r/99.5%
fma-def99.5%
Simplified99.5%
Taylor expanded in a around inf 77.1%
+-commutative77.1%
*-commutative77.1%
mul-1-neg77.1%
unsub-neg77.1%
*-commutative77.1%
associate-/l*83.1%
Simplified83.1%
Taylor expanded in z around 0 77.1%
*-commutative77.1%
associate-*r/78.4%
mul-1-neg78.4%
sub-neg78.4%
*-commutative78.4%
associate-*r/83.1%
distribute-rgt-out--83.1%
Simplified83.1%
if -1.64999999999999991e-34 < a < 8.99999999999999911e-106 or 5.39999999999999987e-78 < a < 78000Initial program 84.6%
+-commutative84.6%
associate-*r/97.5%
fma-def97.5%
Simplified97.5%
Taylor expanded in a around 0 71.6%
+-commutative71.6%
*-commutative71.6%
associate-/l*86.2%
Simplified86.2%
if 78000 < a Initial program 85.4%
+-commutative85.4%
associate-*r/99.8%
fma-def99.9%
Simplified99.9%
Taylor expanded in a around inf 76.3%
+-commutative76.3%
*-commutative76.3%
mul-1-neg76.3%
unsub-neg76.3%
*-commutative76.3%
associate-/l*82.8%
Simplified82.8%
Final simplification84.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -7.5e-38) (not (<= a 9e-106))) (+ x (* y (/ t a))) (+ x (/ (* y (- z t)) z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -7.5e-38) || !(a <= 9e-106)) {
tmp = x + (y * (t / a));
} else {
tmp = x + ((y * (z - 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 <= (-7.5d-38)) .or. (.not. (a <= 9d-106))) then
tmp = x + (y * (t / a))
else
tmp = x + ((y * (z - 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 <= -7.5e-38) || !(a <= 9e-106)) {
tmp = x + (y * (t / a));
} else {
tmp = x + ((y * (z - t)) / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -7.5e-38) or not (a <= 9e-106): tmp = x + (y * (t / a)) else: tmp = x + ((y * (z - t)) / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -7.5e-38) || !(a <= 9e-106)) tmp = Float64(x + Float64(y * Float64(t / a))); else tmp = Float64(x + Float64(Float64(y * Float64(z - t)) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -7.5e-38) || ~((a <= 9e-106))) tmp = x + (y * (t / a)); else tmp = x + ((y * (z - t)) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -7.5e-38], N[Not[LessEqual[a, 9e-106]], $MachinePrecision]], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -7.5 \cdot 10^{-38} \lor \neg \left(a \leq 9 \cdot 10^{-106}\right):\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot \left(z - t\right)}{z}\\
\end{array}
\end{array}
if a < -7.5e-38 or 8.99999999999999911e-106 < a Initial program 85.2%
+-commutative85.2%
associate-*r/99.7%
fma-def99.7%
Simplified99.7%
fma-udef99.7%
Applied egg-rr99.7%
Taylor expanded in z around 0 77.1%
if -7.5e-38 < a < 8.99999999999999911e-106Initial program 84.8%
associate-*l/89.7%
Simplified89.7%
Taylor expanded in a around 0 72.5%
Final simplification75.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.12e+142) (not (<= t 1.6e-38))) (- x (/ (* y t) (- z a))) (+ x (/ y (/ (- z a) z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.12e+142) || !(t <= 1.6e-38)) {
tmp = x - ((y * t) / (z - a));
} else {
tmp = x + (y / ((z - 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 ((t <= (-1.12d+142)) .or. (.not. (t <= 1.6d-38))) then
tmp = x - ((y * t) / (z - a))
else
tmp = x + (y / ((z - 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 ((t <= -1.12e+142) || !(t <= 1.6e-38)) {
tmp = x - ((y * t) / (z - a));
} else {
tmp = x + (y / ((z - a) / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.12e+142) or not (t <= 1.6e-38): tmp = x - ((y * t) / (z - a)) else: tmp = x + (y / ((z - a) / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.12e+142) || !(t <= 1.6e-38)) tmp = Float64(x - Float64(Float64(y * t) / Float64(z - a))); else tmp = Float64(x + Float64(y / Float64(Float64(z - a) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -1.12e+142) || ~((t <= 1.6e-38))) tmp = x - ((y * t) / (z - a)); else tmp = x + (y / ((z - a) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.12e+142], N[Not[LessEqual[t, 1.6e-38]], $MachinePrecision]], N[(x - N[(N[(y * t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(N[(z - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.12 \cdot 10^{+142} \lor \neg \left(t \leq 1.6 \cdot 10^{-38}\right):\\
\;\;\;\;x - \frac{y \cdot t}{z - a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{z - a}{z}}\\
\end{array}
\end{array}
if t < -1.11999999999999996e142 or 1.59999999999999989e-38 < t Initial program 80.6%
associate-*l/94.8%
Simplified94.8%
Taylor expanded in t around inf 81.5%
associate-*r/81.5%
mul-1-neg81.5%
distribute-rgt-neg-out81.5%
Simplified81.5%
if -1.11999999999999996e142 < t < 1.59999999999999989e-38Initial program 87.9%
+-commutative87.9%
associate-*r/99.7%
fma-def99.7%
Simplified99.7%
Taylor expanded in t around 0 77.3%
associate-/l*87.5%
Simplified87.5%
Final simplification85.2%
(FPCore (x y z t a) :precision binary64 (if (<= z 8.6e+129) (+ x (* (- z t) (/ y (- z a)))) (+ x (/ y (/ z (- z t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= 8.6e+129) {
tmp = x + ((z - t) * (y / (z - a)));
} else {
tmp = x + (y / (z / (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 <= 8.6d+129) then
tmp = x + ((z - t) * (y / (z - a)))
else
tmp = x + (y / (z / (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 <= 8.6e+129) {
tmp = x + ((z - t) * (y / (z - a)));
} else {
tmp = x + (y / (z / (z - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= 8.6e+129: tmp = x + ((z - t) * (y / (z - a))) else: tmp = x + (y / (z / (z - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= 8.6e+129) tmp = Float64(x + Float64(Float64(z - t) * Float64(y / Float64(z - a)))); else tmp = Float64(x + Float64(y / Float64(z / Float64(z - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= 8.6e+129) tmp = x + ((z - t) * (y / (z - a))); else tmp = x + (y / (z / (z - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, 8.6e+129], N[(x + N[(N[(z - t), $MachinePrecision] * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq 8.6 \cdot 10^{+129}:\\
\;\;\;\;x + \left(z - t\right) \cdot \frac{y}{z - a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{z}{z - t}}\\
\end{array}
\end{array}
if z < 8.60000000000000042e129Initial program 89.0%
associate-*l/94.7%
Simplified94.7%
if 8.60000000000000042e129 < z Initial program 62.7%
+-commutative62.7%
associate-*r/99.9%
fma-def99.9%
Simplified99.9%
Taylor expanded in a around 0 59.5%
+-commutative59.5%
*-commutative59.5%
associate-/l*94.2%
Simplified94.2%
Final simplification94.6%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.06e-19) (+ y x) (if (<= z 2e+41) (+ x (* y (/ t a))) (+ y x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.06e-19) {
tmp = y + x;
} else if (z <= 2e+41) {
tmp = x + (y * (t / a));
} else {
tmp = y + 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 (z <= (-1.06d-19)) then
tmp = y + x
else if (z <= 2d+41) then
tmp = x + (y * (t / a))
else
tmp = y + x
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.06e-19) {
tmp = y + x;
} else if (z <= 2e+41) {
tmp = x + (y * (t / a));
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.06e-19: tmp = y + x elif z <= 2e+41: tmp = x + (y * (t / a)) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.06e-19) tmp = Float64(y + x); elseif (z <= 2e+41) tmp = Float64(x + Float64(y * Float64(t / a))); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.06e-19) tmp = y + x; elseif (z <= 2e+41) tmp = x + (y * (t / a)); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.06e-19], N[(y + x), $MachinePrecision], If[LessEqual[z, 2e+41], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.06 \cdot 10^{-19}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;z \leq 2 \cdot 10^{+41}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if z < -1.06e-19 or 2.00000000000000001e41 < z Initial program 77.1%
+-commutative77.1%
associate-*r/99.9%
fma-def99.9%
Simplified99.9%
Taylor expanded in z around inf 74.5%
if -1.06e-19 < z < 2.00000000000000001e41Initial program 93.2%
+-commutative93.2%
associate-*r/97.4%
fma-def97.5%
Simplified97.5%
fma-udef97.4%
Applied egg-rr97.4%
Taylor expanded in z around 0 74.4%
Final simplification74.4%
(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}
Initial program 85.1%
associate-/l*98.5%
Simplified98.5%
Final simplification98.5%
(FPCore (x y z t a) :precision binary64 (- x (* y (/ (- t z) (- z a)))))
double code(double x, double y, double z, double t, double a) {
return x - (y * ((t - z) / (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 * ((t - z) / (z - a)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x - (y * ((t - z) / (z - a)));
}
def code(x, y, z, t, a): return x - (y * ((t - z) / (z - a)))
function code(x, y, z, t, a) return Float64(x - Float64(y * Float64(Float64(t - z) / Float64(z - a)))) end
function tmp = code(x, y, z, t, a) tmp = x - (y * ((t - z) / (z - a))); end
code[x_, y_, z_, t_, a_] := N[(x - N[(y * N[(N[(t - z), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - y \cdot \frac{t - z}{z - a}
\end{array}
Initial program 85.1%
+-commutative85.1%
associate-*r/98.7%
fma-def98.7%
Simplified98.7%
fma-udef98.7%
Applied egg-rr98.7%
Final simplification98.7%
(FPCore (x y z t a) :precision binary64 (if (<= a -4.4e-84) x (if (<= a 1.65e+189) (+ y x) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -4.4e-84) {
tmp = x;
} else if (a <= 1.65e+189) {
tmp = y + x;
} 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 <= (-4.4d-84)) then
tmp = x
else if (a <= 1.65d+189) then
tmp = y + x
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 <= -4.4e-84) {
tmp = x;
} else if (a <= 1.65e+189) {
tmp = y + x;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -4.4e-84: tmp = x elif a <= 1.65e+189: tmp = y + x else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -4.4e-84) tmp = x; elseif (a <= 1.65e+189) tmp = Float64(y + x); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -4.4e-84) tmp = x; elseif (a <= 1.65e+189) tmp = y + x; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -4.4e-84], x, If[LessEqual[a, 1.65e+189], N[(y + x), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.4 \cdot 10^{-84}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 1.65 \cdot 10^{+189}:\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -4.3999999999999998e-84 or 1.6500000000000001e189 < a Initial program 84.5%
+-commutative84.5%
associate-*r/99.6%
fma-def99.6%
Simplified99.6%
Taylor expanded in y around 0 63.5%
if -4.3999999999999998e-84 < a < 1.6500000000000001e189Initial program 85.4%
+-commutative85.4%
associate-*r/98.1%
fma-def98.1%
Simplified98.1%
Taylor expanded in z around inf 59.0%
Final simplification60.7%
(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 85.1%
+-commutative85.1%
associate-*r/98.7%
fma-def98.7%
Simplified98.7%
Taylor expanded in y around 0 48.1%
Final simplification48.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 2023181
(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))))