
(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(y * Float64(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[(y * N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \frac{z - t}{z - a}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 14 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(y * Float64(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[(y * N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \frac{z - t}{z - a}
\end{array}
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* y (/ (- z t) (- z a))))) (if (<= t_1 5e+287) (+ t_1 x) (+ x (* t (/ y (- a z)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * ((z - t) / (z - a));
double tmp;
if (t_1 <= 5e+287) {
tmp = t_1 + x;
} else {
tmp = x + (t * (y / (a - z)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = y * ((z - t) / (z - a))
if (t_1 <= 5d+287) then
tmp = t_1 + x
else
tmp = x + (t * (y / (a - z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y * ((z - t) / (z - a));
double tmp;
if (t_1 <= 5e+287) {
tmp = t_1 + x;
} else {
tmp = x + (t * (y / (a - z)));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * ((z - t) / (z - a)) tmp = 0 if t_1 <= 5e+287: tmp = t_1 + x else: tmp = x + (t * (y / (a - z))) return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(Float64(z - t) / Float64(z - a))) tmp = 0.0 if (t_1 <= 5e+287) tmp = Float64(t_1 + x); else tmp = Float64(x + Float64(t * Float64(y / Float64(a - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * ((z - t) / (z - a)); tmp = 0.0; if (t_1 <= 5e+287) tmp = t_1 + x; else tmp = x + (t * (y / (a - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 5e+287], N[(t$95$1 + x), $MachinePrecision], N[(x + N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{z - t}{z - a}\\
\mathbf{if}\;t\_1 \leq 5 \cdot 10^{+287}:\\
\;\;\;\;t\_1 + x\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y}{a - z}\\
\end{array}
\end{array}
if (*.f64 y (/.f64 (-.f64 z t) (-.f64 z a))) < 5e287Initial program 99.5%
if 5e287 < (*.f64 y (/.f64 (-.f64 z t) (-.f64 z a))) Initial program 81.2%
Taylor expanded in t around inf 96.4%
associate-*r/96.4%
mul-1-neg96.4%
distribute-rgt-neg-in96.4%
associate-*r/100.0%
Simplified100.0%
Final simplification99.5%
(FPCore (x y z t a)
:precision binary64
(if (<= z -6.5e+17)
(+ x (* y (/ (- z t) z)))
(if (<= z 1.8e-53)
(+ x (/ 1.0 (/ (/ a y) t)))
(if (or (<= z 1.35e+53) (not (<= z 1.9e+157)))
(+ x (* y (- 1.0 (/ t z))))
(+ x (/ y (/ (- z a) z)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6.5e+17) {
tmp = x + (y * ((z - t) / z));
} else if (z <= 1.8e-53) {
tmp = x + (1.0 / ((a / y) / t));
} else if ((z <= 1.35e+53) || !(z <= 1.9e+157)) {
tmp = x + (y * (1.0 - (t / z)));
} else {
tmp = x + (y / ((z - a) / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-6.5d+17)) then
tmp = x + (y * ((z - t) / z))
else if (z <= 1.8d-53) then
tmp = x + (1.0d0 / ((a / y) / t))
else if ((z <= 1.35d+53) .or. (.not. (z <= 1.9d+157))) then
tmp = x + (y * (1.0d0 - (t / z)))
else
tmp = x + (y / ((z - a) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6.5e+17) {
tmp = x + (y * ((z - t) / z));
} else if (z <= 1.8e-53) {
tmp = x + (1.0 / ((a / y) / t));
} else if ((z <= 1.35e+53) || !(z <= 1.9e+157)) {
tmp = x + (y * (1.0 - (t / z)));
} else {
tmp = x + (y / ((z - a) / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -6.5e+17: tmp = x + (y * ((z - t) / z)) elif z <= 1.8e-53: tmp = x + (1.0 / ((a / y) / t)) elif (z <= 1.35e+53) or not (z <= 1.9e+157): tmp = x + (y * (1.0 - (t / z))) else: tmp = x + (y / ((z - a) / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -6.5e+17) tmp = Float64(x + Float64(y * Float64(Float64(z - t) / z))); elseif (z <= 1.8e-53) tmp = Float64(x + Float64(1.0 / Float64(Float64(a / y) / t))); elseif ((z <= 1.35e+53) || !(z <= 1.9e+157)) tmp = Float64(x + Float64(y * Float64(1.0 - Float64(t / z)))); else tmp = Float64(x + Float64(y / Float64(Float64(z - a) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -6.5e+17) tmp = x + (y * ((z - t) / z)); elseif (z <= 1.8e-53) tmp = x + (1.0 / ((a / y) / t)); elseif ((z <= 1.35e+53) || ~((z <= 1.9e+157))) tmp = x + (y * (1.0 - (t / z))); else tmp = x + (y / ((z - a) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6.5e+17], N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.8e-53], N[(x + N[(1.0 / N[(N[(a / y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, 1.35e+53], N[Not[LessEqual[z, 1.9e+157]], $MachinePrecision]], N[(x + N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(N[(z - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.5 \cdot 10^{+17}:\\
\;\;\;\;x + y \cdot \frac{z - t}{z}\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{-53}:\\
\;\;\;\;x + \frac{1}{\frac{\frac{a}{y}}{t}}\\
\mathbf{elif}\;z \leq 1.35 \cdot 10^{+53} \lor \neg \left(z \leq 1.9 \cdot 10^{+157}\right):\\
\;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{z - a}{z}}\\
\end{array}
\end{array}
if z < -6.5e17Initial program 100.0%
Taylor expanded in a around 0 92.3%
if -6.5e17 < z < 1.7999999999999999e-53Initial program 95.3%
Taylor expanded in z around 0 80.4%
clear-num80.4%
inv-pow80.4%
*-commutative80.4%
Applied egg-rr80.4%
unpow-180.4%
associate-/r*81.1%
Simplified81.1%
if 1.7999999999999999e-53 < z < 1.3500000000000001e53 or 1.9e157 < z Initial program 99.9%
Taylor expanded in a around 0 72.9%
associate-/l*92.3%
div-sub92.3%
*-inverses92.3%
Simplified92.3%
if 1.3500000000000001e53 < z < 1.9e157Initial program 100.0%
clear-num100.0%
un-div-inv100.0%
Applied egg-rr100.0%
Taylor expanded in t around 0 96.3%
Final simplification87.1%
(FPCore (x y z t a)
:precision binary64
(if (<= z -8e+17)
(+ y x)
(if (<= z 1.15e-32)
(+ x (* t (/ y a)))
(if (<= z 5e+86) (- x (* t (/ y z))) (+ y x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -8e+17) {
tmp = y + x;
} else if (z <= 1.15e-32) {
tmp = x + (t * (y / a));
} else if (z <= 5e+86) {
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 <= (-8d+17)) then
tmp = y + x
else if (z <= 1.15d-32) then
tmp = x + (t * (y / a))
else if (z <= 5d+86) 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 <= -8e+17) {
tmp = y + x;
} else if (z <= 1.15e-32) {
tmp = x + (t * (y / a));
} else if (z <= 5e+86) {
tmp = x - (t * (y / z));
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -8e+17: tmp = y + x elif z <= 1.15e-32: tmp = x + (t * (y / a)) elif z <= 5e+86: tmp = x - (t * (y / z)) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -8e+17) tmp = Float64(y + x); elseif (z <= 1.15e-32) tmp = Float64(x + Float64(t * Float64(y / a))); elseif (z <= 5e+86) 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 <= -8e+17) tmp = y + x; elseif (z <= 1.15e-32) tmp = x + (t * (y / a)); elseif (z <= 5e+86) tmp = x - (t * (y / z)); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -8e+17], N[(y + x), $MachinePrecision], If[LessEqual[z, 1.15e-32], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5e+86], N[(x - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8 \cdot 10^{+17}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;z \leq 1.15 \cdot 10^{-32}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq 5 \cdot 10^{+86}:\\
\;\;\;\;x - t \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if z < -8e17 or 4.9999999999999998e86 < z Initial program 100.0%
Taylor expanded in z around inf 84.1%
+-commutative84.1%
Simplified84.1%
if -8e17 < z < 1.15e-32Initial program 95.6%
Taylor expanded in z around 0 78.2%
+-commutative78.2%
associate-/l*79.5%
Simplified79.5%
if 1.15e-32 < z < 4.9999999999999998e86Initial program 99.8%
clear-num99.8%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in t around inf 76.0%
mul-1-neg76.0%
distribute-neg-frac276.0%
Simplified76.0%
frac-2neg76.0%
div-inv75.9%
distribute-neg-frac275.9%
add-sqr-sqrt20.2%
sqrt-unprod41.2%
sqr-neg41.2%
sqrt-unprod25.8%
add-sqr-sqrt35.9%
clear-num35.9%
cancel-sign-sub-inv35.9%
clear-num35.9%
div-inv35.9%
div-inv35.9%
clear-num35.9%
Applied egg-rr76.0%
Taylor expanded in z around inf 71.1%
associate-*r/75.6%
Simplified75.6%
Final simplification81.0%
(FPCore (x y z t a)
:precision binary64
(if (<= z -9.8e+17)
(+ y x)
(if (<= z 1.4e-32)
(+ x (* t (/ y a)))
(if (<= z 3.5e+87) (- x (* y (/ t z))) (+ y x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -9.8e+17) {
tmp = y + x;
} else if (z <= 1.4e-32) {
tmp = x + (t * (y / a));
} else if (z <= 3.5e+87) {
tmp = x - (y * (t / 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 <= (-9.8d+17)) then
tmp = y + x
else if (z <= 1.4d-32) then
tmp = x + (t * (y / a))
else if (z <= 3.5d+87) then
tmp = x - (y * (t / 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 <= -9.8e+17) {
tmp = y + x;
} else if (z <= 1.4e-32) {
tmp = x + (t * (y / a));
} else if (z <= 3.5e+87) {
tmp = x - (y * (t / z));
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -9.8e+17: tmp = y + x elif z <= 1.4e-32: tmp = x + (t * (y / a)) elif z <= 3.5e+87: tmp = x - (y * (t / z)) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -9.8e+17) tmp = Float64(y + x); elseif (z <= 1.4e-32) tmp = Float64(x + Float64(t * Float64(y / a))); elseif (z <= 3.5e+87) tmp = Float64(x - Float64(y * Float64(t / z))); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -9.8e+17) tmp = y + x; elseif (z <= 1.4e-32) tmp = x + (t * (y / a)); elseif (z <= 3.5e+87) tmp = x - (y * (t / z)); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -9.8e+17], N[(y + x), $MachinePrecision], If[LessEqual[z, 1.4e-32], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.5e+87], N[(x - N[(y * N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.8 \cdot 10^{+17}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{-32}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{+87}:\\
\;\;\;\;x - y \cdot \frac{t}{z}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if z < -9.8e17 or 3.49999999999999986e87 < z Initial program 100.0%
Taylor expanded in z around inf 84.1%
+-commutative84.1%
Simplified84.1%
if -9.8e17 < z < 1.3999999999999999e-32Initial program 95.6%
Taylor expanded in z around 0 78.2%
+-commutative78.2%
associate-/l*79.5%
Simplified79.5%
if 1.3999999999999999e-32 < z < 3.49999999999999986e87Initial program 99.8%
clear-num99.8%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in t around inf 76.0%
mul-1-neg76.0%
distribute-neg-frac276.0%
Simplified76.0%
frac-2neg76.0%
div-inv75.9%
distribute-neg-frac275.9%
add-sqr-sqrt20.2%
sqrt-unprod41.2%
sqr-neg41.2%
sqrt-unprod25.8%
add-sqr-sqrt35.9%
clear-num35.9%
cancel-sign-sub-inv35.9%
clear-num35.9%
div-inv35.9%
div-inv35.9%
clear-num35.9%
Applied egg-rr76.0%
Taylor expanded in z around inf 75.7%
Final simplification81.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -6.5e+17) (not (<= z 1.42e-52))) (+ x (* y (- 1.0 (/ t z)))) (+ x (* t (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -6.5e+17) || !(z <= 1.42e-52)) {
tmp = x + (y * (1.0 - (t / z)));
} else {
tmp = x + (t * (y / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-6.5d+17)) .or. (.not. (z <= 1.42d-52))) then
tmp = x + (y * (1.0d0 - (t / z)))
else
tmp = x + (t * (y / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -6.5e+17) || !(z <= 1.42e-52)) {
tmp = x + (y * (1.0 - (t / z)));
} else {
tmp = x + (t * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -6.5e+17) or not (z <= 1.42e-52): tmp = x + (y * (1.0 - (t / z))) else: tmp = x + (t * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -6.5e+17) || !(z <= 1.42e-52)) tmp = Float64(x + Float64(y * Float64(1.0 - Float64(t / z)))); else tmp = Float64(x + Float64(t * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -6.5e+17) || ~((z <= 1.42e-52))) tmp = x + (y * (1.0 - (t / z))); else tmp = x + (t * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -6.5e+17], N[Not[LessEqual[z, 1.42e-52]], $MachinePrecision]], N[(x + N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.5 \cdot 10^{+17} \lor \neg \left(z \leq 1.42 \cdot 10^{-52}\right):\\
\;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\end{array}
\end{array}
if z < -6.5e17 or 1.4200000000000001e-52 < z Initial program 99.9%
Taylor expanded in a around 0 68.5%
associate-/l*88.8%
div-sub88.8%
*-inverses88.8%
Simplified88.8%
if -6.5e17 < z < 1.4200000000000001e-52Initial program 95.3%
Taylor expanded in z around 0 80.4%
+-commutative80.4%
associate-/l*81.1%
Simplified81.1%
Final simplification85.0%
(FPCore (x y z t a) :precision binary64 (if (<= z -6.5e+17) (+ x (* y (/ (- z t) z))) (if (<= z 5.1e-54) (+ x (* t (/ y a))) (+ x (* y (- 1.0 (/ t z)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6.5e+17) {
tmp = x + (y * ((z - t) / z));
} else if (z <= 5.1e-54) {
tmp = x + (t * (y / a));
} else {
tmp = x + (y * (1.0 - (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.5d+17)) then
tmp = x + (y * ((z - t) / z))
else if (z <= 5.1d-54) then
tmp = x + (t * (y / a))
else
tmp = x + (y * (1.0d0 - (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.5e+17) {
tmp = x + (y * ((z - t) / z));
} else if (z <= 5.1e-54) {
tmp = x + (t * (y / a));
} else {
tmp = x + (y * (1.0 - (t / z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -6.5e+17: tmp = x + (y * ((z - t) / z)) elif z <= 5.1e-54: tmp = x + (t * (y / a)) else: tmp = x + (y * (1.0 - (t / z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -6.5e+17) tmp = Float64(x + Float64(y * Float64(Float64(z - t) / z))); elseif (z <= 5.1e-54) tmp = Float64(x + Float64(t * Float64(y / a))); else tmp = Float64(x + Float64(y * Float64(1.0 - Float64(t / z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -6.5e+17) tmp = x + (y * ((z - t) / z)); elseif (z <= 5.1e-54) tmp = x + (t * (y / a)); else tmp = x + (y * (1.0 - (t / z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6.5e+17], N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.1e-54], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.5 \cdot 10^{+17}:\\
\;\;\;\;x + y \cdot \frac{z - t}{z}\\
\mathbf{elif}\;z \leq 5.1 \cdot 10^{-54}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\
\end{array}
\end{array}
if z < -6.5e17Initial program 100.0%
Taylor expanded in a around 0 92.3%
if -6.5e17 < z < 5.1000000000000001e-54Initial program 95.3%
Taylor expanded in z around 0 80.4%
+-commutative80.4%
associate-/l*81.1%
Simplified81.1%
if 5.1000000000000001e-54 < z Initial program 99.9%
Taylor expanded in a around 0 67.2%
associate-/l*85.9%
div-sub86.0%
*-inverses86.0%
Simplified86.0%
Final simplification85.1%
(FPCore (x y z t a) :precision binary64 (if (<= z -7.5e+17) (+ x (* y (/ (- z t) z))) (if (<= z 4e-53) (+ x (/ 1.0 (/ (/ a y) t))) (+ x (* y (- 1.0 (/ t z)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -7.5e+17) {
tmp = x + (y * ((z - t) / z));
} else if (z <= 4e-53) {
tmp = x + (1.0 / ((a / y) / t));
} else {
tmp = x + (y * (1.0 - (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 <= (-7.5d+17)) then
tmp = x + (y * ((z - t) / z))
else if (z <= 4d-53) then
tmp = x + (1.0d0 / ((a / y) / t))
else
tmp = x + (y * (1.0d0 - (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 <= -7.5e+17) {
tmp = x + (y * ((z - t) / z));
} else if (z <= 4e-53) {
tmp = x + (1.0 / ((a / y) / t));
} else {
tmp = x + (y * (1.0 - (t / z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -7.5e+17: tmp = x + (y * ((z - t) / z)) elif z <= 4e-53: tmp = x + (1.0 / ((a / y) / t)) else: tmp = x + (y * (1.0 - (t / z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -7.5e+17) tmp = Float64(x + Float64(y * Float64(Float64(z - t) / z))); elseif (z <= 4e-53) tmp = Float64(x + Float64(1.0 / Float64(Float64(a / y) / t))); else tmp = Float64(x + Float64(y * Float64(1.0 - Float64(t / z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -7.5e+17) tmp = x + (y * ((z - t) / z)); elseif (z <= 4e-53) tmp = x + (1.0 / ((a / y) / t)); else tmp = x + (y * (1.0 - (t / z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -7.5e+17], N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4e-53], N[(x + N[(1.0 / N[(N[(a / y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.5 \cdot 10^{+17}:\\
\;\;\;\;x + y \cdot \frac{z - t}{z}\\
\mathbf{elif}\;z \leq 4 \cdot 10^{-53}:\\
\;\;\;\;x + \frac{1}{\frac{\frac{a}{y}}{t}}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\
\end{array}
\end{array}
if z < -7.5e17Initial program 100.0%
Taylor expanded in a around 0 92.3%
if -7.5e17 < z < 4.00000000000000012e-53Initial program 95.3%
Taylor expanded in z around 0 80.4%
clear-num80.4%
inv-pow80.4%
*-commutative80.4%
Applied egg-rr80.4%
unpow-180.4%
associate-/r*81.1%
Simplified81.1%
if 4.00000000000000012e-53 < z Initial program 99.9%
Taylor expanded in a around 0 67.2%
associate-/l*85.9%
div-sub86.0%
*-inverses86.0%
Simplified86.0%
Final simplification85.1%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.8e+18) (+ x (* y (/ (- z t) z))) (if (<= z 1.54e+41) (+ x (* y (/ t (- a z)))) (+ x (/ y (/ (- z a) z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.8e+18) {
tmp = x + (y * ((z - t) / z));
} else if (z <= 1.54e+41) {
tmp = x + (y * (t / (a - z)));
} else {
tmp = x + (y / ((z - a) / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-1.8d+18)) then
tmp = x + (y * ((z - t) / z))
else if (z <= 1.54d+41) then
tmp = x + (y * (t / (a - z)))
else
tmp = x + (y / ((z - a) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.8e+18) {
tmp = x + (y * ((z - t) / z));
} else if (z <= 1.54e+41) {
tmp = x + (y * (t / (a - z)));
} else {
tmp = x + (y / ((z - a) / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.8e+18: tmp = x + (y * ((z - t) / z)) elif z <= 1.54e+41: tmp = x + (y * (t / (a - z))) else: tmp = x + (y / ((z - a) / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.8e+18) tmp = Float64(x + Float64(y * Float64(Float64(z - t) / z))); elseif (z <= 1.54e+41) tmp = Float64(x + Float64(y * Float64(t / Float64(a - z)))); else tmp = Float64(x + Float64(y / Float64(Float64(z - a) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.8e+18) tmp = x + (y * ((z - t) / z)); elseif (z <= 1.54e+41) tmp = x + (y * (t / (a - z))); else tmp = x + (y / ((z - a) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.8e+18], N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.54e+41], N[(x + N[(y * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(N[(z - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.8 \cdot 10^{+18}:\\
\;\;\;\;x + y \cdot \frac{z - t}{z}\\
\mathbf{elif}\;z \leq 1.54 \cdot 10^{+41}:\\
\;\;\;\;x + y \cdot \frac{t}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{z - a}{z}}\\
\end{array}
\end{array}
if z < -1.8e18Initial program 100.0%
Taylor expanded in a around 0 92.3%
if -1.8e18 < z < 1.53999999999999993e41Initial program 96.0%
clear-num95.8%
un-div-inv96.4%
Applied egg-rr96.4%
Taylor expanded in t around inf 90.3%
mul-1-neg90.3%
distribute-neg-frac290.3%
Simplified90.3%
frac-2neg90.3%
div-inv89.8%
distribute-neg-frac289.8%
add-sqr-sqrt40.0%
sqrt-unprod49.6%
sqr-neg49.6%
sqrt-unprod22.6%
add-sqr-sqrt41.3%
clear-num41.3%
cancel-sign-sub-inv41.3%
clear-num41.3%
div-inv41.3%
div-inv41.3%
clear-num41.3%
Applied egg-rr89.9%
if 1.53999999999999993e41 < z Initial program 99.9%
clear-num99.9%
un-div-inv100.0%
Applied egg-rr100.0%
Taylor expanded in t around 0 90.8%
Final simplification90.6%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.2e+18) (+ x (* y (/ (- z t) z))) (if (<= z 2.1e+41) (+ x (* t (/ y (- a z)))) (+ x (/ y (/ (- z a) z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.2e+18) {
tmp = x + (y * ((z - t) / z));
} else if (z <= 2.1e+41) {
tmp = x + (t * (y / (a - z)));
} else {
tmp = x + (y / ((z - a) / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-1.2d+18)) then
tmp = x + (y * ((z - t) / z))
else if (z <= 2.1d+41) then
tmp = x + (t * (y / (a - z)))
else
tmp = x + (y / ((z - a) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.2e+18) {
tmp = x + (y * ((z - t) / z));
} else if (z <= 2.1e+41) {
tmp = x + (t * (y / (a - z)));
} else {
tmp = x + (y / ((z - a) / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.2e+18: tmp = x + (y * ((z - t) / z)) elif z <= 2.1e+41: tmp = x + (t * (y / (a - z))) else: tmp = x + (y / ((z - a) / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.2e+18) tmp = Float64(x + Float64(y * Float64(Float64(z - t) / z))); elseif (z <= 2.1e+41) tmp = Float64(x + Float64(t * Float64(y / Float64(a - z)))); else tmp = Float64(x + Float64(y / Float64(Float64(z - a) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.2e+18) tmp = x + (y * ((z - t) / z)); elseif (z <= 2.1e+41) tmp = x + (t * (y / (a - z))); else tmp = x + (y / ((z - a) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.2e+18], N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.1e+41], N[(x + N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(N[(z - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.2 \cdot 10^{+18}:\\
\;\;\;\;x + y \cdot \frac{z - t}{z}\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{+41}:\\
\;\;\;\;x + t \cdot \frac{y}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{z - a}{z}}\\
\end{array}
\end{array}
if z < -1.2e18Initial program 100.0%
Taylor expanded in a around 0 92.3%
if -1.2e18 < z < 2.1e41Initial program 96.0%
Taylor expanded in t around inf 88.7%
associate-*r/88.7%
mul-1-neg88.7%
distribute-rgt-neg-in88.7%
associate-*r/91.1%
Simplified91.1%
if 2.1e41 < z Initial program 99.9%
clear-num99.9%
un-div-inv100.0%
Applied egg-rr100.0%
Taylor expanded in t around 0 90.8%
Final simplification91.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.5e+18) (not (<= z 4.3e-45))) (+ y x) (+ x (* y (/ t a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.5e+18) || !(z <= 4.3e-45)) {
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 <= (-1.5d+18)) .or. (.not. (z <= 4.3d-45))) 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 <= -1.5e+18) || !(z <= 4.3e-45)) {
tmp = y + x;
} else {
tmp = x + (y * (t / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.5e+18) or not (z <= 4.3e-45): tmp = y + x else: tmp = x + (y * (t / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.5e+18) || !(z <= 4.3e-45)) 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 <= -1.5e+18) || ~((z <= 4.3e-45))) tmp = y + x; else tmp = x + (y * (t / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.5e+18], N[Not[LessEqual[z, 4.3e-45]], $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 -1.5 \cdot 10^{+18} \lor \neg \left(z \leq 4.3 \cdot 10^{-45}\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\end{array}
\end{array}
if z < -1.5e18 or 4.2999999999999999e-45 < z Initial program 100.0%
Taylor expanded in z around inf 78.0%
+-commutative78.0%
Simplified78.0%
if -1.5e18 < z < 4.2999999999999999e-45Initial program 95.4%
Taylor expanded in z around 0 78.8%
*-commutative78.8%
associate-/l*79.4%
Simplified79.4%
Final simplification78.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.2e+18) (not (<= z 4.3e-45))) (+ y x) (+ x (/ y (/ a t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.2e+18) || !(z <= 4.3e-45)) {
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 <= (-1.2d+18)) .or. (.not. (z <= 4.3d-45))) 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 <= -1.2e+18) || !(z <= 4.3e-45)) {
tmp = y + x;
} else {
tmp = x + (y / (a / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.2e+18) or not (z <= 4.3e-45): tmp = y + x else: tmp = x + (y / (a / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.2e+18) || !(z <= 4.3e-45)) 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 <= -1.2e+18) || ~((z <= 4.3e-45))) tmp = y + x; else tmp = x + (y / (a / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.2e+18], N[Not[LessEqual[z, 4.3e-45]], $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 -1.2 \cdot 10^{+18} \lor \neg \left(z \leq 4.3 \cdot 10^{-45}\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\
\end{array}
\end{array}
if z < -1.2e18 or 4.2999999999999999e-45 < z Initial program 100.0%
Taylor expanded in z around inf 78.0%
+-commutative78.0%
Simplified78.0%
if -1.2e18 < z < 4.2999999999999999e-45Initial program 95.4%
clear-num95.3%
un-div-inv95.9%
Applied egg-rr95.9%
Taylor expanded in z around 0 80.1%
Final simplification79.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.45e+18) (not (<= z 2.1e-45))) (+ y x) (+ x (* t (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.45e+18) || !(z <= 2.1e-45)) {
tmp = y + x;
} else {
tmp = x + (t * (y / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-1.45d+18)) .or. (.not. (z <= 2.1d-45))) then
tmp = y + x
else
tmp = x + (t * (y / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.45e+18) || !(z <= 2.1e-45)) {
tmp = y + x;
} else {
tmp = x + (t * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.45e+18) or not (z <= 2.1e-45): tmp = y + x else: tmp = x + (t * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.45e+18) || !(z <= 2.1e-45)) tmp = Float64(y + x); else tmp = Float64(x + Float64(t * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.45e+18) || ~((z <= 2.1e-45))) tmp = y + x; else tmp = x + (t * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.45e+18], N[Not[LessEqual[z, 2.1e-45]], $MachinePrecision]], N[(y + x), $MachinePrecision], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.45 \cdot 10^{+18} \lor \neg \left(z \leq 2.1 \cdot 10^{-45}\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\end{array}
\end{array}
if z < -1.45e18 or 2.09999999999999995e-45 < z Initial program 100.0%
Taylor expanded in z around inf 78.0%
+-commutative78.0%
Simplified78.0%
if -1.45e18 < z < 2.09999999999999995e-45Initial program 95.4%
Taylor expanded in z around 0 78.8%
+-commutative78.8%
associate-/l*80.1%
Simplified80.1%
Final simplification79.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -6.5e+17) (not (<= z 8.5e-54))) (+ y x) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -6.5e+17) || !(z <= 8.5e-54)) {
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 <= (-6.5d+17)) .or. (.not. (z <= 8.5d-54))) 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 <= -6.5e+17) || !(z <= 8.5e-54)) {
tmp = y + x;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -6.5e+17) or not (z <= 8.5e-54): tmp = y + x else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -6.5e+17) || !(z <= 8.5e-54)) 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 <= -6.5e+17) || ~((z <= 8.5e-54))) tmp = y + x; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -6.5e+17], N[Not[LessEqual[z, 8.5e-54]], $MachinePrecision]], N[(y + x), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.5 \cdot 10^{+17} \lor \neg \left(z \leq 8.5 \cdot 10^{-54}\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -6.5e17 or 8.5e-54 < z Initial program 99.9%
Taylor expanded in z around inf 75.7%
+-commutative75.7%
Simplified75.7%
if -6.5e17 < z < 8.5e-54Initial program 95.3%
Taylor expanded in x around inf 42.8%
Final simplification59.6%
(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 97.7%
Taylor expanded in x around inf 47.2%
Final simplification47.2%
(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 2024071
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisLine from plot-0.2.3.4, A"
:precision binary64
:alt
(+ x (/ y (/ (- z a) (- z t))))
(+ x (* y (/ (- z t) (- z a)))))