
(FPCore (x y z t a) :precision binary64 (- (+ x y) (/ (* (- z t) y) (- a t))))
double code(double x, double y, double z, double t, double a) {
return (x + y) - (((z - t) * y) / (a - 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 - t) * y) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return (x + y) - (((z - t) * y) / (a - t));
}
def code(x, y, z, t, a): return (x + y) - (((z - t) * y) / (a - t))
function code(x, y, z, t, a) return Float64(Float64(x + y) - Float64(Float64(Float64(z - t) * y) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = (x + y) - (((z - t) * y) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(N[(x + y), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (- (+ x y) (/ (* (- z t) y) (- a t))))
double code(double x, double y, double z, double t, double a) {
return (x + y) - (((z - t) * y) / (a - 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 - t) * y) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return (x + y) - (((z - t) * y) / (a - t));
}
def code(x, y, z, t, a): return (x + y) - (((z - t) * y) / (a - t))
function code(x, y, z, t, a) return Float64(Float64(x + y) - Float64(Float64(Float64(z - t) * y) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = (x + y) - (((z - t) * y) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(N[(x + y), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}
\end{array}
(FPCore (x y z t a) :precision binary64 (if (or (<= t -2.6e+82) (not (<= t 6.8e+75))) (+ (- x (* a (/ y t))) (* y (/ z t))) (fma (- z t) (/ y (- t a)) (+ x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -2.6e+82) || !(t <= 6.8e+75)) {
tmp = (x - (a * (y / t))) + (y * (z / t));
} else {
tmp = fma((z - t), (y / (t - a)), (x + y));
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -2.6e+82) || !(t <= 6.8e+75)) tmp = Float64(Float64(x - Float64(a * Float64(y / t))) + Float64(y * Float64(z / t))); else tmp = fma(Float64(z - t), Float64(y / Float64(t - a)), Float64(x + y)); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -2.6e+82], N[Not[LessEqual[t, 6.8e+75]], $MachinePrecision]], N[(N[(x - N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z - t), $MachinePrecision] * N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision] + N[(x + y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.6 \cdot 10^{+82} \lor \neg \left(t \leq 6.8 \cdot 10^{+75}\right):\\
\;\;\;\;\left(x - a \cdot \frac{y}{t}\right) + y \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(z - t, \frac{y}{t - a}, x + y\right)\\
\end{array}
\end{array}
if t < -2.5999999999999998e82 or 6.80000000000000022e75 < t Initial program 56.9%
Taylor expanded in t around inf 76.9%
sub-neg76.9%
mul-1-neg76.9%
unsub-neg76.9%
associate-/l*82.1%
mul-1-neg82.1%
remove-double-neg82.1%
associate-/l*91.0%
Simplified91.0%
if -2.5999999999999998e82 < t < 6.80000000000000022e75Initial program 92.1%
sub-neg92.1%
+-commutative92.1%
distribute-frac-neg92.1%
distribute-rgt-neg-out92.1%
associate-/l*96.2%
fma-define96.2%
distribute-frac-neg96.2%
distribute-neg-frac296.2%
sub-neg96.2%
distribute-neg-in96.2%
remove-double-neg96.2%
+-commutative96.2%
sub-neg96.2%
Simplified96.2%
Final simplification94.3%
(FPCore (x y z t a)
:precision binary64
(if (<= z -3.2e+251)
(* (/ y t) z)
(if (<= z 1.85e+81)
(+ x y)
(if (<= z 1.15e+144)
(/ y (- (/ a z)))
(if (<= z 3.5e+179) x (* y (/ z t)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.2e+251) {
tmp = (y / t) * z;
} else if (z <= 1.85e+81) {
tmp = x + y;
} else if (z <= 1.15e+144) {
tmp = y / -(a / z);
} else if (z <= 3.5e+179) {
tmp = x;
} else {
tmp = y * (z / t);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-3.2d+251)) then
tmp = (y / t) * z
else if (z <= 1.85d+81) then
tmp = x + y
else if (z <= 1.15d+144) then
tmp = y / -(a / z)
else if (z <= 3.5d+179) then
tmp = x
else
tmp = y * (z / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.2e+251) {
tmp = (y / t) * z;
} else if (z <= 1.85e+81) {
tmp = x + y;
} else if (z <= 1.15e+144) {
tmp = y / -(a / z);
} else if (z <= 3.5e+179) {
tmp = x;
} else {
tmp = y * (z / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.2e+251: tmp = (y / t) * z elif z <= 1.85e+81: tmp = x + y elif z <= 1.15e+144: tmp = y / -(a / z) elif z <= 3.5e+179: tmp = x else: tmp = y * (z / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.2e+251) tmp = Float64(Float64(y / t) * z); elseif (z <= 1.85e+81) tmp = Float64(x + y); elseif (z <= 1.15e+144) tmp = Float64(y / Float64(-Float64(a / z))); elseif (z <= 3.5e+179) tmp = x; else tmp = Float64(y * Float64(z / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3.2e+251) tmp = (y / t) * z; elseif (z <= 1.85e+81) tmp = x + y; elseif (z <= 1.15e+144) tmp = y / -(a / z); elseif (z <= 3.5e+179) tmp = x; else tmp = y * (z / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.2e+251], N[(N[(y / t), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[z, 1.85e+81], N[(x + y), $MachinePrecision], If[LessEqual[z, 1.15e+144], N[(y / (-N[(a / z), $MachinePrecision])), $MachinePrecision], If[LessEqual[z, 3.5e+179], x, N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.2 \cdot 10^{+251}:\\
\;\;\;\;\frac{y}{t} \cdot z\\
\mathbf{elif}\;z \leq 1.85 \cdot 10^{+81}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq 1.15 \cdot 10^{+144}:\\
\;\;\;\;\frac{y}{-\frac{a}{z}}\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{+179}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{z}{t}\\
\end{array}
\end{array}
if z < -3.1999999999999997e251Initial program 81.9%
sub-neg81.9%
+-commutative81.9%
distribute-frac-neg81.9%
distribute-rgt-neg-out81.9%
associate-/l*93.9%
fma-define93.8%
distribute-frac-neg93.8%
distribute-neg-frac293.8%
sub-neg93.8%
distribute-neg-in93.8%
remove-double-neg93.8%
+-commutative93.8%
sub-neg93.8%
Simplified93.8%
Taylor expanded in z around inf 63.9%
Taylor expanded in t around inf 57.3%
associate-/l*51.6%
Simplified51.6%
Taylor expanded in y around 0 57.3%
*-commutative57.3%
associate-*r/63.5%
Simplified63.5%
if -3.1999999999999997e251 < z < 1.85e81Initial program 79.3%
Taylor expanded in a around inf 70.4%
+-commutative70.4%
Simplified70.4%
if 1.85e81 < z < 1.1500000000000001e144Initial program 84.8%
sub-neg84.8%
+-commutative84.8%
distribute-frac-neg84.8%
distribute-rgt-neg-out84.8%
associate-/l*91.7%
fma-define91.6%
distribute-frac-neg91.6%
distribute-neg-frac291.6%
sub-neg91.6%
distribute-neg-in91.6%
remove-double-neg91.6%
+-commutative91.6%
sub-neg91.6%
Simplified91.6%
Taylor expanded in z around inf 74.9%
Taylor expanded in t around 0 60.9%
associate-*r/60.9%
neg-mul-160.9%
distribute-rgt-neg-in60.9%
Simplified60.9%
distribute-rgt-neg-out60.9%
distribute-frac-neg60.9%
associate-*r/67.9%
clear-num67.9%
un-div-inv68.0%
Applied egg-rr68.0%
if 1.1500000000000001e144 < z < 3.50000000000000015e179Initial program 71.8%
Taylor expanded in x around inf 67.8%
if 3.50000000000000015e179 < z Initial program 73.5%
sub-neg73.5%
+-commutative73.5%
distribute-frac-neg73.5%
distribute-rgt-neg-out73.5%
associate-/l*85.5%
fma-define86.3%
distribute-frac-neg86.3%
distribute-neg-frac286.3%
sub-neg86.3%
distribute-neg-in86.3%
remove-double-neg86.3%
+-commutative86.3%
sub-neg86.3%
Simplified86.3%
Taylor expanded in z around inf 71.4%
Taylor expanded in t around inf 51.3%
associate-/l*55.3%
Simplified55.3%
Final simplification68.3%
(FPCore (x y z t a)
:precision binary64
(if (<= z -3.2e+251)
(* (/ y t) z)
(if (<= z 1.85e+81)
(+ x y)
(if (<= z 1.2e+146)
(* z (- (/ y a)))
(if (<= z 8e+180) x (* y (/ z t)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.2e+251) {
tmp = (y / t) * z;
} else if (z <= 1.85e+81) {
tmp = x + y;
} else if (z <= 1.2e+146) {
tmp = z * -(y / a);
} else if (z <= 8e+180) {
tmp = x;
} else {
tmp = y * (z / t);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-3.2d+251)) then
tmp = (y / t) * z
else if (z <= 1.85d+81) then
tmp = x + y
else if (z <= 1.2d+146) then
tmp = z * -(y / a)
else if (z <= 8d+180) then
tmp = x
else
tmp = y * (z / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.2e+251) {
tmp = (y / t) * z;
} else if (z <= 1.85e+81) {
tmp = x + y;
} else if (z <= 1.2e+146) {
tmp = z * -(y / a);
} else if (z <= 8e+180) {
tmp = x;
} else {
tmp = y * (z / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.2e+251: tmp = (y / t) * z elif z <= 1.85e+81: tmp = x + y elif z <= 1.2e+146: tmp = z * -(y / a) elif z <= 8e+180: tmp = x else: tmp = y * (z / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.2e+251) tmp = Float64(Float64(y / t) * z); elseif (z <= 1.85e+81) tmp = Float64(x + y); elseif (z <= 1.2e+146) tmp = Float64(z * Float64(-Float64(y / a))); elseif (z <= 8e+180) tmp = x; else tmp = Float64(y * Float64(z / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3.2e+251) tmp = (y / t) * z; elseif (z <= 1.85e+81) tmp = x + y; elseif (z <= 1.2e+146) tmp = z * -(y / a); elseif (z <= 8e+180) tmp = x; else tmp = y * (z / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.2e+251], N[(N[(y / t), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[z, 1.85e+81], N[(x + y), $MachinePrecision], If[LessEqual[z, 1.2e+146], N[(z * (-N[(y / a), $MachinePrecision])), $MachinePrecision], If[LessEqual[z, 8e+180], x, N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.2 \cdot 10^{+251}:\\
\;\;\;\;\frac{y}{t} \cdot z\\
\mathbf{elif}\;z \leq 1.85 \cdot 10^{+81}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq 1.2 \cdot 10^{+146}:\\
\;\;\;\;z \cdot \left(-\frac{y}{a}\right)\\
\mathbf{elif}\;z \leq 8 \cdot 10^{+180}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{z}{t}\\
\end{array}
\end{array}
if z < -3.1999999999999997e251Initial program 81.9%
sub-neg81.9%
+-commutative81.9%
distribute-frac-neg81.9%
distribute-rgt-neg-out81.9%
associate-/l*93.9%
fma-define93.8%
distribute-frac-neg93.8%
distribute-neg-frac293.8%
sub-neg93.8%
distribute-neg-in93.8%
remove-double-neg93.8%
+-commutative93.8%
sub-neg93.8%
Simplified93.8%
Taylor expanded in z around inf 63.9%
Taylor expanded in t around inf 57.3%
associate-/l*51.6%
Simplified51.6%
Taylor expanded in y around 0 57.3%
*-commutative57.3%
associate-*r/63.5%
Simplified63.5%
if -3.1999999999999997e251 < z < 1.85e81Initial program 79.3%
Taylor expanded in a around inf 70.4%
+-commutative70.4%
Simplified70.4%
if 1.85e81 < z < 1.2000000000000001e146Initial program 84.8%
sub-neg84.8%
+-commutative84.8%
distribute-frac-neg84.8%
distribute-rgt-neg-out84.8%
associate-/l*91.7%
fma-define91.6%
distribute-frac-neg91.6%
distribute-neg-frac291.6%
sub-neg91.6%
distribute-neg-in91.6%
remove-double-neg91.6%
+-commutative91.6%
sub-neg91.6%
Simplified91.6%
Taylor expanded in z around inf 74.9%
Taylor expanded in t around 0 60.9%
associate-*r/60.9%
neg-mul-160.9%
distribute-rgt-neg-in60.9%
Simplified60.9%
distribute-rgt-neg-out60.9%
distribute-frac-neg60.9%
associate-*r/67.9%
clear-num67.9%
un-div-inv68.0%
Applied egg-rr68.0%
associate-/r/68.0%
Applied egg-rr68.0%
if 1.2000000000000001e146 < z < 8.0000000000000001e180Initial program 71.8%
Taylor expanded in x around inf 67.8%
if 8.0000000000000001e180 < z Initial program 73.5%
sub-neg73.5%
+-commutative73.5%
distribute-frac-neg73.5%
distribute-rgt-neg-out73.5%
associate-/l*85.5%
fma-define86.3%
distribute-frac-neg86.3%
distribute-neg-frac286.3%
sub-neg86.3%
distribute-neg-in86.3%
remove-double-neg86.3%
+-commutative86.3%
sub-neg86.3%
Simplified86.3%
Taylor expanded in z around inf 71.4%
Taylor expanded in t around inf 51.3%
associate-/l*55.3%
Simplified55.3%
Final simplification68.3%
(FPCore (x y z t a)
:precision binary64
(if (<= z -2.8e+251)
(* (/ y t) z)
(if (<= z 1.85e+81)
(+ x y)
(if (<= z 1.8e+144)
(* y (- (/ z a)))
(if (<= z 3e+179) x (* y (/ z t)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.8e+251) {
tmp = (y / t) * z;
} else if (z <= 1.85e+81) {
tmp = x + y;
} else if (z <= 1.8e+144) {
tmp = y * -(z / a);
} else if (z <= 3e+179) {
tmp = x;
} else {
tmp = y * (z / t);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-2.8d+251)) then
tmp = (y / t) * z
else if (z <= 1.85d+81) then
tmp = x + y
else if (z <= 1.8d+144) then
tmp = y * -(z / a)
else if (z <= 3d+179) then
tmp = x
else
tmp = y * (z / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.8e+251) {
tmp = (y / t) * z;
} else if (z <= 1.85e+81) {
tmp = x + y;
} else if (z <= 1.8e+144) {
tmp = y * -(z / a);
} else if (z <= 3e+179) {
tmp = x;
} else {
tmp = y * (z / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.8e+251: tmp = (y / t) * z elif z <= 1.85e+81: tmp = x + y elif z <= 1.8e+144: tmp = y * -(z / a) elif z <= 3e+179: tmp = x else: tmp = y * (z / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.8e+251) tmp = Float64(Float64(y / t) * z); elseif (z <= 1.85e+81) tmp = Float64(x + y); elseif (z <= 1.8e+144) tmp = Float64(y * Float64(-Float64(z / a))); elseif (z <= 3e+179) tmp = x; else tmp = Float64(y * Float64(z / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.8e+251) tmp = (y / t) * z; elseif (z <= 1.85e+81) tmp = x + y; elseif (z <= 1.8e+144) tmp = y * -(z / a); elseif (z <= 3e+179) tmp = x; else tmp = y * (z / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.8e+251], N[(N[(y / t), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[z, 1.85e+81], N[(x + y), $MachinePrecision], If[LessEqual[z, 1.8e+144], N[(y * (-N[(z / a), $MachinePrecision])), $MachinePrecision], If[LessEqual[z, 3e+179], x, N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.8 \cdot 10^{+251}:\\
\;\;\;\;\frac{y}{t} \cdot z\\
\mathbf{elif}\;z \leq 1.85 \cdot 10^{+81}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{+144}:\\
\;\;\;\;y \cdot \left(-\frac{z}{a}\right)\\
\mathbf{elif}\;z \leq 3 \cdot 10^{+179}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{z}{t}\\
\end{array}
\end{array}
if z < -2.8e251Initial program 81.9%
sub-neg81.9%
+-commutative81.9%
distribute-frac-neg81.9%
distribute-rgt-neg-out81.9%
associate-/l*93.9%
fma-define93.8%
distribute-frac-neg93.8%
distribute-neg-frac293.8%
sub-neg93.8%
distribute-neg-in93.8%
remove-double-neg93.8%
+-commutative93.8%
sub-neg93.8%
Simplified93.8%
Taylor expanded in z around inf 63.9%
Taylor expanded in t around inf 57.3%
associate-/l*51.6%
Simplified51.6%
Taylor expanded in y around 0 57.3%
*-commutative57.3%
associate-*r/63.5%
Simplified63.5%
if -2.8e251 < z < 1.85e81Initial program 79.3%
Taylor expanded in a around inf 70.4%
+-commutative70.4%
Simplified70.4%
if 1.85e81 < z < 1.7999999999999999e144Initial program 84.8%
sub-neg84.8%
+-commutative84.8%
distribute-frac-neg84.8%
distribute-rgt-neg-out84.8%
associate-/l*91.7%
fma-define91.6%
distribute-frac-neg91.6%
distribute-neg-frac291.6%
sub-neg91.6%
distribute-neg-in91.6%
remove-double-neg91.6%
+-commutative91.6%
sub-neg91.6%
Simplified91.6%
Taylor expanded in z around inf 74.9%
Taylor expanded in t around 0 60.9%
associate-*r/60.9%
neg-mul-160.9%
distribute-rgt-neg-in60.9%
Simplified60.9%
Taylor expanded in y around 0 60.9%
mul-1-neg60.9%
associate-*r/67.9%
Simplified67.9%
if 1.7999999999999999e144 < z < 2.9999999999999998e179Initial program 71.8%
Taylor expanded in x around inf 67.8%
if 2.9999999999999998e179 < z Initial program 73.5%
sub-neg73.5%
+-commutative73.5%
distribute-frac-neg73.5%
distribute-rgt-neg-out73.5%
associate-/l*85.5%
fma-define86.3%
distribute-frac-neg86.3%
distribute-neg-frac286.3%
sub-neg86.3%
distribute-neg-in86.3%
remove-double-neg86.3%
+-commutative86.3%
sub-neg86.3%
Simplified86.3%
Taylor expanded in z around inf 71.4%
Taylor expanded in t around inf 51.3%
associate-/l*55.3%
Simplified55.3%
Final simplification68.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -3.7e+86) (not (<= t 1.4e+76))) (+ (- x (* a (/ y t))) (* y (/ z t))) (+ (+ x y) (* (- z t) (/ y (- t a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -3.7e+86) || !(t <= 1.4e+76)) {
tmp = (x - (a * (y / t))) + (y * (z / t));
} else {
tmp = (x + y) + ((z - t) * (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 ((t <= (-3.7d+86)) .or. (.not. (t <= 1.4d+76))) then
tmp = (x - (a * (y / t))) + (y * (z / t))
else
tmp = (x + y) + ((z - t) * (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 ((t <= -3.7e+86) || !(t <= 1.4e+76)) {
tmp = (x - (a * (y / t))) + (y * (z / t));
} else {
tmp = (x + y) + ((z - t) * (y / (t - a)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -3.7e+86) or not (t <= 1.4e+76): tmp = (x - (a * (y / t))) + (y * (z / t)) else: tmp = (x + y) + ((z - t) * (y / (t - a))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -3.7e+86) || !(t <= 1.4e+76)) tmp = Float64(Float64(x - Float64(a * Float64(y / t))) + Float64(y * Float64(z / t))); else tmp = Float64(Float64(x + y) + Float64(Float64(z - t) * Float64(y / Float64(t - a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -3.7e+86) || ~((t <= 1.4e+76))) tmp = (x - (a * (y / t))) + (y * (z / t)); else tmp = (x + y) + ((z - t) * (y / (t - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -3.7e+86], N[Not[LessEqual[t, 1.4e+76]], $MachinePrecision]], N[(N[(x - N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + y), $MachinePrecision] + N[(N[(z - t), $MachinePrecision] * N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.7 \cdot 10^{+86} \lor \neg \left(t \leq 1.4 \cdot 10^{+76}\right):\\
\;\;\;\;\left(x - a \cdot \frac{y}{t}\right) + y \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) + \left(z - t\right) \cdot \frac{y}{t - a}\\
\end{array}
\end{array}
if t < -3.69999999999999992e86 or 1.3999999999999999e76 < t Initial program 56.9%
Taylor expanded in t around inf 76.9%
sub-neg76.9%
mul-1-neg76.9%
unsub-neg76.9%
associate-/l*82.1%
mul-1-neg82.1%
remove-double-neg82.1%
associate-/l*91.0%
Simplified91.0%
if -3.69999999999999992e86 < t < 1.3999999999999999e76Initial program 92.1%
+-commutative92.1%
associate-/l*96.2%
Applied egg-rr96.2%
Final simplification94.2%
(FPCore (x y z t a)
:precision binary64
(if (<= t -3.65e+183)
(+ x (* (/ y t) (- z a)))
(if (<= t 1.16e+76)
(+ (+ x y) (* y (/ z (- t a))))
(+ (- x (* a (/ y t))) (* y (/ z t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -3.65e+183) {
tmp = x + ((y / t) * (z - a));
} else if (t <= 1.16e+76) {
tmp = (x + y) + (y * (z / (t - a)));
} else {
tmp = (x - (a * (y / t))) + (y * (z / t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-3.65d+183)) then
tmp = x + ((y / t) * (z - a))
else if (t <= 1.16d+76) then
tmp = (x + y) + (y * (z / (t - a)))
else
tmp = (x - (a * (y / t))) + (y * (z / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -3.65e+183) {
tmp = x + ((y / t) * (z - a));
} else if (t <= 1.16e+76) {
tmp = (x + y) + (y * (z / (t - a)));
} else {
tmp = (x - (a * (y / t))) + (y * (z / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -3.65e+183: tmp = x + ((y / t) * (z - a)) elif t <= 1.16e+76: tmp = (x + y) + (y * (z / (t - a))) else: tmp = (x - (a * (y / t))) + (y * (z / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -3.65e+183) tmp = Float64(x + Float64(Float64(y / t) * Float64(z - a))); elseif (t <= 1.16e+76) tmp = Float64(Float64(x + y) + Float64(y * Float64(z / Float64(t - a)))); else tmp = Float64(Float64(x - Float64(a * Float64(y / t))) + Float64(y * Float64(z / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -3.65e+183) tmp = x + ((y / t) * (z - a)); elseif (t <= 1.16e+76) tmp = (x + y) + (y * (z / (t - a))); else tmp = (x - (a * (y / t))) + (y * (z / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -3.65e+183], N[(x + N[(N[(y / t), $MachinePrecision] * N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.16e+76], N[(N[(x + y), $MachinePrecision] + N[(y * N[(z / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x - N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.65 \cdot 10^{+183}:\\
\;\;\;\;x + \frac{y}{t} \cdot \left(z - a\right)\\
\mathbf{elif}\;t \leq 1.16 \cdot 10^{+76}:\\
\;\;\;\;\left(x + y\right) + y \cdot \frac{z}{t - a}\\
\mathbf{else}:\\
\;\;\;\;\left(x - a \cdot \frac{y}{t}\right) + y \cdot \frac{z}{t}\\
\end{array}
\end{array}
if t < -3.6499999999999999e183Initial program 40.7%
Taylor expanded in t around inf 75.8%
sub-neg75.8%
mul-1-neg75.8%
unsub-neg75.8%
associate-/l*79.6%
mul-1-neg79.6%
remove-double-neg79.6%
associate-/l*93.2%
Simplified93.2%
Taylor expanded in x around 0 75.8%
associate--l+75.8%
associate-*r/86.0%
associate-*r/93.2%
*-commutative93.2%
associate-*l/79.6%
associate-*r/96.7%
distribute-rgt-out--96.7%
Simplified96.7%
if -3.6499999999999999e183 < t < 1.1599999999999999e76Initial program 91.3%
Taylor expanded in z around inf 90.2%
associate-/l*92.3%
Simplified92.3%
if 1.1599999999999999e76 < t Initial program 56.9%
Taylor expanded in t around inf 75.3%
sub-neg75.3%
mul-1-neg75.3%
unsub-neg75.3%
associate-/l*83.0%
mul-1-neg83.0%
remove-double-neg83.0%
associate-/l*90.4%
Simplified90.4%
Final simplification92.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -3.1e+183) (not (<= t 7.1e+99))) (+ x (* (/ y t) (- z a))) (+ (+ x y) (* y (/ z (- t a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -3.1e+183) || !(t <= 7.1e+99)) {
tmp = x + ((y / t) * (z - a));
} else {
tmp = (x + y) + (y * (z / (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 ((t <= (-3.1d+183)) .or. (.not. (t <= 7.1d+99))) then
tmp = x + ((y / t) * (z - a))
else
tmp = (x + y) + (y * (z / (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 ((t <= -3.1e+183) || !(t <= 7.1e+99)) {
tmp = x + ((y / t) * (z - a));
} else {
tmp = (x + y) + (y * (z / (t - a)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -3.1e+183) or not (t <= 7.1e+99): tmp = x + ((y / t) * (z - a)) else: tmp = (x + y) + (y * (z / (t - a))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -3.1e+183) || !(t <= 7.1e+99)) tmp = Float64(x + Float64(Float64(y / t) * Float64(z - a))); else tmp = Float64(Float64(x + y) + Float64(y * Float64(z / Float64(t - a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -3.1e+183) || ~((t <= 7.1e+99))) tmp = x + ((y / t) * (z - a)); else tmp = (x + y) + (y * (z / (t - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -3.1e+183], N[Not[LessEqual[t, 7.1e+99]], $MachinePrecision]], N[(x + N[(N[(y / t), $MachinePrecision] * N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + y), $MachinePrecision] + N[(y * N[(z / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.1 \cdot 10^{+183} \lor \neg \left(t \leq 7.1 \cdot 10^{+99}\right):\\
\;\;\;\;x + \frac{y}{t} \cdot \left(z - a\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) + y \cdot \frac{z}{t - a}\\
\end{array}
\end{array}
if t < -3.0999999999999998e183 or 7.09999999999999994e99 < t Initial program 49.3%
Taylor expanded in t around inf 74.5%
sub-neg74.5%
mul-1-neg74.5%
unsub-neg74.5%
associate-/l*81.1%
mul-1-neg81.1%
remove-double-neg81.1%
associate-/l*91.1%
Simplified91.1%
Taylor expanded in x around 0 74.5%
associate--l+74.5%
associate-*r/82.2%
associate-*r/91.1%
*-commutative91.1%
associate-*l/81.1%
associate-*r/92.3%
distribute-rgt-out--92.3%
Simplified92.3%
if -3.0999999999999998e183 < t < 7.09999999999999994e99Initial program 91.4%
Taylor expanded in z around inf 90.4%
associate-/l*92.4%
Simplified92.4%
Final simplification92.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -9.8e+36) (not (<= t 0.0066))) (+ x (* (/ y t) (- z a))) (- (+ x y) (/ y (/ a z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -9.8e+36) || !(t <= 0.0066)) {
tmp = x + ((y / t) * (z - a));
} else {
tmp = (x + y) - (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 ((t <= (-9.8d+36)) .or. (.not. (t <= 0.0066d0))) then
tmp = x + ((y / t) * (z - a))
else
tmp = (x + y) - (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 ((t <= -9.8e+36) || !(t <= 0.0066)) {
tmp = x + ((y / t) * (z - a));
} else {
tmp = (x + y) - (y / (a / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -9.8e+36) or not (t <= 0.0066): tmp = x + ((y / t) * (z - a)) else: tmp = (x + y) - (y / (a / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -9.8e+36) || !(t <= 0.0066)) tmp = Float64(x + Float64(Float64(y / t) * Float64(z - a))); else tmp = Float64(Float64(x + y) - Float64(y / Float64(a / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -9.8e+36) || ~((t <= 0.0066))) tmp = x + ((y / t) * (z - a)); else tmp = (x + y) - (y / (a / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -9.8e+36], N[Not[LessEqual[t, 0.0066]], $MachinePrecision]], N[(x + N[(N[(y / t), $MachinePrecision] * N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + y), $MachinePrecision] - N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -9.8 \cdot 10^{+36} \lor \neg \left(t \leq 0.0066\right):\\
\;\;\;\;x + \frac{y}{t} \cdot \left(z - a\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) - \frac{y}{\frac{a}{z}}\\
\end{array}
\end{array}
if t < -9.79999999999999962e36 or 0.0066 < t Initial program 61.6%
Taylor expanded in t around inf 77.6%
sub-neg77.6%
mul-1-neg77.6%
unsub-neg77.6%
associate-/l*82.2%
mul-1-neg82.2%
remove-double-neg82.2%
associate-/l*90.1%
Simplified90.1%
Taylor expanded in x around 0 77.6%
associate--l+77.6%
associate-*r/83.0%
associate-*r/90.1%
*-commutative90.1%
associate-*l/82.2%
associate-*r/88.3%
distribute-rgt-out--88.3%
Simplified88.3%
if -9.79999999999999962e36 < t < 0.0066Initial program 91.5%
Taylor expanded in z around inf 90.7%
associate-/l*91.9%
Simplified91.9%
clear-num91.9%
un-div-inv91.9%
Applied egg-rr91.9%
Taylor expanded in a around inf 82.2%
Final simplification84.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -23500000.0) (not (<= a 1020000000.0))) (+ x y) (+ x (* (/ y t) (- z a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -23500000.0) || !(a <= 1020000000.0)) {
tmp = x + y;
} else {
tmp = x + ((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 ((a <= (-23500000.0d0)) .or. (.not. (a <= 1020000000.0d0))) then
tmp = x + y
else
tmp = x + ((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 ((a <= -23500000.0) || !(a <= 1020000000.0)) {
tmp = x + y;
} else {
tmp = x + ((y / t) * (z - a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -23500000.0) or not (a <= 1020000000.0): tmp = x + y else: tmp = x + ((y / t) * (z - a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -23500000.0) || !(a <= 1020000000.0)) tmp = Float64(x + y); else tmp = Float64(x + Float64(Float64(y / t) * Float64(z - a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -23500000.0) || ~((a <= 1020000000.0))) tmp = x + y; else tmp = x + ((y / t) * (z - a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -23500000.0], N[Not[LessEqual[a, 1020000000.0]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(N[(y / t), $MachinePrecision] * N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -23500000 \lor \neg \left(a \leq 1020000000\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{t} \cdot \left(z - a\right)\\
\end{array}
\end{array}
if a < -2.35e7 or 1.02e9 < a Initial program 80.2%
Taylor expanded in a around inf 76.5%
+-commutative76.5%
Simplified76.5%
if -2.35e7 < a < 1.02e9Initial program 77.6%
Taylor expanded in t around inf 77.8%
sub-neg77.8%
mul-1-neg77.8%
unsub-neg77.8%
associate-/l*74.6%
mul-1-neg74.6%
remove-double-neg74.6%
associate-/l*73.0%
Simplified73.0%
Taylor expanded in x around 0 77.8%
associate--l+77.8%
associate-*r/76.2%
associate-*r/73.0%
*-commutative73.0%
associate-*l/74.6%
associate-*r/76.9%
distribute-rgt-out--80.1%
Simplified80.1%
Final simplification78.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -9.2e-11) (not (<= a 4400000.0))) (+ x y) (+ x (/ (* y z) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -9.2e-11) || !(a <= 4400000.0)) {
tmp = x + y;
} else {
tmp = x + ((y * z) / t);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-9.2d-11)) .or. (.not. (a <= 4400000.0d0))) then
tmp = x + y
else
tmp = x + ((y * z) / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -9.2e-11) || !(a <= 4400000.0)) {
tmp = x + y;
} else {
tmp = x + ((y * z) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -9.2e-11) or not (a <= 4400000.0): tmp = x + y else: tmp = x + ((y * z) / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -9.2e-11) || !(a <= 4400000.0)) tmp = Float64(x + y); else tmp = Float64(x + Float64(Float64(y * z) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -9.2e-11) || ~((a <= 4400000.0))) tmp = x + y; else tmp = x + ((y * z) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -9.2e-11], N[Not[LessEqual[a, 4400000.0]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -9.2 \cdot 10^{-11} \lor \neg \left(a \leq 4400000\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot z}{t}\\
\end{array}
\end{array}
if a < -9.20000000000000054e-11 or 4.4e6 < a Initial program 80.2%
Taylor expanded in a around inf 74.7%
+-commutative74.7%
Simplified74.7%
if -9.20000000000000054e-11 < a < 4.4e6Initial program 77.4%
Taylor expanded in t around inf 79.6%
sub-neg79.6%
mul-1-neg79.6%
unsub-neg79.6%
associate-/l*76.2%
mul-1-neg76.2%
remove-double-neg76.2%
associate-/l*74.6%
Simplified74.6%
Taylor expanded in a around 0 76.8%
Final simplification75.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2.55e+218) (not (<= z 1.85e+81))) (* y (/ z (- t a))) (+ x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.55e+218) || !(z <= 1.85e+81)) {
tmp = y * (z / (t - a));
} else {
tmp = x + 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 <= (-2.55d+218)) .or. (.not. (z <= 1.85d+81))) then
tmp = y * (z / (t - a))
else
tmp = x + 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 <= -2.55e+218) || !(z <= 1.85e+81)) {
tmp = y * (z / (t - a));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2.55e+218) or not (z <= 1.85e+81): tmp = y * (z / (t - a)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2.55e+218) || !(z <= 1.85e+81)) tmp = Float64(y * Float64(z / Float64(t - a))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -2.55e+218) || ~((z <= 1.85e+81))) tmp = y * (z / (t - a)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.55e+218], N[Not[LessEqual[z, 1.85e+81]], $MachinePrecision]], N[(y * N[(z / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.55 \cdot 10^{+218} \lor \neg \left(z \leq 1.85 \cdot 10^{+81}\right):\\
\;\;\;\;y \cdot \frac{z}{t - a}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -2.55e218 or 1.85e81 < z Initial program 77.5%
sub-neg77.5%
+-commutative77.5%
distribute-frac-neg77.5%
distribute-rgt-neg-out77.5%
associate-/l*88.1%
fma-define88.3%
distribute-frac-neg88.3%
distribute-neg-frac288.3%
sub-neg88.3%
distribute-neg-in88.3%
remove-double-neg88.3%
+-commutative88.3%
sub-neg88.3%
Simplified88.3%
Taylor expanded in z around inf 62.8%
associate-/l*69.2%
Simplified69.2%
if -2.55e218 < z < 1.85e81Initial program 79.4%
Taylor expanded in a around inf 72.2%
+-commutative72.2%
Simplified72.2%
Final simplification71.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -6e+218) (not (<= z 7.6e+180))) (* y (/ z t)) (+ x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -6e+218) || !(z <= 7.6e+180)) {
tmp = y * (z / t);
} else {
tmp = x + 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 <= (-6d+218)) .or. (.not. (z <= 7.6d+180))) then
tmp = y * (z / t)
else
tmp = x + 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 <= -6e+218) || !(z <= 7.6e+180)) {
tmp = y * (z / t);
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -6e+218) or not (z <= 7.6e+180): tmp = y * (z / t) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -6e+218) || !(z <= 7.6e+180)) tmp = Float64(y * Float64(z / t)); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -6e+218) || ~((z <= 7.6e+180))) tmp = y * (z / t); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -6e+218], N[Not[LessEqual[z, 7.6e+180]], $MachinePrecision]], N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6 \cdot 10^{+218} \lor \neg \left(z \leq 7.6 \cdot 10^{+180}\right):\\
\;\;\;\;y \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -6.0000000000000001e218 or 7.6e180 < z Initial program 76.8%
sub-neg76.8%
+-commutative76.8%
distribute-frac-neg76.8%
distribute-rgt-neg-out76.8%
associate-/l*88.7%
fma-define89.1%
distribute-frac-neg89.1%
distribute-neg-frac289.1%
sub-neg89.1%
distribute-neg-in89.1%
remove-double-neg89.1%
+-commutative89.1%
sub-neg89.1%
Simplified89.1%
Taylor expanded in z around inf 65.6%
Taylor expanded in t around inf 51.2%
associate-/l*51.2%
Simplified51.2%
if -6.0000000000000001e218 < z < 7.6e180Initial program 79.4%
Taylor expanded in a around inf 68.3%
+-commutative68.3%
Simplified68.3%
Final simplification65.1%
(FPCore (x y z t a) :precision binary64 (if (<= z -2.9e+251) (* (/ y t) z) (if (<= z 4.8e+180) (+ x y) (* y (/ z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.9e+251) {
tmp = (y / t) * z;
} else if (z <= 4.8e+180) {
tmp = x + y;
} else {
tmp = y * (z / t);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-2.9d+251)) then
tmp = (y / t) * z
else if (z <= 4.8d+180) then
tmp = x + y
else
tmp = y * (z / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.9e+251) {
tmp = (y / t) * z;
} else if (z <= 4.8e+180) {
tmp = x + y;
} else {
tmp = y * (z / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.9e+251: tmp = (y / t) * z elif z <= 4.8e+180: tmp = x + y else: tmp = y * (z / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.9e+251) tmp = Float64(Float64(y / t) * z); elseif (z <= 4.8e+180) tmp = Float64(x + y); else tmp = Float64(y * Float64(z / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.9e+251) tmp = (y / t) * z; elseif (z <= 4.8e+180) tmp = x + y; else tmp = y * (z / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.9e+251], N[(N[(y / t), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[z, 4.8e+180], N[(x + y), $MachinePrecision], N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.9 \cdot 10^{+251}:\\
\;\;\;\;\frac{y}{t} \cdot z\\
\mathbf{elif}\;z \leq 4.8 \cdot 10^{+180}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{z}{t}\\
\end{array}
\end{array}
if z < -2.9e251Initial program 81.9%
sub-neg81.9%
+-commutative81.9%
distribute-frac-neg81.9%
distribute-rgt-neg-out81.9%
associate-/l*93.9%
fma-define93.8%
distribute-frac-neg93.8%
distribute-neg-frac293.8%
sub-neg93.8%
distribute-neg-in93.8%
remove-double-neg93.8%
+-commutative93.8%
sub-neg93.8%
Simplified93.8%
Taylor expanded in z around inf 63.9%
Taylor expanded in t around inf 57.3%
associate-/l*51.6%
Simplified51.6%
Taylor expanded in y around 0 57.3%
*-commutative57.3%
associate-*r/63.5%
Simplified63.5%
if -2.9e251 < z < 4.7999999999999997e180Initial program 79.3%
Taylor expanded in a around inf 66.8%
+-commutative66.8%
Simplified66.8%
if 4.7999999999999997e180 < z Initial program 73.5%
sub-neg73.5%
+-commutative73.5%
distribute-frac-neg73.5%
distribute-rgt-neg-out73.5%
associate-/l*85.5%
fma-define86.3%
distribute-frac-neg86.3%
distribute-neg-frac286.3%
sub-neg86.3%
distribute-neg-in86.3%
remove-double-neg86.3%
+-commutative86.3%
sub-neg86.3%
Simplified86.3%
Taylor expanded in z around inf 71.4%
Taylor expanded in t around inf 51.3%
associate-/l*55.3%
Simplified55.3%
Final simplification65.5%
(FPCore (x y z t a) :precision binary64 (+ x y))
double code(double x, double y, double z, double t, double a) {
return x + 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 + y
end function
public static double code(double x, double y, double z, double t, double a) {
return x + y;
}
def code(x, y, z, t, a): return x + y
function code(x, y, z, t, a) return Float64(x + y) end
function tmp = code(x, y, z, t, a) tmp = x + y; end
code[x_, y_, z_, t_, a_] := N[(x + y), $MachinePrecision]
\begin{array}{l}
\\
x + y
\end{array}
Initial program 78.9%
Taylor expanded in a around inf 59.7%
+-commutative59.7%
Simplified59.7%
Final simplification59.7%
(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 78.9%
Taylor expanded in x around inf 45.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- (+ y x) (* (* (- z t) (/ 1.0 (- a t))) y)))
(t_2 (- (+ x y) (/ (* (- z t) y) (- a t)))))
(if (< t_2 -1.3664970889390727e-7)
t_1
(if (< t_2 1.4754293444577233e-239)
(/ (- (* y (- a z)) (* x t)) (- a t))
t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y + x) - (((z - t) * (1.0 / (a - t))) * y);
double t_2 = (x + y) - (((z - t) * y) / (a - t));
double tmp;
if (t_2 < -1.3664970889390727e-7) {
tmp = t_1;
} else if (t_2 < 1.4754293444577233e-239) {
tmp = ((y * (a - z)) - (x * t)) / (a - t);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (y + x) - (((z - t) * (1.0d0 / (a - t))) * y)
t_2 = (x + y) - (((z - t) * y) / (a - t))
if (t_2 < (-1.3664970889390727d-7)) then
tmp = t_1
else if (t_2 < 1.4754293444577233d-239) then
tmp = ((y * (a - z)) - (x * t)) / (a - t)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (y + x) - (((z - t) * (1.0 / (a - t))) * y);
double t_2 = (x + y) - (((z - t) * y) / (a - t));
double tmp;
if (t_2 < -1.3664970889390727e-7) {
tmp = t_1;
} else if (t_2 < 1.4754293444577233e-239) {
tmp = ((y * (a - z)) - (x * t)) / (a - t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y + x) - (((z - t) * (1.0 / (a - t))) * y) t_2 = (x + y) - (((z - t) * y) / (a - t)) tmp = 0 if t_2 < -1.3664970889390727e-7: tmp = t_1 elif t_2 < 1.4754293444577233e-239: tmp = ((y * (a - z)) - (x * t)) / (a - t) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y + x) - Float64(Float64(Float64(z - t) * Float64(1.0 / Float64(a - t))) * y)) t_2 = Float64(Float64(x + y) - Float64(Float64(Float64(z - t) * y) / Float64(a - t))) tmp = 0.0 if (t_2 < -1.3664970889390727e-7) tmp = t_1; elseif (t_2 < 1.4754293444577233e-239) tmp = Float64(Float64(Float64(y * Float64(a - z)) - Float64(x * t)) / Float64(a - t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y + x) - (((z - t) * (1.0 / (a - t))) * y); t_2 = (x + y) - (((z - t) * y) / (a - t)); tmp = 0.0; if (t_2 < -1.3664970889390727e-7) tmp = t_1; elseif (t_2 < 1.4754293444577233e-239) tmp = ((y * (a - z)) - (x * t)) / (a - t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y + x), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * N[(1.0 / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + y), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t$95$2, -1.3664970889390727e-7], t$95$1, If[Less[t$95$2, 1.4754293444577233e-239], N[(N[(N[(y * N[(a - z), $MachinePrecision]), $MachinePrecision] - N[(x * t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y + x\right) - \left(\left(z - t\right) \cdot \frac{1}{a - t}\right) \cdot y\\
t_2 := \left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}\\
\mathbf{if}\;t\_2 < -1.3664970889390727 \cdot 10^{-7}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 < 1.4754293444577233 \cdot 10^{-239}:\\
\;\;\;\;\frac{y \cdot \left(a - z\right) - x \cdot t}{a - t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024096
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, B"
:precision binary64
:alt
(if (< (- (+ x y) (/ (* (- z t) y) (- a t))) -1.3664970889390727e-7) (- (+ y x) (* (* (- z t) (/ 1.0 (- a t))) y)) (if (< (- (+ x y) (/ (* (- z t) y) (- a t))) 1.4754293444577233e-239) (/ (- (* y (- a z)) (* x t)) (- a t)) (- (+ y x) (* (* (- z t) (/ 1.0 (- a t))) y))))
(- (+ x y) (/ (* (- z t) y) (- a t))))