
(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(y * Float64(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[(y * N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \frac{z - t}{z - a}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 8 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(y * Float64(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[(y * N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \frac{z - t}{z - a}
\end{array}
(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(y * Float64(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[(y * N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \frac{z - t}{z - a}
\end{array}
Initial program 98.8%
Final simplification98.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.4e+123) (not (<= z 5.2e+72))) (+ x y) (+ x (* t (/ y (- a z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.4e+123) || !(z <= 5.2e+72)) {
tmp = x + y;
} else {
tmp = x + (t * (y / (a - z)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-1.4d+123)) .or. (.not. (z <= 5.2d+72))) then
tmp = x + y
else
tmp = x + (t * (y / (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.4e+123) || !(z <= 5.2e+72)) {
tmp = x + y;
} else {
tmp = x + (t * (y / (a - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.4e+123) or not (z <= 5.2e+72): tmp = x + y else: tmp = x + (t * (y / (a - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.4e+123) || !(z <= 5.2e+72)) tmp = Float64(x + y); else tmp = Float64(x + Float64(t * Float64(y / Float64(a - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.4e+123) || ~((z <= 5.2e+72))) tmp = x + y; else tmp = x + (t * (y / (a - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.4e+123], N[Not[LessEqual[z, 5.2e+72]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.4 \cdot 10^{+123} \lor \neg \left(z \leq 5.2 \cdot 10^{+72}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y}{a - z}\\
\end{array}
\end{array}
if z < -1.40000000000000006e123 or 5.19999999999999963e72 < z Initial program 100.0%
Taylor expanded in z around inf 85.4%
if -1.40000000000000006e123 < z < 5.19999999999999963e72Initial program 98.3%
Taylor expanded in t around inf 87.2%
neg-mul-187.2%
distribute-neg-frac287.2%
sub-neg87.2%
distribute-neg-in87.2%
remove-double-neg87.2%
Simplified87.2%
Taylor expanded in t around 0 87.2%
Taylor expanded in y around 0 81.9%
associate-*r/87.6%
Simplified87.6%
Final simplification86.9%
(FPCore (x y z t a) :precision binary64 (if (<= t -2.06e+55) (+ x (* t (/ y (- a z)))) (if (<= t 4.3e+117) (+ x (* y (/ z (- z a)))) (+ x (* y (/ t (- a z)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.06e+55) {
tmp = x + (t * (y / (a - z)));
} else if (t <= 4.3e+117) {
tmp = x + (y * (z / (z - a)));
} else {
tmp = x + (y * (t / (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 <= (-2.06d+55)) then
tmp = x + (t * (y / (a - z)))
else if (t <= 4.3d+117) then
tmp = x + (y * (z / (z - a)))
else
tmp = x + (y * (t / (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 <= -2.06e+55) {
tmp = x + (t * (y / (a - z)));
} else if (t <= 4.3e+117) {
tmp = x + (y * (z / (z - a)));
} else {
tmp = x + (y * (t / (a - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -2.06e+55: tmp = x + (t * (y / (a - z))) elif t <= 4.3e+117: tmp = x + (y * (z / (z - a))) else: tmp = x + (y * (t / (a - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -2.06e+55) tmp = Float64(x + Float64(t * Float64(y / Float64(a - z)))); elseif (t <= 4.3e+117) tmp = Float64(x + Float64(y * Float64(z / Float64(z - a)))); else tmp = Float64(x + Float64(y * Float64(t / Float64(a - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -2.06e+55) tmp = x + (t * (y / (a - z))); elseif (t <= 4.3e+117) tmp = x + (y * (z / (z - a))); else tmp = x + (y * (t / (a - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2.06e+55], N[(x + N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.3e+117], N[(x + N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.06 \cdot 10^{+55}:\\
\;\;\;\;x + t \cdot \frac{y}{a - z}\\
\mathbf{elif}\;t \leq 4.3 \cdot 10^{+117}:\\
\;\;\;\;x + y \cdot \frac{z}{z - a}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t}{a - z}\\
\end{array}
\end{array}
if t < -2.06e55Initial program 95.0%
Taylor expanded in t around inf 83.3%
neg-mul-183.3%
distribute-neg-frac283.3%
sub-neg83.3%
distribute-neg-in83.3%
remove-double-neg83.3%
Simplified83.3%
Taylor expanded in t around 0 83.3%
Taylor expanded in y around 0 76.8%
associate-*r/88.0%
Simplified88.0%
if -2.06e55 < t < 4.29999999999999998e117Initial program 100.0%
Taylor expanded in t around 0 77.1%
associate-/l*88.8%
Simplified88.8%
if 4.29999999999999998e117 < t Initial program 99.9%
Taylor expanded in t around inf 93.1%
neg-mul-193.1%
distribute-neg-frac293.1%
sub-neg93.1%
distribute-neg-in93.1%
remove-double-neg93.1%
Simplified93.1%
Taylor expanded in t around 0 93.1%
Final simplification89.4%
(FPCore (x y z t a) :precision binary64 (if (<= z -3.5e+120) (+ x (* y (/ (- z t) z))) (if (<= z 4.9e+70) (+ x (* t (/ y (- a z)))) (+ x (* y (/ z (- z a)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.5e+120) {
tmp = x + (y * ((z - t) / z));
} else if (z <= 4.9e+70) {
tmp = x + (t * (y / (a - z)));
} 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 <= (-3.5d+120)) then
tmp = x + (y * ((z - t) / z))
else if (z <= 4.9d+70) then
tmp = x + (t * (y / (a - z)))
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 <= -3.5e+120) {
tmp = x + (y * ((z - t) / z));
} else if (z <= 4.9e+70) {
tmp = x + (t * (y / (a - z)));
} else {
tmp = x + (y * (z / (z - a)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.5e+120: tmp = x + (y * ((z - t) / z)) elif z <= 4.9e+70: tmp = x + (t * (y / (a - z))) else: tmp = x + (y * (z / (z - a))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.5e+120) tmp = Float64(x + Float64(y * Float64(Float64(z - t) / z))); elseif (z <= 4.9e+70) tmp = Float64(x + Float64(t * Float64(y / Float64(a - z)))); 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 <= -3.5e+120) tmp = x + (y * ((z - t) / z)); elseif (z <= 4.9e+70) tmp = x + (t * (y / (a - z))); else tmp = x + (y * (z / (z - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.5e+120], N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.9e+70], N[(x + N[(t * N[(y / N[(a - z), $MachinePrecision]), $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 -3.5 \cdot 10^{+120}:\\
\;\;\;\;x + y \cdot \frac{z - t}{z}\\
\mathbf{elif}\;z \leq 4.9 \cdot 10^{+70}:\\
\;\;\;\;x + t \cdot \frac{y}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{z - a}\\
\end{array}
\end{array}
if z < -3.50000000000000007e120Initial program 100.0%
Taylor expanded in a around 0 95.0%
if -3.50000000000000007e120 < z < 4.90000000000000028e70Initial program 98.3%
Taylor expanded in t around inf 87.2%
neg-mul-187.2%
distribute-neg-frac287.2%
sub-neg87.2%
distribute-neg-in87.2%
remove-double-neg87.2%
Simplified87.2%
Taylor expanded in t around 0 87.2%
Taylor expanded in y around 0 81.9%
associate-*r/87.6%
Simplified87.6%
if 4.90000000000000028e70 < z Initial program 100.0%
Taylor expanded in t around 0 66.1%
associate-/l*92.4%
Simplified92.4%
Final simplification89.7%
(FPCore (x y z t a) :precision binary64 (if (<= z -2.8e+82) (+ x (/ y (/ z (- z t)))) (if (<= z 3.7e+72) (+ x (/ t (/ (- a z) y))) (+ x (* y (/ z (- z a)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.8e+82) {
tmp = x + (y / (z / (z - t)));
} else if (z <= 3.7e+72) {
tmp = x + (t / ((a - z) / y));
} 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.8d+82)) then
tmp = x + (y / (z / (z - t)))
else if (z <= 3.7d+72) then
tmp = x + (t / ((a - z) / y))
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.8e+82) {
tmp = x + (y / (z / (z - t)));
} else if (z <= 3.7e+72) {
tmp = x + (t / ((a - z) / y));
} else {
tmp = x + (y * (z / (z - a)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.8e+82: tmp = x + (y / (z / (z - t))) elif z <= 3.7e+72: tmp = x + (t / ((a - z) / y)) else: tmp = x + (y * (z / (z - a))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.8e+82) tmp = Float64(x + Float64(y / Float64(z / Float64(z - t)))); elseif (z <= 3.7e+72) tmp = Float64(x + Float64(t / Float64(Float64(a - z) / y))); 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.8e+82) tmp = x + (y / (z / (z - t))); elseif (z <= 3.7e+72) tmp = x + (t / ((a - z) / y)); else tmp = x + (y * (z / (z - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.8e+82], N[(x + N[(y / N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.7e+72], N[(x + N[(t / N[(N[(a - z), $MachinePrecision] / y), $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.8 \cdot 10^{+82}:\\
\;\;\;\;x + \frac{y}{\frac{z}{z - t}}\\
\mathbf{elif}\;z \leq 3.7 \cdot 10^{+72}:\\
\;\;\;\;x + \frac{t}{\frac{a - z}{y}}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{z - a}\\
\end{array}
\end{array}
if z < -2.8e82Initial program 99.9%
clear-num99.9%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in a around 0 95.8%
if -2.8e82 < z < 3.7000000000000002e72Initial program 98.2%
Taylor expanded in t around inf 86.6%
neg-mul-186.6%
distribute-neg-frac286.6%
sub-neg86.6%
distribute-neg-in86.6%
remove-double-neg86.6%
Simplified86.6%
Taylor expanded in t around 0 86.6%
Taylor expanded in y around 0 81.0%
associate-*r/87.0%
Simplified87.0%
Taylor expanded in t around 0 81.0%
associate-*l/86.6%
associate-/r/87.0%
Simplified87.0%
if 3.7000000000000002e72 < z Initial program 100.0%
Taylor expanded in t around 0 66.1%
associate-/l*92.4%
Simplified92.4%
Final simplification89.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.7e+84) (not (<= z 5.2e+27))) (+ x y) (+ x (* t (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.7e+84) || !(z <= 5.2e+27)) {
tmp = x + y;
} else {
tmp = x + (t * (y / 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 <= (-1.7d+84)) .or. (.not. (z <= 5.2d+27))) then
tmp = x + y
else
tmp = x + (t * (y / 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 <= -1.7e+84) || !(z <= 5.2e+27)) {
tmp = x + y;
} else {
tmp = x + (t * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.7e+84) or not (z <= 5.2e+27): tmp = x + y else: tmp = x + (t * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.7e+84) || !(z <= 5.2e+27)) tmp = Float64(x + y); else tmp = Float64(x + Float64(t * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.7e+84) || ~((z <= 5.2e+27))) tmp = x + y; else tmp = x + (t * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.7e+84], N[Not[LessEqual[z, 5.2e+27]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.7 \cdot 10^{+84} \lor \neg \left(z \leq 5.2 \cdot 10^{+27}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\end{array}
\end{array}
if z < -1.6999999999999999e84 or 5.20000000000000018e27 < z Initial program 99.9%
Taylor expanded in z around inf 79.5%
if -1.6999999999999999e84 < z < 5.20000000000000018e27Initial program 98.0%
Taylor expanded in z around 0 73.6%
associate-/l*79.6%
Simplified79.6%
Final simplification79.5%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.45e+153) x (if (<= a 6.2e+199) (+ x y) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.45e+153) {
tmp = x;
} else if (a <= 6.2e+199) {
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 <= (-1.45d+153)) then
tmp = x
else if (a <= 6.2d+199) 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 <= -1.45e+153) {
tmp = x;
} else if (a <= 6.2e+199) {
tmp = x + y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.45e+153: tmp = x elif a <= 6.2e+199: tmp = x + y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.45e+153) tmp = x; elseif (a <= 6.2e+199) 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 <= -1.45e+153) tmp = x; elseif (a <= 6.2e+199) tmp = x + y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.45e+153], x, If[LessEqual[a, 6.2e+199], N[(x + y), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.45 \cdot 10^{+153}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 6.2 \cdot 10^{+199}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -1.45000000000000001e153 or 6.19999999999999971e199 < a Initial program 99.9%
Taylor expanded in z around 0 77.3%
Taylor expanded in x around inf 68.4%
if -1.45000000000000001e153 < a < 6.19999999999999971e199Initial program 98.5%
Taylor expanded in z around inf 63.8%
Final simplification64.8%
(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 98.8%
Taylor expanded in z around 0 57.5%
Taylor expanded in x around inf 48.6%
Final simplification48.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 2024079
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisLine from plot-0.2.3.4, A"
:precision binary64
:alt
(+ x (/ y (/ (- z a) (- z t))))
(+ x (* y (/ (- z t) (- z a)))))