
(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 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(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
(let* ((t_1 (/ (* y (- z t)) (- z a))))
(if (or (<= t_1 -1e+277) (not (<= t_1 5e+239)))
(+ x (/ (- z t) (/ (- z a) y)))
(+ t_1 x))))
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 <= -1e+277) || !(t_1 <= 5e+239)) {
tmp = x + ((z - t) / ((z - a) / y));
} else {
tmp = t_1 + 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 = (y * (z - t)) / (z - a)
if ((t_1 <= (-1d+277)) .or. (.not. (t_1 <= 5d+239))) then
tmp = x + ((z - t) / ((z - a) / y))
else
tmp = t_1 + x
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 <= -1e+277) || !(t_1 <= 5e+239)) {
tmp = x + ((z - t) / ((z - a) / y));
} else {
tmp = t_1 + x;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y * (z - t)) / (z - a) tmp = 0 if (t_1 <= -1e+277) or not (t_1 <= 5e+239): tmp = x + ((z - t) / ((z - a) / y)) else: tmp = t_1 + x return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y * Float64(z - t)) / Float64(z - a)) tmp = 0.0 if ((t_1 <= -1e+277) || !(t_1 <= 5e+239)) tmp = Float64(x + Float64(Float64(z - t) / Float64(Float64(z - a) / y))); else tmp = Float64(t_1 + x); 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 <= -1e+277) || ~((t_1 <= 5e+239))) tmp = x + ((z - t) / ((z - a) / y)); else tmp = t_1 + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -1e+277], N[Not[LessEqual[t$95$1, 5e+239]], $MachinePrecision]], N[(x + N[(N[(z - t), $MachinePrecision] / N[(N[(z - a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot \left(z - t\right)}{z - a}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+277} \lor \neg \left(t\_1 \leq 5 \cdot 10^{+239}\right):\\
\;\;\;\;x + \frac{z - t}{\frac{z - a}{y}}\\
\mathbf{else}:\\
\;\;\;\;t\_1 + x\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < -1e277 or 5.00000000000000007e239 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) Initial program 48.4%
*-commutative48.4%
associate-/l*99.9%
Simplified99.9%
if -1e277 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < 5.00000000000000007e239Initial program 99.9%
Final simplification99.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* z (/ y (- z a))))))
(if (<= z -1.2e-68)
t_1
(if (<= z -2e-111)
(- x (* t (/ y z)))
(if (<= z -4.1e-190)
t_1
(if (<= z 5.4e-47) (+ x (/ t (/ a y))) (+ x (* y (/ z (- z a))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (z * (y / (z - a)));
double tmp;
if (z <= -1.2e-68) {
tmp = t_1;
} else if (z <= -2e-111) {
tmp = x - (t * (y / z));
} else if (z <= -4.1e-190) {
tmp = t_1;
} else if (z <= 5.4e-47) {
tmp = x + (t / (a / y));
} else {
tmp = x + (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) :: t_1
real(8) :: tmp
t_1 = x + (z * (y / (z - a)))
if (z <= (-1.2d-68)) then
tmp = t_1
else if (z <= (-2d-111)) then
tmp = x - (t * (y / z))
else if (z <= (-4.1d-190)) then
tmp = t_1
else if (z <= 5.4d-47) then
tmp = x + (t / (a / y))
else
tmp = x + (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 t_1 = x + (z * (y / (z - a)));
double tmp;
if (z <= -1.2e-68) {
tmp = t_1;
} else if (z <= -2e-111) {
tmp = x - (t * (y / z));
} else if (z <= -4.1e-190) {
tmp = t_1;
} else if (z <= 5.4e-47) {
tmp = x + (t / (a / y));
} else {
tmp = x + (y * (z / (z - a)));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (z * (y / (z - a))) tmp = 0 if z <= -1.2e-68: tmp = t_1 elif z <= -2e-111: tmp = x - (t * (y / z)) elif z <= -4.1e-190: tmp = t_1 elif z <= 5.4e-47: tmp = x + (t / (a / y)) else: tmp = x + (y * (z / (z - a))) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(z * Float64(y / Float64(z - a)))) tmp = 0.0 if (z <= -1.2e-68) tmp = t_1; elseif (z <= -2e-111) tmp = Float64(x - Float64(t * Float64(y / z))); elseif (z <= -4.1e-190) tmp = t_1; elseif (z <= 5.4e-47) tmp = Float64(x + Float64(t / Float64(a / y))); else tmp = Float64(x + Float64(y * Float64(z / Float64(z - a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (z * (y / (z - a))); tmp = 0.0; if (z <= -1.2e-68) tmp = t_1; elseif (z <= -2e-111) tmp = x - (t * (y / z)); elseif (z <= -4.1e-190) tmp = t_1; elseif (z <= 5.4e-47) tmp = x + (t / (a / y)); else tmp = x + (y * (z / (z - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(z * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.2e-68], t$95$1, If[LessEqual[z, -2e-111], N[(x - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4.1e-190], t$95$1, If[LessEqual[z, 5.4e-47], N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + z \cdot \frac{y}{z - a}\\
\mathbf{if}\;z \leq -1.2 \cdot 10^{-68}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -2 \cdot 10^{-111}:\\
\;\;\;\;x - t \cdot \frac{y}{z}\\
\mathbf{elif}\;z \leq -4.1 \cdot 10^{-190}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 5.4 \cdot 10^{-47}:\\
\;\;\;\;x + \frac{t}{\frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{z - a}\\
\end{array}
\end{array}
if z < -1.19999999999999996e-68 or -2.00000000000000018e-111 < z < -4.1000000000000002e-190Initial program 82.8%
Taylor expanded in t around 0 67.6%
associate-*l/85.9%
*-commutative85.9%
Simplified85.9%
if -1.19999999999999996e-68 < z < -2.00000000000000018e-111Initial program 99.9%
clear-num99.8%
associate-/r/99.9%
Applied egg-rr99.9%
Taylor expanded in t around inf 99.9%
mul-1-neg99.9%
*-commutative99.9%
distribute-frac-neg99.9%
distribute-lft-neg-in99.9%
associate-/l*93.0%
Simplified93.0%
Taylor expanded in x around 0 99.9%
mul-1-neg99.9%
associate-*l/93.0%
distribute-lft-neg-in93.0%
cancel-sign-sub-inv93.0%
*-commutative93.0%
associate-*r/99.9%
associate-/l*93.0%
Simplified93.0%
Taylor expanded in z around inf 73.3%
associate-*r/73.3%
Simplified73.3%
if -4.1000000000000002e-190 < z < 5.3999999999999996e-47Initial program 95.5%
+-commutative95.5%
associate-*l/93.3%
fma-def93.3%
Simplified93.3%
Taylor expanded in z around 0 79.3%
+-commutative79.3%
associate-/l*81.5%
Simplified81.5%
if 5.3999999999999996e-47 < z Initial program 82.7%
clear-num82.6%
associate-/r/82.6%
Applied egg-rr82.6%
Taylor expanded in t around 0 72.8%
associate-*r/85.5%
Simplified85.5%
Final simplification83.6%
(FPCore (x y z t a)
:precision binary64
(if (<= z -2.3e+41)
(+ y x)
(if (<= z 2.1e-47)
(+ x (/ t (/ a y)))
(if (<= z 2.6e+90) (- x (* t (/ y z))) (+ y x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.3e+41) {
tmp = y + x;
} else if (z <= 2.1e-47) {
tmp = x + (t / (a / y));
} else if (z <= 2.6e+90) {
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 <= (-2.3d+41)) then
tmp = y + x
else if (z <= 2.1d-47) then
tmp = x + (t / (a / y))
else if (z <= 2.6d+90) 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 <= -2.3e+41) {
tmp = y + x;
} else if (z <= 2.1e-47) {
tmp = x + (t / (a / y));
} else if (z <= 2.6e+90) {
tmp = x - (t * (y / z));
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.3e+41: tmp = y + x elif z <= 2.1e-47: tmp = x + (t / (a / y)) elif z <= 2.6e+90: tmp = x - (t * (y / z)) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.3e+41) tmp = Float64(y + x); elseif (z <= 2.1e-47) tmp = Float64(x + Float64(t / Float64(a / y))); elseif (z <= 2.6e+90) 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 <= -2.3e+41) tmp = y + x; elseif (z <= 2.1e-47) tmp = x + (t / (a / y)); elseif (z <= 2.6e+90) tmp = x - (t * (y / z)); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.3e+41], N[(y + x), $MachinePrecision], If[LessEqual[z, 2.1e-47], N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.6e+90], N[(x - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.3 \cdot 10^{+41}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{-47}:\\
\;\;\;\;x + \frac{t}{\frac{a}{y}}\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{+90}:\\
\;\;\;\;x - t \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if z < -2.2999999999999998e41 or 2.5999999999999998e90 < z Initial program 75.3%
+-commutative75.3%
associate-*l/96.9%
fma-def96.8%
Simplified96.8%
Taylor expanded in z around inf 82.2%
+-commutative82.2%
Simplified82.2%
if -2.2999999999999998e41 < z < 2.1000000000000001e-47Initial program 95.5%
+-commutative95.5%
associate-*l/95.5%
fma-def95.5%
Simplified95.5%
Taylor expanded in z around 0 74.5%
+-commutative74.5%
associate-/l*75.3%
Simplified75.3%
if 2.1000000000000001e-47 < z < 2.5999999999999998e90Initial program 99.9%
clear-num99.6%
associate-/r/99.8%
Applied egg-rr99.8%
Taylor expanded in t around inf 72.7%
mul-1-neg72.7%
*-commutative72.7%
distribute-frac-neg72.7%
distribute-lft-neg-in72.7%
associate-/l*72.7%
Simplified72.7%
Taylor expanded in x around 0 72.7%
mul-1-neg72.7%
associate-*l/72.7%
distribute-lft-neg-in72.7%
cancel-sign-sub-inv72.7%
*-commutative72.7%
associate-*r/72.7%
associate-/l*72.7%
Simplified72.7%
Taylor expanded in z around inf 68.6%
associate-*r/68.6%
Simplified68.6%
Final simplification77.3%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.6e+53)
(+ y x)
(if (<= z 8.5e-47)
(+ x (/ t (/ a y)))
(if (<= z 6.3e+91) (- x (/ y (/ z t))) (+ y x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.6e+53) {
tmp = y + x;
} else if (z <= 8.5e-47) {
tmp = x + (t / (a / y));
} else if (z <= 6.3e+91) {
tmp = x - (y / (z / 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 <= (-1.6d+53)) then
tmp = y + x
else if (z <= 8.5d-47) then
tmp = x + (t / (a / y))
else if (z <= 6.3d+91) then
tmp = x - (y / (z / 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 <= -1.6e+53) {
tmp = y + x;
} else if (z <= 8.5e-47) {
tmp = x + (t / (a / y));
} else if (z <= 6.3e+91) {
tmp = x - (y / (z / t));
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.6e+53: tmp = y + x elif z <= 8.5e-47: tmp = x + (t / (a / y)) elif z <= 6.3e+91: tmp = x - (y / (z / t)) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.6e+53) tmp = Float64(y + x); elseif (z <= 8.5e-47) tmp = Float64(x + Float64(t / Float64(a / y))); elseif (z <= 6.3e+91) tmp = Float64(x - Float64(y / Float64(z / t))); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.6e+53) tmp = y + x; elseif (z <= 8.5e-47) tmp = x + (t / (a / y)); elseif (z <= 6.3e+91) tmp = x - (y / (z / t)); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.6e+53], N[(y + x), $MachinePrecision], If[LessEqual[z, 8.5e-47], N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.3e+91], N[(x - N[(y / N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.6 \cdot 10^{+53}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{-47}:\\
\;\;\;\;x + \frac{t}{\frac{a}{y}}\\
\mathbf{elif}\;z \leq 6.3 \cdot 10^{+91}:\\
\;\;\;\;x - \frac{y}{\frac{z}{t}}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if z < -1.6e53 or 6.3e91 < z Initial program 75.3%
+-commutative75.3%
associate-*l/96.9%
fma-def96.8%
Simplified96.8%
Taylor expanded in z around inf 82.2%
+-commutative82.2%
Simplified82.2%
if -1.6e53 < z < 8.4999999999999999e-47Initial program 95.5%
+-commutative95.5%
associate-*l/95.5%
fma-def95.5%
Simplified95.5%
Taylor expanded in z around 0 74.5%
+-commutative74.5%
associate-/l*75.3%
Simplified75.3%
if 8.4999999999999999e-47 < z < 6.3e91Initial program 99.9%
clear-num99.6%
associate-/r/99.8%
Applied egg-rr99.8%
Taylor expanded in t around inf 72.7%
mul-1-neg72.7%
*-commutative72.7%
distribute-frac-neg72.7%
distribute-lft-neg-in72.7%
associate-/l*72.7%
Simplified72.7%
Taylor expanded in x around 0 72.7%
mul-1-neg72.7%
associate-*l/72.7%
distribute-lft-neg-in72.7%
cancel-sign-sub-inv72.7%
*-commutative72.7%
associate-*r/72.7%
associate-/l*72.7%
Simplified72.7%
Taylor expanded in z around inf 68.6%
Final simplification77.3%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.15e+206)
(+ x (* (- z t) (/ y z)))
(if (<= z 5.5e+74)
(+ (/ (* y (- z t)) (- z a)) x)
(+ x (* y (/ z (- z a)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.15e+206) {
tmp = x + ((z - t) * (y / z));
} else if (z <= 5.5e+74) {
tmp = ((y * (z - t)) / (z - a)) + x;
} else {
tmp = x + (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 (z <= (-1.15d+206)) then
tmp = x + ((z - t) * (y / z))
else if (z <= 5.5d+74) then
tmp = ((y * (z - t)) / (z - a)) + x
else
tmp = x + (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 (z <= -1.15e+206) {
tmp = x + ((z - t) * (y / z));
} else if (z <= 5.5e+74) {
tmp = ((y * (z - t)) / (z - a)) + x;
} else {
tmp = x + (y * (z / (z - a)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.15e+206: tmp = x + ((z - t) * (y / z)) elif z <= 5.5e+74: tmp = ((y * (z - t)) / (z - a)) + x else: tmp = x + (y * (z / (z - a))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.15e+206) tmp = Float64(x + Float64(Float64(z - t) * Float64(y / z))); elseif (z <= 5.5e+74) tmp = Float64(Float64(Float64(y * Float64(z - t)) / Float64(z - a)) + x); else tmp = Float64(x + Float64(y * Float64(z / Float64(z - a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.15e+206) tmp = x + ((z - t) * (y / z)); elseif (z <= 5.5e+74) tmp = ((y * (z - t)) / (z - a)) + x; else tmp = x + (y * (z / (z - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.15e+206], N[(x + N[(N[(z - t), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.5e+74], N[(N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(x + N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.15 \cdot 10^{+206}:\\
\;\;\;\;x + \left(z - t\right) \cdot \frac{y}{z}\\
\mathbf{elif}\;z \leq 5.5 \cdot 10^{+74}:\\
\;\;\;\;\frac{y \cdot \left(z - t\right)}{z - a} + x\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{z - a}\\
\end{array}
\end{array}
if z < -1.15000000000000008e206Initial program 54.4%
+-commutative54.4%
associate-*l/100.0%
fma-def100.0%
Simplified100.0%
Taylor expanded in a around 0 54.4%
+-commutative54.4%
associate-/l*99.9%
associate-/r/100.0%
Simplified100.0%
if -1.15000000000000008e206 < z < 5.5000000000000003e74Initial program 96.1%
if 5.5000000000000003e74 < z Initial program 76.3%
clear-num76.2%
associate-/r/76.2%
Applied egg-rr76.2%
Taylor expanded in t around 0 73.3%
associate-*r/92.5%
Simplified92.5%
Final simplification95.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -13200.0) (not (<= z 1.7e-47))) (+ x (* y (/ z (- z a)))) (+ x (/ t (/ a y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -13200.0) || !(z <= 1.7e-47)) {
tmp = x + (y * (z / (z - a)));
} else {
tmp = x + (t / (a / y));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-13200.0d0)) .or. (.not. (z <= 1.7d-47))) then
tmp = x + (y * (z / (z - a)))
else
tmp = x + (t / (a / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -13200.0) || !(z <= 1.7e-47)) {
tmp = x + (y * (z / (z - a)));
} else {
tmp = x + (t / (a / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -13200.0) or not (z <= 1.7e-47): tmp = x + (y * (z / (z - a))) else: tmp = x + (t / (a / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -13200.0) || !(z <= 1.7e-47)) tmp = Float64(x + Float64(y * Float64(z / Float64(z - a)))); else tmp = Float64(x + Float64(t / Float64(a / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -13200.0) || ~((z <= 1.7e-47))) tmp = x + (y * (z / (z - a))); else tmp = x + (t / (a / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -13200.0], N[Not[LessEqual[z, 1.7e-47]], $MachinePrecision]], N[(x + N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -13200 \lor \neg \left(z \leq 1.7 \cdot 10^{-47}\right):\\
\;\;\;\;x + y \cdot \frac{z}{z - a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t}{\frac{a}{y}}\\
\end{array}
\end{array}
if z < -13200 or 1.7000000000000001e-47 < z Initial program 80.5%
clear-num80.4%
associate-/r/80.4%
Applied egg-rr80.4%
Taylor expanded in t around 0 71.0%
associate-*r/86.5%
Simplified86.5%
if -13200 < z < 1.7000000000000001e-47Initial program 96.0%
+-commutative96.0%
associate-*l/95.3%
fma-def95.2%
Simplified95.2%
Taylor expanded in z around 0 75.4%
+-commutative75.4%
associate-/l*77.0%
Simplified77.0%
Final simplification81.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.6e+26) (not (<= t 1.7e-109))) (- x (* y (/ t (- z a)))) (+ x (* y (/ z (- z a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.6e+26) || !(t <= 1.7e-109)) {
tmp = x - (y * (t / (z - a)));
} else {
tmp = x + (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 ((t <= (-1.6d+26)) .or. (.not. (t <= 1.7d-109))) then
tmp = x - (y * (t / (z - a)))
else
tmp = x + (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 ((t <= -1.6e+26) || !(t <= 1.7e-109)) {
tmp = x - (y * (t / (z - a)));
} else {
tmp = x + (y * (z / (z - a)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.6e+26) or not (t <= 1.7e-109): tmp = x - (y * (t / (z - a))) else: tmp = x + (y * (z / (z - a))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.6e+26) || !(t <= 1.7e-109)) tmp = Float64(x - Float64(y * Float64(t / Float64(z - a)))); else tmp = Float64(x + Float64(y * Float64(z / Float64(z - a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -1.6e+26) || ~((t <= 1.7e-109))) tmp = x - (y * (t / (z - a))); else tmp = x + (y * (z / (z - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.6e+26], N[Not[LessEqual[t, 1.7e-109]], $MachinePrecision]], N[(x - N[(y * N[(t / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.6 \cdot 10^{+26} \lor \neg \left(t \leq 1.7 \cdot 10^{-109}\right):\\
\;\;\;\;x - y \cdot \frac{t}{z - a}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{z - a}\\
\end{array}
\end{array}
if t < -1.60000000000000014e26 or 1.70000000000000006e-109 < t Initial program 85.8%
clear-num85.8%
associate-/r/85.8%
Applied egg-rr85.8%
Taylor expanded in t around inf 82.8%
mul-1-neg82.8%
*-commutative82.8%
distribute-frac-neg82.8%
distribute-lft-neg-in82.8%
associate-/l*86.1%
Simplified86.1%
Taylor expanded in x around 0 82.8%
mul-1-neg82.8%
*-commutative82.8%
associate-*r/85.3%
sub-neg85.3%
Simplified85.3%
if -1.60000000000000014e26 < t < 1.70000000000000006e-109Initial program 91.0%
clear-num91.0%
associate-/r/91.0%
Applied egg-rr91.0%
Taylor expanded in t around 0 84.0%
associate-*r/92.8%
Simplified92.8%
Final simplification88.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.82e+25) (not (<= t 8.4e-110))) (- x (* t (/ y (- z a)))) (+ x (* y (/ z (- z a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.82e+25) || !(t <= 8.4e-110)) {
tmp = x - (t * (y / (z - a)));
} else {
tmp = x + (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 ((t <= (-1.82d+25)) .or. (.not. (t <= 8.4d-110))) then
tmp = x - (t * (y / (z - a)))
else
tmp = x + (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 ((t <= -1.82e+25) || !(t <= 8.4e-110)) {
tmp = x - (t * (y / (z - a)));
} else {
tmp = x + (y * (z / (z - a)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.82e+25) or not (t <= 8.4e-110): tmp = x - (t * (y / (z - a))) else: tmp = x + (y * (z / (z - a))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.82e+25) || !(t <= 8.4e-110)) tmp = Float64(x - Float64(t * Float64(y / Float64(z - a)))); else tmp = Float64(x + Float64(y * Float64(z / Float64(z - a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -1.82e+25) || ~((t <= 8.4e-110))) tmp = x - (t * (y / (z - a))); else tmp = x + (y * (z / (z - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.82e+25], N[Not[LessEqual[t, 8.4e-110]], $MachinePrecision]], N[(x - N[(t * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.82 \cdot 10^{+25} \lor \neg \left(t \leq 8.4 \cdot 10^{-110}\right):\\
\;\;\;\;x - t \cdot \frac{y}{z - a}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{z - a}\\
\end{array}
\end{array}
if t < -1.8199999999999999e25 or 8.40000000000000008e-110 < t Initial program 85.8%
Taylor expanded in t around inf 82.8%
associate-*r/87.8%
neg-mul-187.8%
distribute-lft-neg-in87.8%
*-commutative87.8%
Simplified87.8%
if -1.8199999999999999e25 < t < 8.40000000000000008e-110Initial program 91.0%
clear-num91.0%
associate-/r/91.0%
Applied egg-rr91.0%
Taylor expanded in t around 0 84.0%
associate-*r/92.8%
Simplified92.8%
Final simplification89.9%
(FPCore (x y z t a) :precision binary64 (if (<= t -1.92e+24) (- x (* y (/ t (- z a)))) (if (<= t 2.15e-109) (+ x (* y (/ z (- z a)))) (- x (/ y (/ (- z a) t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.92e+24) {
tmp = x - (y * (t / (z - a)));
} else if (t <= 2.15e-109) {
tmp = x + (y * (z / (z - a)));
} else {
tmp = x - (y / ((z - 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 (t <= (-1.92d+24)) then
tmp = x - (y * (t / (z - a)))
else if (t <= 2.15d-109) then
tmp = x + (y * (z / (z - a)))
else
tmp = x - (y / ((z - 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 (t <= -1.92e+24) {
tmp = x - (y * (t / (z - a)));
} else if (t <= 2.15e-109) {
tmp = x + (y * (z / (z - a)));
} else {
tmp = x - (y / ((z - a) / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.92e+24: tmp = x - (y * (t / (z - a))) elif t <= 2.15e-109: tmp = x + (y * (z / (z - a))) else: tmp = x - (y / ((z - a) / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.92e+24) tmp = Float64(x - Float64(y * Float64(t / Float64(z - a)))); elseif (t <= 2.15e-109) tmp = Float64(x + Float64(y * Float64(z / Float64(z - a)))); else tmp = Float64(x - Float64(y / Float64(Float64(z - a) / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -1.92e+24) tmp = x - (y * (t / (z - a))); elseif (t <= 2.15e-109) tmp = x + (y * (z / (z - a))); else tmp = x - (y / ((z - a) / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.92e+24], N[(x - N[(y * N[(t / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.15e-109], N[(x + N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(y / N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.92 \cdot 10^{+24}:\\
\;\;\;\;x - y \cdot \frac{t}{z - a}\\
\mathbf{elif}\;t \leq 2.15 \cdot 10^{-109}:\\
\;\;\;\;x + y \cdot \frac{z}{z - a}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{\frac{z - a}{t}}\\
\end{array}
\end{array}
if t < -1.92e24Initial program 82.9%
clear-num82.9%
associate-/r/82.9%
Applied egg-rr82.9%
Taylor expanded in t around inf 78.7%
mul-1-neg78.7%
*-commutative78.7%
distribute-frac-neg78.7%
distribute-lft-neg-in78.7%
associate-/l*81.9%
Simplified81.9%
Taylor expanded in x around 0 78.7%
mul-1-neg78.7%
*-commutative78.7%
associate-*r/82.0%
sub-neg82.0%
Simplified82.0%
if -1.92e24 < t < 2.1499999999999998e-109Initial program 91.0%
clear-num91.0%
associate-/r/91.0%
Applied egg-rr91.0%
Taylor expanded in t around 0 84.0%
associate-*r/92.8%
Simplified92.8%
if 2.1499999999999998e-109 < t Initial program 87.9%
clear-num87.9%
associate-/r/87.9%
Applied egg-rr87.9%
Taylor expanded in t around inf 85.7%
mul-1-neg85.7%
*-commutative85.7%
distribute-frac-neg85.7%
distribute-lft-neg-in85.7%
associate-/l*89.1%
Simplified89.1%
Taylor expanded in x around 0 85.7%
mul-1-neg85.7%
associate-*l/87.7%
distribute-lft-neg-in87.7%
cancel-sign-sub-inv87.7%
*-commutative87.7%
associate-*r/85.7%
associate-/l*89.1%
Simplified89.1%
Final simplification88.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.12e+49) (not (<= z 1.1e-46))) (+ y x) (+ x (/ (* y t) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.12e+49) || !(z <= 1.1e-46)) {
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.12d+49)) .or. (.not. (z <= 1.1d-46))) 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.12e+49) || !(z <= 1.1e-46)) {
tmp = y + x;
} else {
tmp = x + ((y * t) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.12e+49) or not (z <= 1.1e-46): tmp = y + x else: tmp = x + ((y * t) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.12e+49) || !(z <= 1.1e-46)) tmp = Float64(y + x); else tmp = Float64(x + Float64(Float64(y * t) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.12e+49) || ~((z <= 1.1e-46))) 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.12e+49], N[Not[LessEqual[z, 1.1e-46]], $MachinePrecision]], N[(y + x), $MachinePrecision], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.12 \cdot 10^{+49} \lor \neg \left(z \leq 1.1 \cdot 10^{-46}\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\end{array}
\end{array}
if z < -1.12000000000000005e49 or 1.1e-46 < z Initial program 80.2%
+-commutative80.2%
associate-*l/97.5%
fma-def97.4%
Simplified97.4%
Taylor expanded in z around inf 75.5%
+-commutative75.5%
Simplified75.5%
if -1.12000000000000005e49 < z < 1.1e-46Initial program 95.5%
Taylor expanded in z around 0 74.5%
Final simplification75.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -7e+41) (not (<= z 1.1e-46))) (+ y x) (+ x (* y (/ t a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -7e+41) || !(z <= 1.1e-46)) {
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 <= (-7d+41)) .or. (.not. (z <= 1.1d-46))) 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 <= -7e+41) || !(z <= 1.1e-46)) {
tmp = y + x;
} else {
tmp = x + (y * (t / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -7e+41) or not (z <= 1.1e-46): tmp = y + x else: tmp = x + (y * (t / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -7e+41) || !(z <= 1.1e-46)) 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 <= -7e+41) || ~((z <= 1.1e-46))) tmp = y + x; else tmp = x + (y * (t / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -7e+41], N[Not[LessEqual[z, 1.1e-46]], $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 -7 \cdot 10^{+41} \lor \neg \left(z \leq 1.1 \cdot 10^{-46}\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\end{array}
\end{array}
if z < -6.9999999999999998e41 or 1.1e-46 < z Initial program 80.2%
+-commutative80.2%
associate-*l/97.5%
fma-def97.4%
Simplified97.4%
Taylor expanded in z around inf 75.5%
+-commutative75.5%
Simplified75.5%
if -6.9999999999999998e41 < z < 1.1e-46Initial program 95.5%
+-commutative95.5%
associate-*l/95.5%
fma-def95.5%
Simplified95.5%
Taylor expanded in z around 0 74.5%
+-commutative74.5%
associate-/l*75.3%
associate-/r/74.7%
Simplified74.7%
Final simplification75.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.9e+40) (not (<= z 6.8e-47))) (+ y x) (+ x (/ t (/ a y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.9e+40) || !(z <= 6.8e-47)) {
tmp = y + x;
} else {
tmp = x + (t / (a / y));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-1.9d+40)) .or. (.not. (z <= 6.8d-47))) then
tmp = y + x
else
tmp = x + (t / (a / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.9e+40) || !(z <= 6.8e-47)) {
tmp = y + x;
} else {
tmp = x + (t / (a / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.9e+40) or not (z <= 6.8e-47): tmp = y + x else: tmp = x + (t / (a / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.9e+40) || !(z <= 6.8e-47)) tmp = Float64(y + x); else tmp = Float64(x + Float64(t / Float64(a / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.9e+40) || ~((z <= 6.8e-47))) tmp = y + x; else tmp = x + (t / (a / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.9e+40], N[Not[LessEqual[z, 6.8e-47]], $MachinePrecision]], N[(y + x), $MachinePrecision], N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.9 \cdot 10^{+40} \lor \neg \left(z \leq 6.8 \cdot 10^{-47}\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t}{\frac{a}{y}}\\
\end{array}
\end{array}
if z < -1.90000000000000002e40 or 6.8000000000000003e-47 < z Initial program 80.2%
+-commutative80.2%
associate-*l/97.5%
fma-def97.4%
Simplified97.4%
Taylor expanded in z around inf 75.5%
+-commutative75.5%
Simplified75.5%
if -1.90000000000000002e40 < z < 6.8000000000000003e-47Initial program 95.5%
+-commutative95.5%
associate-*l/95.5%
fma-def95.5%
Simplified95.5%
Taylor expanded in z around 0 74.5%
+-commutative74.5%
associate-/l*75.3%
Simplified75.3%
Final simplification75.4%
(FPCore (x y z t a) :precision binary64 (if (<= a -2.1e+132) x (if (<= a 2.7e+158) (+ y x) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.1e+132) {
tmp = x;
} else if (a <= 2.7e+158) {
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 (a <= (-2.1d+132)) then
tmp = x
else if (a <= 2.7d+158) 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 (a <= -2.1e+132) {
tmp = x;
} else if (a <= 2.7e+158) {
tmp = y + x;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -2.1e+132: tmp = x elif a <= 2.7e+158: tmp = y + x else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2.1e+132) tmp = x; elseif (a <= 2.7e+158) tmp = Float64(y + x); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -2.1e+132) tmp = x; elseif (a <= 2.7e+158) tmp = y + x; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.1e+132], x, If[LessEqual[a, 2.7e+158], N[(y + x), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.1 \cdot 10^{+132}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 2.7 \cdot 10^{+158}:\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -2.09999999999999993e132 or 2.69999999999999979e158 < a Initial program 84.5%
+-commutative84.5%
associate-*l/99.9%
fma-def99.9%
Simplified99.9%
Taylor expanded in y around 0 67.4%
if -2.09999999999999993e132 < a < 2.69999999999999979e158Initial program 89.0%
+-commutative89.0%
associate-*l/95.5%
fma-def95.5%
Simplified95.5%
Taylor expanded in z around inf 58.9%
+-commutative58.9%
Simplified58.9%
Final simplification60.8%
(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.0%
+-commutative88.0%
associate-*l/96.5%
fma-def96.5%
Simplified96.5%
Taylor expanded in y around 0 48.2%
Final simplification48.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 2024029
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, A"
:precision binary64
:herbie-target
(+ x (/ y (/ (- z a) (- z t))))
(+ x (/ (* y (- z t)) (- z a))))