
(FPCore (x y z t a) :precision binary64 (+ x (/ (* y (- z t)) (- a t))))
double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (a - 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 - t)) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (a - t));
}
def code(x, y, z, t, a): return x + ((y * (z - t)) / (a - t))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y * Float64(z - t)) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y * (z - t)) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - t\right)}{a - t}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 9 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (/ (* y (- z t)) (- a t))))
double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (a - 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 - t)) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (a - t));
}
def code(x, y, z, t, a): return x + ((y * (z - t)) / (a - t))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y * Float64(z - t)) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y * (z - t)) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - t\right)}{a - t}
\end{array}
(FPCore (x y z t a) :precision binary64 (- x (* y (/ (- z t) (- t a)))))
double code(double x, double y, double z, double t, double a) {
return x - (y * ((z - t) / (t - 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) / (t - a)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x - (y * ((z - t) / (t - a)));
}
def code(x, y, z, t, a): return x - (y * ((z - t) / (t - a)))
function code(x, y, z, t, a) return Float64(x - Float64(y * Float64(Float64(z - t) / Float64(t - a)))) end
function tmp = code(x, y, z, t, a) tmp = x - (y * ((z - t) / (t - a))); end
code[x_, y_, z_, t_, a_] := N[(x - N[(y * N[(N[(z - t), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - y \cdot \frac{z - t}{t - a}
\end{array}
Initial program 83.0%
associate-/l*98.4%
Simplified98.4%
Final simplification98.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -8e+98) (not (<= t 1.02e+115))) (+ x y) (+ x (* y (/ z (- a t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -8e+98) || !(t <= 1.02e+115)) {
tmp = x + y;
} else {
tmp = x + (y * (z / (a - 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 ((t <= (-8d+98)) .or. (.not. (t <= 1.02d+115))) then
tmp = x + y
else
tmp = x + (y * (z / (a - t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -8e+98) || !(t <= 1.02e+115)) {
tmp = x + y;
} else {
tmp = x + (y * (z / (a - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -8e+98) or not (t <= 1.02e+115): tmp = x + y else: tmp = x + (y * (z / (a - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -8e+98) || !(t <= 1.02e+115)) tmp = Float64(x + y); else tmp = Float64(x + Float64(y * Float64(z / Float64(a - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -8e+98) || ~((t <= 1.02e+115))) tmp = x + y; else tmp = x + (y * (z / (a - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -8e+98], N[Not[LessEqual[t, 1.02e+115]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8 \cdot 10^{+98} \lor \neg \left(t \leq 1.02 \cdot 10^{+115}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{a - t}\\
\end{array}
\end{array}
if t < -7.99999999999999998e98 or 1.02e115 < t Initial program 67.0%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in t around inf 83.2%
+-commutative83.2%
Simplified83.2%
if -7.99999999999999998e98 < t < 1.02e115Initial program 93.3%
associate-/l*97.4%
Simplified97.4%
Taylor expanded in z around inf 79.8%
associate-/l*81.6%
Simplified81.6%
Final simplification82.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.5e+95) (not (<= t 3.6e+113))) (+ x y) (- x (/ z (/ (- t a) y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.5e+95) || !(t <= 3.6e+113)) {
tmp = x + y;
} else {
tmp = x - (z / ((t - 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) :: tmp
if ((t <= (-1.5d+95)) .or. (.not. (t <= 3.6d+113))) then
tmp = x + y
else
tmp = x - (z / ((t - a) / y))
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.5e+95) || !(t <= 3.6e+113)) {
tmp = x + y;
} else {
tmp = x - (z / ((t - a) / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.5e+95) or not (t <= 3.6e+113): tmp = x + y else: tmp = x - (z / ((t - a) / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.5e+95) || !(t <= 3.6e+113)) tmp = Float64(x + y); else tmp = Float64(x - Float64(z / Float64(Float64(t - a) / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -1.5e+95) || ~((t <= 3.6e+113))) tmp = x + y; else tmp = x - (z / ((t - a) / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.5e+95], N[Not[LessEqual[t, 3.6e+113]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x - N[(z / N[(N[(t - a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.5 \cdot 10^{+95} \lor \neg \left(t \leq 3.6 \cdot 10^{+113}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x - \frac{z}{\frac{t - a}{y}}\\
\end{array}
\end{array}
if t < -1.49999999999999996e95 or 3.59999999999999992e113 < t Initial program 67.0%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in t around inf 83.2%
+-commutative83.2%
Simplified83.2%
if -1.49999999999999996e95 < t < 3.59999999999999992e113Initial program 93.3%
associate-/l*97.4%
Simplified97.4%
Taylor expanded in z around inf 79.8%
associate-/l*81.6%
Simplified81.6%
associate-*r/79.8%
associate-*l/82.3%
clear-num82.1%
associate-*l/82.8%
*-un-lft-identity82.8%
Applied egg-rr82.8%
Final simplification83.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -9.8e+51) (not (<= t 1.8e-28))) (- x (* y (+ (/ z t) -1.0))) (- x (/ z (/ (- t a) y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -9.8e+51) || !(t <= 1.8e-28)) {
tmp = x - (y * ((z / t) + -1.0));
} else {
tmp = x - (z / ((t - 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) :: tmp
if ((t <= (-9.8d+51)) .or. (.not. (t <= 1.8d-28))) then
tmp = x - (y * ((z / t) + (-1.0d0)))
else
tmp = x - (z / ((t - a) / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -9.8e+51) || !(t <= 1.8e-28)) {
tmp = x - (y * ((z / t) + -1.0));
} else {
tmp = x - (z / ((t - a) / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -9.8e+51) or not (t <= 1.8e-28): tmp = x - (y * ((z / t) + -1.0)) else: tmp = x - (z / ((t - a) / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -9.8e+51) || !(t <= 1.8e-28)) tmp = Float64(x - Float64(y * Float64(Float64(z / t) + -1.0))); else tmp = Float64(x - Float64(z / Float64(Float64(t - a) / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -9.8e+51) || ~((t <= 1.8e-28))) tmp = x - (y * ((z / t) + -1.0)); else tmp = x - (z / ((t - a) / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -9.8e+51], N[Not[LessEqual[t, 1.8e-28]], $MachinePrecision]], N[(x - N[(y * N[(N[(z / t), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(z / N[(N[(t - a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -9.8 \cdot 10^{+51} \lor \neg \left(t \leq 1.8 \cdot 10^{-28}\right):\\
\;\;\;\;x - y \cdot \left(\frac{z}{t} + -1\right)\\
\mathbf{else}:\\
\;\;\;\;x - \frac{z}{\frac{t - a}{y}}\\
\end{array}
\end{array}
if t < -9.79999999999999967e51 or 1.7999999999999999e-28 < t Initial program 71.0%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in a around 0 63.2%
mul-1-neg63.2%
unsub-neg63.2%
associate-/l*86.0%
div-sub86.0%
sub-neg86.0%
*-inverses86.0%
metadata-eval86.0%
Simplified86.0%
if -9.79999999999999967e51 < t < 1.7999999999999999e-28Initial program 97.4%
associate-/l*96.5%
Simplified96.5%
Taylor expanded in z around inf 89.8%
associate-/l*88.9%
Simplified88.9%
associate-*r/89.8%
associate-*l/89.9%
clear-num89.7%
associate-*l/90.6%
*-un-lft-identity90.6%
Applied egg-rr90.6%
Final simplification88.1%
(FPCore (x y z t a) :precision binary64 (if (<= z -800000000.0) (+ x (* y (/ z (- a t)))) (if (<= z 1.4e+41) (+ x (* y (/ t (- t a)))) (- x (/ z (/ (- t a) y))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -800000000.0) {
tmp = x + (y * (z / (a - t)));
} else if (z <= 1.4e+41) {
tmp = x + (y * (t / (t - a)));
} else {
tmp = x - (z / ((t - 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) :: tmp
if (z <= (-800000000.0d0)) then
tmp = x + (y * (z / (a - t)))
else if (z <= 1.4d+41) then
tmp = x + (y * (t / (t - a)))
else
tmp = x - (z / ((t - a) / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -800000000.0) {
tmp = x + (y * (z / (a - t)));
} else if (z <= 1.4e+41) {
tmp = x + (y * (t / (t - a)));
} else {
tmp = x - (z / ((t - a) / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -800000000.0: tmp = x + (y * (z / (a - t))) elif z <= 1.4e+41: tmp = x + (y * (t / (t - a))) else: tmp = x - (z / ((t - a) / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -800000000.0) tmp = Float64(x + Float64(y * Float64(z / Float64(a - t)))); elseif (z <= 1.4e+41) tmp = Float64(x + Float64(y * Float64(t / Float64(t - a)))); else tmp = Float64(x - Float64(z / Float64(Float64(t - a) / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -800000000.0) tmp = x + (y * (z / (a - t))); elseif (z <= 1.4e+41) tmp = x + (y * (t / (t - a))); else tmp = x - (z / ((t - a) / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -800000000.0], N[(x + N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.4e+41], N[(x + N[(y * N[(t / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(z / N[(N[(t - a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -800000000:\\
\;\;\;\;x + y \cdot \frac{z}{a - t}\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{+41}:\\
\;\;\;\;x + y \cdot \frac{t}{t - a}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{z}{\frac{t - a}{y}}\\
\end{array}
\end{array}
if z < -8e8Initial program 83.7%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 81.7%
associate-/l*89.1%
Simplified89.1%
if -8e8 < z < 1.4e41Initial program 82.7%
associate-/l*99.2%
Simplified99.2%
Taylor expanded in z around 0 76.0%
mul-1-neg76.0%
unsub-neg76.0%
*-commutative76.0%
associate-/l*93.2%
Simplified93.2%
if 1.4e41 < z Initial program 82.9%
associate-/l*94.0%
Simplified94.0%
Taylor expanded in z around inf 77.3%
associate-/l*84.5%
Simplified84.5%
associate-*r/77.3%
associate-*l/87.2%
clear-num86.9%
associate-*l/87.0%
*-un-lft-identity87.0%
Applied egg-rr87.0%
Final simplification91.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.9e+51) (not (<= t 3.1e-28))) (+ x y) (+ x (* z (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.9e+51) || !(t <= 3.1e-28)) {
tmp = x + y;
} else {
tmp = x + (z * (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 ((t <= (-1.9d+51)) .or. (.not. (t <= 3.1d-28))) then
tmp = x + y
else
tmp = x + (z * (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 ((t <= -1.9e+51) || !(t <= 3.1e-28)) {
tmp = x + y;
} else {
tmp = x + (z * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.9e+51) or not (t <= 3.1e-28): tmp = x + y else: tmp = x + (z * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.9e+51) || !(t <= 3.1e-28)) tmp = Float64(x + y); else tmp = Float64(x + Float64(z * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -1.9e+51) || ~((t <= 3.1e-28))) tmp = x + y; else tmp = x + (z * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.9e+51], N[Not[LessEqual[t, 3.1e-28]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.9 \cdot 10^{+51} \lor \neg \left(t \leq 3.1 \cdot 10^{-28}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y}{a}\\
\end{array}
\end{array}
if t < -1.8999999999999999e51 or 3.09999999999999992e-28 < t Initial program 71.0%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in t around inf 75.4%
+-commutative75.4%
Simplified75.4%
if -1.8999999999999999e51 < t < 3.09999999999999992e-28Initial program 97.4%
associate-/l*96.5%
Simplified96.5%
Taylor expanded in t around 0 83.9%
*-commutative83.9%
associate-/l*84.0%
Applied egg-rr84.0%
Final simplification79.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -2.25e+51) (not (<= t 3.25e-28))) (+ x y) (+ x (/ z (/ a y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -2.25e+51) || !(t <= 3.25e-28)) {
tmp = x + y;
} else {
tmp = x + (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) :: tmp
if ((t <= (-2.25d+51)) .or. (.not. (t <= 3.25d-28))) then
tmp = x + y
else
tmp = x + (z / (a / y))
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.25e+51) || !(t <= 3.25e-28)) {
tmp = x + y;
} else {
tmp = x + (z / (a / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -2.25e+51) or not (t <= 3.25e-28): tmp = x + y else: tmp = x + (z / (a / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -2.25e+51) || !(t <= 3.25e-28)) tmp = Float64(x + y); else tmp = Float64(x + Float64(z / Float64(a / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -2.25e+51) || ~((t <= 3.25e-28))) tmp = x + y; else tmp = x + (z / (a / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -2.25e+51], N[Not[LessEqual[t, 3.25e-28]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(z / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.25 \cdot 10^{+51} \lor \neg \left(t \leq 3.25 \cdot 10^{-28}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z}{\frac{a}{y}}\\
\end{array}
\end{array}
if t < -2.25e51 or 3.25000000000000021e-28 < t Initial program 71.0%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in t around inf 75.4%
+-commutative75.4%
Simplified75.4%
if -2.25e51 < t < 3.25000000000000021e-28Initial program 97.4%
associate-/l*96.5%
Simplified96.5%
Taylor expanded in z around inf 89.8%
associate-/l*88.9%
Simplified88.9%
associate-*r/89.8%
associate-*l/89.9%
clear-num89.7%
associate-*l/90.6%
*-un-lft-identity90.6%
Applied egg-rr90.6%
Taylor expanded in a around inf 84.7%
Final simplification79.6%
(FPCore (x y z t a) :precision binary64 (if (<= a 2.55e+101) (+ x y) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= 2.55e+101) {
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 <= 2.55d+101) 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 <= 2.55e+101) {
tmp = x + y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= 2.55e+101: tmp = x + y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= 2.55e+101) 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 <= 2.55e+101) tmp = x + y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, 2.55e+101], N[(x + y), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 2.55 \cdot 10^{+101}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < 2.54999999999999997e101Initial program 82.2%
associate-/l*98.1%
Simplified98.1%
Taylor expanded in t around inf 62.3%
+-commutative62.3%
Simplified62.3%
if 2.54999999999999997e101 < a Initial program 87.6%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 65.3%
Final simplification62.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 83.0%
associate-/l*98.4%
Simplified98.4%
Taylor expanded in x around inf 44.6%
Final simplification44.6%
(FPCore (x y z t a) :precision binary64 (+ x (/ y (/ (- a t) (- z t)))))
double code(double x, double y, double z, double t, double a) {
return x + (y / ((a - t) / (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 / ((a - t) / (z - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y / ((a - t) / (z - t)));
}
def code(x, y, z, t, a): return x + (y / ((a - t) / (z - t)))
function code(x, y, z, t, a) return Float64(x + Float64(y / Float64(Float64(a - t) / Float64(z - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y / ((a - t) / (z - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y / N[(N[(a - t), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y}{\frac{a - t}{z - t}}
\end{array}
herbie shell --seed 2024071
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, B"
:precision binary64
:alt
(+ x (/ y (/ (- a t) (- z t))))
(+ x (/ (* y (- z t)) (- a t))))