
(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 18 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 (/ (* (- y z) t) (- a z))))
(if (<= t_1 (- INFINITY))
(fma (- y z) (/ t (- a z)) x)
(if (<= t_1 1e+307) (+ t_1 x) (+ x (* t (/ (- y z) (- a z))))))))
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)) {
tmp = fma((y - z), (t / (a - z)), x);
} else if (t_1 <= 1e+307) {
tmp = t_1 + x;
} else {
tmp = x + (t * ((y - z) / (a - z)));
}
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)) tmp = fma(Float64(y - z), Float64(t / Float64(a - z)), x); elseif (t_1 <= 1e+307) tmp = Float64(t_1 + x); else tmp = Float64(x + Float64(t * Float64(Float64(y - z) / Float64(a - z)))); end return 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[LessEqual[t$95$1, (-Infinity)], N[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t$95$1, 1e+307], N[(t$95$1 + x), $MachinePrecision], N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\left(y - z\right) \cdot t}{a - z}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;\mathsf{fma}\left(y - z, \frac{t}{a - z}, x\right)\\
\mathbf{elif}\;t\_1 \leq 10^{+307}:\\
\;\;\;\;t\_1 + x\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y - z}{a - z}\\
\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%
+-commutative37.4%
*-commutative37.4%
associate-/l*99.9%
Applied egg-rr99.9%
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%
*-commutative99.8%
Applied egg-rr99.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
(let* ((t_1 (/ (* (- y z) t) (- a z))))
(if (<= t_1 (- INFINITY))
(+ x (* (- y z) (/ t (- a z))))
(if (<= t_1 1e+307) (+ t_1 x) (+ x (* t (/ (- y z) (- a z))))))))
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)) {
tmp = x + ((y - z) * (t / (a - z)));
} else if (t_1 <= 1e+307) {
tmp = t_1 + x;
} else {
tmp = x + (t * ((y - z) / (a - z)));
}
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) {
tmp = x + ((y - z) * (t / (a - z)));
} else if (t_1 <= 1e+307) {
tmp = t_1 + x;
} else {
tmp = x + (t * ((y - z) / (a - z)));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = ((y - z) * t) / (a - z) tmp = 0 if t_1 <= -math.inf: tmp = x + ((y - z) * (t / (a - z))) elif t_1 <= 1e+307: tmp = t_1 + x else: tmp = x + (t * ((y - z) / (a - z))) 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)) tmp = Float64(x + Float64(Float64(y - z) * Float64(t / Float64(a - z)))); elseif (t_1 <= 1e+307) tmp = Float64(t_1 + x); else tmp = Float64(x + Float64(t * Float64(Float64(y - z) / Float64(a - z)))); 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) tmp = x + ((y - z) * (t / (a - z))); elseif (t_1 <= 1e+307) tmp = t_1 + x; else tmp = x + (t * ((y - z) / (a - z))); 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[LessEqual[t$95$1, (-Infinity)], N[(x + N[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+307], N[(t$95$1 + x), $MachinePrecision], N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\left(y - z\right) \cdot t}{a - z}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t}{a - z}\\
\mathbf{elif}\;t\_1 \leq 10^{+307}:\\
\;\;\;\;t\_1 + x\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y - z}{a - z}\\
\end{array}
\end{array}
if (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < -inf.0Initial program 42.3%
associate-/l*99.9%
*-commutative99.9%
Applied egg-rr99.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%
+-commutative37.4%
*-commutative37.4%
associate-/l*99.9%
Applied egg-rr99.9%
Final simplification99.9%
(FPCore (x y z t a)
:precision binary64
(if (<= z -3.6e+168)
(+ t x)
(if (<= z -5.2e-19)
(- x (/ t (/ z y)))
(if (<= z 4e-68)
(+ x (* y (/ t a)))
(if (<= z 4.5e+120) (- x (/ (* y t) z)) (+ t x))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.6e+168) {
tmp = t + x;
} else if (z <= -5.2e-19) {
tmp = x - (t / (z / y));
} else if (z <= 4e-68) {
tmp = x + (y * (t / a));
} else if (z <= 4.5e+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 <= (-3.6d+168)) then
tmp = t + x
else if (z <= (-5.2d-19)) then
tmp = x - (t / (z / y))
else if (z <= 4d-68) then
tmp = x + (y * (t / a))
else if (z <= 4.5d+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 <= -3.6e+168) {
tmp = t + x;
} else if (z <= -5.2e-19) {
tmp = x - (t / (z / y));
} else if (z <= 4e-68) {
tmp = x + (y * (t / a));
} else if (z <= 4.5e+120) {
tmp = x - ((y * t) / z);
} else {
tmp = t + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.6e+168: tmp = t + x elif z <= -5.2e-19: tmp = x - (t / (z / y)) elif z <= 4e-68: tmp = x + (y * (t / a)) elif z <= 4.5e+120: tmp = x - ((y * t) / z) else: tmp = t + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.6e+168) tmp = Float64(t + x); elseif (z <= -5.2e-19) tmp = Float64(x - Float64(t / Float64(z / y))); elseif (z <= 4e-68) tmp = Float64(x + Float64(y * Float64(t / a))); elseif (z <= 4.5e+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 <= -3.6e+168) tmp = t + x; elseif (z <= -5.2e-19) tmp = x - (t / (z / y)); elseif (z <= 4e-68) tmp = x + (y * (t / a)); elseif (z <= 4.5e+120) tmp = x - ((y * t) / z); else tmp = t + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.6e+168], N[(t + x), $MachinePrecision], If[LessEqual[z, -5.2e-19], N[(x - N[(t / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4e-68], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.5e+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 -3.6 \cdot 10^{+168}:\\
\;\;\;\;t + x\\
\mathbf{elif}\;z \leq -5.2 \cdot 10^{-19}:\\
\;\;\;\;x - \frac{t}{\frac{z}{y}}\\
\mathbf{elif}\;z \leq 4 \cdot 10^{-68}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{elif}\;z \leq 4.5 \cdot 10^{+120}:\\
\;\;\;\;x - \frac{y \cdot t}{z}\\
\mathbf{else}:\\
\;\;\;\;t + x\\
\end{array}
\end{array}
if z < -3.5999999999999999e168 or 4.49999999999999977e120 < z Initial program 63.3%
Taylor expanded in z around inf 84.6%
if -3.5999999999999999e168 < z < -5.20000000000000026e-19Initial program 88.9%
+-commutative88.9%
*-commutative88.9%
associate-/l*97.7%
Applied egg-rr97.7%
Taylor expanded in a around 0 75.7%
mul-1-neg75.7%
unsub-neg75.7%
associate-/l*81.5%
div-sub81.5%
sub-neg81.5%
*-inverses81.5%
metadata-eval81.5%
Simplified81.5%
Taylor expanded in y around inf 75.4%
clear-num75.4%
un-div-inv77.0%
Applied egg-rr77.0%
if -5.20000000000000026e-19 < z < 4.00000000000000027e-68Initial program 96.2%
Taylor expanded in z around 0 73.9%
*-commutative73.9%
associate-/l*77.4%
Applied egg-rr77.4%
if 4.00000000000000027e-68 < z < 4.49999999999999977e120Initial program 94.9%
+-commutative94.9%
*-commutative94.9%
associate-/l*97.4%
Applied egg-rr97.4%
Taylor expanded in a around 0 84.8%
mul-1-neg84.8%
unsub-neg84.8%
associate-/l*79.9%
div-sub79.9%
sub-neg79.9%
*-inverses79.9%
metadata-eval79.9%
Simplified79.9%
Taylor expanded in y around inf 71.7%
Final simplification78.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (/ t (/ z y)))))
(if (<= z -3.6e+171)
(+ t x)
(if (<= z -3.1e-20)
t_1
(if (<= z 3.75e-65)
(+ x (* y (/ t a)))
(if (<= z 2.7e+122) t_1 (+ t x)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (t / (z / y));
double tmp;
if (z <= -3.6e+171) {
tmp = t + x;
} else if (z <= -3.1e-20) {
tmp = t_1;
} else if (z <= 3.75e-65) {
tmp = x + (y * (t / a));
} else if (z <= 2.7e+122) {
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 / (z / y))
if (z <= (-3.6d+171)) then
tmp = t + x
else if (z <= (-3.1d-20)) then
tmp = t_1
else if (z <= 3.75d-65) then
tmp = x + (y * (t / a))
else if (z <= 2.7d+122) 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 / (z / y));
double tmp;
if (z <= -3.6e+171) {
tmp = t + x;
} else if (z <= -3.1e-20) {
tmp = t_1;
} else if (z <= 3.75e-65) {
tmp = x + (y * (t / a));
} else if (z <= 2.7e+122) {
tmp = t_1;
} else {
tmp = t + x;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (t / (z / y)) tmp = 0 if z <= -3.6e+171: tmp = t + x elif z <= -3.1e-20: tmp = t_1 elif z <= 3.75e-65: tmp = x + (y * (t / a)) elif z <= 2.7e+122: tmp = t_1 else: tmp = t + x return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(t / Float64(z / y))) tmp = 0.0 if (z <= -3.6e+171) tmp = Float64(t + x); elseif (z <= -3.1e-20) tmp = t_1; elseif (z <= 3.75e-65) tmp = Float64(x + Float64(y * Float64(t / a))); elseif (z <= 2.7e+122) 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 / (z / y)); tmp = 0.0; if (z <= -3.6e+171) tmp = t + x; elseif (z <= -3.1e-20) tmp = t_1; elseif (z <= 3.75e-65) tmp = x + (y * (t / a)); elseif (z <= 2.7e+122) 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[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.6e+171], N[(t + x), $MachinePrecision], If[LessEqual[z, -3.1e-20], t$95$1, If[LessEqual[z, 3.75e-65], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.7e+122], t$95$1, N[(t + x), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \frac{t}{\frac{z}{y}}\\
\mathbf{if}\;z \leq -3.6 \cdot 10^{+171}:\\
\;\;\;\;t + x\\
\mathbf{elif}\;z \leq -3.1 \cdot 10^{-20}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.75 \cdot 10^{-65}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{elif}\;z \leq 2.7 \cdot 10^{+122}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t + x\\
\end{array}
\end{array}
if z < -3.60000000000000018e171 or 2.6999999999999998e122 < z Initial program 63.3%
Taylor expanded in z around inf 84.6%
if -3.60000000000000018e171 < z < -3.1e-20 or 3.7500000000000001e-65 < z < 2.6999999999999998e122Initial program 91.7%
+-commutative91.7%
*-commutative91.7%
associate-/l*97.6%
Applied egg-rr97.6%
Taylor expanded in a around 0 79.9%
mul-1-neg79.9%
unsub-neg79.9%
associate-/l*80.7%
div-sub80.7%
sub-neg80.7%
*-inverses80.7%
metadata-eval80.7%
Simplified80.7%
Taylor expanded in y around inf 71.3%
clear-num71.3%
un-div-inv73.3%
Applied egg-rr73.3%
if -3.1e-20 < z < 3.7500000000000001e-65Initial program 96.2%
Taylor expanded in z around 0 73.9%
*-commutative73.9%
associate-/l*77.4%
Applied egg-rr77.4%
Final simplification78.3%
(FPCore (x y z t a)
:precision binary64
(if (<= z -215.0)
(+ t x)
(if (<= z 2.5e+21)
(+ x (* y (/ t a)))
(if (<= z 2.75e+81)
(* t (- 1.0 (/ y z)))
(if (<= z 1.08e+83) (+ x (* t (/ y a))) (+ t x))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -215.0) {
tmp = t + x;
} else if (z <= 2.5e+21) {
tmp = x + (y * (t / a));
} else if (z <= 2.75e+81) {
tmp = t * (1.0 - (y / z));
} else if (z <= 1.08e+83) {
tmp = x + (t * (y / 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 <= (-215.0d0)) then
tmp = t + x
else if (z <= 2.5d+21) then
tmp = x + (y * (t / a))
else if (z <= 2.75d+81) then
tmp = t * (1.0d0 - (y / z))
else if (z <= 1.08d+83) then
tmp = x + (t * (y / 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 <= -215.0) {
tmp = t + x;
} else if (z <= 2.5e+21) {
tmp = x + (y * (t / a));
} else if (z <= 2.75e+81) {
tmp = t * (1.0 - (y / z));
} else if (z <= 1.08e+83) {
tmp = x + (t * (y / a));
} else {
tmp = t + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -215.0: tmp = t + x elif z <= 2.5e+21: tmp = x + (y * (t / a)) elif z <= 2.75e+81: tmp = t * (1.0 - (y / z)) elif z <= 1.08e+83: tmp = x + (t * (y / a)) else: tmp = t + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -215.0) tmp = Float64(t + x); elseif (z <= 2.5e+21) tmp = Float64(x + Float64(y * Float64(t / a))); elseif (z <= 2.75e+81) tmp = Float64(t * Float64(1.0 - Float64(y / z))); elseif (z <= 1.08e+83) tmp = Float64(x + Float64(t * Float64(y / a))); else tmp = Float64(t + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -215.0) tmp = t + x; elseif (z <= 2.5e+21) tmp = x + (y * (t / a)); elseif (z <= 2.75e+81) tmp = t * (1.0 - (y / z)); elseif (z <= 1.08e+83) tmp = x + (t * (y / a)); else tmp = t + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -215.0], N[(t + x), $MachinePrecision], If[LessEqual[z, 2.5e+21], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.75e+81], N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.08e+83], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + x), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -215:\\
\;\;\;\;t + x\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{+21}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{elif}\;z \leq 2.75 \cdot 10^{+81}:\\
\;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{elif}\;z \leq 1.08 \cdot 10^{+83}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t + x\\
\end{array}
\end{array}
if z < -215 or 1.08e83 < z Initial program 73.3%
Taylor expanded in z around inf 76.1%
if -215 < z < 2.5e21Initial program 96.9%
Taylor expanded in z around 0 71.8%
*-commutative71.8%
associate-/l*74.7%
Applied egg-rr74.7%
if 2.5e21 < z < 2.7500000000000002e81Initial program 92.4%
Taylor expanded in t around inf 83.6%
Taylor expanded in a around 0 76.2%
mul-1-neg76.2%
unsub-neg76.2%
Simplified76.2%
if 2.7500000000000002e81 < z < 1.08e83Initial program 52.6%
Taylor expanded in z around 0 52.6%
associate-/l*100.0%
Simplified100.0%
Final simplification75.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* t (/ y a)))))
(if (<= z -120.0)
(+ t x)
(if (<= z 2.8e+21)
t_1
(if (<= z 2.1e+81)
(* t (- 1.0 (/ y z)))
(if (<= z 2.15e+82) 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 <= -120.0) {
tmp = t + x;
} else if (z <= 2.8e+21) {
tmp = t_1;
} else if (z <= 2.1e+81) {
tmp = t * (1.0 - (y / z));
} else if (z <= 2.15e+82) {
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 <= (-120.0d0)) then
tmp = t + x
else if (z <= 2.8d+21) then
tmp = t_1
else if (z <= 2.1d+81) then
tmp = t * (1.0d0 - (y / z))
else if (z <= 2.15d+82) 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 <= -120.0) {
tmp = t + x;
} else if (z <= 2.8e+21) {
tmp = t_1;
} else if (z <= 2.1e+81) {
tmp = t * (1.0 - (y / z));
} else if (z <= 2.15e+82) {
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 <= -120.0: tmp = t + x elif z <= 2.8e+21: tmp = t_1 elif z <= 2.1e+81: tmp = t * (1.0 - (y / z)) elif z <= 2.15e+82: 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 <= -120.0) tmp = Float64(t + x); elseif (z <= 2.8e+21) tmp = t_1; elseif (z <= 2.1e+81) tmp = Float64(t * Float64(1.0 - Float64(y / z))); elseif (z <= 2.15e+82) 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 <= -120.0) tmp = t + x; elseif (z <= 2.8e+21) tmp = t_1; elseif (z <= 2.1e+81) tmp = t * (1.0 - (y / z)); elseif (z <= 2.15e+82) 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, -120.0], N[(t + x), $MachinePrecision], If[LessEqual[z, 2.8e+21], t$95$1, If[LessEqual[z, 2.1e+81], N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.15e+82], 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 -120:\\
\;\;\;\;t + x\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{+21}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{+81}:\\
\;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{elif}\;z \leq 2.15 \cdot 10^{+82}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t + x\\
\end{array}
\end{array}
if z < -120 or 2.15000000000000007e82 < z Initial program 73.3%
Taylor expanded in z around inf 76.1%
if -120 < z < 2.8e21 or 2.0999999999999999e81 < z < 2.15000000000000007e82Initial program 96.1%
Taylor expanded in z around 0 71.5%
associate-/l*71.3%
Simplified71.3%
if 2.8e21 < z < 2.0999999999999999e81Initial program 92.4%
Taylor expanded in t around inf 83.6%
Taylor expanded in a around 0 76.2%
mul-1-neg76.2%
unsub-neg76.2%
Simplified76.2%
Final simplification73.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (- 1.0 (/ y z)))))
(if (<= y -3.2e+53)
t_1
(if (<= y 3.6e+20)
(+ t x)
(if (<= y 5.6e+65) t_1 (if (<= y 9.5e+230) (+ t x) (/ y (/ a t))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * (1.0 - (y / z));
double tmp;
if (y <= -3.2e+53) {
tmp = t_1;
} else if (y <= 3.6e+20) {
tmp = t + x;
} else if (y <= 5.6e+65) {
tmp = t_1;
} else if (y <= 9.5e+230) {
tmp = t + x;
} else {
tmp = y / (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) :: t_1
real(8) :: tmp
t_1 = t * (1.0d0 - (y / z))
if (y <= (-3.2d+53)) then
tmp = t_1
else if (y <= 3.6d+20) then
tmp = t + x
else if (y <= 5.6d+65) then
tmp = t_1
else if (y <= 9.5d+230) then
tmp = t + x
else
tmp = y / (a / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t * (1.0 - (y / z));
double tmp;
if (y <= -3.2e+53) {
tmp = t_1;
} else if (y <= 3.6e+20) {
tmp = t + x;
} else if (y <= 5.6e+65) {
tmp = t_1;
} else if (y <= 9.5e+230) {
tmp = t + x;
} else {
tmp = y / (a / t);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * (1.0 - (y / z)) tmp = 0 if y <= -3.2e+53: tmp = t_1 elif y <= 3.6e+20: tmp = t + x elif y <= 5.6e+65: tmp = t_1 elif y <= 9.5e+230: tmp = t + x else: tmp = y / (a / t) return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(1.0 - Float64(y / z))) tmp = 0.0 if (y <= -3.2e+53) tmp = t_1; elseif (y <= 3.6e+20) tmp = Float64(t + x); elseif (y <= 5.6e+65) tmp = t_1; elseif (y <= 9.5e+230) tmp = Float64(t + x); else tmp = Float64(y / Float64(a / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * (1.0 - (y / z)); tmp = 0.0; if (y <= -3.2e+53) tmp = t_1; elseif (y <= 3.6e+20) tmp = t + x; elseif (y <= 5.6e+65) tmp = t_1; elseif (y <= 9.5e+230) tmp = t + x; else tmp = y / (a / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.2e+53], t$95$1, If[LessEqual[y, 3.6e+20], N[(t + x), $MachinePrecision], If[LessEqual[y, 5.6e+65], t$95$1, If[LessEqual[y, 9.5e+230], N[(t + x), $MachinePrecision], N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{if}\;y \leq -3.2 \cdot 10^{+53}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 3.6 \cdot 10^{+20}:\\
\;\;\;\;t + x\\
\mathbf{elif}\;y \leq 5.6 \cdot 10^{+65}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 9.5 \cdot 10^{+230}:\\
\;\;\;\;t + x\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{\frac{a}{t}}\\
\end{array}
\end{array}
if y < -3.2e53 or 3.6e20 < y < 5.5999999999999998e65Initial program 81.5%
Taylor expanded in t around inf 69.0%
Taylor expanded in a around 0 60.2%
mul-1-neg60.2%
unsub-neg60.2%
Simplified60.2%
if -3.2e53 < y < 3.6e20 or 5.5999999999999998e65 < y < 9.5000000000000002e230Initial program 87.6%
Taylor expanded in z around inf 67.7%
if 9.5000000000000002e230 < y Initial program 74.4%
Taylor expanded in z around 0 51.7%
Taylor expanded in y around inf 67.7%
Taylor expanded in t around inf 54.5%
clear-num54.6%
un-div-inv54.6%
Applied egg-rr54.6%
Final simplification64.9%
(FPCore (x y z t a)
:precision binary64
(if (<= z -6e+169)
(+ t x)
(if (<= z -3.15e-26)
(- x (* t (/ y z)))
(if (<= z 1.45e+25) (+ x (* y (/ t a))) (+ t x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6e+169) {
tmp = t + x;
} else if (z <= -3.15e-26) {
tmp = x - (t * (y / z));
} else if (z <= 1.45e+25) {
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 <= (-6d+169)) then
tmp = t + x
else if (z <= (-3.15d-26)) then
tmp = x - (t * (y / z))
else if (z <= 1.45d+25) 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 <= -6e+169) {
tmp = t + x;
} else if (z <= -3.15e-26) {
tmp = x - (t * (y / z));
} else if (z <= 1.45e+25) {
tmp = x + (y * (t / a));
} else {
tmp = t + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -6e+169: tmp = t + x elif z <= -3.15e-26: tmp = x - (t * (y / z)) elif z <= 1.45e+25: tmp = x + (y * (t / a)) else: tmp = t + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -6e+169) tmp = Float64(t + x); elseif (z <= -3.15e-26) tmp = Float64(x - Float64(t * Float64(y / z))); elseif (z <= 1.45e+25) 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 <= -6e+169) tmp = t + x; elseif (z <= -3.15e-26) tmp = x - (t * (y / z)); elseif (z <= 1.45e+25) tmp = x + (y * (t / a)); else tmp = t + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6e+169], N[(t + x), $MachinePrecision], If[LessEqual[z, -3.15e-26], N[(x - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.45e+25], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6 \cdot 10^{+169}:\\
\;\;\;\;t + x\\
\mathbf{elif}\;z \leq -3.15 \cdot 10^{-26}:\\
\;\;\;\;x - t \cdot \frac{y}{z}\\
\mathbf{elif}\;z \leq 1.45 \cdot 10^{+25}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;t + x\\
\end{array}
\end{array}
if z < -5.9999999999999999e169 or 1.44999999999999995e25 < z Initial program 69.7%
Taylor expanded in z around inf 78.6%
if -5.9999999999999999e169 < z < -3.15e-26Initial program 89.1%
+-commutative89.1%
*-commutative89.1%
associate-/l*97.7%
Applied egg-rr97.7%
Taylor expanded in a around 0 74.6%
mul-1-neg74.6%
unsub-neg74.6%
associate-/l*80.3%
div-sub80.3%
sub-neg80.3%
*-inverses80.3%
metadata-eval80.3%
Simplified80.3%
Taylor expanded in y around inf 75.4%
if -3.15e-26 < z < 1.44999999999999995e25Initial program 96.0%
Taylor expanded in z around 0 71.5%
*-commutative71.5%
associate-/l*74.4%
Applied egg-rr74.4%
Final simplification76.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -54.0) (not (<= z 2.8e+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.8e+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.8d+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.8e+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.8e+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.8e+21)) tmp = Float64(x + Float64(t - Float64(t * Float64(y / z)))); else tmp = Float64(x + Float64(Float64(y * 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.8e+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.8e+21]], $MachinePrecision]], N[(x + N[(t - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -54 \lor \neg \left(z \leq 2.8 \cdot 10^{+21}\right):\\
\;\;\;\;x + \left(t - t \cdot \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot t}{a - z}\\
\end{array}
\end{array}
if z < -54 or 2.8e21 < z Initial program 74.8%
+-commutative74.8%
*-commutative74.8%
associate-/l*99.9%
Applied egg-rr99.9%
Taylor expanded in t around 0 74.8%
associate-*r/99.9%
*-commutative99.9%
*-rgt-identity99.9%
associate-*r/99.8%
associate-*r*95.2%
associate-*l/95.4%
*-lft-identity95.4%
Simplified95.4%
Taylor expanded in a around 0 87.0%
mul-1-neg87.0%
distribute-neg-frac287.0%
Simplified87.0%
Taylor expanded in y around 0 81.0%
mul-1-neg81.0%
associate-*r/90.8%
unsub-neg90.8%
Simplified90.8%
if -54 < z < 2.8e21Initial program 96.9%
Taylor expanded in y around inf 89.5%
Final simplification90.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -8.8e+167) (not (<= z 2.6e+121))) (+ t x) (+ x (/ (* y t) (- a z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -8.8e+167) || !(z <= 2.6e+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 <= (-8.8d+167)) .or. (.not. (z <= 2.6d+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 <= -8.8e+167) || !(z <= 2.6e+121)) {
tmp = t + x;
} else {
tmp = x + ((y * t) / (a - z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -8.8e+167) or not (z <= 2.6e+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 <= -8.8e+167) || !(z <= 2.6e+121)) tmp = Float64(t + x); else tmp = Float64(x + Float64(Float64(y * t) / Float64(a - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -8.8e+167) || ~((z <= 2.6e+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, -8.8e+167], N[Not[LessEqual[z, 2.6e+121]], $MachinePrecision]], N[(t + x), $MachinePrecision], N[(x + N[(N[(y * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.8 \cdot 10^{+167} \lor \neg \left(z \leq 2.6 \cdot 10^{+121}\right):\\
\;\;\;\;t + x\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot t}{a - z}\\
\end{array}
\end{array}
if z < -8.80000000000000013e167 or 2.5999999999999999e121 < z Initial program 63.3%
Taylor expanded in z around inf 84.6%
if -8.80000000000000013e167 < z < 2.5999999999999999e121Initial program 94.2%
Taylor expanded in y around inf 84.5%
Final simplification84.5%
(FPCore (x y z t a) :precision binary64 (if (<= z -145.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 <= -145.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 <= (-145.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 <= -145.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 <= -145.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 <= -145.0) tmp = Float64(x + Float64(t * Float64(Float64(z - y) / z))); elseif (z <= 2.6e+21) tmp = Float64(x + Float64(Float64(y * 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 <= -145.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, -145.0], N[(x + N[(t * N[(N[(z - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.6e+21], N[(x + N[(N[(y * t), $MachinePrecision] / N[(a - z), $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 -145:\\
\;\;\;\;x + t \cdot \frac{z - y}{z}\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{+21}:\\
\;\;\;\;x + \frac{y \cdot t}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + \left(t - t \cdot \frac{y}{z}\right)\\
\end{array}
\end{array}
if z < -145Initial program 76.9%
Taylor expanded in a around 0 71.5%
mul-1-neg71.5%
unsub-neg71.5%
associate-/l*91.4%
Simplified91.4%
if -145 < z < 2.6e21Initial program 96.9%
Taylor expanded in y around inf 89.5%
if 2.6e21 < z Initial program 72.0%
+-commutative72.0%
*-commutative72.0%
associate-/l*99.9%
Applied egg-rr99.9%
Taylor expanded in t around 0 72.0%
associate-*r/99.9%
*-commutative99.9%
*-rgt-identity99.9%
associate-*r/99.8%
associate-*r*94.9%
associate-*l/95.0%
*-lft-identity95.0%
Simplified95.0%
Taylor expanded in a around 0 86.7%
mul-1-neg86.7%
distribute-neg-frac286.7%
Simplified86.7%
Taylor expanded in y around 0 80.2%
mul-1-neg80.2%
associate-*r/89.9%
unsub-neg89.9%
Simplified89.9%
Final simplification90.2%
(FPCore (x y z t a) :precision binary64 (if (<= y -4.7e+199) (* y (/ t (- z))) (if (<= y 8.8e+231) (+ t x) (/ y (/ a t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -4.7e+199) {
tmp = y * (t / -z);
} else if (y <= 8.8e+231) {
tmp = t + x;
} else {
tmp = y / (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 (y <= (-4.7d+199)) then
tmp = y * (t / -z)
else if (y <= 8.8d+231) then
tmp = t + x
else
tmp = y / (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 (y <= -4.7e+199) {
tmp = y * (t / -z);
} else if (y <= 8.8e+231) {
tmp = t + x;
} else {
tmp = y / (a / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -4.7e+199: tmp = y * (t / -z) elif y <= 8.8e+231: tmp = t + x else: tmp = y / (a / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -4.7e+199) tmp = Float64(y * Float64(t / Float64(-z))); elseif (y <= 8.8e+231) tmp = Float64(t + x); else tmp = Float64(y / Float64(a / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -4.7e+199) tmp = y * (t / -z); elseif (y <= 8.8e+231) tmp = t + x; else tmp = y / (a / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -4.7e+199], N[(y * N[(t / (-z)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8.8e+231], N[(t + x), $MachinePrecision], N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.7 \cdot 10^{+199}:\\
\;\;\;\;y \cdot \frac{t}{-z}\\
\mathbf{elif}\;y \leq 8.8 \cdot 10^{+231}:\\
\;\;\;\;t + x\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{\frac{a}{t}}\\
\end{array}
\end{array}
if y < -4.7000000000000001e199Initial program 82.7%
+-commutative82.7%
*-commutative82.7%
associate-/l*82.3%
Applied egg-rr82.3%
Taylor expanded in a around 0 72.0%
mul-1-neg72.0%
unsub-neg72.0%
associate-/l*71.5%
div-sub71.5%
sub-neg71.5%
*-inverses71.5%
metadata-eval71.5%
Simplified71.5%
Taylor expanded in y around inf 55.5%
Taylor expanded in x around 0 53.2%
mul-1-neg53.2%
associate-*r/42.9%
*-commutative42.9%
associate-*l/53.2%
associate-*r/50.0%
distribute-rgt-neg-in50.0%
distribute-neg-frac250.0%
Simplified50.0%
if -4.7000000000000001e199 < y < 8.79999999999999967e231Initial program 86.6%
Taylor expanded in z around inf 63.4%
if 8.79999999999999967e231 < y Initial program 74.4%
Taylor expanded in z around 0 51.7%
Taylor expanded in y around inf 67.7%
Taylor expanded in t around inf 54.5%
clear-num54.6%
un-div-inv54.6%
Applied egg-rr54.6%
Final simplification61.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -23.0) (not (<= z 3.8e-73))) (+ t x) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -23.0) || !(z <= 3.8e-73)) {
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 <= (-23.0d0)) .or. (.not. (z <= 3.8d-73))) 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 <= -23.0) || !(z <= 3.8e-73)) {
tmp = t + x;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -23.0) or not (z <= 3.8e-73): tmp = t + x else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -23.0) || !(z <= 3.8e-73)) 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 <= -23.0) || ~((z <= 3.8e-73))) tmp = t + x; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -23.0], N[Not[LessEqual[z, 3.8e-73]], $MachinePrecision]], N[(t + x), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -23 \lor \neg \left(z \leq 3.8 \cdot 10^{-73}\right):\\
\;\;\;\;t + x\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -23 or 3.8000000000000003e-73 < z Initial program 77.6%
Taylor expanded in z around inf 69.7%
if -23 < z < 3.8000000000000003e-73Initial program 96.3%
Taylor expanded in x around inf 48.0%
Final simplification61.0%
(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%
*-commutative96.0%
Applied egg-rr96.0%
Final simplification96.0%
(FPCore (x y z t a) :precision binary64 (if (<= y 4.6e+229) (+ t x) (/ y (/ a t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= 4.6e+229) {
tmp = t + x;
} else {
tmp = y / (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 (y <= 4.6d+229) then
tmp = t + x
else
tmp = y / (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 (y <= 4.6e+229) {
tmp = t + x;
} else {
tmp = y / (a / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= 4.6e+229: tmp = t + x else: tmp = y / (a / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= 4.6e+229) tmp = Float64(t + x); else tmp = Float64(y / Float64(a / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= 4.6e+229) tmp = t + x; else tmp = y / (a / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, 4.6e+229], N[(t + x), $MachinePrecision], N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 4.6 \cdot 10^{+229}:\\
\;\;\;\;t + x\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{\frac{a}{t}}\\
\end{array}
\end{array}
if y < 4.5999999999999999e229Initial program 86.2%
Taylor expanded in z around inf 59.6%
if 4.5999999999999999e229 < y Initial program 74.4%
Taylor expanded in z around 0 51.7%
Taylor expanded in y around inf 67.7%
Taylor expanded in t around inf 54.5%
clear-num54.6%
un-div-inv54.6%
Applied egg-rr54.6%
Final simplification59.2%
(FPCore (x y z t a) :precision binary64 (if (<= y 3.3e+232) (+ t x) (* y (/ t a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= 3.3e+232) {
tmp = t + x;
} else {
tmp = 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 (y <= 3.3d+232) then
tmp = t + x
else
tmp = 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 (y <= 3.3e+232) {
tmp = t + x;
} else {
tmp = y * (t / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= 3.3e+232: tmp = t + x else: tmp = y * (t / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= 3.3e+232) tmp = Float64(t + x); else tmp = Float64(y * Float64(t / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= 3.3e+232) tmp = t + x; else tmp = y * (t / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, 3.3e+232], N[(t + x), $MachinePrecision], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 3.3 \cdot 10^{+232}:\\
\;\;\;\;t + x\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{t}{a}\\
\end{array}
\end{array}
if y < 3.3e232Initial program 86.2%
Taylor expanded in z around inf 59.6%
if 3.3e232 < y Initial program 74.4%
Taylor expanded in z around 0 51.7%
Taylor expanded in y around inf 67.7%
Taylor expanded in t around inf 54.5%
Final simplification59.2%
(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%
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))))