
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y z) t) (- a z))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * t) / (a - 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) * t) / (a - z))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * t) / (a - z));
}
def code(x, y, z, t, a): return x + (((y - z) * t) / (a - z))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - z) * t) / Float64(a - z))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - z) * t) / (a - z)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - z\right) \cdot t}{a - z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 10 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y z) t) (- a z))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * t) / (a - 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) * t) / (a - z))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * t) / (a - z));
}
def code(x, y, z, t, a): return x + (((y - z) * t) / (a - z))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - z) * t) / Float64(a - z))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - z) * t) / (a - z)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - z\right) \cdot t}{a - z}
\end{array}
(FPCore (x y z t a) :precision binary64 (+ x (* (- y z) (/ t (- a z)))))
double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * (t / (a - 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) * (t / (a - z)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * (t / (a - z)));
}
def code(x, y, z, t, a): return x + ((y - z) * (t / (a - z)))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y - z) * Float64(t / Float64(a - z)))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y - z) * (t / (a - z))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - z\right) \cdot \frac{t}{a - z}
\end{array}
Initial program 82.7%
associate-/l*96.2%
Simplified96.2%
Final simplification96.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -6.2e+125) (not (<= z 0.011))) (+ x t) (+ x (* t (/ y (- a z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -6.2e+125) || !(z <= 0.011)) {
tmp = x + t;
} 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 <= (-6.2d+125)) .or. (.not. (z <= 0.011d0))) then
tmp = x + t
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 <= -6.2e+125) || !(z <= 0.011)) {
tmp = x + t;
} else {
tmp = x + (t * (y / (a - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -6.2e+125) or not (z <= 0.011): tmp = x + t else: tmp = x + (t * (y / (a - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -6.2e+125) || !(z <= 0.011)) tmp = Float64(x + t); 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 <= -6.2e+125) || ~((z <= 0.011))) tmp = x + t; else tmp = x + (t * (y / (a - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -6.2e+125], N[Not[LessEqual[z, 0.011]], $MachinePrecision]], N[(x + t), $MachinePrecision], N[(x + N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.2 \cdot 10^{+125} \lor \neg \left(z \leq 0.011\right):\\
\;\;\;\;x + t\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y}{a - z}\\
\end{array}
\end{array}
if z < -6.2e125 or 0.010999999999999999 < z Initial program 69.0%
associate-/l*94.6%
Simplified94.6%
Taylor expanded in z around inf 83.1%
if -6.2e125 < z < 0.010999999999999999Initial program 92.4%
associate-/l*97.3%
Simplified97.3%
Taylor expanded in y around inf 87.1%
associate-/l*90.1%
Simplified90.1%
Final simplification87.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -3.45e+131) (not (<= z 5.8e-5))) (+ x t) (+ x (/ y (/ (- a z) t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -3.45e+131) || !(z <= 5.8e-5)) {
tmp = x + t;
} else {
tmp = x + (y / ((a - 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 <= (-3.45d+131)) .or. (.not. (z <= 5.8d-5))) then
tmp = x + t
else
tmp = x + (y / ((a - 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 <= -3.45e+131) || !(z <= 5.8e-5)) {
tmp = x + t;
} else {
tmp = x + (y / ((a - z) / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -3.45e+131) or not (z <= 5.8e-5): tmp = x + t else: tmp = x + (y / ((a - z) / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -3.45e+131) || !(z <= 5.8e-5)) tmp = Float64(x + t); else tmp = Float64(x + Float64(y / Float64(Float64(a - z) / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -3.45e+131) || ~((z <= 5.8e-5))) tmp = x + t; else tmp = x + (y / ((a - z) / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -3.45e+131], N[Not[LessEqual[z, 5.8e-5]], $MachinePrecision]], N[(x + t), $MachinePrecision], N[(x + N[(y / N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.45 \cdot 10^{+131} \lor \neg \left(z \leq 5.8 \cdot 10^{-5}\right):\\
\;\;\;\;x + t\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a - z}{t}}\\
\end{array}
\end{array}
if z < -3.4500000000000001e131 or 5.8e-5 < z Initial program 69.3%
associate-/l*94.5%
Simplified94.5%
Taylor expanded in z around inf 83.1%
if -3.4500000000000001e131 < z < 5.8e-5Initial program 92.4%
associate-/l*97.4%
Simplified97.4%
Taylor expanded in y around inf 87.0%
associate-/l*90.0%
Simplified90.0%
*-commutative90.0%
associate-/r/91.3%
Applied egg-rr91.3%
Final simplification87.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -4e+21) (not (<= z 3.75e-6))) (+ x (* t (/ z (- z a)))) (+ x (/ y (/ (- a z) t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -4e+21) || !(z <= 3.75e-6)) {
tmp = x + (t * (z / (z - a)));
} else {
tmp = x + (y / ((a - 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 <= (-4d+21)) .or. (.not. (z <= 3.75d-6))) then
tmp = x + (t * (z / (z - a)))
else
tmp = x + (y / ((a - 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 <= -4e+21) || !(z <= 3.75e-6)) {
tmp = x + (t * (z / (z - a)));
} else {
tmp = x + (y / ((a - z) / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -4e+21) or not (z <= 3.75e-6): tmp = x + (t * (z / (z - a))) else: tmp = x + (y / ((a - z) / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -4e+21) || !(z <= 3.75e-6)) tmp = Float64(x + Float64(t * Float64(z / Float64(z - a)))); else tmp = Float64(x + Float64(y / Float64(Float64(a - z) / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -4e+21) || ~((z <= 3.75e-6))) tmp = x + (t * (z / (z - a))); else tmp = x + (y / ((a - z) / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -4e+21], N[Not[LessEqual[z, 3.75e-6]], $MachinePrecision]], N[(x + N[(t * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4 \cdot 10^{+21} \lor \neg \left(z \leq 3.75 \cdot 10^{-6}\right):\\
\;\;\;\;x + t \cdot \frac{z}{z - a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a - z}{t}}\\
\end{array}
\end{array}
if z < -4e21 or 3.7500000000000001e-6 < z Initial program 72.2%
associate-/l*95.3%
Simplified95.3%
Taylor expanded in y around 0 66.5%
associate-*r/66.5%
mul-1-neg66.5%
distribute-rgt-neg-out66.5%
associate-/l*89.7%
Simplified89.7%
if -4e21 < z < 3.7500000000000001e-6Initial program 92.8%
associate-/l*97.0%
Simplified97.0%
Taylor expanded in y around inf 88.9%
associate-/l*91.6%
Simplified91.6%
*-commutative91.6%
associate-/r/93.1%
Applied egg-rr93.1%
Final simplification91.4%
(FPCore (x y z t a) :precision binary64 (if (<= z -6e+125) (+ x t) (if (<= z 2.1e-6) (+ x (/ y (/ (- a z) t))) (+ x (* z (/ t (- z a)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6e+125) {
tmp = x + t;
} else if (z <= 2.1e-6) {
tmp = x + (y / ((a - z) / t));
} else {
tmp = x + (z * (t / (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 <= (-6d+125)) then
tmp = x + t
else if (z <= 2.1d-6) then
tmp = x + (y / ((a - z) / t))
else
tmp = x + (z * (t / (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 <= -6e+125) {
tmp = x + t;
} else if (z <= 2.1e-6) {
tmp = x + (y / ((a - z) / t));
} else {
tmp = x + (z * (t / (z - a)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -6e+125: tmp = x + t elif z <= 2.1e-6: tmp = x + (y / ((a - z) / t)) else: tmp = x + (z * (t / (z - a))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -6e+125) tmp = Float64(x + t); elseif (z <= 2.1e-6) tmp = Float64(x + Float64(y / Float64(Float64(a - z) / t))); else tmp = Float64(x + Float64(z * Float64(t / Float64(z - a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -6e+125) tmp = x + t; elseif (z <= 2.1e-6) tmp = x + (y / ((a - z) / t)); else tmp = x + (z * (t / (z - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6e+125], N[(x + t), $MachinePrecision], If[LessEqual[z, 2.1e-6], N[(x + N[(y / N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(t / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6 \cdot 10^{+125}:\\
\;\;\;\;x + t\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{-6}:\\
\;\;\;\;x + \frac{y}{\frac{a - z}{t}}\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{t}{z - a}\\
\end{array}
\end{array}
if z < -6.0000000000000003e125Initial program 59.0%
associate-/l*90.3%
Simplified90.3%
Taylor expanded in z around inf 91.3%
if -6.0000000000000003e125 < z < 2.0999999999999998e-6Initial program 92.4%
associate-/l*97.4%
Simplified97.4%
Taylor expanded in y around inf 87.0%
associate-/l*90.0%
Simplified90.0%
*-commutative90.0%
associate-/r/91.3%
Applied egg-rr91.3%
if 2.0999999999999998e-6 < z Initial program 75.2%
associate-/l*96.9%
Simplified96.9%
Taylor expanded in y around 0 70.4%
associate-*r/70.4%
mul-1-neg70.4%
distribute-rgt-neg-out70.4%
associate-*l/85.7%
Simplified85.7%
Taylor expanded in x around 0 70.4%
mul-1-neg70.4%
unsub-neg70.4%
*-commutative70.4%
associate-/l*85.7%
Simplified85.7%
Final simplification89.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -5.2e+15) (not (<= z 0.003))) (+ x t) (+ x (* t (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -5.2e+15) || !(z <= 0.003)) {
tmp = x + t;
} 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 <= (-5.2d+15)) .or. (.not. (z <= 0.003d0))) then
tmp = x + t
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 <= -5.2e+15) || !(z <= 0.003)) {
tmp = x + t;
} else {
tmp = x + (t * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -5.2e+15) or not (z <= 0.003): tmp = x + t else: tmp = x + (t * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -5.2e+15) || !(z <= 0.003)) tmp = Float64(x + t); 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 <= -5.2e+15) || ~((z <= 0.003))) tmp = x + t; else tmp = x + (t * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -5.2e+15], N[Not[LessEqual[z, 0.003]], $MachinePrecision]], N[(x + t), $MachinePrecision], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.2 \cdot 10^{+15} \lor \neg \left(z \leq 0.003\right):\\
\;\;\;\;x + t\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\end{array}
\end{array}
if z < -5.2e15 or 0.0030000000000000001 < z Initial program 72.7%
associate-/l*95.5%
Simplified95.5%
Taylor expanded in z around inf 82.0%
if -5.2e15 < z < 0.0030000000000000001Initial program 92.6%
associate-/l*96.9%
Simplified96.9%
Taylor expanded in z around 0 77.5%
associate-/l*81.8%
Simplified81.8%
Final simplification81.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -3e+79) (not (<= z 3.05e-5))) (+ x t) (+ x (* y (/ t a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -3e+79) || !(z <= 3.05e-5)) {
tmp = x + t;
} 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 <= (-3d+79)) .or. (.not. (z <= 3.05d-5))) then
tmp = x + t
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 <= -3e+79) || !(z <= 3.05e-5)) {
tmp = x + t;
} else {
tmp = x + (y * (t / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -3e+79) or not (z <= 3.05e-5): tmp = x + t else: tmp = x + (y * (t / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -3e+79) || !(z <= 3.05e-5)) tmp = Float64(x + t); 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 <= -3e+79) || ~((z <= 3.05e-5))) tmp = x + t; else tmp = x + (y * (t / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -3e+79], N[Not[LessEqual[z, 3.05e-5]], $MachinePrecision]], N[(x + t), $MachinePrecision], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3 \cdot 10^{+79} \lor \neg \left(z \leq 3.05 \cdot 10^{-5}\right):\\
\;\;\;\;x + t\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\end{array}
\end{array}
if z < -2.99999999999999974e79 or 3.04999999999999994e-5 < z Initial program 71.7%
associate-/l*94.9%
Simplified94.9%
Taylor expanded in z around inf 82.7%
if -2.99999999999999974e79 < z < 3.04999999999999994e-5Initial program 91.9%
associate-/l*97.2%
Simplified97.2%
Taylor expanded in z around 0 76.6%
*-commutative76.6%
associate-/l*81.3%
Simplified81.3%
Final simplification81.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -3.2e+79) (not (<= z 0.009))) (+ x t) (+ x (/ t (/ a y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -3.2e+79) || !(z <= 0.009)) {
tmp = x + t;
} else {
tmp = x + (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 <= (-3.2d+79)) .or. (.not. (z <= 0.009d0))) then
tmp = x + t
else
tmp = x + (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 <= -3.2e+79) || !(z <= 0.009)) {
tmp = x + t;
} else {
tmp = x + (t / (a / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -3.2e+79) or not (z <= 0.009): tmp = x + t else: tmp = x + (t / (a / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -3.2e+79) || !(z <= 0.009)) tmp = Float64(x + t); else tmp = Float64(x + Float64(t / Float64(a / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -3.2e+79) || ~((z <= 0.009))) tmp = x + t; else tmp = x + (t / (a / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -3.2e+79], N[Not[LessEqual[z, 0.009]], $MachinePrecision]], N[(x + t), $MachinePrecision], N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.2 \cdot 10^{+79} \lor \neg \left(z \leq 0.009\right):\\
\;\;\;\;x + t\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t}{\frac{a}{y}}\\
\end{array}
\end{array}
if z < -3.20000000000000003e79 or 0.00899999999999999932 < z Initial program 71.5%
associate-/l*95.0%
Simplified95.0%
Taylor expanded in z around inf 82.7%
if -3.20000000000000003e79 < z < 0.00899999999999999932Initial program 91.9%
associate-/l*97.1%
Simplified97.1%
Taylor expanded in z around 0 76.7%
associate-/l*80.7%
Simplified80.7%
clear-num80.7%
un-div-inv81.3%
Applied egg-rr81.3%
Final simplification82.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2.5e-16) (not (<= z 5.5e-9))) (+ x t) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.5e-16) || !(z <= 5.5e-9)) {
tmp = x + t;
} 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 ((z <= (-2.5d-16)) .or. (.not. (z <= 5.5d-9))) then
tmp = x + t
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 ((z <= -2.5e-16) || !(z <= 5.5e-9)) {
tmp = x + t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2.5e-16) or not (z <= 5.5e-9): tmp = x + t else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2.5e-16) || !(z <= 5.5e-9)) tmp = Float64(x + t); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -2.5e-16) || ~((z <= 5.5e-9))) tmp = x + t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.5e-16], N[Not[LessEqual[z, 5.5e-9]], $MachinePrecision]], N[(x + t), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.5 \cdot 10^{-16} \lor \neg \left(z \leq 5.5 \cdot 10^{-9}\right):\\
\;\;\;\;x + t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -2.5000000000000002e-16 or 5.4999999999999996e-9 < z Initial program 73.8%
associate-/l*95.6%
Simplified95.6%
Taylor expanded in z around inf 80.3%
if -2.5000000000000002e-16 < z < 5.4999999999999996e-9Initial program 92.9%
associate-/l*96.8%
Simplified96.8%
Taylor expanded in z around 0 76.5%
associate-/l*80.5%
Simplified80.5%
Taylor expanded in x around inf 49.6%
Final simplification65.9%
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
return x;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x
end function
public static double code(double x, double y, double z, double t, double a) {
return x;
}
def code(x, y, z, t, a): return x
function code(x, y, z, t, a) return x end
function tmp = code(x, y, z, t, a) tmp = x; end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 82.7%
associate-/l*96.2%
Simplified96.2%
Taylor expanded in z around 0 59.2%
associate-/l*62.1%
Simplified62.1%
Taylor expanded in x around inf 48.8%
Final simplification48.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (/ (- y z) (- a z)) t))))
(if (< t -1.0682974490174067e-39)
t_1
(if (< t 3.9110949887586375e-141) (+ x (/ (* (- y z) t) (- a z))) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((y - z) / (a - z)) * t);
double tmp;
if (t < -1.0682974490174067e-39) {
tmp = t_1;
} else if (t < 3.9110949887586375e-141) {
tmp = x + (((y - z) * t) / (a - z));
} 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) / (a - z)) * t)
if (t < (-1.0682974490174067d-39)) then
tmp = t_1
else if (t < 3.9110949887586375d-141) then
tmp = x + (((y - z) * t) / (a - z))
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) / (a - z)) * t);
double tmp;
if (t < -1.0682974490174067e-39) {
tmp = t_1;
} else if (t < 3.9110949887586375e-141) {
tmp = x + (((y - z) * t) / (a - z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (((y - z) / (a - z)) * t) tmp = 0 if t < -1.0682974490174067e-39: tmp = t_1 elif t < 3.9110949887586375e-141: tmp = x + (((y - z) * t) / (a - z)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(y - z) / Float64(a - z)) * t)) tmp = 0.0 if (t < -1.0682974490174067e-39) tmp = t_1; elseif (t < 3.9110949887586375e-141) tmp = Float64(x + Float64(Float64(Float64(y - z) * t) / Float64(a - z))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (((y - z) / (a - z)) * t); tmp = 0.0; if (t < -1.0682974490174067e-39) tmp = t_1; elseif (t < 3.9110949887586375e-141) tmp = x + (((y - z) * t) / (a - z)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -1.0682974490174067e-39], t$95$1, If[Less[t, 3.9110949887586375e-141], N[(x + N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y - z}{a - z} \cdot t\\
\mathbf{if}\;t < -1.0682974490174067 \cdot 10^{-39}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t < 3.9110949887586375 \cdot 10^{-141}:\\
\;\;\;\;x + \frac{\left(y - z\right) \cdot t}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024079
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, A"
:precision binary64
:alt
(if (< t -1.0682974490174067e-39) (+ x (* (/ (- y z) (- a z)) t)) (if (< t 3.9110949887586375e-141) (+ x (/ (* (- y z) t) (- a z))) (+ x (* (/ (- y z) (- a z)) t))))
(+ x (/ (* (- y z) t) (- a z))))