
(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 13 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 91.5%
+-commutative91.5%
associate-/l*99.0%
fma-define99.0%
Simplified99.0%
Final simplification99.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* y (- z t)) (- z a))))
(if (<= t_1 -4e+306)
(* (- z t) (/ y (- z a)))
(if (<= t_1 5e+292) (+ x t_1) (/ (- z t) (/ (- z a) y))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y * (z - t)) / (z - a);
double tmp;
if (t_1 <= -4e+306) {
tmp = (z - t) * (y / (z - a));
} else if (t_1 <= 5e+292) {
tmp = x + t_1;
} else {
tmp = (z - 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) :: tmp
t_1 = (y * (z - t)) / (z - a)
if (t_1 <= (-4d+306)) then
tmp = (z - t) * (y / (z - a))
else if (t_1 <= 5d+292) then
tmp = x + t_1
else
tmp = (z - 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 = (y * (z - t)) / (z - a);
double tmp;
if (t_1 <= -4e+306) {
tmp = (z - t) * (y / (z - a));
} else if (t_1 <= 5e+292) {
tmp = x + t_1;
} else {
tmp = (z - t) / ((z - a) / y);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y * (z - t)) / (z - a) tmp = 0 if t_1 <= -4e+306: tmp = (z - t) * (y / (z - a)) elif t_1 <= 5e+292: tmp = x + t_1 else: tmp = (z - t) / ((z - a) / y) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y * Float64(z - t)) / Float64(z - a)) tmp = 0.0 if (t_1 <= -4e+306) tmp = Float64(Float64(z - t) * Float64(y / Float64(z - a))); elseif (t_1 <= 5e+292) tmp = Float64(x + t_1); else tmp = Float64(Float64(z - t) / Float64(Float64(z - a) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y * (z - t)) / (z - a); tmp = 0.0; if (t_1 <= -4e+306) tmp = (z - t) * (y / (z - a)); elseif (t_1 <= 5e+292) tmp = x + t_1; else tmp = (z - t) / ((z - a) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -4e+306], N[(N[(z - t), $MachinePrecision] * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+292], N[(x + t$95$1), $MachinePrecision], N[(N[(z - t), $MachinePrecision] / N[(N[(z - a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot \left(z - t\right)}{z - a}\\
\mathbf{if}\;t\_1 \leq -4 \cdot 10^{+306}:\\
\;\;\;\;\left(z - t\right) \cdot \frac{y}{z - a}\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+292}:\\
\;\;\;\;x + t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{z - t}{\frac{z - a}{y}}\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < -4.00000000000000007e306Initial program 64.2%
+-commutative64.2%
associate-/l*99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in y around inf 95.6%
div-sub95.6%
associate-*r/64.2%
associate-*l/95.7%
Simplified95.7%
if -4.00000000000000007e306 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < 4.9999999999999996e292Initial program 99.5%
if 4.9999999999999996e292 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) Initial program 51.1%
+-commutative51.1%
associate-/l*100.0%
fma-define100.0%
Simplified100.0%
Taylor expanded in y around inf 78.9%
div-sub78.9%
associate-*r/51.1%
associate-*l/78.7%
Simplified78.7%
*-commutative78.7%
clear-num78.8%
un-div-inv78.9%
Applied egg-rr78.9%
Final simplification97.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (/ z (- z a))))))
(if (<= z -9e+17)
t_1
(if (<= z 6e-125)
(+ x (* y (/ t a)))
(if (<= z 1.85e-103)
(* (- z t) (/ y (- z a)))
(if (<= z 6000000000.0) (+ 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 <= -9e+17) {
tmp = t_1;
} else if (z <= 6e-125) {
tmp = x + (y * (t / a));
} else if (z <= 1.85e-103) {
tmp = (z - t) * (y / (z - a));
} else if (z <= 6000000000.0) {
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 <= (-9d+17)) then
tmp = t_1
else if (z <= 6d-125) then
tmp = x + (y * (t / a))
else if (z <= 1.85d-103) then
tmp = (z - t) * (y / (z - a))
else if (z <= 6000000000.0d0) 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 <= -9e+17) {
tmp = t_1;
} else if (z <= 6e-125) {
tmp = x + (y * (t / a));
} else if (z <= 1.85e-103) {
tmp = (z - t) * (y / (z - a));
} else if (z <= 6000000000.0) {
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 <= -9e+17: tmp = t_1 elif z <= 6e-125: tmp = x + (y * (t / a)) elif z <= 1.85e-103: tmp = (z - t) * (y / (z - a)) elif z <= 6000000000.0: 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 <= -9e+17) tmp = t_1; elseif (z <= 6e-125) tmp = Float64(x + Float64(y * Float64(t / a))); elseif (z <= 1.85e-103) tmp = Float64(Float64(z - t) * Float64(y / Float64(z - a))); elseif (z <= 6000000000.0) tmp = Float64(x + Float64(Float64(y * 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 <= -9e+17) tmp = t_1; elseif (z <= 6e-125) tmp = x + (y * (t / a)); elseif (z <= 1.85e-103) tmp = (z - t) * (y / (z - a)); elseif (z <= 6000000000.0) 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, -9e+17], t$95$1, If[LessEqual[z, 6e-125], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.85e-103], N[(N[(z - t), $MachinePrecision] * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6000000000.0], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z}{z - a}\\
\mathbf{if}\;z \leq -9 \cdot 10^{+17}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 6 \cdot 10^{-125}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{elif}\;z \leq 1.85 \cdot 10^{-103}:\\
\;\;\;\;\left(z - t\right) \cdot \frac{y}{z - a}\\
\mathbf{elif}\;z \leq 6000000000:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -9e17 or 6e9 < z Initial program 83.5%
Taylor expanded in t around 0 76.9%
associate-/l*87.4%
Simplified87.4%
if -9e17 < z < 5.99999999999999981e-125Initial program 96.7%
Taylor expanded in z around 0 84.7%
*-commutative84.7%
associate-/l*85.5%
Applied egg-rr85.5%
if 5.99999999999999981e-125 < z < 1.85e-103Initial program 99.5%
+-commutative99.5%
associate-/l*99.5%
fma-define99.5%
Simplified99.5%
Taylor expanded in y around inf 95.6%
div-sub95.6%
associate-*r/95.3%
associate-*l/95.6%
Simplified95.6%
if 1.85e-103 < z < 6e9Initial program 99.9%
Taylor expanded in z around 0 79.7%
Final simplification86.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ y (- 1.0 (/ a z))))))
(if (<= z -13000000.0)
t_1
(if (<= z 7.2e-125)
(+ x (* y (/ t a)))
(if (<= z 1.92e-103)
(* (- z t) (/ y (- z a)))
(if (<= z 5600000000.0) (+ x (/ (* y t) a)) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y / (1.0 - (a / z)));
double tmp;
if (z <= -13000000.0) {
tmp = t_1;
} else if (z <= 7.2e-125) {
tmp = x + (y * (t / a));
} else if (z <= 1.92e-103) {
tmp = (z - t) * (y / (z - a));
} else if (z <= 5600000000.0) {
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 / (1.0d0 - (a / z)))
if (z <= (-13000000.0d0)) then
tmp = t_1
else if (z <= 7.2d-125) then
tmp = x + (y * (t / a))
else if (z <= 1.92d-103) then
tmp = (z - t) * (y / (z - a))
else if (z <= 5600000000.0d0) 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 / (1.0 - (a / z)));
double tmp;
if (z <= -13000000.0) {
tmp = t_1;
} else if (z <= 7.2e-125) {
tmp = x + (y * (t / a));
} else if (z <= 1.92e-103) {
tmp = (z - t) * (y / (z - a));
} else if (z <= 5600000000.0) {
tmp = x + ((y * t) / a);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y / (1.0 - (a / z))) tmp = 0 if z <= -13000000.0: tmp = t_1 elif z <= 7.2e-125: tmp = x + (y * (t / a)) elif z <= 1.92e-103: tmp = (z - t) * (y / (z - a)) elif z <= 5600000000.0: 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(1.0 - Float64(a / z)))) tmp = 0.0 if (z <= -13000000.0) tmp = t_1; elseif (z <= 7.2e-125) tmp = Float64(x + Float64(y * Float64(t / a))); elseif (z <= 1.92e-103) tmp = Float64(Float64(z - t) * Float64(y / Float64(z - a))); elseif (z <= 5600000000.0) tmp = Float64(x + Float64(Float64(y * t) / a)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y / (1.0 - (a / z))); tmp = 0.0; if (z <= -13000000.0) tmp = t_1; elseif (z <= 7.2e-125) tmp = x + (y * (t / a)); elseif (z <= 1.92e-103) tmp = (z - t) * (y / (z - a)); elseif (z <= 5600000000.0) 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[(1.0 - N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -13000000.0], t$95$1, If[LessEqual[z, 7.2e-125], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.92e-103], N[(N[(z - t), $MachinePrecision] * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5600000000.0], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y}{1 - \frac{a}{z}}\\
\mathbf{if}\;z \leq -13000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 7.2 \cdot 10^{-125}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{elif}\;z \leq 1.92 \cdot 10^{-103}:\\
\;\;\;\;\left(z - t\right) \cdot \frac{y}{z - a}\\
\mathbf{elif}\;z \leq 5600000000:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.3e7 or 5.6e9 < z Initial program 83.5%
clear-num83.5%
inv-pow83.5%
Applied egg-rr83.5%
unpow-183.5%
*-commutative83.5%
associate-/r*99.8%
Simplified99.8%
div-sub99.8%
Applied egg-rr99.8%
Taylor expanded in t around 0 87.5%
if -1.3e7 < z < 7.2000000000000004e-125Initial program 96.7%
Taylor expanded in z around 0 84.7%
*-commutative84.7%
associate-/l*85.5%
Applied egg-rr85.5%
if 7.2000000000000004e-125 < z < 1.9200000000000001e-103Initial program 99.5%
+-commutative99.5%
associate-/l*99.5%
fma-define99.5%
Simplified99.5%
Taylor expanded in y around inf 95.6%
div-sub95.6%
associate-*r/95.3%
associate-*l/95.6%
Simplified95.6%
if 1.9200000000000001e-103 < z < 5.6e9Initial program 99.9%
Taylor expanded in z around 0 79.7%
Final simplification86.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ y (- 1.0 (/ a z))))))
(if (<= z -3200000000000.0)
t_1
(if (<= z 4.35e-147)
(+ x (* y (/ t a)))
(if (<= z 2.1e-84)
(+ x (/ (* y (- z t)) z))
(if (<= z 5600000000.0) (+ x (/ (* y t) a)) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y / (1.0 - (a / z)));
double tmp;
if (z <= -3200000000000.0) {
tmp = t_1;
} else if (z <= 4.35e-147) {
tmp = x + (y * (t / a));
} else if (z <= 2.1e-84) {
tmp = x + ((y * (z - t)) / z);
} else if (z <= 5600000000.0) {
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 / (1.0d0 - (a / z)))
if (z <= (-3200000000000.0d0)) then
tmp = t_1
else if (z <= 4.35d-147) then
tmp = x + (y * (t / a))
else if (z <= 2.1d-84) then
tmp = x + ((y * (z - t)) / z)
else if (z <= 5600000000.0d0) 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 / (1.0 - (a / z)));
double tmp;
if (z <= -3200000000000.0) {
tmp = t_1;
} else if (z <= 4.35e-147) {
tmp = x + (y * (t / a));
} else if (z <= 2.1e-84) {
tmp = x + ((y * (z - t)) / z);
} else if (z <= 5600000000.0) {
tmp = x + ((y * t) / a);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y / (1.0 - (a / z))) tmp = 0 if z <= -3200000000000.0: tmp = t_1 elif z <= 4.35e-147: tmp = x + (y * (t / a)) elif z <= 2.1e-84: tmp = x + ((y * (z - t)) / z) elif z <= 5600000000.0: 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(1.0 - Float64(a / z)))) tmp = 0.0 if (z <= -3200000000000.0) tmp = t_1; elseif (z <= 4.35e-147) tmp = Float64(x + Float64(y * Float64(t / a))); elseif (z <= 2.1e-84) tmp = Float64(x + Float64(Float64(y * Float64(z - t)) / z)); elseif (z <= 5600000000.0) tmp = Float64(x + Float64(Float64(y * t) / a)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y / (1.0 - (a / z))); tmp = 0.0; if (z <= -3200000000000.0) tmp = t_1; elseif (z <= 4.35e-147) tmp = x + (y * (t / a)); elseif (z <= 2.1e-84) tmp = x + ((y * (z - t)) / z); elseif (z <= 5600000000.0) 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[(1.0 - N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3200000000000.0], t$95$1, If[LessEqual[z, 4.35e-147], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.1e-84], N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5600000000.0], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y}{1 - \frac{a}{z}}\\
\mathbf{if}\;z \leq -3200000000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 4.35 \cdot 10^{-147}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{-84}:\\
\;\;\;\;x + \frac{y \cdot \left(z - t\right)}{z}\\
\mathbf{elif}\;z \leq 5600000000:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.2e12 or 5.6e9 < z Initial program 83.5%
clear-num83.5%
inv-pow83.5%
Applied egg-rr83.5%
unpow-183.5%
*-commutative83.5%
associate-/r*99.8%
Simplified99.8%
div-sub99.8%
Applied egg-rr99.8%
Taylor expanded in t around 0 87.5%
if -3.2e12 < z < 4.3500000000000002e-147Initial program 96.5%
Taylor expanded in z around 0 84.7%
*-commutative84.7%
associate-/l*85.5%
Applied egg-rr85.5%
if 4.3500000000000002e-147 < z < 2.09999999999999998e-84Initial program 99.8%
Taylor expanded in a around 0 80.2%
if 2.09999999999999998e-84 < z < 5.6e9Initial program 99.8%
Taylor expanded in z around 0 88.9%
Final simplification86.2%
(FPCore (x y z t a)
:precision binary64
(if (<= z -5.4e+28)
(+ y x)
(if (<= z 4.8e-125)
(+ x (* y (/ t a)))
(if (<= z 4e-103)
(* (- z t) (/ y (- z a)))
(if (<= z 9.5e+75) (+ x (/ (* y t) a)) (+ y x))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5.4e+28) {
tmp = y + x;
} else if (z <= 4.8e-125) {
tmp = x + (y * (t / a));
} else if (z <= 4e-103) {
tmp = (z - t) * (y / (z - a));
} else if (z <= 9.5e+75) {
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 <= (-5.4d+28)) then
tmp = y + x
else if (z <= 4.8d-125) then
tmp = x + (y * (t / a))
else if (z <= 4d-103) then
tmp = (z - t) * (y / (z - a))
else if (z <= 9.5d+75) 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 <= -5.4e+28) {
tmp = y + x;
} else if (z <= 4.8e-125) {
tmp = x + (y * (t / a));
} else if (z <= 4e-103) {
tmp = (z - t) * (y / (z - a));
} else if (z <= 9.5e+75) {
tmp = x + ((y * t) / a);
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -5.4e+28: tmp = y + x elif z <= 4.8e-125: tmp = x + (y * (t / a)) elif z <= 4e-103: tmp = (z - t) * (y / (z - a)) elif z <= 9.5e+75: tmp = x + ((y * t) / a) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -5.4e+28) tmp = Float64(y + x); elseif (z <= 4.8e-125) tmp = Float64(x + Float64(y * Float64(t / a))); elseif (z <= 4e-103) tmp = Float64(Float64(z - t) * Float64(y / Float64(z - a))); elseif (z <= 9.5e+75) tmp = Float64(x + Float64(Float64(y * 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 <= -5.4e+28) tmp = y + x; elseif (z <= 4.8e-125) tmp = x + (y * (t / a)); elseif (z <= 4e-103) tmp = (z - t) * (y / (z - a)); elseif (z <= 9.5e+75) tmp = x + ((y * t) / a); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -5.4e+28], N[(y + x), $MachinePrecision], If[LessEqual[z, 4.8e-125], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4e-103], N[(N[(z - t), $MachinePrecision] * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.5e+75], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.4 \cdot 10^{+28}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;z \leq 4.8 \cdot 10^{-125}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{elif}\;z \leq 4 \cdot 10^{-103}:\\
\;\;\;\;\left(z - t\right) \cdot \frac{y}{z - a}\\
\mathbf{elif}\;z \leq 9.5 \cdot 10^{+75}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if z < -5.4000000000000003e28 or 9.50000000000000061e75 < z Initial program 81.9%
+-commutative81.9%
associate-/l*99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in z around inf 77.5%
+-commutative77.5%
Simplified77.5%
if -5.4000000000000003e28 < z < 4.8000000000000003e-125Initial program 96.7%
Taylor expanded in z around 0 84.7%
*-commutative84.7%
associate-/l*85.5%
Applied egg-rr85.5%
if 4.8000000000000003e-125 < z < 3.99999999999999983e-103Initial program 99.5%
+-commutative99.5%
associate-/l*99.5%
fma-define99.5%
Simplified99.5%
Taylor expanded in y around inf 95.6%
div-sub95.6%
associate-*r/95.3%
associate-*l/95.6%
Simplified95.6%
if 3.99999999999999983e-103 < z < 9.50000000000000061e75Initial program 99.9%
Taylor expanded in z around 0 71.9%
Final simplification80.8%
(FPCore (x y z t a)
:precision binary64
(if (<= a -3.95e-28)
(+ x (* y (/ t a)))
(if (<= a 245.0)
(- x (* y (/ (- t z) z)))
(if (<= a 5e+185)
(+ x (/ y (- 1.0 (/ a z))))
(if (<= a 9.6e+264) (+ x (* t (/ y a))) (- x (/ (* y z) a)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.95e-28) {
tmp = x + (y * (t / a));
} else if (a <= 245.0) {
tmp = x - (y * ((t - z) / z));
} else if (a <= 5e+185) {
tmp = x + (y / (1.0 - (a / z)));
} else if (a <= 9.6e+264) {
tmp = x + (t * (y / a));
} else {
tmp = x - ((y * 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 (a <= (-3.95d-28)) then
tmp = x + (y * (t / a))
else if (a <= 245.0d0) then
tmp = x - (y * ((t - z) / z))
else if (a <= 5d+185) then
tmp = x + (y / (1.0d0 - (a / z)))
else if (a <= 9.6d+264) then
tmp = x + (t * (y / a))
else
tmp = x - ((y * 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 (a <= -3.95e-28) {
tmp = x + (y * (t / a));
} else if (a <= 245.0) {
tmp = x - (y * ((t - z) / z));
} else if (a <= 5e+185) {
tmp = x + (y / (1.0 - (a / z)));
} else if (a <= 9.6e+264) {
tmp = x + (t * (y / a));
} else {
tmp = x - ((y * z) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -3.95e-28: tmp = x + (y * (t / a)) elif a <= 245.0: tmp = x - (y * ((t - z) / z)) elif a <= 5e+185: tmp = x + (y / (1.0 - (a / z))) elif a <= 9.6e+264: tmp = x + (t * (y / a)) else: tmp = x - ((y * z) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -3.95e-28) tmp = Float64(x + Float64(y * Float64(t / a))); elseif (a <= 245.0) tmp = Float64(x - Float64(y * Float64(Float64(t - z) / z))); elseif (a <= 5e+185) tmp = Float64(x + Float64(y / Float64(1.0 - Float64(a / z)))); elseif (a <= 9.6e+264) tmp = Float64(x + Float64(t * Float64(y / a))); else tmp = Float64(x - Float64(Float64(y * z) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -3.95e-28) tmp = x + (y * (t / a)); elseif (a <= 245.0) tmp = x - (y * ((t - z) / z)); elseif (a <= 5e+185) tmp = x + (y / (1.0 - (a / z))); elseif (a <= 9.6e+264) tmp = x + (t * (y / a)); else tmp = x - ((y * z) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3.95e-28], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 245.0], N[(x - N[(y * N[(N[(t - z), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 5e+185], N[(x + N[(y / N[(1.0 - N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 9.6e+264], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.95 \cdot 10^{-28}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{elif}\;a \leq 245:\\
\;\;\;\;x - y \cdot \frac{t - z}{z}\\
\mathbf{elif}\;a \leq 5 \cdot 10^{+185}:\\
\;\;\;\;x + \frac{y}{1 - \frac{a}{z}}\\
\mathbf{elif}\;a \leq 9.6 \cdot 10^{+264}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y \cdot z}{a}\\
\end{array}
\end{array}
if a < -3.9499999999999999e-28Initial program 89.6%
Taylor expanded in z around 0 87.0%
*-commutative87.0%
associate-/l*92.1%
Applied egg-rr92.1%
if -3.9499999999999999e-28 < a < 245Initial program 92.3%
+-commutative92.3%
associate-/l*98.4%
fma-define98.4%
Simplified98.4%
Taylor expanded in a around 0 77.7%
+-commutative77.7%
associate-/l*85.1%
Simplified85.1%
if 245 < a < 4.9999999999999999e185Initial program 90.0%
clear-num89.9%
inv-pow89.9%
Applied egg-rr89.9%
unpow-189.9%
*-commutative89.9%
associate-/r*99.9%
Simplified99.9%
div-sub99.9%
Applied egg-rr99.9%
Taylor expanded in t around 0 86.9%
if 4.9999999999999999e185 < a < 9.59999999999999971e264Initial program 99.9%
+-commutative99.9%
associate-/l*97.3%
fma-define97.3%
Simplified97.3%
Taylor expanded in z around 0 99.9%
+-commutative99.9%
associate-/l*100.0%
Simplified100.0%
if 9.59999999999999971e264 < a Initial program 87.3%
Taylor expanded in t around 0 89.8%
associate-/l*89.8%
Simplified89.8%
Taylor expanded in z around 0 89.8%
mul-1-neg89.8%
unsub-neg89.8%
Simplified89.8%
Final simplification88.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -4e-28) (not (<= a 1.1e+31))) (+ x (* y (/ (- t z) a))) (- x (* y (/ (- t z) z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -4e-28) || !(a <= 1.1e+31)) {
tmp = x + (y * ((t - z) / a));
} else {
tmp = x - (y * ((t - z) / 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 <= (-4d-28)) .or. (.not. (a <= 1.1d+31))) then
tmp = x + (y * ((t - z) / a))
else
tmp = x - (y * ((t - z) / 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 <= -4e-28) || !(a <= 1.1e+31)) {
tmp = x + (y * ((t - z) / a));
} else {
tmp = x - (y * ((t - z) / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -4e-28) or not (a <= 1.1e+31): tmp = x + (y * ((t - z) / a)) else: tmp = x - (y * ((t - z) / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -4e-28) || !(a <= 1.1e+31)) tmp = Float64(x + Float64(y * Float64(Float64(t - z) / a))); else tmp = Float64(x - Float64(y * Float64(Float64(t - z) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -4e-28) || ~((a <= 1.1e+31))) tmp = x + (y * ((t - z) / a)); else tmp = x - (y * ((t - z) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -4e-28], N[Not[LessEqual[a, 1.1e+31]], $MachinePrecision]], N[(x + N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(y * N[(N[(t - z), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4 \cdot 10^{-28} \lor \neg \left(a \leq 1.1 \cdot 10^{+31}\right):\\
\;\;\;\;x + y \cdot \frac{t - z}{a}\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot \frac{t - z}{z}\\
\end{array}
\end{array}
if a < -3.99999999999999988e-28 or 1.10000000000000005e31 < a Initial program 90.1%
+-commutative90.1%
associate-/l*99.6%
fma-define99.6%
Simplified99.6%
Taylor expanded in a around inf 86.4%
mul-1-neg86.4%
unsub-neg86.4%
associate-/l*91.4%
Simplified91.4%
if -3.99999999999999988e-28 < a < 1.10000000000000005e31Initial program 92.8%
+-commutative92.8%
associate-/l*98.5%
fma-define98.5%
Simplified98.5%
Taylor expanded in a around 0 78.4%
+-commutative78.4%
associate-/l*85.3%
Simplified85.3%
Final simplification88.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -8.8e+18) (not (<= z 9.5e+75))) (+ y x) (+ x (* y (/ t a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -8.8e+18) || !(z <= 9.5e+75)) {
tmp = y + x;
} 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 <= (-8.8d+18)) .or. (.not. (z <= 9.5d+75))) then
tmp = y + x
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 <= -8.8e+18) || !(z <= 9.5e+75)) {
tmp = y + x;
} else {
tmp = x + (y * (t / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -8.8e+18) or not (z <= 9.5e+75): tmp = y + x else: tmp = x + (y * (t / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -8.8e+18) || !(z <= 9.5e+75)) tmp = Float64(y + x); 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 <= -8.8e+18) || ~((z <= 9.5e+75))) tmp = y + x; else tmp = x + (y * (t / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -8.8e+18], N[Not[LessEqual[z, 9.5e+75]], $MachinePrecision]], N[(y + x), $MachinePrecision], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.8 \cdot 10^{+18} \lor \neg \left(z \leq 9.5 \cdot 10^{+75}\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\end{array}
\end{array}
if z < -8.8e18 or 9.50000000000000061e75 < z Initial program 81.9%
+-commutative81.9%
associate-/l*99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in z around inf 77.5%
+-commutative77.5%
Simplified77.5%
if -8.8e18 < z < 9.50000000000000061e75Initial program 97.5%
Taylor expanded in z around 0 79.7%
*-commutative79.7%
associate-/l*80.2%
Applied egg-rr80.2%
Final simplification79.1%
(FPCore (x y z t a) :precision binary64 (+ x (/ y (+ (/ z (- z t)) (/ a (- t z))))))
double code(double x, double y, double z, double t, double a) {
return x + (y / ((z / (z - t)) + (a / (t - 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 / (z - t)) + (a / (t - z))))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y / ((z / (z - t)) + (a / (t - z))));
}
def code(x, y, z, t, a): return x + (y / ((z / (z - t)) + (a / (t - z))))
function code(x, y, z, t, a) return Float64(x + Float64(y / Float64(Float64(z / Float64(z - t)) + Float64(a / Float64(t - z))))) end
function tmp = code(x, y, z, t, a) tmp = x + (y / ((z / (z - t)) + (a / (t - z)))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y / N[(N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y}{\frac{z}{z - t} + \frac{a}{t - z}}
\end{array}
Initial program 91.5%
clear-num91.4%
inv-pow91.4%
Applied egg-rr91.4%
unpow-191.4%
*-commutative91.4%
associate-/r*98.7%
Simplified98.7%
div-sub98.7%
Applied egg-rr98.7%
Taylor expanded in y around 0 98.8%
Final simplification98.8%
(FPCore (x y z t a) :precision binary64 (if (<= a -5.8e+144) x (if (<= a 8.1e+93) (+ y x) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -5.8e+144) {
tmp = x;
} else if (a <= 8.1e+93) {
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 <= (-5.8d+144)) then
tmp = x
else if (a <= 8.1d+93) 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 <= -5.8e+144) {
tmp = x;
} else if (a <= 8.1e+93) {
tmp = y + x;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -5.8e+144: tmp = x elif a <= 8.1e+93: tmp = y + x else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -5.8e+144) tmp = x; elseif (a <= 8.1e+93) 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 <= -5.8e+144) tmp = x; elseif (a <= 8.1e+93) tmp = y + x; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -5.8e+144], x, If[LessEqual[a, 8.1e+93], N[(y + x), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.8 \cdot 10^{+144}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 8.1 \cdot 10^{+93}:\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -5.79999999999999996e144 or 8.09999999999999983e93 < a Initial program 92.6%
+-commutative92.6%
associate-/l*99.4%
fma-define99.4%
Simplified99.4%
Taylor expanded in y around 0 71.4%
if -5.79999999999999996e144 < a < 8.09999999999999983e93Initial program 91.0%
+-commutative91.0%
associate-/l*98.8%
fma-define98.8%
Simplified98.8%
Taylor expanded in z around inf 65.0%
+-commutative65.0%
Simplified65.0%
Final simplification67.0%
(FPCore (x y z t a) :precision binary64 (+ x (/ -1.0 (/ (/ (- z a) (- t z)) y))))
double code(double x, double y, double z, double t, double a) {
return x + (-1.0 / (((z - a) / (t - z)) / 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 + ((-1.0d0) / (((z - a) / (t - z)) / y))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (-1.0 / (((z - a) / (t - z)) / y));
}
def code(x, y, z, t, a): return x + (-1.0 / (((z - a) / (t - z)) / y))
function code(x, y, z, t, a) return Float64(x + Float64(-1.0 / Float64(Float64(Float64(z - a) / Float64(t - z)) / y))) end
function tmp = code(x, y, z, t, a) tmp = x + (-1.0 / (((z - a) / (t - z)) / y)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(-1.0 / N[(N[(N[(z - a), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{-1}{\frac{\frac{z - a}{t - z}}{y}}
\end{array}
Initial program 91.5%
clear-num91.4%
inv-pow91.4%
Applied egg-rr91.4%
unpow-191.4%
*-commutative91.4%
associate-/r*98.7%
Simplified98.7%
Final simplification98.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 91.5%
+-commutative91.5%
associate-/l*99.0%
fma-define99.0%
Simplified99.0%
Taylor expanded in y around 0 56.6%
Final simplification56.6%
(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 2024054
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, A"
:precision binary64
:alt
(+ x (/ y (/ (- z a) (- z t))))
(+ x (/ (* y (- z t)) (- z a))))