
(FPCore (x y z t a) :precision binary64 (+ x (/ (* y (- z t)) (- z a))))
double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (z - a));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + ((y * (z - t)) / (z - a))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (z - a));
}
def code(x, y, z, t, a): return x + ((y * (z - t)) / (z - a))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y * Float64(z - t)) / Float64(z - a))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y * (z - t)) / (z - a)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - t\right)}{z - a}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (/ (* y (- z t)) (- z a))))
double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (z - a));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + ((y * (z - t)) / (z - a))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (z - a));
}
def code(x, y, z, t, a): return x + ((y * (z - t)) / (z - a))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y * Float64(z - t)) / Float64(z - a))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y * (z - t)) / (z - a)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - t\right)}{z - a}
\end{array}
(FPCore (x y z t a) :precision binary64 (fma y (/ (- z t) (- z a)) x))
double code(double x, double y, double z, double t, double a) {
return fma(y, ((z - t) / (z - a)), x);
}
function code(x, y, z, t, a) return fma(y, Float64(Float64(z - t) / Float64(z - a)), x) end
code[x_, y_, z_, t_, a_] := N[(y * N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(y, \frac{z - t}{z - a}, x\right)
\end{array}
Initial program 88.5%
+-commutative88.5%
associate-/l*99.1%
fma-define99.1%
Simplified99.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (* y (- t z)) (- a z)))))
(if (or (<= t_1 (- INFINITY)) (not (<= t_1 1e+305)))
(/ y (/ (- z a) (- z t)))
t_1)))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y * (t - z)) / (a - z));
double tmp;
if ((t_1 <= -((double) INFINITY)) || !(t_1 <= 1e+305)) {
tmp = y / ((z - a) / (z - t));
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y * (t - z)) / (a - z));
double tmp;
if ((t_1 <= -Double.POSITIVE_INFINITY) || !(t_1 <= 1e+305)) {
tmp = y / ((z - a) / (z - t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y * (t - z)) / (a - z)) tmp = 0 if (t_1 <= -math.inf) or not (t_1 <= 1e+305): tmp = y / ((z - a) / (z - t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y * Float64(t - z)) / Float64(a - z))) tmp = 0.0 if ((t_1 <= Float64(-Inf)) || !(t_1 <= 1e+305)) tmp = Float64(y / Float64(Float64(z - a) / Float64(z - t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((y * (t - z)) / (a - z)); tmp = 0.0; if ((t_1 <= -Inf) || ~((t_1 <= 1e+305))) tmp = y / ((z - a) / (z - t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, (-Infinity)], N[Not[LessEqual[t$95$1, 1e+305]], $MachinePrecision]], N[(y / N[(N[(z - a), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y \cdot \left(t - z\right)}{a - z}\\
\mathbf{if}\;t\_1 \leq -\infty \lor \neg \left(t\_1 \leq 10^{+305}\right):\\
\;\;\;\;\frac{y}{\frac{z - a}{z - t}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a))) < -inf.0 or 9.9999999999999994e304 < (+.f64 x (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a))) Initial program 47.1%
+-commutative47.1%
associate-/l*99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in y around inf 92.8%
div-sub92.8%
associate-*r/47.1%
associate-*l/92.6%
Simplified92.6%
associate-/r/92.8%
Applied egg-rr92.8%
if -inf.0 < (+.f64 x (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a))) < 9.9999999999999994e304Initial program 99.9%
Final simplification98.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (- t z) (/ y (- a z)))))
(if (<= z -1.95e+26)
(+ x (* y (/ z (- z a))))
(if (<= z 5.8e-9)
(+ x (/ y (/ a t)))
(if (<= z 3.4e+35)
t_1
(if (<= z 1.1e+140)
(- x (/ (* y (- t z)) z))
(if (<= z 2.7e+152) t_1 (+ y x))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (t - z) * (y / (a - z));
double tmp;
if (z <= -1.95e+26) {
tmp = x + (y * (z / (z - a)));
} else if (z <= 5.8e-9) {
tmp = x + (y / (a / t));
} else if (z <= 3.4e+35) {
tmp = t_1;
} else if (z <= 1.1e+140) {
tmp = x - ((y * (t - z)) / z);
} else if (z <= 2.7e+152) {
tmp = t_1;
} else {
tmp = y + 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 = (t - z) * (y / (a - z))
if (z <= (-1.95d+26)) then
tmp = x + (y * (z / (z - a)))
else if (z <= 5.8d-9) then
tmp = x + (y / (a / t))
else if (z <= 3.4d+35) then
tmp = t_1
else if (z <= 1.1d+140) then
tmp = x - ((y * (t - z)) / z)
else if (z <= 2.7d+152) then
tmp = t_1
else
tmp = y + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (t - z) * (y / (a - z));
double tmp;
if (z <= -1.95e+26) {
tmp = x + (y * (z / (z - a)));
} else if (z <= 5.8e-9) {
tmp = x + (y / (a / t));
} else if (z <= 3.4e+35) {
tmp = t_1;
} else if (z <= 1.1e+140) {
tmp = x - ((y * (t - z)) / z);
} else if (z <= 2.7e+152) {
tmp = t_1;
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (t - z) * (y / (a - z)) tmp = 0 if z <= -1.95e+26: tmp = x + (y * (z / (z - a))) elif z <= 5.8e-9: tmp = x + (y / (a / t)) elif z <= 3.4e+35: tmp = t_1 elif z <= 1.1e+140: tmp = x - ((y * (t - z)) / z) elif z <= 2.7e+152: tmp = t_1 else: tmp = y + x return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(t - z) * Float64(y / Float64(a - z))) tmp = 0.0 if (z <= -1.95e+26) tmp = Float64(x + Float64(y * Float64(z / Float64(z - a)))); elseif (z <= 5.8e-9) tmp = Float64(x + Float64(y / Float64(a / t))); elseif (z <= 3.4e+35) tmp = t_1; elseif (z <= 1.1e+140) tmp = Float64(x - Float64(Float64(y * Float64(t - z)) / z)); elseif (z <= 2.7e+152) tmp = t_1; else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (t - z) * (y / (a - z)); tmp = 0.0; if (z <= -1.95e+26) tmp = x + (y * (z / (z - a))); elseif (z <= 5.8e-9) tmp = x + (y / (a / t)); elseif (z <= 3.4e+35) tmp = t_1; elseif (z <= 1.1e+140) tmp = x - ((y * (t - z)) / z); elseif (z <= 2.7e+152) tmp = t_1; else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(t - z), $MachinePrecision] * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.95e+26], N[(x + N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.8e-9], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.4e+35], t$95$1, If[LessEqual[z, 1.1e+140], N[(x - N[(N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.7e+152], t$95$1, N[(y + x), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(t - z\right) \cdot \frac{y}{a - z}\\
\mathbf{if}\;z \leq -1.95 \cdot 10^{+26}:\\
\;\;\;\;x + y \cdot \frac{z}{z - a}\\
\mathbf{elif}\;z \leq 5.8 \cdot 10^{-9}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\
\mathbf{elif}\;z \leq 3.4 \cdot 10^{+35}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{+140}:\\
\;\;\;\;x - \frac{y \cdot \left(t - z\right)}{z}\\
\mathbf{elif}\;z \leq 2.7 \cdot 10^{+152}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if z < -1.95e26Initial program 80.9%
Taylor expanded in t around 0 77.1%
associate-/l*92.7%
Simplified92.7%
if -1.95e26 < z < 5.79999999999999982e-9Initial program 94.5%
Taylor expanded in z around 0 82.1%
*-commutative82.1%
associate-/l*86.8%
Applied egg-rr86.8%
clear-num86.8%
un-div-inv86.9%
Applied egg-rr86.9%
if 5.79999999999999982e-9 < z < 3.4000000000000001e35 or 1.0999999999999999e140 < z < 2.70000000000000015e152Initial program 81.3%
+-commutative81.3%
associate-/l*99.8%
fma-define99.8%
Simplified99.8%
Taylor expanded in y around inf 93.3%
div-sub93.3%
associate-*r/74.8%
associate-*l/93.3%
Simplified93.3%
if 3.4000000000000001e35 < z < 1.0999999999999999e140Initial program 99.9%
Taylor expanded in a around 0 86.5%
if 2.70000000000000015e152 < z Initial program 67.2%
+-commutative67.2%
associate-/l*100.0%
fma-define100.0%
Simplified100.0%
Taylor expanded in z around inf 100.0%
+-commutative100.0%
Simplified100.0%
Final simplification89.8%
(FPCore (x y z t a)
:precision binary64
(if (<= z -6.4e+22)
(+ x (* y (/ z (- z a))))
(if (<= z 1.04e-8)
(+ x (/ y (/ a t)))
(if (<= z 5.2e+35)
(* (- t z) (/ y (- a z)))
(if (<= z 9.2e+79) (+ x (/ (* y t) a)) (+ x (* y (/ (- z t) z))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6.4e+22) {
tmp = x + (y * (z / (z - a)));
} else if (z <= 1.04e-8) {
tmp = x + (y / (a / t));
} else if (z <= 5.2e+35) {
tmp = (t - z) * (y / (a - z));
} else if (z <= 9.2e+79) {
tmp = x + ((y * t) / a);
} else {
tmp = x + (y * ((z - t) / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-6.4d+22)) then
tmp = x + (y * (z / (z - a)))
else if (z <= 1.04d-8) then
tmp = x + (y / (a / t))
else if (z <= 5.2d+35) then
tmp = (t - z) * (y / (a - z))
else if (z <= 9.2d+79) then
tmp = x + ((y * t) / a)
else
tmp = x + (y * ((z - t) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6.4e+22) {
tmp = x + (y * (z / (z - a)));
} else if (z <= 1.04e-8) {
tmp = x + (y / (a / t));
} else if (z <= 5.2e+35) {
tmp = (t - z) * (y / (a - z));
} else if (z <= 9.2e+79) {
tmp = x + ((y * t) / a);
} else {
tmp = x + (y * ((z - t) / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -6.4e+22: tmp = x + (y * (z / (z - a))) elif z <= 1.04e-8: tmp = x + (y / (a / t)) elif z <= 5.2e+35: tmp = (t - z) * (y / (a - z)) elif z <= 9.2e+79: tmp = x + ((y * t) / a) else: tmp = x + (y * ((z - t) / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -6.4e+22) tmp = Float64(x + Float64(y * Float64(z / Float64(z - a)))); elseif (z <= 1.04e-8) tmp = Float64(x + Float64(y / Float64(a / t))); elseif (z <= 5.2e+35) tmp = Float64(Float64(t - z) * Float64(y / Float64(a - z))); elseif (z <= 9.2e+79) tmp = Float64(x + Float64(Float64(y * t) / a)); else tmp = Float64(x + Float64(y * Float64(Float64(z - t) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -6.4e+22) tmp = x + (y * (z / (z - a))); elseif (z <= 1.04e-8) tmp = x + (y / (a / t)); elseif (z <= 5.2e+35) tmp = (t - z) * (y / (a - z)); elseif (z <= 9.2e+79) tmp = x + ((y * t) / a); else tmp = x + (y * ((z - t) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6.4e+22], N[(x + N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.04e-8], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.2e+35], N[(N[(t - z), $MachinePrecision] * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.2e+79], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.4 \cdot 10^{+22}:\\
\;\;\;\;x + y \cdot \frac{z}{z - a}\\
\mathbf{elif}\;z \leq 1.04 \cdot 10^{-8}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{+35}:\\
\;\;\;\;\left(t - z\right) \cdot \frac{y}{a - z}\\
\mathbf{elif}\;z \leq 9.2 \cdot 10^{+79}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z - t}{z}\\
\end{array}
\end{array}
if z < -6.4e22Initial program 80.9%
Taylor expanded in t around 0 77.1%
associate-/l*92.7%
Simplified92.7%
if -6.4e22 < z < 1.04e-8Initial program 94.5%
Taylor expanded in z around 0 82.1%
*-commutative82.1%
associate-/l*86.8%
Applied egg-rr86.8%
clear-num86.8%
un-div-inv86.9%
Applied egg-rr86.9%
if 1.04e-8 < z < 5.20000000000000013e35Initial program 99.6%
+-commutative99.6%
associate-/l*99.7%
fma-define99.7%
Simplified99.7%
Taylor expanded in y around inf 90.9%
div-sub90.9%
associate-*r/90.7%
associate-*l/91.2%
Simplified91.2%
if 5.20000000000000013e35 < z < 9.2000000000000002e79Initial program 100.0%
Taylor expanded in z around 0 100.0%
if 9.2000000000000002e79 < z Initial program 75.9%
+-commutative75.9%
associate-/l*100.0%
fma-define100.0%
Simplified100.0%
Taylor expanded in a around 0 71.2%
+-commutative71.2%
associate-/l*93.2%
Simplified93.2%
Final simplification89.8%
(FPCore (x y z t a)
:precision binary64
(if (<= z -5400.0)
(+ y x)
(if (<= z 1.14e-8)
(+ x (/ y (/ a t)))
(if (<= z 5.4e+35)
(* (- t z) (/ y (- a z)))
(if (<= z 4.5e+101) (- x (* t (/ y z))) (+ y x))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5400.0) {
tmp = y + x;
} else if (z <= 1.14e-8) {
tmp = x + (y / (a / t));
} else if (z <= 5.4e+35) {
tmp = (t - z) * (y / (a - z));
} else if (z <= 4.5e+101) {
tmp = x - (t * (y / z));
} else {
tmp = y + 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 <= (-5400.0d0)) then
tmp = y + x
else if (z <= 1.14d-8) then
tmp = x + (y / (a / t))
else if (z <= 5.4d+35) then
tmp = (t - z) * (y / (a - z))
else if (z <= 4.5d+101) then
tmp = x - (t * (y / z))
else
tmp = y + 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 <= -5400.0) {
tmp = y + x;
} else if (z <= 1.14e-8) {
tmp = x + (y / (a / t));
} else if (z <= 5.4e+35) {
tmp = (t - z) * (y / (a - z));
} else if (z <= 4.5e+101) {
tmp = x - (t * (y / z));
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -5400.0: tmp = y + x elif z <= 1.14e-8: tmp = x + (y / (a / t)) elif z <= 5.4e+35: tmp = (t - z) * (y / (a - z)) elif z <= 4.5e+101: tmp = x - (t * (y / z)) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -5400.0) tmp = Float64(y + x); elseif (z <= 1.14e-8) tmp = Float64(x + Float64(y / Float64(a / t))); elseif (z <= 5.4e+35) tmp = Float64(Float64(t - z) * Float64(y / Float64(a - z))); elseif (z <= 4.5e+101) tmp = Float64(x - Float64(t * Float64(y / z))); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -5400.0) tmp = y + x; elseif (z <= 1.14e-8) tmp = x + (y / (a / t)); elseif (z <= 5.4e+35) tmp = (t - z) * (y / (a - z)); elseif (z <= 4.5e+101) tmp = x - (t * (y / z)); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -5400.0], N[(y + x), $MachinePrecision], If[LessEqual[z, 1.14e-8], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.4e+35], N[(N[(t - z), $MachinePrecision] * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.5e+101], N[(x - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5400:\\
\;\;\;\;y + x\\
\mathbf{elif}\;z \leq 1.14 \cdot 10^{-8}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\
\mathbf{elif}\;z \leq 5.4 \cdot 10^{+35}:\\
\;\;\;\;\left(t - z\right) \cdot \frac{y}{a - z}\\
\mathbf{elif}\;z \leq 4.5 \cdot 10^{+101}:\\
\;\;\;\;x - t \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if z < -5400 or 4.5000000000000002e101 < z Initial program 77.9%
+-commutative77.9%
associate-/l*100.0%
fma-define100.0%
Simplified100.0%
Taylor expanded in z around inf 88.9%
+-commutative88.9%
Simplified88.9%
if -5400 < z < 1.14e-8Initial program 94.3%
Taylor expanded in z around 0 82.3%
*-commutative82.3%
associate-/l*87.8%
Applied egg-rr87.8%
clear-num87.8%
un-div-inv87.9%
Applied egg-rr87.9%
if 1.14e-8 < z < 5.40000000000000005e35Initial program 99.6%
+-commutative99.6%
associate-/l*99.7%
fma-define99.7%
Simplified99.7%
Taylor expanded in y around inf 90.9%
div-sub90.9%
associate-*r/90.7%
associate-*l/91.2%
Simplified91.2%
if 5.40000000000000005e35 < z < 4.5000000000000002e101Initial program 99.9%
Taylor expanded in a around 0 79.7%
Taylor expanded in z around 0 92.4%
associate-*r/92.4%
associate-*r*92.4%
neg-mul-192.4%
Simplified92.4%
Taylor expanded in x around 0 92.4%
mul-1-neg92.4%
associate-*r/92.4%
sub-neg92.4%
Simplified92.4%
Final simplification88.7%
(FPCore (x y z t a)
:precision binary64
(if (<= z -3600.0)
(+ x (* y (/ z (- z a))))
(if (<= z 1.24e-8)
(+ x (* y (/ (- t z) a)))
(if (<= z 3.4e+35) (* (- t z) (/ y (- a z))) (+ x (* y (/ (- z t) z)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3600.0) {
tmp = x + (y * (z / (z - a)));
} else if (z <= 1.24e-8) {
tmp = x + (y * ((t - z) / a));
} else if (z <= 3.4e+35) {
tmp = (t - z) * (y / (a - z));
} else {
tmp = x + (y * ((z - t) / 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 <= (-3600.0d0)) then
tmp = x + (y * (z / (z - a)))
else if (z <= 1.24d-8) then
tmp = x + (y * ((t - z) / a))
else if (z <= 3.4d+35) then
tmp = (t - z) * (y / (a - z))
else
tmp = x + (y * ((z - t) / 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 <= -3600.0) {
tmp = x + (y * (z / (z - a)));
} else if (z <= 1.24e-8) {
tmp = x + (y * ((t - z) / a));
} else if (z <= 3.4e+35) {
tmp = (t - z) * (y / (a - z));
} else {
tmp = x + (y * ((z - t) / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3600.0: tmp = x + (y * (z / (z - a))) elif z <= 1.24e-8: tmp = x + (y * ((t - z) / a)) elif z <= 3.4e+35: tmp = (t - z) * (y / (a - z)) else: tmp = x + (y * ((z - t) / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3600.0) tmp = Float64(x + Float64(y * Float64(z / Float64(z - a)))); elseif (z <= 1.24e-8) tmp = Float64(x + Float64(y * Float64(Float64(t - z) / a))); elseif (z <= 3.4e+35) tmp = Float64(Float64(t - z) * Float64(y / Float64(a - z))); else tmp = Float64(x + Float64(y * Float64(Float64(z - t) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3600.0) tmp = x + (y * (z / (z - a))); elseif (z <= 1.24e-8) tmp = x + (y * ((t - z) / a)); elseif (z <= 3.4e+35) tmp = (t - z) * (y / (a - z)); else tmp = x + (y * ((z - t) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3600.0], N[(x + N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.24e-8], N[(x + N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.4e+35], N[(N[(t - z), $MachinePrecision] * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3600:\\
\;\;\;\;x + y \cdot \frac{z}{z - a}\\
\mathbf{elif}\;z \leq 1.24 \cdot 10^{-8}:\\
\;\;\;\;x + y \cdot \frac{t - z}{a}\\
\mathbf{elif}\;z \leq 3.4 \cdot 10^{+35}:\\
\;\;\;\;\left(t - z\right) \cdot \frac{y}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z - t}{z}\\
\end{array}
\end{array}
if z < -3600Initial program 82.2%
Taylor expanded in t around 0 78.6%
associate-/l*93.2%
Simplified93.2%
if -3600 < z < 1.24000000000000002e-8Initial program 94.3%
+-commutative94.3%
associate-/l*98.4%
fma-define98.4%
Simplified98.4%
Taylor expanded in a around inf 85.1%
mul-1-neg85.1%
unsub-neg85.1%
associate-/l*89.9%
Simplified89.9%
if 1.24000000000000002e-8 < z < 3.4000000000000001e35Initial program 99.6%
+-commutative99.6%
associate-/l*99.7%
fma-define99.7%
Simplified99.7%
Taylor expanded in y around inf 90.9%
div-sub90.9%
associate-*r/90.7%
associate-*l/91.2%
Simplified91.2%
if 3.4000000000000001e35 < z Initial program 78.6%
+-commutative78.6%
associate-/l*100.0%
fma-define100.0%
Simplified100.0%
Taylor expanded in a around 0 72.8%
+-commutative72.8%
associate-/l*92.3%
Simplified92.3%
Final simplification91.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= y 2.95e+72) (and (not (<= y 1.56e+162)) (<= y 1.3e+259))) (+ y x) (* t (/ y (- a z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= 2.95e+72) || (!(y <= 1.56e+162) && (y <= 1.3e+259))) {
tmp = y + x;
} else {
tmp = t * (y / (a - z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((y <= 2.95d+72) .or. (.not. (y <= 1.56d+162)) .and. (y <= 1.3d+259)) then
tmp = y + x
else
tmp = t * (y / (a - z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= 2.95e+72) || (!(y <= 1.56e+162) && (y <= 1.3e+259))) {
tmp = y + x;
} else {
tmp = t * (y / (a - z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= 2.95e+72) or (not (y <= 1.56e+162) and (y <= 1.3e+259)): tmp = y + x else: tmp = t * (y / (a - z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= 2.95e+72) || (!(y <= 1.56e+162) && (y <= 1.3e+259))) tmp = Float64(y + x); else tmp = Float64(t * Float64(y / Float64(a - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= 2.95e+72) || (~((y <= 1.56e+162)) && (y <= 1.3e+259))) tmp = y + x; else tmp = t * (y / (a - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, 2.95e+72], And[N[Not[LessEqual[y, 1.56e+162]], $MachinePrecision], LessEqual[y, 1.3e+259]]], N[(y + x), $MachinePrecision], N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.95 \cdot 10^{+72} \lor \neg \left(y \leq 1.56 \cdot 10^{+162}\right) \land y \leq 1.3 \cdot 10^{+259}:\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y}{a - z}\\
\end{array}
\end{array}
if y < 2.9500000000000001e72 or 1.5600000000000001e162 < y < 1.30000000000000001e259Initial program 89.8%
+-commutative89.8%
associate-/l*99.1%
fma-define99.1%
Simplified99.1%
Taylor expanded in z around inf 67.6%
+-commutative67.6%
Simplified67.6%
if 2.9500000000000001e72 < y < 1.5600000000000001e162 or 1.30000000000000001e259 < y Initial program 79.6%
+-commutative79.6%
associate-/l*99.6%
fma-define99.5%
Simplified99.5%
Taylor expanded in y around inf 80.5%
div-sub80.5%
associate-*r/61.2%
associate-*l/80.9%
Simplified80.9%
associate-/r/77.7%
Applied egg-rr77.7%
Taylor expanded in t around inf 53.8%
mul-1-neg53.8%
associate-/l*62.7%
distribute-rgt-neg-in62.7%
distribute-neg-frac262.7%
neg-sub062.7%
associate-+l-62.7%
neg-sub062.7%
+-commutative62.7%
unsub-neg62.7%
Simplified62.7%
Final simplification67.0%
(FPCore (x y z t a) :precision binary64 (if (<= z -2.15e+46) (+ y x) (if (<= z 4.8e-77) x (if (<= z 3e-37) (/ y (/ a t)) (+ y x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.15e+46) {
tmp = y + x;
} else if (z <= 4.8e-77) {
tmp = x;
} else if (z <= 3e-37) {
tmp = y / (a / t);
} else {
tmp = y + 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.15d+46)) then
tmp = y + x
else if (z <= 4.8d-77) then
tmp = x
else if (z <= 3d-37) then
tmp = y / (a / t)
else
tmp = y + 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.15e+46) {
tmp = y + x;
} else if (z <= 4.8e-77) {
tmp = x;
} else if (z <= 3e-37) {
tmp = y / (a / t);
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.15e+46: tmp = y + x elif z <= 4.8e-77: tmp = x elif z <= 3e-37: tmp = y / (a / t) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.15e+46) tmp = Float64(y + x); elseif (z <= 4.8e-77) tmp = x; elseif (z <= 3e-37) tmp = Float64(y / Float64(a / t)); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.15e+46) tmp = y + x; elseif (z <= 4.8e-77) tmp = x; elseif (z <= 3e-37) tmp = y / (a / t); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.15e+46], N[(y + x), $MachinePrecision], If[LessEqual[z, 4.8e-77], x, If[LessEqual[z, 3e-37], N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.15 \cdot 10^{+46}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;z \leq 4.8 \cdot 10^{-77}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 3 \cdot 10^{-37}:\\
\;\;\;\;\frac{y}{\frac{a}{t}}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if z < -2.15000000000000002e46 or 3e-37 < z Initial program 82.8%
+-commutative82.8%
associate-/l*99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in z around inf 79.1%
+-commutative79.1%
Simplified79.1%
if -2.15000000000000002e46 < z < 4.7999999999999998e-77Initial program 95.6%
+-commutative95.6%
associate-/l*98.4%
fma-define98.4%
Simplified98.4%
Taylor expanded in y around 0 59.3%
if 4.7999999999999998e-77 < z < 3e-37Initial program 59.4%
+-commutative59.4%
associate-/l*99.8%
fma-define99.8%
Simplified99.8%
Taylor expanded in y around inf 86.3%
div-sub86.3%
associate-*r/46.0%
associate-*l/86.1%
Simplified86.1%
Taylor expanded in z around 0 86.1%
associate-*r/86.1%
neg-mul-186.1%
Simplified86.1%
Taylor expanded in y around 0 46.0%
mul-1-neg46.0%
distribute-frac-neg246.0%
associate-/l*86.4%
Simplified86.4%
Taylor expanded in z around 0 85.9%
clear-num99.8%
un-div-inv100.0%
Applied egg-rr86.2%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.45e+47) (+ y x) (if (<= z 5e-77) x (if (<= z 2.2e-37) (* y (/ t a)) (+ y x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.45e+47) {
tmp = y + x;
} else if (z <= 5e-77) {
tmp = x;
} else if (z <= 2.2e-37) {
tmp = y * (t / a);
} else {
tmp = y + 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.45d+47)) then
tmp = y + x
else if (z <= 5d-77) then
tmp = x
else if (z <= 2.2d-37) then
tmp = y * (t / a)
else
tmp = y + 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.45e+47) {
tmp = y + x;
} else if (z <= 5e-77) {
tmp = x;
} else if (z <= 2.2e-37) {
tmp = y * (t / a);
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.45e+47: tmp = y + x elif z <= 5e-77: tmp = x elif z <= 2.2e-37: tmp = y * (t / a) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.45e+47) tmp = Float64(y + x); elseif (z <= 5e-77) tmp = x; elseif (z <= 2.2e-37) tmp = Float64(y * Float64(t / a)); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.45e+47) tmp = y + x; elseif (z <= 5e-77) tmp = x; elseif (z <= 2.2e-37) tmp = y * (t / a); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.45e+47], N[(y + x), $MachinePrecision], If[LessEqual[z, 5e-77], x, If[LessEqual[z, 2.2e-37], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.45 \cdot 10^{+47}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;z \leq 5 \cdot 10^{-77}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 2.2 \cdot 10^{-37}:\\
\;\;\;\;y \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if z < -1.4499999999999999e47 or 2.20000000000000002e-37 < z Initial program 82.8%
+-commutative82.8%
associate-/l*99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in z around inf 79.1%
+-commutative79.1%
Simplified79.1%
if -1.4499999999999999e47 < z < 4.99999999999999963e-77Initial program 95.6%
+-commutative95.6%
associate-/l*98.4%
fma-define98.4%
Simplified98.4%
Taylor expanded in y around 0 59.3%
if 4.99999999999999963e-77 < z < 2.20000000000000002e-37Initial program 59.4%
+-commutative59.4%
associate-/l*99.8%
fma-define99.8%
Simplified99.8%
Taylor expanded in y around inf 86.3%
div-sub86.3%
associate-*r/46.0%
associate-*l/86.1%
Simplified86.1%
Taylor expanded in z around 0 86.1%
associate-*r/86.1%
neg-mul-186.1%
Simplified86.1%
Taylor expanded in y around 0 46.0%
mul-1-neg46.0%
distribute-frac-neg246.0%
associate-/l*86.4%
Simplified86.4%
Taylor expanded in z around 0 85.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2.75e+23) (not (<= z 1.65e+18))) (+ x (* y (/ z (- z a)))) (+ x (/ y (/ a t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.75e+23) || !(z <= 1.65e+18)) {
tmp = x + (y * (z / (z - a)));
} else {
tmp = x + (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 ((z <= (-2.75d+23)) .or. (.not. (z <= 1.65d+18))) then
tmp = x + (y * (z / (z - a)))
else
tmp = x + (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 ((z <= -2.75e+23) || !(z <= 1.65e+18)) {
tmp = x + (y * (z / (z - a)));
} else {
tmp = x + (y / (a / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2.75e+23) or not (z <= 1.65e+18): tmp = x + (y * (z / (z - a))) else: tmp = x + (y / (a / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2.75e+23) || !(z <= 1.65e+18)) tmp = Float64(x + Float64(y * Float64(z / Float64(z - a)))); else tmp = Float64(x + Float64(y / Float64(a / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -2.75e+23) || ~((z <= 1.65e+18))) tmp = x + (y * (z / (z - a))); else tmp = x + (y / (a / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.75e+23], N[Not[LessEqual[z, 1.65e+18]], $MachinePrecision]], N[(x + N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.75 \cdot 10^{+23} \lor \neg \left(z \leq 1.65 \cdot 10^{+18}\right):\\
\;\;\;\;x + y \cdot \frac{z}{z - a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\
\end{array}
\end{array}
if z < -2.75000000000000002e23 or 1.65e18 < z Initial program 81.0%
Taylor expanded in t around 0 74.1%
associate-/l*90.1%
Simplified90.1%
if -2.75000000000000002e23 < z < 1.65e18Initial program 94.6%
Taylor expanded in z around 0 81.8%
*-commutative81.8%
associate-/l*86.4%
Applied egg-rr86.4%
clear-num86.4%
un-div-inv86.5%
Applied egg-rr86.5%
Final simplification88.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -3800.0) (not (<= z 1.38e+101))) (+ y x) (+ x (/ y (/ a t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -3800.0) || !(z <= 1.38e+101)) {
tmp = y + x;
} else {
tmp = x + (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 ((z <= (-3800.0d0)) .or. (.not. (z <= 1.38d+101))) then
tmp = y + x
else
tmp = x + (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 ((z <= -3800.0) || !(z <= 1.38e+101)) {
tmp = y + x;
} else {
tmp = x + (y / (a / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -3800.0) or not (z <= 1.38e+101): tmp = y + x else: tmp = x + (y / (a / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -3800.0) || !(z <= 1.38e+101)) tmp = Float64(y + x); else tmp = Float64(x + Float64(y / Float64(a / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -3800.0) || ~((z <= 1.38e+101))) tmp = y + x; else tmp = x + (y / (a / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -3800.0], N[Not[LessEqual[z, 1.38e+101]], $MachinePrecision]], N[(y + x), $MachinePrecision], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3800 \lor \neg \left(z \leq 1.38 \cdot 10^{+101}\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\
\end{array}
\end{array}
if z < -3800 or 1.38e101 < z Initial program 77.9%
+-commutative77.9%
associate-/l*100.0%
fma-define100.0%
Simplified100.0%
Taylor expanded in z around inf 88.9%
+-commutative88.9%
Simplified88.9%
if -3800 < z < 1.38e101Initial program 95.1%
Taylor expanded in z around 0 80.6%
*-commutative80.6%
associate-/l*84.1%
Applied egg-rr84.1%
clear-num84.1%
un-div-inv84.8%
Applied egg-rr84.8%
Final simplification86.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -700.0) (not (<= z 1.9e+101))) (+ y x) (+ x (* y (/ t a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -700.0) || !(z <= 1.9e+101)) {
tmp = y + 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 <= (-700.0d0)) .or. (.not. (z <= 1.9d+101))) then
tmp = y + 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 <= -700.0) || !(z <= 1.9e+101)) {
tmp = y + x;
} else {
tmp = x + (y * (t / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -700.0) or not (z <= 1.9e+101): tmp = y + x else: tmp = x + (y * (t / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -700.0) || !(z <= 1.9e+101)) tmp = Float64(y + 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 <= -700.0) || ~((z <= 1.9e+101))) tmp = y + x; else tmp = x + (y * (t / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -700.0], N[Not[LessEqual[z, 1.9e+101]], $MachinePrecision]], N[(y + x), $MachinePrecision], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -700 \lor \neg \left(z \leq 1.9 \cdot 10^{+101}\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\end{array}
\end{array}
if z < -700 or 1.8999999999999999e101 < z Initial program 77.9%
+-commutative77.9%
associate-/l*100.0%
fma-define100.0%
Simplified100.0%
Taylor expanded in z around inf 88.9%
+-commutative88.9%
Simplified88.9%
if -700 < z < 1.8999999999999999e101Initial program 95.1%
Taylor expanded in z around 0 80.6%
*-commutative80.6%
associate-/l*84.1%
Applied egg-rr84.1%
Final simplification85.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -9.5e+86) (not (<= y 4.7e+80))) (* y (/ (- t z) a)) (+ y x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -9.5e+86) || !(y <= 4.7e+80)) {
tmp = y * ((t - z) / a);
} else {
tmp = y + 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 <= (-9.5d+86)) .or. (.not. (y <= 4.7d+80))) then
tmp = y * ((t - z) / a)
else
tmp = y + 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 <= -9.5e+86) || !(y <= 4.7e+80)) {
tmp = y * ((t - z) / a);
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -9.5e+86) or not (y <= 4.7e+80): tmp = y * ((t - z) / a) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -9.5e+86) || !(y <= 4.7e+80)) tmp = Float64(y * Float64(Float64(t - z) / a)); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -9.5e+86) || ~((y <= 4.7e+80))) tmp = y * ((t - z) / a); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -9.5e+86], N[Not[LessEqual[y, 4.7e+80]], $MachinePrecision]], N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.5 \cdot 10^{+86} \lor \neg \left(y \leq 4.7 \cdot 10^{+80}\right):\\
\;\;\;\;y \cdot \frac{t - z}{a}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if y < -9.50000000000000028e86 or 4.70000000000000009e80 < y Initial program 70.8%
+-commutative70.8%
associate-/l*98.7%
fma-define98.6%
Simplified98.6%
Taylor expanded in y around inf 82.7%
div-sub82.7%
associate-*r/58.4%
associate-*l/81.8%
Simplified81.8%
Taylor expanded in z around 0 54.3%
associate-*r/54.3%
neg-mul-154.3%
Simplified54.3%
Taylor expanded in y around 0 45.1%
associate-*r/54.2%
neg-mul-154.2%
distribute-rgt-neg-in54.2%
neg-sub054.2%
div-sub52.9%
associate--r-52.9%
neg-sub052.9%
+-commutative52.9%
sub-neg52.9%
distribute-lft-out--52.7%
associate-/l*43.4%
*-commutative43.4%
associate-*r/51.7%
associate-/l*50.1%
associate-*l/50.5%
*-commutative50.5%
distribute-rgt-out--54.3%
Simplified54.3%
Taylor expanded in y around 0 45.1%
associate-/l*54.2%
Simplified54.2%
if -9.50000000000000028e86 < y < 4.70000000000000009e80Initial program 97.7%
+-commutative97.7%
associate-/l*99.4%
fma-define99.4%
Simplified99.4%
Taylor expanded in z around inf 76.5%
+-commutative76.5%
Simplified76.5%
Final simplification68.9%
(FPCore (x y z t a) :precision binary64 (if (<= y -4.4e+95) (* (/ y a) (- t z)) (if (<= y 7.5e+80) (+ y x) (* y (/ (- t z) a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -4.4e+95) {
tmp = (y / a) * (t - z);
} else if (y <= 7.5e+80) {
tmp = y + x;
} else {
tmp = y * ((t - z) / a);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (y <= (-4.4d+95)) then
tmp = (y / a) * (t - z)
else if (y <= 7.5d+80) then
tmp = y + x
else
tmp = y * ((t - z) / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -4.4e+95) {
tmp = (y / a) * (t - z);
} else if (y <= 7.5e+80) {
tmp = y + x;
} else {
tmp = y * ((t - z) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -4.4e+95: tmp = (y / a) * (t - z) elif y <= 7.5e+80: tmp = y + x else: tmp = y * ((t - z) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -4.4e+95) tmp = Float64(Float64(y / a) * Float64(t - z)); elseif (y <= 7.5e+80) tmp = Float64(y + x); else tmp = Float64(y * Float64(Float64(t - z) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -4.4e+95) tmp = (y / a) * (t - z); elseif (y <= 7.5e+80) tmp = y + x; else tmp = y * ((t - z) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -4.4e+95], N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7.5e+80], N[(y + x), $MachinePrecision], N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.4 \cdot 10^{+95}:\\
\;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\
\mathbf{elif}\;y \leq 7.5 \cdot 10^{+80}:\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{t - z}{a}\\
\end{array}
\end{array}
if y < -4.3999999999999998e95Initial program 80.0%
+-commutative80.0%
associate-/l*97.0%
fma-define97.0%
Simplified97.0%
Taylor expanded in y around inf 82.1%
div-sub82.1%
associate-*r/68.0%
associate-*l/82.1%
Simplified82.1%
Taylor expanded in z around 0 50.4%
associate-*r/50.4%
neg-mul-150.4%
Simplified50.4%
Taylor expanded in y around 0 44.8%
associate-*r/47.5%
neg-mul-147.5%
distribute-rgt-neg-in47.5%
neg-sub047.5%
div-sub47.3%
associate--r-47.3%
neg-sub047.3%
+-commutative47.3%
sub-neg47.3%
distribute-lft-out--47.3%
associate-/l*41.7%
*-commutative41.7%
associate-*r/47.5%
associate-/l*50.5%
associate-*l/47.2%
*-commutative47.2%
distribute-rgt-out--50.4%
Simplified50.4%
if -4.3999999999999998e95 < y < 7.49999999999999994e80Initial program 97.7%
+-commutative97.7%
associate-/l*99.4%
fma-define99.4%
Simplified99.4%
Taylor expanded in z around inf 76.0%
+-commutative76.0%
Simplified76.0%
if 7.49999999999999994e80 < y Initial program 64.6%
+-commutative64.6%
associate-/l*99.7%
fma-define99.6%
Simplified99.6%
Taylor expanded in y around inf 82.8%
div-sub82.8%
associate-*r/51.7%
associate-*l/81.2%
Simplified81.2%
Taylor expanded in z around 0 55.9%
associate-*r/55.9%
neg-mul-155.9%
Simplified55.9%
Taylor expanded in y around 0 44.3%
associate-*r/57.5%
neg-mul-157.5%
distribute-rgt-neg-in57.5%
neg-sub057.5%
div-sub55.4%
associate--r-55.4%
neg-sub055.4%
+-commutative55.4%
sub-neg55.4%
distribute-lft-out--55.1%
associate-/l*43.4%
*-commutative43.4%
associate-*r/53.4%
associate-/l*48.9%
associate-*l/51.7%
*-commutative51.7%
distribute-rgt-out--55.9%
Simplified55.9%
Taylor expanded in y around 0 44.3%
associate-/l*57.5%
Simplified57.5%
(FPCore (x y z t a) :precision binary64 (if (<= y 1.1e+72) (+ y x) (if (<= y 7.6e+161) (* t (/ y (- a z))) (* y (/ z (- z a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= 1.1e+72) {
tmp = y + x;
} else if (y <= 7.6e+161) {
tmp = t * (y / (a - z));
} else {
tmp = y * (z / (z - a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (y <= 1.1d+72) then
tmp = y + x
else if (y <= 7.6d+161) then
tmp = t * (y / (a - z))
else
tmp = y * (z / (z - a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= 1.1e+72) {
tmp = y + x;
} else if (y <= 7.6e+161) {
tmp = t * (y / (a - z));
} else {
tmp = y * (z / (z - a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= 1.1e+72: tmp = y + x elif y <= 7.6e+161: tmp = t * (y / (a - z)) else: tmp = y * (z / (z - a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= 1.1e+72) tmp = Float64(y + x); elseif (y <= 7.6e+161) tmp = Float64(t * Float64(y / Float64(a - z))); else tmp = Float64(y * Float64(z / Float64(z - a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= 1.1e+72) tmp = y + x; elseif (y <= 7.6e+161) tmp = t * (y / (a - z)); else tmp = y * (z / (z - a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, 1.1e+72], N[(y + x), $MachinePrecision], If[LessEqual[y, 7.6e+161], N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.1 \cdot 10^{+72}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;y \leq 7.6 \cdot 10^{+161}:\\
\;\;\;\;t \cdot \frac{y}{a - z}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{z}{z - a}\\
\end{array}
\end{array}
if y < 1.1e72Initial program 94.7%
+-commutative94.7%
associate-/l*99.0%
fma-define99.0%
Simplified99.0%
Taylor expanded in z around inf 70.0%
+-commutative70.0%
Simplified70.0%
if 1.1e72 < y < 7.6000000000000005e161Initial program 85.6%
+-commutative85.6%
associate-/l*99.8%
fma-define99.8%
Simplified99.8%
Taylor expanded in y around inf 75.1%
div-sub75.1%
associate-*r/60.8%
associate-*l/75.0%
Simplified75.0%
associate-/r/75.0%
Applied egg-rr75.0%
Taylor expanded in t around inf 60.2%
mul-1-neg60.2%
associate-/l*69.7%
distribute-rgt-neg-in69.7%
distribute-neg-frac269.7%
neg-sub069.7%
associate-+l-69.7%
neg-sub069.7%
+-commutative69.7%
unsub-neg69.7%
Simplified69.7%
if 7.6000000000000005e161 < y Initial program 54.6%
+-commutative54.6%
associate-/l*99.6%
fma-define99.5%
Simplified99.5%
Taylor expanded in y around inf 85.5%
div-sub85.5%
associate-*r/46.6%
associate-*l/83.1%
Simplified83.1%
associate-/r/83.0%
Applied egg-rr83.0%
Taylor expanded in t around 0 24.0%
associate-/l*48.1%
Simplified48.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2.7e+24) (not (<= z 4.5e-138))) (+ y x) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.7e+24) || !(z <= 4.5e-138)) {
tmp = y + 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 <= (-2.7d+24)) .or. (.not. (z <= 4.5d-138))) then
tmp = y + 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 <= -2.7e+24) || !(z <= 4.5e-138)) {
tmp = y + x;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2.7e+24) or not (z <= 4.5e-138): tmp = y + x else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2.7e+24) || !(z <= 4.5e-138)) tmp = Float64(y + x); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -2.7e+24) || ~((z <= 4.5e-138))) tmp = y + x; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.7e+24], N[Not[LessEqual[z, 4.5e-138]], $MachinePrecision]], N[(y + x), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.7 \cdot 10^{+24} \lor \neg \left(z \leq 4.5 \cdot 10^{-138}\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -2.7e24 or 4.50000000000000008e-138 < z Initial program 83.6%
+-commutative83.6%
associate-/l*99.2%
fma-define99.2%
Simplified99.2%
Taylor expanded in z around inf 73.5%
+-commutative73.5%
Simplified73.5%
if -2.7e24 < z < 4.50000000000000008e-138Initial program 95.5%
+-commutative95.5%
associate-/l*99.0%
fma-define99.0%
Simplified99.0%
Taylor expanded in y around 0 57.7%
Final simplification66.9%
(FPCore (x y z t a) :precision binary64 (+ x (/ -1.0 (/ (/ (- z a) (- t z)) y))))
double code(double x, double y, double z, double t, double a) {
return x + (-1.0 / (((z - a) / (t - z)) / y));
}
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 + ((-1.0d0) / (((z - a) / (t - z)) / y))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (-1.0 / (((z - a) / (t - z)) / y));
}
def code(x, y, z, t, a): return x + (-1.0 / (((z - a) / (t - z)) / y))
function code(x, y, z, t, a) return Float64(x + Float64(-1.0 / Float64(Float64(Float64(z - a) / Float64(t - z)) / y))) end
function tmp = code(x, y, z, t, a) tmp = x + (-1.0 / (((z - a) / (t - z)) / y)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(-1.0 / N[(N[(N[(z - a), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{-1}{\frac{\frac{z - a}{t - z}}{y}}
\end{array}
Initial program 88.5%
clear-num88.5%
inv-pow88.5%
Applied egg-rr88.5%
unpow-188.5%
*-commutative88.5%
associate-/r*99.1%
Simplified99.1%
Final simplification99.1%
(FPCore (x y z t a) :precision binary64 (if (<= x -7.5e-136) x (if (<= x 1.02e-168) y x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -7.5e-136) {
tmp = x;
} else if (x <= 1.02e-168) {
tmp = y;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (x <= (-7.5d-136)) then
tmp = x
else if (x <= 1.02d-168) then
tmp = y
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -7.5e-136) {
tmp = x;
} else if (x <= 1.02e-168) {
tmp = y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -7.5e-136: tmp = x elif x <= 1.02e-168: tmp = y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -7.5e-136) tmp = x; elseif (x <= 1.02e-168) tmp = y; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -7.5e-136) tmp = x; elseif (x <= 1.02e-168) tmp = y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -7.5e-136], x, If[LessEqual[x, 1.02e-168], y, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.5 \cdot 10^{-136}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 1.02 \cdot 10^{-168}:\\
\;\;\;\;y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -7.5000000000000003e-136 or 1.01999999999999999e-168 < x Initial program 90.0%
+-commutative90.0%
associate-/l*99.4%
fma-define99.4%
Simplified99.4%
Taylor expanded in y around 0 65.2%
if -7.5000000000000003e-136 < x < 1.01999999999999999e-168Initial program 83.7%
Taylor expanded in a around 0 47.2%
Taylor expanded in z around inf 57.0%
associate-+r+57.0%
mul-1-neg57.0%
unsub-neg57.0%
+-commutative57.0%
Simplified57.0%
Taylor expanded in y around inf 52.1%
Taylor expanded in t around 0 35.3%
(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 88.5%
+-commutative88.5%
associate-/l*99.1%
fma-define99.1%
Simplified99.1%
Taylor expanded in y around 0 54.6%
(FPCore (x y z t a) :precision binary64 (+ x (/ y (/ (- z a) (- z t)))))
double code(double x, double y, double z, double t, double a) {
return x + (y / ((z - a) / (z - t)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (y / ((z - a) / (z - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y / ((z - a) / (z - t)));
}
def code(x, y, z, t, a): return x + (y / ((z - a) / (z - t)))
function code(x, y, z, t, a) return Float64(x + Float64(y / Float64(Float64(z - a) / Float64(z - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y / ((z - a) / (z - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y / N[(N[(z - a), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y}{\frac{z - a}{z - t}}
\end{array}
herbie shell --seed 2024105
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, A"
:precision binary64
:alt
(+ x (/ y (/ (- z a) (- z t))))
(+ x (/ (* y (- z t)) (- z a))))