
(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 17 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
(let* ((t_1 (/ t (- a z))) (t_2 (/ (* (- y z) t) (- a z))))
(if (<= t_2 (- INFINITY))
(fma (- y z) t_1 x)
(if (<= t_2 1e+307) (+ t_2 x) (+ x (* (- y z) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t / (a - z);
double t_2 = ((y - z) * t) / (a - z);
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = fma((y - z), t_1, x);
} else if (t_2 <= 1e+307) {
tmp = t_2 + x;
} else {
tmp = x + ((y - z) * t_1);
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(t / Float64(a - z)) t_2 = Float64(Float64(Float64(y - z) * t) / Float64(a - z)) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = fma(Float64(y - z), t_1, x); elseif (t_2 <= 1e+307) tmp = Float64(t_2 + x); else tmp = Float64(x + Float64(Float64(y - z) * t_1)); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(N[(y - z), $MachinePrecision] * t$95$1 + x), $MachinePrecision], If[LessEqual[t$95$2, 1e+307], N[(t$95$2 + x), $MachinePrecision], N[(x + N[(N[(y - z), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{a - z}\\
t_2 := \frac{\left(y - z\right) \cdot t}{a - z}\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;\mathsf{fma}\left(y - z, t\_1, x\right)\\
\mathbf{elif}\;t\_2 \leq 10^{+307}:\\
\;\;\;\;t\_2 + x\\
\mathbf{else}:\\
\;\;\;\;x + \left(y - z\right) \cdot t\_1\\
\end{array}
\end{array}
if (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < -inf.0Initial program 42.3%
+-commutative42.3%
associate-/l*99.9%
fma-define99.9%
Simplified99.9%
if -inf.0 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < 9.99999999999999986e306Initial program 99.9%
if 9.99999999999999986e306 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) Initial program 37.4%
associate-/l*99.8%
Simplified99.8%
Final simplification99.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* (- y z) t) (- a z))))
(if (or (<= t_1 (- INFINITY)) (not (<= t_1 1e+307)))
(+ x (* (- y z) (/ t (- a z))))
(+ t_1 x))))
double code(double x, double y, double z, double t, double a) {
double t_1 = ((y - z) * t) / (a - z);
double tmp;
if ((t_1 <= -((double) INFINITY)) || !(t_1 <= 1e+307)) {
tmp = x + ((y - z) * (t / (a - z)));
} else {
tmp = t_1 + x;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
double t_1 = ((y - z) * t) / (a - z);
double tmp;
if ((t_1 <= -Double.POSITIVE_INFINITY) || !(t_1 <= 1e+307)) {
tmp = x + ((y - z) * (t / (a - z)));
} else {
tmp = t_1 + x;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = ((y - z) * t) / (a - z) tmp = 0 if (t_1 <= -math.inf) or not (t_1 <= 1e+307): tmp = x + ((y - z) * (t / (a - z))) else: tmp = t_1 + x return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(Float64(y - z) * t) / Float64(a - z)) tmp = 0.0 if ((t_1 <= Float64(-Inf)) || !(t_1 <= 1e+307)) tmp = Float64(x + Float64(Float64(y - z) * Float64(t / Float64(a - z)))); else tmp = Float64(t_1 + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = ((y - z) * t) / (a - z); tmp = 0.0; if ((t_1 <= -Inf) || ~((t_1 <= 1e+307))) tmp = x + ((y - z) * (t / (a - z))); else tmp = t_1 + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, (-Infinity)], N[Not[LessEqual[t$95$1, 1e+307]], $MachinePrecision]], N[(x + N[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\left(y - z\right) \cdot t}{a - z}\\
\mathbf{if}\;t\_1 \leq -\infty \lor \neg \left(t\_1 \leq 10^{+307}\right):\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t\_1 + x\\
\end{array}
\end{array}
if (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < -inf.0 or 9.99999999999999986e306 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) Initial program 40.0%
associate-/l*99.8%
Simplified99.8%
if -inf.0 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < 9.99999999999999986e306Initial program 99.9%
Final simplification99.9%
(FPCore (x y z t a)
:precision binary64
(if (or (<= y -4.5e+89)
(and (not (<= y 2e-6)) (or (<= y 1.12e+66) (not (<= y 1.58e+130)))))
(* t (/ y (- a z)))
(+ t x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -4.5e+89) || (!(y <= 2e-6) && ((y <= 1.12e+66) || !(y <= 1.58e+130)))) {
tmp = t * (y / (a - z));
} else {
tmp = t + 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 ((y <= (-4.5d+89)) .or. (.not. (y <= 2d-6)) .and. (y <= 1.12d+66) .or. (.not. (y <= 1.58d+130))) then
tmp = t * (y / (a - z))
else
tmp = t + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -4.5e+89) || (!(y <= 2e-6) && ((y <= 1.12e+66) || !(y <= 1.58e+130)))) {
tmp = t * (y / (a - z));
} else {
tmp = t + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -4.5e+89) or (not (y <= 2e-6) and ((y <= 1.12e+66) or not (y <= 1.58e+130))): tmp = t * (y / (a - z)) else: tmp = t + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -4.5e+89) || (!(y <= 2e-6) && ((y <= 1.12e+66) || !(y <= 1.58e+130)))) tmp = Float64(t * Float64(y / Float64(a - z))); else tmp = Float64(t + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -4.5e+89) || (~((y <= 2e-6)) && ((y <= 1.12e+66) || ~((y <= 1.58e+130))))) tmp = t * (y / (a - z)); else tmp = t + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -4.5e+89], And[N[Not[LessEqual[y, 2e-6]], $MachinePrecision], Or[LessEqual[y, 1.12e+66], N[Not[LessEqual[y, 1.58e+130]], $MachinePrecision]]]], N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.5 \cdot 10^{+89} \lor \neg \left(y \leq 2 \cdot 10^{-6}\right) \land \left(y \leq 1.12 \cdot 10^{+66} \lor \neg \left(y \leq 1.58 \cdot 10^{+130}\right)\right):\\
\;\;\;\;t \cdot \frac{y}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t + x\\
\end{array}
\end{array}
if y < -4.5e89 or 1.99999999999999991e-6 < y < 1.12e66 or 1.57999999999999994e130 < y Initial program 80.3%
associate-/l*95.5%
Simplified95.5%
Taylor expanded in x around inf 70.6%
+-commutative70.6%
associate-/l*70.7%
fma-define70.7%
*-commutative70.7%
associate-/r*73.7%
Simplified73.7%
Taylor expanded in y around inf 57.9%
associate-/l*58.9%
Simplified58.9%
if -4.5e89 < y < 1.99999999999999991e-6 or 1.12e66 < y < 1.57999999999999994e130Initial program 88.5%
associate-/l*96.4%
Simplified96.4%
Taylor expanded in z around inf 73.9%
Final simplification67.7%
(FPCore (x y z t a)
:precision binary64
(if (<= z -2.9e+168)
(+ t x)
(if (<= z -2.8e-25)
(- x (* y (/ t z)))
(if (<= z 1.95e-66)
(+ x (* y (/ t a)))
(if (<= z 1.4e+120) (- x (/ (* y t) z)) (+ t x))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.9e+168) {
tmp = t + x;
} else if (z <= -2.8e-25) {
tmp = x - (y * (t / z));
} else if (z <= 1.95e-66) {
tmp = x + (y * (t / a));
} else if (z <= 1.4e+120) {
tmp = x - ((y * t) / z);
} else {
tmp = t + 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.9d+168)) then
tmp = t + x
else if (z <= (-2.8d-25)) then
tmp = x - (y * (t / z))
else if (z <= 1.95d-66) then
tmp = x + (y * (t / a))
else if (z <= 1.4d+120) then
tmp = x - ((y * t) / z)
else
tmp = t + 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.9e+168) {
tmp = t + x;
} else if (z <= -2.8e-25) {
tmp = x - (y * (t / z));
} else if (z <= 1.95e-66) {
tmp = x + (y * (t / a));
} else if (z <= 1.4e+120) {
tmp = x - ((y * t) / z);
} else {
tmp = t + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.9e+168: tmp = t + x elif z <= -2.8e-25: tmp = x - (y * (t / z)) elif z <= 1.95e-66: tmp = x + (y * (t / a)) elif z <= 1.4e+120: tmp = x - ((y * t) / z) else: tmp = t + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.9e+168) tmp = Float64(t + x); elseif (z <= -2.8e-25) tmp = Float64(x - Float64(y * Float64(t / z))); elseif (z <= 1.95e-66) tmp = Float64(x + Float64(y * Float64(t / a))); elseif (z <= 1.4e+120) tmp = Float64(x - Float64(Float64(y * t) / z)); else tmp = Float64(t + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.9e+168) tmp = t + x; elseif (z <= -2.8e-25) tmp = x - (y * (t / z)); elseif (z <= 1.95e-66) tmp = x + (y * (t / a)); elseif (z <= 1.4e+120) tmp = x - ((y * t) / z); else tmp = t + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.9e+168], N[(t + x), $MachinePrecision], If[LessEqual[z, -2.8e-25], N[(x - N[(y * N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.95e-66], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.4e+120], N[(x - N[(N[(y * t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(t + x), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.9 \cdot 10^{+168}:\\
\;\;\;\;t + x\\
\mathbf{elif}\;z \leq -2.8 \cdot 10^{-25}:\\
\;\;\;\;x - y \cdot \frac{t}{z}\\
\mathbf{elif}\;z \leq 1.95 \cdot 10^{-66}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{+120}:\\
\;\;\;\;x - \frac{y \cdot t}{z}\\
\mathbf{else}:\\
\;\;\;\;t + x\\
\end{array}
\end{array}
if z < -2.9e168 or 1.4e120 < z Initial program 63.3%
associate-/l*92.9%
Simplified92.9%
Taylor expanded in z around inf 84.6%
if -2.9e168 < z < -2.79999999999999988e-25Initial program 89.1%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in y around inf 77.7%
associate-*l/81.8%
*-commutative81.8%
Simplified81.8%
Taylor expanded in a around 0 77.5%
associate-*r/82.3%
neg-mul-182.3%
Simplified77.5%
if -2.79999999999999988e-25 < z < 1.94999999999999991e-66Initial program 96.2%
associate-/l*96.1%
Simplified96.1%
Taylor expanded in y around inf 90.4%
associate-*l/92.3%
*-commutative92.3%
Simplified92.3%
Taylor expanded in a around inf 77.5%
if 1.94999999999999991e-66 < z < 1.4e120Initial program 94.9%
associate-/l*97.6%
Simplified97.6%
Taylor expanded in y around inf 76.8%
associate-*l/79.3%
*-commutative79.3%
Simplified79.3%
Taylor expanded in a around 0 71.7%
mul-1-neg71.7%
unsub-neg71.7%
associate-/l*66.7%
Simplified66.7%
Taylor expanded in t around 0 71.7%
Final simplification78.7%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.22e+168)
(+ t x)
(if (<= z -2.65e-28)
(- x (* t (/ y z)))
(if (<= z 9.5e-70)
(+ x (* y (/ t a)))
(if (<= z 1.48e+122) (- x (/ (* y t) z)) (+ t x))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.22e+168) {
tmp = t + x;
} else if (z <= -2.65e-28) {
tmp = x - (t * (y / z));
} else if (z <= 9.5e-70) {
tmp = x + (y * (t / a));
} else if (z <= 1.48e+122) {
tmp = x - ((y * t) / z);
} else {
tmp = t + x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-1.22d+168)) then
tmp = t + x
else if (z <= (-2.65d-28)) then
tmp = x - (t * (y / z))
else if (z <= 9.5d-70) then
tmp = x + (y * (t / a))
else if (z <= 1.48d+122) then
tmp = x - ((y * t) / z)
else
tmp = t + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.22e+168) {
tmp = t + x;
} else if (z <= -2.65e-28) {
tmp = x - (t * (y / z));
} else if (z <= 9.5e-70) {
tmp = x + (y * (t / a));
} else if (z <= 1.48e+122) {
tmp = x - ((y * t) / z);
} else {
tmp = t + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.22e+168: tmp = t + x elif z <= -2.65e-28: tmp = x - (t * (y / z)) elif z <= 9.5e-70: tmp = x + (y * (t / a)) elif z <= 1.48e+122: tmp = x - ((y * t) / z) else: tmp = t + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.22e+168) tmp = Float64(t + x); elseif (z <= -2.65e-28) tmp = Float64(x - Float64(t * Float64(y / z))); elseif (z <= 9.5e-70) tmp = Float64(x + Float64(y * Float64(t / a))); elseif (z <= 1.48e+122) tmp = Float64(x - Float64(Float64(y * t) / z)); else tmp = Float64(t + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.22e+168) tmp = t + x; elseif (z <= -2.65e-28) tmp = x - (t * (y / z)); elseif (z <= 9.5e-70) tmp = x + (y * (t / a)); elseif (z <= 1.48e+122) tmp = x - ((y * t) / z); else tmp = t + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.22e+168], N[(t + x), $MachinePrecision], If[LessEqual[z, -2.65e-28], N[(x - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.5e-70], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.48e+122], N[(x - N[(N[(y * t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(t + x), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.22 \cdot 10^{+168}:\\
\;\;\;\;t + x\\
\mathbf{elif}\;z \leq -2.65 \cdot 10^{-28}:\\
\;\;\;\;x - t \cdot \frac{y}{z}\\
\mathbf{elif}\;z \leq 9.5 \cdot 10^{-70}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{elif}\;z \leq 1.48 \cdot 10^{+122}:\\
\;\;\;\;x - \frac{y \cdot t}{z}\\
\mathbf{else}:\\
\;\;\;\;t + x\\
\end{array}
\end{array}
if z < -1.21999999999999991e168 or 1.48000000000000005e122 < z Initial program 63.3%
associate-/l*92.9%
Simplified92.9%
Taylor expanded in z around inf 84.6%
if -1.21999999999999991e168 < z < -2.64999999999999994e-28Initial program 89.1%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in y around inf 77.7%
associate-*l/81.8%
*-commutative81.8%
Simplified81.8%
Taylor expanded in a around 0 73.4%
mul-1-neg73.4%
unsub-neg73.4%
associate-/l*75.4%
Simplified75.4%
if -2.64999999999999994e-28 < z < 9.4999999999999994e-70Initial program 96.2%
associate-/l*96.1%
Simplified96.1%
Taylor expanded in y around inf 90.4%
associate-*l/92.3%
*-commutative92.3%
Simplified92.3%
Taylor expanded in a around inf 77.5%
if 9.4999999999999994e-70 < z < 1.48000000000000005e122Initial program 94.9%
associate-/l*97.6%
Simplified97.6%
Taylor expanded in y around inf 76.8%
associate-*l/79.3%
*-commutative79.3%
Simplified79.3%
Taylor expanded in a around 0 71.7%
mul-1-neg71.7%
unsub-neg71.7%
associate-/l*66.7%
Simplified66.7%
Taylor expanded in t around 0 71.7%
Final simplification78.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* t (/ y a)))))
(if (<= z -165.0)
(+ t x)
(if (<= z 1.16e-110)
t_1
(if (<= z 6.2e-37)
(* y (/ t (- a z)))
(if (<= z 2.9e+25) t_1 (+ t x)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (t * (y / a));
double tmp;
if (z <= -165.0) {
tmp = t + x;
} else if (z <= 1.16e-110) {
tmp = t_1;
} else if (z <= 6.2e-37) {
tmp = y * (t / (a - z));
} else if (z <= 2.9e+25) {
tmp = t_1;
} else {
tmp = t + 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) :: t_1
real(8) :: tmp
t_1 = x + (t * (y / a))
if (z <= (-165.0d0)) then
tmp = t + x
else if (z <= 1.16d-110) then
tmp = t_1
else if (z <= 6.2d-37) then
tmp = y * (t / (a - z))
else if (z <= 2.9d+25) then
tmp = t_1
else
tmp = t + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (t * (y / a));
double tmp;
if (z <= -165.0) {
tmp = t + x;
} else if (z <= 1.16e-110) {
tmp = t_1;
} else if (z <= 6.2e-37) {
tmp = y * (t / (a - z));
} else if (z <= 2.9e+25) {
tmp = t_1;
} else {
tmp = t + x;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (t * (y / a)) tmp = 0 if z <= -165.0: tmp = t + x elif z <= 1.16e-110: tmp = t_1 elif z <= 6.2e-37: tmp = y * (t / (a - z)) elif z <= 2.9e+25: tmp = t_1 else: tmp = t + x return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(t * Float64(y / a))) tmp = 0.0 if (z <= -165.0) tmp = Float64(t + x); elseif (z <= 1.16e-110) tmp = t_1; elseif (z <= 6.2e-37) tmp = Float64(y * Float64(t / Float64(a - z))); elseif (z <= 2.9e+25) tmp = t_1; else tmp = Float64(t + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (t * (y / a)); tmp = 0.0; if (z <= -165.0) tmp = t + x; elseif (z <= 1.16e-110) tmp = t_1; elseif (z <= 6.2e-37) tmp = y * (t / (a - z)); elseif (z <= 2.9e+25) tmp = t_1; else tmp = t + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -165.0], N[(t + x), $MachinePrecision], If[LessEqual[z, 1.16e-110], t$95$1, If[LessEqual[z, 6.2e-37], N[(y * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.9e+25], t$95$1, N[(t + x), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + t \cdot \frac{y}{a}\\
\mathbf{if}\;z \leq -165:\\
\;\;\;\;t + x\\
\mathbf{elif}\;z \leq 1.16 \cdot 10^{-110}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 6.2 \cdot 10^{-37}:\\
\;\;\;\;y \cdot \frac{t}{a - z}\\
\mathbf{elif}\;z \leq 2.9 \cdot 10^{+25}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t + x\\
\end{array}
\end{array}
if z < -165 or 2.8999999999999999e25 < z Initial program 75.0%
associate-/l*95.3%
Simplified95.3%
Taylor expanded in z around inf 73.9%
if -165 < z < 1.16000000000000001e-110 or 6.19999999999999987e-37 < z < 2.8999999999999999e25Initial program 96.4%
associate-/l*98.1%
Simplified98.1%
Taylor expanded in y around inf 90.7%
associate-*l/91.5%
*-commutative91.5%
Simplified91.5%
Taylor expanded in y around inf 86.0%
Taylor expanded in a around inf 75.1%
associate-/l*74.3%
Simplified74.3%
if 1.16000000000000001e-110 < z < 6.19999999999999987e-37Initial program 94.6%
associate-/l*89.4%
Simplified89.4%
Taylor expanded in y around inf 77.8%
associate-*l/83.7%
*-commutative83.7%
Simplified83.7%
Taylor expanded in y around inf 83.7%
Taylor expanded in y around inf 60.9%
associate-*l/66.8%
*-commutative66.8%
Simplified66.8%
Final simplification73.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ t (- a z)))))
(if (<= y -2.7e+93)
t_1
(if (<= y 2e-6)
(+ t x)
(if (<= y 1.15e+66)
(* t (/ y (- a z)))
(if (<= y 1.6e+130) (+ t x) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (t / (a - z));
double tmp;
if (y <= -2.7e+93) {
tmp = t_1;
} else if (y <= 2e-6) {
tmp = t + x;
} else if (y <= 1.15e+66) {
tmp = t * (y / (a - z));
} else if (y <= 1.6e+130) {
tmp = t + x;
} 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 = y * (t / (a - z))
if (y <= (-2.7d+93)) then
tmp = t_1
else if (y <= 2d-6) then
tmp = t + x
else if (y <= 1.15d+66) then
tmp = t * (y / (a - z))
else if (y <= 1.6d+130) then
tmp = t + x
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 = y * (t / (a - z));
double tmp;
if (y <= -2.7e+93) {
tmp = t_1;
} else if (y <= 2e-6) {
tmp = t + x;
} else if (y <= 1.15e+66) {
tmp = t * (y / (a - z));
} else if (y <= 1.6e+130) {
tmp = t + x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (t / (a - z)) tmp = 0 if y <= -2.7e+93: tmp = t_1 elif y <= 2e-6: tmp = t + x elif y <= 1.15e+66: tmp = t * (y / (a - z)) elif y <= 1.6e+130: tmp = t + x else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(t / Float64(a - z))) tmp = 0.0 if (y <= -2.7e+93) tmp = t_1; elseif (y <= 2e-6) tmp = Float64(t + x); elseif (y <= 1.15e+66) tmp = Float64(t * Float64(y / Float64(a - z))); elseif (y <= 1.6e+130) tmp = Float64(t + x); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * (t / (a - z)); tmp = 0.0; if (y <= -2.7e+93) tmp = t_1; elseif (y <= 2e-6) tmp = t + x; elseif (y <= 1.15e+66) tmp = t * (y / (a - z)); elseif (y <= 1.6e+130) tmp = t + x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.7e+93], t$95$1, If[LessEqual[y, 2e-6], N[(t + x), $MachinePrecision], If[LessEqual[y, 1.15e+66], N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.6e+130], N[(t + x), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{t}{a - z}\\
\mathbf{if}\;y \leq -2.7 \cdot 10^{+93}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2 \cdot 10^{-6}:\\
\;\;\;\;t + x\\
\mathbf{elif}\;y \leq 1.15 \cdot 10^{+66}:\\
\;\;\;\;t \cdot \frac{y}{a - z}\\
\mathbf{elif}\;y \leq 1.6 \cdot 10^{+130}:\\
\;\;\;\;t + x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2.6999999999999999e93 or 1.6e130 < y Initial program 78.9%
associate-/l*94.7%
Simplified94.7%
Taylor expanded in y around inf 75.6%
associate-*l/87.2%
*-commutative87.2%
Simplified87.2%
Taylor expanded in y around inf 86.6%
Taylor expanded in y around inf 57.9%
associate-*l/64.0%
*-commutative64.0%
Simplified64.0%
if -2.6999999999999999e93 < y < 1.99999999999999991e-6 or 1.15e66 < y < 1.6e130Initial program 88.5%
associate-/l*96.4%
Simplified96.4%
Taylor expanded in z around inf 73.9%
if 1.99999999999999991e-6 < y < 1.15e66Initial program 88.0%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 81.9%
+-commutative81.9%
associate-/l*76.2%
fma-define76.2%
*-commutative76.2%
associate-/r*76.2%
Simplified76.2%
Taylor expanded in y around inf 58.3%
associate-/l*58.4%
Simplified58.4%
Final simplification69.5%
(FPCore (x y z t a)
:precision binary64
(if (<= z -5.5e+168)
(+ t x)
(if (<= z -2.8e-25)
(- x (* t (/ y z)))
(if (<= z 1e+26) (+ x (* y (/ t a))) (+ t x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5.5e+168) {
tmp = t + x;
} else if (z <= -2.8e-25) {
tmp = x - (t * (y / z));
} else if (z <= 1e+26) {
tmp = x + (y * (t / a));
} else {
tmp = t + 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.5d+168)) then
tmp = t + x
else if (z <= (-2.8d-25)) then
tmp = x - (t * (y / z))
else if (z <= 1d+26) then
tmp = x + (y * (t / a))
else
tmp = t + 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.5e+168) {
tmp = t + x;
} else if (z <= -2.8e-25) {
tmp = x - (t * (y / z));
} else if (z <= 1e+26) {
tmp = x + (y * (t / a));
} else {
tmp = t + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -5.5e+168: tmp = t + x elif z <= -2.8e-25: tmp = x - (t * (y / z)) elif z <= 1e+26: tmp = x + (y * (t / a)) else: tmp = t + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -5.5e+168) tmp = Float64(t + x); elseif (z <= -2.8e-25) tmp = Float64(x - Float64(t * Float64(y / z))); elseif (z <= 1e+26) tmp = Float64(x + Float64(y * Float64(t / a))); else tmp = Float64(t + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -5.5e+168) tmp = t + x; elseif (z <= -2.8e-25) tmp = x - (t * (y / z)); elseif (z <= 1e+26) tmp = x + (y * (t / a)); else tmp = t + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -5.5e+168], N[(t + x), $MachinePrecision], If[LessEqual[z, -2.8e-25], N[(x - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1e+26], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5 \cdot 10^{+168}:\\
\;\;\;\;t + x\\
\mathbf{elif}\;z \leq -2.8 \cdot 10^{-25}:\\
\;\;\;\;x - t \cdot \frac{y}{z}\\
\mathbf{elif}\;z \leq 10^{+26}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;t + x\\
\end{array}
\end{array}
if z < -5.5000000000000001e168 or 1.00000000000000005e26 < z Initial program 69.7%
associate-/l*93.4%
Simplified93.4%
Taylor expanded in z around inf 78.6%
if -5.5000000000000001e168 < z < -2.79999999999999988e-25Initial program 89.1%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in y around inf 77.7%
associate-*l/81.8%
*-commutative81.8%
Simplified81.8%
Taylor expanded in a around 0 73.4%
mul-1-neg73.4%
unsub-neg73.4%
associate-/l*75.4%
Simplified75.4%
if -2.79999999999999988e-25 < z < 1.00000000000000005e26Initial program 96.0%
associate-/l*96.7%
Simplified96.7%
Taylor expanded in y around inf 89.5%
associate-*l/91.0%
*-commutative91.0%
Simplified91.0%
Taylor expanded in a around inf 74.4%
Final simplification76.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -54.0) (not (<= z 2.9e+21))) (+ x (- t (* t (/ y z)))) (+ x (* y (/ t (- a z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -54.0) || !(z <= 2.9e+21)) {
tmp = x + (t - (t * (y / z)));
} 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 ((z <= (-54.0d0)) .or. (.not. (z <= 2.9d+21))) then
tmp = x + (t - (t * (y / z)))
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 ((z <= -54.0) || !(z <= 2.9e+21)) {
tmp = x + (t - (t * (y / z)));
} else {
tmp = x + (y * (t / (a - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -54.0) or not (z <= 2.9e+21): tmp = x + (t - (t * (y / z))) else: tmp = x + (y * (t / (a - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -54.0) || !(z <= 2.9e+21)) tmp = Float64(x + Float64(t - Float64(t * Float64(y / z)))); 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 ((z <= -54.0) || ~((z <= 2.9e+21))) tmp = x + (t - (t * (y / z))); else tmp = x + (y * (t / (a - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -54.0], N[Not[LessEqual[z, 2.9e+21]], $MachinePrecision]], N[(x + N[(t - N[(t * N[(y / z), $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}\;z \leq -54 \lor \neg \left(z \leq 2.9 \cdot 10^{+21}\right):\\
\;\;\;\;x + \left(t - t \cdot \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t}{a - z}\\
\end{array}
\end{array}
if z < -54 or 2.9e21 < z Initial program 74.8%
associate-/l*95.4%
Simplified95.4%
Taylor expanded in a around 0 87.0%
associate-*r/87.0%
neg-mul-187.0%
Simplified87.0%
Taylor expanded in y around 0 81.0%
associate-*l/90.0%
associate-/r/90.8%
neg-mul-190.8%
unsub-neg90.8%
associate-/r/90.0%
associate-*l/81.0%
associate-*r/90.8%
Simplified90.8%
if -54 < z < 2.9e21Initial program 96.9%
associate-/l*96.8%
Simplified96.8%
Taylor expanded in y around inf 89.5%
associate-*l/91.0%
*-commutative91.0%
Simplified91.0%
Final simplification90.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.55e+168) (not (<= z 5.4e+121))) (+ t x) (+ x (* y (/ t (- a z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.55e+168) || !(z <= 5.4e+121)) {
tmp = t + x;
} 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 ((z <= (-1.55d+168)) .or. (.not. (z <= 5.4d+121))) then
tmp = t + x
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 ((z <= -1.55e+168) || !(z <= 5.4e+121)) {
tmp = t + x;
} else {
tmp = x + (y * (t / (a - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.55e+168) or not (z <= 5.4e+121): tmp = t + x else: tmp = x + (y * (t / (a - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.55e+168) || !(z <= 5.4e+121)) tmp = Float64(t + x); 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 ((z <= -1.55e+168) || ~((z <= 5.4e+121))) tmp = t + x; else tmp = x + (y * (t / (a - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.55e+168], N[Not[LessEqual[z, 5.4e+121]], $MachinePrecision]], N[(t + x), $MachinePrecision], N[(x + N[(y * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.55 \cdot 10^{+168} \lor \neg \left(z \leq 5.4 \cdot 10^{+121}\right):\\
\;\;\;\;t + x\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t}{a - z}\\
\end{array}
\end{array}
if z < -1.54999999999999998e168 or 5.4000000000000004e121 < z Initial program 63.3%
associate-/l*92.9%
Simplified92.9%
Taylor expanded in z around inf 84.6%
if -1.54999999999999998e168 < z < 5.4000000000000004e121Initial program 94.2%
associate-/l*97.3%
Simplified97.3%
Taylor expanded in y around inf 84.5%
associate-*l/87.0%
*-commutative87.0%
Simplified87.0%
Final simplification86.3%
(FPCore (x y z t a) :precision binary64 (if (<= z -205.0) (+ x (* t (/ (- z y) z))) (if (<= z 2.6e+21) (+ x (* y (/ t (- a z)))) (+ x (- t (* t (/ y z)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -205.0) {
tmp = x + (t * ((z - y) / z));
} else if (z <= 2.6e+21) {
tmp = x + (y * (t / (a - z)));
} else {
tmp = x + (t - (t * (y / 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 <= (-205.0d0)) then
tmp = x + (t * ((z - y) / z))
else if (z <= 2.6d+21) then
tmp = x + (y * (t / (a - z)))
else
tmp = x + (t - (t * (y / 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 <= -205.0) {
tmp = x + (t * ((z - y) / z));
} else if (z <= 2.6e+21) {
tmp = x + (y * (t / (a - z)));
} else {
tmp = x + (t - (t * (y / z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -205.0: tmp = x + (t * ((z - y) / z)) elif z <= 2.6e+21: tmp = x + (y * (t / (a - z))) else: tmp = x + (t - (t * (y / z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -205.0) tmp = Float64(x + Float64(t * Float64(Float64(z - y) / z))); elseif (z <= 2.6e+21) tmp = Float64(x + Float64(y * Float64(t / Float64(a - z)))); else tmp = Float64(x + Float64(t - Float64(t * Float64(y / z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -205.0) tmp = x + (t * ((z - y) / z)); elseif (z <= 2.6e+21) tmp = x + (y * (t / (a - z))); else tmp = x + (t - (t * (y / z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -205.0], N[(x + N[(t * N[(N[(z - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.6e+21], N[(x + N[(y * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -205:\\
\;\;\;\;x + t \cdot \frac{z - y}{z}\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{+21}:\\
\;\;\;\;x + y \cdot \frac{t}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + \left(t - t \cdot \frac{y}{z}\right)\\
\end{array}
\end{array}
if z < -205Initial program 76.9%
associate-/l*95.6%
Simplified95.6%
Taylor expanded in a around 0 71.5%
mul-1-neg71.5%
unsub-neg71.5%
associate-/l*91.4%
Simplified91.4%
if -205 < z < 2.6e21Initial program 96.9%
associate-/l*96.8%
Simplified96.8%
Taylor expanded in y around inf 89.5%
associate-*l/91.0%
*-commutative91.0%
Simplified91.0%
if 2.6e21 < z Initial program 72.0%
associate-/l*95.0%
Simplified95.0%
Taylor expanded in a around 0 86.7%
associate-*r/86.7%
neg-mul-186.7%
Simplified86.7%
Taylor expanded in y around 0 80.2%
associate-*l/88.3%
associate-/r/89.9%
neg-mul-189.9%
unsub-neg89.9%
associate-/r/88.3%
associate-*l/80.2%
associate-*r/89.9%
Simplified89.9%
Final simplification90.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -205.0) (not (<= z 1.5e+25))) (+ t x) (+ x (* y (/ t a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -205.0) || !(z <= 1.5e+25)) {
tmp = t + 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 <= (-205.0d0)) .or. (.not. (z <= 1.5d+25))) then
tmp = t + 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 <= -205.0) || !(z <= 1.5e+25)) {
tmp = t + x;
} else {
tmp = x + (y * (t / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -205.0) or not (z <= 1.5e+25): tmp = t + x else: tmp = x + (y * (t / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -205.0) || !(z <= 1.5e+25)) tmp = Float64(t + 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 <= -205.0) || ~((z <= 1.5e+25))) tmp = t + x; else tmp = x + (y * (t / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -205.0], N[Not[LessEqual[z, 1.5e+25]], $MachinePrecision]], N[(t + x), $MachinePrecision], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -205 \lor \neg \left(z \leq 1.5 \cdot 10^{+25}\right):\\
\;\;\;\;t + x\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\end{array}
\end{array}
if z < -205 or 1.50000000000000003e25 < z Initial program 75.0%
associate-/l*95.3%
Simplified95.3%
Taylor expanded in z around inf 73.9%
if -205 < z < 1.50000000000000003e25Initial program 96.1%
associate-/l*96.9%
Simplified96.9%
Taylor expanded in y around inf 89.0%
associate-*l/90.4%
*-commutative90.4%
Simplified90.4%
Taylor expanded in a around inf 73.7%
Final simplification73.8%
(FPCore (x y z t a) :precision binary64 (if (<= y -9e+200) (* y (/ t (- z))) (if (<= y 9.2e+227) (+ t x) (* (/ y z) (- t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -9e+200) {
tmp = y * (t / -z);
} else if (y <= 9.2e+227) {
tmp = t + x;
} else {
tmp = (y / 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 (y <= (-9d+200)) then
tmp = y * (t / -z)
else if (y <= 9.2d+227) then
tmp = t + x
else
tmp = (y / 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 (y <= -9e+200) {
tmp = y * (t / -z);
} else if (y <= 9.2e+227) {
tmp = t + x;
} else {
tmp = (y / z) * -t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -9e+200: tmp = y * (t / -z) elif y <= 9.2e+227: tmp = t + x else: tmp = (y / z) * -t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -9e+200) tmp = Float64(y * Float64(t / Float64(-z))); elseif (y <= 9.2e+227) tmp = Float64(t + x); else tmp = Float64(Float64(y / z) * Float64(-t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -9e+200) tmp = y * (t / -z); elseif (y <= 9.2e+227) tmp = t + x; else tmp = (y / z) * -t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -9e+200], N[(y * N[(t / (-z)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9.2e+227], N[(t + x), $MachinePrecision], N[(N[(y / z), $MachinePrecision] * (-t)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9 \cdot 10^{+200}:\\
\;\;\;\;y \cdot \frac{t}{-z}\\
\mathbf{elif}\;y \leq 9.2 \cdot 10^{+227}:\\
\;\;\;\;t + x\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{z} \cdot \left(-t\right)\\
\end{array}
\end{array}
if y < -8.99999999999999939e200Initial program 82.7%
associate-/l*91.1%
Simplified91.1%
Taylor expanded in y around inf 76.1%
associate-*l/80.3%
*-commutative80.3%
Simplified80.3%
Taylor expanded in a around 0 65.5%
mul-1-neg65.5%
unsub-neg65.5%
associate-/l*55.5%
Simplified55.5%
Taylor expanded in x around 0 53.2%
associate-*l/50.0%
associate-/r/45.5%
associate-*r/45.5%
neg-mul-145.5%
Simplified45.5%
distribute-frac-neg45.5%
associate-/r/50.0%
distribute-rgt-neg-in50.0%
Applied egg-rr50.0%
if -8.99999999999999939e200 < y < 9.1999999999999992e227Initial program 86.6%
associate-/l*96.3%
Simplified96.3%
Taylor expanded in z around inf 63.4%
if 9.1999999999999992e227 < y Initial program 74.4%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in y around inf 74.4%
associate-*l/99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in a around 0 51.0%
mul-1-neg51.0%
unsub-neg51.0%
associate-/l*60.1%
Simplified60.1%
Taylor expanded in x around 0 42.4%
associate-*l/46.8%
associate-/r/46.8%
associate-*r/46.8%
neg-mul-146.8%
Simplified46.8%
Taylor expanded in t around 0 42.4%
associate-*r/47.0%
neg-mul-147.0%
distribute-rgt-neg-in47.0%
distribute-neg-frac47.0%
Simplified47.0%
Final simplification60.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -27.0) (not (<= z 6.8e-74))) (+ t x) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -27.0) || !(z <= 6.8e-74)) {
tmp = t + 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 ((z <= (-27.0d0)) .or. (.not. (z <= 6.8d-74))) then
tmp = t + 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 ((z <= -27.0) || !(z <= 6.8e-74)) {
tmp = t + x;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -27.0) or not (z <= 6.8e-74): tmp = t + x else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -27.0) || !(z <= 6.8e-74)) tmp = Float64(t + x); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -27.0) || ~((z <= 6.8e-74))) tmp = t + x; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -27.0], N[Not[LessEqual[z, 6.8e-74]], $MachinePrecision]], N[(t + x), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -27 \lor \neg \left(z \leq 6.8 \cdot 10^{-74}\right):\\
\;\;\;\;t + x\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -27 or 6.8000000000000001e-74 < z Initial program 77.6%
associate-/l*95.9%
Simplified95.9%
Taylor expanded in z around inf 69.7%
if -27 < z < 6.8000000000000001e-74Initial program 96.3%
associate-/l*96.3%
Simplified96.3%
Taylor expanded in x around inf 48.0%
Final simplification61.0%
(FPCore (x y z t a) :precision binary64 (if (<= y 1.52e+229) (+ t x) (* (/ y z) (- t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= 1.52e+229) {
tmp = t + x;
} else {
tmp = (y / 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 (y <= 1.52d+229) then
tmp = t + x
else
tmp = (y / 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 (y <= 1.52e+229) {
tmp = t + x;
} else {
tmp = (y / z) * -t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= 1.52e+229: tmp = t + x else: tmp = (y / z) * -t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= 1.52e+229) tmp = Float64(t + x); else tmp = Float64(Float64(y / z) * Float64(-t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= 1.52e+229) tmp = t + x; else tmp = (y / z) * -t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, 1.52e+229], N[(t + x), $MachinePrecision], N[(N[(y / z), $MachinePrecision] * (-t)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.52 \cdot 10^{+229}:\\
\;\;\;\;t + x\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{z} \cdot \left(-t\right)\\
\end{array}
\end{array}
if y < 1.5200000000000001e229Initial program 86.2%
associate-/l*95.7%
Simplified95.7%
Taylor expanded in z around inf 59.6%
if 1.5200000000000001e229 < y Initial program 74.4%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in y around inf 74.4%
associate-*l/99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in a around 0 51.0%
mul-1-neg51.0%
unsub-neg51.0%
associate-/l*60.1%
Simplified60.1%
Taylor expanded in x around 0 42.4%
associate-*l/46.8%
associate-/r/46.8%
associate-*r/46.8%
neg-mul-146.8%
Simplified46.8%
Taylor expanded in t around 0 42.4%
associate-*r/47.0%
neg-mul-147.0%
distribute-rgt-neg-in47.0%
distribute-neg-frac47.0%
Simplified47.0%
Final simplification58.5%
(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 85.1%
associate-/l*96.0%
Simplified96.0%
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
return x;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x
end function
public static double code(double x, double y, double z, double t, double a) {
return x;
}
def code(x, y, z, t, a): return x
function code(x, y, z, t, a) return x end
function tmp = code(x, y, z, t, a) tmp = x; end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 85.1%
associate-/l*96.0%
Simplified96.0%
Taylor expanded in x around inf 47.9%
(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 2024096
(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))))