
(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 14 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 (<= t -1.05e+185) (- (+ x (* y (/ z t))) (* a (/ y t))) (+ x (* y (+ (/ (- z t) (- t a)) 1.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.05e+185) {
tmp = (x + (y * (z / t))) - (a * (y / t));
} else {
tmp = x + (y * (((z - t) / (t - a)) + 1.0));
}
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.05d+185)) then
tmp = (x + (y * (z / t))) - (a * (y / t))
else
tmp = x + (y * (((z - t) / (t - a)) + 1.0d0))
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.05e+185) {
tmp = (x + (y * (z / t))) - (a * (y / t));
} else {
tmp = x + (y * (((z - t) / (t - a)) + 1.0));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.05e+185: tmp = (x + (y * (z / t))) - (a * (y / t)) else: tmp = x + (y * (((z - t) / (t - a)) + 1.0)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.05e+185) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) - Float64(a * Float64(y / t))); else tmp = Float64(x + Float64(y * Float64(Float64(Float64(z - t) / Float64(t - a)) + 1.0))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -1.05e+185) tmp = (x + (y * (z / t))) - (a * (y / t)); else tmp = x + (y * (((z - t) / (t - a)) + 1.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.05e+185], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(N[(N[(z - t), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.05 \cdot 10^{+185}:\\
\;\;\;\;\left(x + y \cdot \frac{z}{t}\right) - a \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(\frac{z - t}{t - a} + 1\right)\\
\end{array}
\end{array}
if t < -1.05e185Initial program 45.0%
sub-neg45.0%
+-commutative45.0%
distribute-frac-neg45.0%
distribute-rgt-neg-out45.0%
associate-/l*45.1%
fma-define45.3%
distribute-frac-neg45.3%
distribute-neg-frac245.3%
sub-neg45.3%
distribute-neg-in45.3%
remove-double-neg45.3%
+-commutative45.3%
sub-neg45.3%
Simplified45.3%
Taylor expanded in t around inf 76.0%
associate-+r+86.4%
distribute-rgt1-in86.4%
metadata-eval86.4%
mul0-lft86.4%
associate-+r+86.4%
associate-/l*89.7%
associate-/l*93.2%
Simplified93.2%
if -1.05e185 < t Initial program 84.7%
Taylor expanded in x around 0 84.7%
associate--l+86.8%
sub-neg86.8%
*-rgt-identity86.8%
associate-*r/93.2%
distribute-rgt-neg-in93.2%
mul-1-neg93.2%
distribute-lft-in93.2%
mul-1-neg93.2%
unsub-neg93.2%
Simplified93.2%
Final simplification93.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (/ (* y (- a z)) t))) (t_2 (- (+ x y) (* y (/ z a)))))
(if (<= a -0.022)
t_2
(if (<= a -1.45e-86)
t_1
(if (<= a -1.06e-113)
t_2
(if (<= a -3.6e-166)
(+ x (* y (/ z t)))
(if (<= a 2.35e-267)
t_1
(if (<= a 4.8e-229)
(* z (/ y (- t a)))
(if (<= a 3.3e+21) t_1 t_2)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - ((y * (a - z)) / t);
double t_2 = (x + y) - (y * (z / a));
double tmp;
if (a <= -0.022) {
tmp = t_2;
} else if (a <= -1.45e-86) {
tmp = t_1;
} else if (a <= -1.06e-113) {
tmp = t_2;
} else if (a <= -3.6e-166) {
tmp = x + (y * (z / t));
} else if (a <= 2.35e-267) {
tmp = t_1;
} else if (a <= 4.8e-229) {
tmp = z * (y / (t - a));
} else if (a <= 3.3e+21) {
tmp = t_1;
} else {
tmp = t_2;
}
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 = x - ((y * (a - z)) / t)
t_2 = (x + y) - (y * (z / a))
if (a <= (-0.022d0)) then
tmp = t_2
else if (a <= (-1.45d-86)) then
tmp = t_1
else if (a <= (-1.06d-113)) then
tmp = t_2
else if (a <= (-3.6d-166)) then
tmp = x + (y * (z / t))
else if (a <= 2.35d-267) then
tmp = t_1
else if (a <= 4.8d-229) then
tmp = z * (y / (t - a))
else if (a <= 3.3d+21) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x - ((y * (a - z)) / t);
double t_2 = (x + y) - (y * (z / a));
double tmp;
if (a <= -0.022) {
tmp = t_2;
} else if (a <= -1.45e-86) {
tmp = t_1;
} else if (a <= -1.06e-113) {
tmp = t_2;
} else if (a <= -3.6e-166) {
tmp = x + (y * (z / t));
} else if (a <= 2.35e-267) {
tmp = t_1;
} else if (a <= 4.8e-229) {
tmp = z * (y / (t - a));
} else if (a <= 3.3e+21) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - ((y * (a - z)) / t) t_2 = (x + y) - (y * (z / a)) tmp = 0 if a <= -0.022: tmp = t_2 elif a <= -1.45e-86: tmp = t_1 elif a <= -1.06e-113: tmp = t_2 elif a <= -3.6e-166: tmp = x + (y * (z / t)) elif a <= 2.35e-267: tmp = t_1 elif a <= 4.8e-229: tmp = z * (y / (t - a)) elif a <= 3.3e+21: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(Float64(y * Float64(a - z)) / t)) t_2 = Float64(Float64(x + y) - Float64(y * Float64(z / a))) tmp = 0.0 if (a <= -0.022) tmp = t_2; elseif (a <= -1.45e-86) tmp = t_1; elseif (a <= -1.06e-113) tmp = t_2; elseif (a <= -3.6e-166) tmp = Float64(x + Float64(y * Float64(z / t))); elseif (a <= 2.35e-267) tmp = t_1; elseif (a <= 4.8e-229) tmp = Float64(z * Float64(y / Float64(t - a))); elseif (a <= 3.3e+21) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - ((y * (a - z)) / t); t_2 = (x + y) - (y * (z / a)); tmp = 0.0; if (a <= -0.022) tmp = t_2; elseif (a <= -1.45e-86) tmp = t_1; elseif (a <= -1.06e-113) tmp = t_2; elseif (a <= -3.6e-166) tmp = x + (y * (z / t)); elseif (a <= 2.35e-267) tmp = t_1; elseif (a <= 4.8e-229) tmp = z * (y / (t - a)); elseif (a <= 3.3e+21) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(N[(y * N[(a - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + y), $MachinePrecision] - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -0.022], t$95$2, If[LessEqual[a, -1.45e-86], t$95$1, If[LessEqual[a, -1.06e-113], t$95$2, If[LessEqual[a, -3.6e-166], N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.35e-267], t$95$1, If[LessEqual[a, 4.8e-229], N[(z * N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.3e+21], t$95$1, t$95$2]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \frac{y \cdot \left(a - z\right)}{t}\\
t_2 := \left(x + y\right) - y \cdot \frac{z}{a}\\
\mathbf{if}\;a \leq -0.022:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq -1.45 \cdot 10^{-86}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -1.06 \cdot 10^{-113}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq -3.6 \cdot 10^{-166}:\\
\;\;\;\;x + y \cdot \frac{z}{t}\\
\mathbf{elif}\;a \leq 2.35 \cdot 10^{-267}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 4.8 \cdot 10^{-229}:\\
\;\;\;\;z \cdot \frac{y}{t - a}\\
\mathbf{elif}\;a \leq 3.3 \cdot 10^{+21}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if a < -0.021999999999999999 or -1.45e-86 < a < -1.05999999999999995e-113 or 3.3e21 < a Initial program 83.7%
Taylor expanded in t around 0 81.2%
+-commutative81.2%
associate-/l*85.8%
Simplified85.8%
if -0.021999999999999999 < a < -1.45e-86 or -3.6000000000000001e-166 < a < 2.3500000000000001e-267 or 4.8e-229 < a < 3.3e21Initial program 77.1%
Taylor expanded in t around inf 82.4%
associate--l+82.4%
distribute-lft-out--82.4%
div-sub83.6%
mul-1-neg83.6%
unsub-neg83.6%
*-commutative83.6%
distribute-lft-out--83.6%
Simplified83.6%
if -1.05999999999999995e-113 < a < -3.6000000000000001e-166Initial program 74.5%
Taylor expanded in x around 0 74.5%
associate--l+80.4%
sub-neg80.4%
*-rgt-identity80.4%
associate-*r/100.0%
distribute-rgt-neg-in100.0%
mul-1-neg100.0%
distribute-lft-in100.0%
mul-1-neg100.0%
unsub-neg100.0%
Simplified100.0%
Taylor expanded in a around 0 84.7%
if 2.3500000000000001e-267 < a < 4.8e-229Initial program 67.9%
sub-neg67.9%
+-commutative67.9%
distribute-frac-neg67.9%
distribute-rgt-neg-out67.9%
associate-/l*83.5%
fma-define84.1%
distribute-frac-neg84.1%
distribute-neg-frac284.1%
sub-neg84.1%
distribute-neg-in84.1%
remove-double-neg84.1%
+-commutative84.1%
sub-neg84.1%
Simplified84.1%
Taylor expanded in z around inf 84.1%
*-commutative84.1%
*-un-lft-identity84.1%
times-frac100.0%
Applied egg-rr100.0%
clear-num99.7%
frac-times68.1%
*-un-lft-identity68.1%
Applied egg-rr68.1%
associate-*l/68.4%
*-un-lft-identity68.4%
associate-/r/100.0%
Applied egg-rr100.0%
Final simplification85.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (/ z t)))))
(if (<= a -1.15e-8)
(+ x y)
(if (<= a -1.35e-86)
t_1
(if (<= a -2.15e-103)
(* x (+ (/ y x) 1.0))
(if (<= a -3e-115)
(* z (/ y (- t a)))
(if (<= a 2.3e+24) t_1 (+ x y))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * (z / t));
double tmp;
if (a <= -1.15e-8) {
tmp = x + y;
} else if (a <= -1.35e-86) {
tmp = t_1;
} else if (a <= -2.15e-103) {
tmp = x * ((y / x) + 1.0);
} else if (a <= -3e-115) {
tmp = z * (y / (t - a));
} else if (a <= 2.3e+24) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = x + (y * (z / t))
if (a <= (-1.15d-8)) then
tmp = x + y
else if (a <= (-1.35d-86)) then
tmp = t_1
else if (a <= (-2.15d-103)) then
tmp = x * ((y / x) + 1.0d0)
else if (a <= (-3d-115)) then
tmp = z * (y / (t - a))
else if (a <= 2.3d+24) then
tmp = t_1
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 t_1 = x + (y * (z / t));
double tmp;
if (a <= -1.15e-8) {
tmp = x + y;
} else if (a <= -1.35e-86) {
tmp = t_1;
} else if (a <= -2.15e-103) {
tmp = x * ((y / x) + 1.0);
} else if (a <= -3e-115) {
tmp = z * (y / (t - a));
} else if (a <= 2.3e+24) {
tmp = t_1;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * (z / t)) tmp = 0 if a <= -1.15e-8: tmp = x + y elif a <= -1.35e-86: tmp = t_1 elif a <= -2.15e-103: tmp = x * ((y / x) + 1.0) elif a <= -3e-115: tmp = z * (y / (t - a)) elif a <= 2.3e+24: tmp = t_1 else: tmp = x + y return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y * Float64(z / t))) tmp = 0.0 if (a <= -1.15e-8) tmp = Float64(x + y); elseif (a <= -1.35e-86) tmp = t_1; elseif (a <= -2.15e-103) tmp = Float64(x * Float64(Float64(y / x) + 1.0)); elseif (a <= -3e-115) tmp = Float64(z * Float64(y / Float64(t - a))); elseif (a <= 2.3e+24) tmp = t_1; else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y * (z / t)); tmp = 0.0; if (a <= -1.15e-8) tmp = x + y; elseif (a <= -1.35e-86) tmp = t_1; elseif (a <= -2.15e-103) tmp = x * ((y / x) + 1.0); elseif (a <= -3e-115) tmp = z * (y / (t - a)); elseif (a <= 2.3e+24) tmp = t_1; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.15e-8], N[(x + y), $MachinePrecision], If[LessEqual[a, -1.35e-86], t$95$1, If[LessEqual[a, -2.15e-103], N[(x * N[(N[(y / x), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -3e-115], N[(z * N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.3e+24], t$95$1, N[(x + y), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z}{t}\\
\mathbf{if}\;a \leq -1.15 \cdot 10^{-8}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq -1.35 \cdot 10^{-86}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -2.15 \cdot 10^{-103}:\\
\;\;\;\;x \cdot \left(\frac{y}{x} + 1\right)\\
\mathbf{elif}\;a \leq -3 \cdot 10^{-115}:\\
\;\;\;\;z \cdot \frac{y}{t - a}\\
\mathbf{elif}\;a \leq 2.3 \cdot 10^{+24}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if a < -1.15e-8 or 2.2999999999999999e24 < a Initial program 82.6%
Taylor expanded in a around inf 77.4%
+-commutative77.4%
Simplified77.4%
if -1.15e-8 < a < -1.34999999999999996e-86 or -3.0000000000000002e-115 < a < 2.2999999999999999e24Initial program 76.4%
Taylor expanded in x around 0 76.4%
associate--l+80.0%
sub-neg80.0%
*-rgt-identity80.0%
associate-*r/86.4%
distribute-rgt-neg-in86.4%
mul-1-neg86.4%
distribute-lft-in86.4%
mul-1-neg86.4%
unsub-neg86.4%
Simplified86.4%
Taylor expanded in a around 0 75.6%
if -1.34999999999999996e-86 < a < -2.15000000000000011e-103Initial program 100.0%
Taylor expanded in x around inf 100.0%
associate-/l*100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in a around inf 96.2%
if -2.15000000000000011e-103 < a < -3.0000000000000002e-115Initial program 99.4%
sub-neg99.4%
+-commutative99.4%
distribute-frac-neg99.4%
distribute-rgt-neg-out99.4%
associate-/l*100.0%
fma-define100.0%
distribute-frac-neg100.0%
distribute-neg-frac2100.0%
sub-neg100.0%
distribute-neg-in100.0%
remove-double-neg100.0%
+-commutative100.0%
sub-neg100.0%
Simplified100.0%
Taylor expanded in z around inf 95.2%
*-commutative95.2%
*-un-lft-identity95.2%
times-frac95.8%
Applied egg-rr95.8%
clear-num95.5%
frac-times95.5%
*-un-lft-identity95.5%
Applied egg-rr95.5%
associate-*l/95.8%
*-un-lft-identity95.8%
associate-/r/95.8%
Applied egg-rr95.8%
Final simplification77.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (/ (* y (- a z)) t))))
(if (<= a -0.32)
(+ x y)
(if (<= a 2.35e-267)
t_1
(if (<= a 4.8e-229)
(* z (/ y (- t a)))
(if (<= a 4.3e+24) t_1 (+ x y)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - ((y * (a - z)) / t);
double tmp;
if (a <= -0.32) {
tmp = x + y;
} else if (a <= 2.35e-267) {
tmp = t_1;
} else if (a <= 4.8e-229) {
tmp = z * (y / (t - a));
} else if (a <= 4.3e+24) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = x - ((y * (a - z)) / t)
if (a <= (-0.32d0)) then
tmp = x + y
else if (a <= 2.35d-267) then
tmp = t_1
else if (a <= 4.8d-229) then
tmp = z * (y / (t - a))
else if (a <= 4.3d+24) then
tmp = t_1
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 t_1 = x - ((y * (a - z)) / t);
double tmp;
if (a <= -0.32) {
tmp = x + y;
} else if (a <= 2.35e-267) {
tmp = t_1;
} else if (a <= 4.8e-229) {
tmp = z * (y / (t - a));
} else if (a <= 4.3e+24) {
tmp = t_1;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - ((y * (a - z)) / t) tmp = 0 if a <= -0.32: tmp = x + y elif a <= 2.35e-267: tmp = t_1 elif a <= 4.8e-229: tmp = z * (y / (t - a)) elif a <= 4.3e+24: tmp = t_1 else: tmp = x + y return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(Float64(y * Float64(a - z)) / t)) tmp = 0.0 if (a <= -0.32) tmp = Float64(x + y); elseif (a <= 2.35e-267) tmp = t_1; elseif (a <= 4.8e-229) tmp = Float64(z * Float64(y / Float64(t - a))); elseif (a <= 4.3e+24) tmp = t_1; else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - ((y * (a - z)) / t); tmp = 0.0; if (a <= -0.32) tmp = x + y; elseif (a <= 2.35e-267) tmp = t_1; elseif (a <= 4.8e-229) tmp = z * (y / (t - a)); elseif (a <= 4.3e+24) tmp = t_1; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(N[(y * N[(a - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -0.32], N[(x + y), $MachinePrecision], If[LessEqual[a, 2.35e-267], t$95$1, If[LessEqual[a, 4.8e-229], N[(z * N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4.3e+24], t$95$1, N[(x + y), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \frac{y \cdot \left(a - z\right)}{t}\\
\mathbf{if}\;a \leq -0.32:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq 2.35 \cdot 10^{-267}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 4.8 \cdot 10^{-229}:\\
\;\;\;\;z \cdot \frac{y}{t - a}\\
\mathbf{elif}\;a \leq 4.3 \cdot 10^{+24}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if a < -0.320000000000000007 or 4.29999999999999987e24 < a Initial program 83.2%
Taylor expanded in a around inf 78.0%
+-commutative78.0%
Simplified78.0%
if -0.320000000000000007 < a < 2.3500000000000001e-267 or 4.8e-229 < a < 4.29999999999999987e24Initial program 77.9%
Taylor expanded in t around inf 77.7%
associate--l+77.7%
distribute-lft-out--77.7%
div-sub78.7%
mul-1-neg78.7%
unsub-neg78.7%
*-commutative78.7%
distribute-lft-out--78.7%
Simplified78.7%
if 2.3500000000000001e-267 < a < 4.8e-229Initial program 67.9%
sub-neg67.9%
+-commutative67.9%
distribute-frac-neg67.9%
distribute-rgt-neg-out67.9%
associate-/l*83.5%
fma-define84.1%
distribute-frac-neg84.1%
distribute-neg-frac284.1%
sub-neg84.1%
distribute-neg-in84.1%
remove-double-neg84.1%
+-commutative84.1%
sub-neg84.1%
Simplified84.1%
Taylor expanded in z around inf 84.1%
*-commutative84.1%
*-un-lft-identity84.1%
times-frac100.0%
Applied egg-rr100.0%
clear-num99.7%
frac-times68.1%
*-un-lft-identity68.1%
Applied egg-rr68.1%
associate-*l/68.4%
*-un-lft-identity68.4%
associate-/r/100.0%
Applied egg-rr100.0%
Final simplification78.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ z (- t a)))))
(if (<= z -3.4e+119)
t_1
(if (<= z 1.72e+44)
(+ x y)
(if (or (<= z 2e+97) (not (<= z 4.7e+271)))
t_1
(* x (+ (/ y x) 1.0)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (z / (t - a));
double tmp;
if (z <= -3.4e+119) {
tmp = t_1;
} else if (z <= 1.72e+44) {
tmp = x + y;
} else if ((z <= 2e+97) || !(z <= 4.7e+271)) {
tmp = t_1;
} else {
tmp = x * ((y / x) + 1.0);
}
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 - a))
if (z <= (-3.4d+119)) then
tmp = t_1
else if (z <= 1.72d+44) then
tmp = x + y
else if ((z <= 2d+97) .or. (.not. (z <= 4.7d+271))) then
tmp = t_1
else
tmp = x * ((y / x) + 1.0d0)
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 - a));
double tmp;
if (z <= -3.4e+119) {
tmp = t_1;
} else if (z <= 1.72e+44) {
tmp = x + y;
} else if ((z <= 2e+97) || !(z <= 4.7e+271)) {
tmp = t_1;
} else {
tmp = x * ((y / x) + 1.0);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (z / (t - a)) tmp = 0 if z <= -3.4e+119: tmp = t_1 elif z <= 1.72e+44: tmp = x + y elif (z <= 2e+97) or not (z <= 4.7e+271): tmp = t_1 else: tmp = x * ((y / x) + 1.0) return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(z / Float64(t - a))) tmp = 0.0 if (z <= -3.4e+119) tmp = t_1; elseif (z <= 1.72e+44) tmp = Float64(x + y); elseif ((z <= 2e+97) || !(z <= 4.7e+271)) tmp = t_1; else tmp = Float64(x * Float64(Float64(y / x) + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * (z / (t - a)); tmp = 0.0; if (z <= -3.4e+119) tmp = t_1; elseif (z <= 1.72e+44) tmp = x + y; elseif ((z <= 2e+97) || ~((z <= 4.7e+271))) tmp = t_1; else tmp = x * ((y / x) + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(z / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.4e+119], t$95$1, If[LessEqual[z, 1.72e+44], N[(x + y), $MachinePrecision], If[Or[LessEqual[z, 2e+97], N[Not[LessEqual[z, 4.7e+271]], $MachinePrecision]], t$95$1, N[(x * N[(N[(y / x), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{z}{t - a}\\
\mathbf{if}\;z \leq -3.4 \cdot 10^{+119}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.72 \cdot 10^{+44}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq 2 \cdot 10^{+97} \lor \neg \left(z \leq 4.7 \cdot 10^{+271}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\frac{y}{x} + 1\right)\\
\end{array}
\end{array}
if z < -3.40000000000000013e119 or 1.72e44 < z < 2.0000000000000001e97 or 4.6999999999999998e271 < z Initial program 74.1%
sub-neg74.1%
+-commutative74.1%
distribute-frac-neg74.1%
distribute-rgt-neg-out74.1%
associate-/l*89.5%
fma-define89.7%
distribute-frac-neg89.7%
distribute-neg-frac289.7%
sub-neg89.7%
distribute-neg-in89.7%
remove-double-neg89.7%
+-commutative89.7%
sub-neg89.7%
Simplified89.7%
Taylor expanded in z around inf 57.2%
associate-/l*69.7%
Simplified69.7%
if -3.40000000000000013e119 < z < 1.72e44Initial program 81.6%
Taylor expanded in a around inf 74.1%
+-commutative74.1%
Simplified74.1%
if 2.0000000000000001e97 < z < 4.6999999999999998e271Initial program 85.0%
Taylor expanded in x around inf 76.1%
associate-/l*73.2%
*-commutative73.2%
Simplified73.2%
Taylor expanded in a around inf 58.5%
Final simplification71.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* z (/ y (- t a)))))
(if (<= z -3.4e+119)
t_1
(if (<= z 2.45e+44)
(+ x y)
(if (<= z 3.7e+170)
t_1
(if (<= z 4.7e+271) (* x (+ (/ y x) 1.0)) (* y (/ z (- t a)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = z * (y / (t - a));
double tmp;
if (z <= -3.4e+119) {
tmp = t_1;
} else if (z <= 2.45e+44) {
tmp = x + y;
} else if (z <= 3.7e+170) {
tmp = t_1;
} else if (z <= 4.7e+271) {
tmp = x * ((y / x) + 1.0);
} else {
tmp = 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) :: t_1
real(8) :: tmp
t_1 = z * (y / (t - a))
if (z <= (-3.4d+119)) then
tmp = t_1
else if (z <= 2.45d+44) then
tmp = x + y
else if (z <= 3.7d+170) then
tmp = t_1
else if (z <= 4.7d+271) then
tmp = x * ((y / x) + 1.0d0)
else
tmp = 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 t_1 = z * (y / (t - a));
double tmp;
if (z <= -3.4e+119) {
tmp = t_1;
} else if (z <= 2.45e+44) {
tmp = x + y;
} else if (z <= 3.7e+170) {
tmp = t_1;
} else if (z <= 4.7e+271) {
tmp = x * ((y / x) + 1.0);
} else {
tmp = y * (z / (t - a));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = z * (y / (t - a)) tmp = 0 if z <= -3.4e+119: tmp = t_1 elif z <= 2.45e+44: tmp = x + y elif z <= 3.7e+170: tmp = t_1 elif z <= 4.7e+271: tmp = x * ((y / x) + 1.0) else: tmp = y * (z / (t - a)) return tmp
function code(x, y, z, t, a) t_1 = Float64(z * Float64(y / Float64(t - a))) tmp = 0.0 if (z <= -3.4e+119) tmp = t_1; elseif (z <= 2.45e+44) tmp = Float64(x + y); elseif (z <= 3.7e+170) tmp = t_1; elseif (z <= 4.7e+271) tmp = Float64(x * Float64(Float64(y / x) + 1.0)); else tmp = Float64(y * Float64(z / Float64(t - a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = z * (y / (t - a)); tmp = 0.0; if (z <= -3.4e+119) tmp = t_1; elseif (z <= 2.45e+44) tmp = x + y; elseif (z <= 3.7e+170) tmp = t_1; elseif (z <= 4.7e+271) tmp = x * ((y / x) + 1.0); else tmp = y * (z / (t - a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(z * N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.4e+119], t$95$1, If[LessEqual[z, 2.45e+44], N[(x + y), $MachinePrecision], If[LessEqual[z, 3.7e+170], t$95$1, If[LessEqual[z, 4.7e+271], N[(x * N[(N[(y / x), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(y * N[(z / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \frac{y}{t - a}\\
\mathbf{if}\;z \leq -3.4 \cdot 10^{+119}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.45 \cdot 10^{+44}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq 3.7 \cdot 10^{+170}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 4.7 \cdot 10^{+271}:\\
\;\;\;\;x \cdot \left(\frac{y}{x} + 1\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{z}{t - a}\\
\end{array}
\end{array}
if z < -3.40000000000000013e119 or 2.45000000000000018e44 < z < 3.69999999999999987e170Initial program 81.6%
sub-neg81.6%
+-commutative81.6%
distribute-frac-neg81.6%
distribute-rgt-neg-out81.6%
associate-/l*91.7%
fma-define91.9%
distribute-frac-neg91.9%
distribute-neg-frac291.9%
sub-neg91.9%
distribute-neg-in91.9%
remove-double-neg91.9%
+-commutative91.9%
sub-neg91.9%
Simplified91.9%
Taylor expanded in z around inf 59.7%
*-commutative59.7%
*-un-lft-identity59.7%
times-frac65.6%
Applied egg-rr65.6%
clear-num65.5%
frac-times63.3%
*-un-lft-identity63.3%
Applied egg-rr63.3%
associate-*l/63.4%
*-un-lft-identity63.4%
associate-/r/65.6%
Applied egg-rr65.6%
if -3.40000000000000013e119 < z < 2.45000000000000018e44Initial program 81.6%
Taylor expanded in a around inf 74.1%
+-commutative74.1%
Simplified74.1%
if 3.69999999999999987e170 < z < 4.6999999999999998e271Initial program 76.1%
Taylor expanded in x around inf 75.9%
associate-/l*76.0%
*-commutative76.0%
Simplified76.0%
Taylor expanded in a around inf 66.7%
if 4.6999999999999998e271 < z Initial program 53.8%
sub-neg53.8%
+-commutative53.8%
distribute-frac-neg53.8%
distribute-rgt-neg-out53.8%
associate-/l*87.8%
fma-define87.8%
distribute-frac-neg87.8%
distribute-neg-frac287.8%
sub-neg87.8%
distribute-neg-in87.8%
remove-double-neg87.8%
+-commutative87.8%
sub-neg87.8%
Simplified87.8%
Taylor expanded in z around inf 41.5%
associate-/l*87.5%
Simplified87.5%
Final simplification71.8%
(FPCore (x y z t a) :precision binary64 (if (<= t -1.65e+224) (- x (/ (* y (- a z)) t)) (if (<= t 1.12e+108) (+ (+ x y) (* y (/ z (- t a)))) (+ x (* y (/ z t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.65e+224) {
tmp = x - ((y * (a - z)) / t);
} else if (t <= 1.12e+108) {
tmp = (x + y) + (y * (z / (t - a)));
} 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 (t <= (-1.65d+224)) then
tmp = x - ((y * (a - z)) / t)
else if (t <= 1.12d+108) then
tmp = (x + y) + (y * (z / (t - a)))
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 (t <= -1.65e+224) {
tmp = x - ((y * (a - z)) / t);
} else if (t <= 1.12e+108) {
tmp = (x + y) + (y * (z / (t - a)));
} else {
tmp = x + (y * (z / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.65e+224: tmp = x - ((y * (a - z)) / t) elif t <= 1.12e+108: tmp = (x + y) + (y * (z / (t - a))) else: tmp = x + (y * (z / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.65e+224) tmp = Float64(x - Float64(Float64(y * Float64(a - z)) / t)); elseif (t <= 1.12e+108) tmp = Float64(Float64(x + y) + Float64(y * Float64(z / Float64(t - a)))); else tmp = Float64(x + Float64(y * Float64(z / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -1.65e+224) tmp = x - ((y * (a - z)) / t); elseif (t <= 1.12e+108) tmp = (x + y) + (y * (z / (t - a))); else tmp = x + (y * (z / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.65e+224], N[(x - N[(N[(y * N[(a - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.12e+108], N[(N[(x + y), $MachinePrecision] + N[(y * N[(z / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.65 \cdot 10^{+224}:\\
\;\;\;\;x - \frac{y \cdot \left(a - z\right)}{t}\\
\mathbf{elif}\;t \leq 1.12 \cdot 10^{+108}:\\
\;\;\;\;\left(x + y\right) + y \cdot \frac{z}{t - a}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{t}\\
\end{array}
\end{array}
if t < -1.64999999999999998e224Initial program 30.6%
Taylor expanded in t around inf 94.6%
associate--l+94.6%
distribute-lft-out--94.6%
div-sub94.6%
mul-1-neg94.6%
unsub-neg94.6%
*-commutative94.6%
distribute-lft-out--94.6%
Simplified94.6%
if -1.64999999999999998e224 < t < 1.11999999999999994e108Initial program 88.8%
Taylor expanded in z around inf 87.2%
associate-/l*89.2%
Simplified89.2%
if 1.11999999999999994e108 < t Initial program 63.3%
Taylor expanded in x around 0 63.3%
associate--l+69.1%
sub-neg69.1%
*-rgt-identity69.1%
associate-*r/88.3%
distribute-rgt-neg-in88.3%
mul-1-neg88.3%
distribute-lft-in88.4%
mul-1-neg88.4%
unsub-neg88.4%
Simplified88.4%
Taylor expanded in a around 0 88.1%
Final simplification89.4%
(FPCore (x y z t a) :precision binary64 (+ x (* y (+ (/ (- z t) (- t a)) 1.0))))
double code(double x, double y, double z, double t, double a) {
return x + (y * (((z - t) / (t - a)) + 1.0));
}
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) / (t - a)) + 1.0d0))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y * (((z - t) / (t - a)) + 1.0));
}
def code(x, y, z, t, a): return x + (y * (((z - t) / (t - a)) + 1.0))
function code(x, y, z, t, a) return Float64(x + Float64(y * Float64(Float64(Float64(z - t) / Float64(t - a)) + 1.0))) end
function tmp = code(x, y, z, t, a) tmp = x + (y * (((z - t) / (t - a)) + 1.0)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y * N[(N[(N[(z - t), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \left(\frac{z - t}{t - a} + 1\right)
\end{array}
Initial program 80.3%
Taylor expanded in x around 0 80.3%
associate--l+83.7%
sub-neg83.7%
*-rgt-identity83.7%
associate-*r/91.3%
distribute-rgt-neg-in91.3%
mul-1-neg91.3%
distribute-lft-in91.3%
mul-1-neg91.3%
unsub-neg91.3%
Simplified91.3%
Final simplification91.3%
(FPCore (x y z t a) :precision binary64 (if (<= y -1.08e+105) y (if (<= y 8e+178) x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.08e+105) {
tmp = y;
} else if (y <= 8e+178) {
tmp = x;
} else {
tmp = 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 (y <= (-1.08d+105)) then
tmp = y
else if (y <= 8d+178) then
tmp = x
else
tmp = y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.08e+105) {
tmp = y;
} else if (y <= 8e+178) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -1.08e+105: tmp = y elif y <= 8e+178: tmp = x else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -1.08e+105) tmp = y; elseif (y <= 8e+178) tmp = x; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -1.08e+105) tmp = y; elseif (y <= 8e+178) tmp = x; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -1.08e+105], y, If[LessEqual[y, 8e+178], x, y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.08 \cdot 10^{+105}:\\
\;\;\;\;y\\
\mathbf{elif}\;y \leq 8 \cdot 10^{+178}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if y < -1.07999999999999994e105 or 8.0000000000000004e178 < y Initial program 68.8%
Taylor expanded in x around inf 36.9%
associate-/l*42.0%
*-commutative42.0%
Simplified42.0%
Taylor expanded in a around inf 27.0%
Taylor expanded in x around 0 42.8%
if -1.07999999999999994e105 < y < 8.0000000000000004e178Initial program 84.3%
Taylor expanded in x around inf 63.9%
(FPCore (x y z t a) :precision binary64 (if (<= z -2.1e+246) (/ y (/ a (- z))) (+ x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.1e+246) {
tmp = y / (a / -z);
} 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.1d+246)) then
tmp = y / (a / -z)
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.1e+246) {
tmp = y / (a / -z);
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.1e+246: tmp = y / (a / -z) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.1e+246) tmp = Float64(y / Float64(a / Float64(-z))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.1e+246) tmp = y / (a / -z); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.1e+246], N[(y / N[(a / (-z)), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.1 \cdot 10^{+246}:\\
\;\;\;\;\frac{y}{\frac{a}{-z}}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -2.1e246Initial program 76.6%
sub-neg76.6%
+-commutative76.6%
distribute-frac-neg76.6%
distribute-rgt-neg-out76.6%
associate-/l*92.2%
fma-define92.4%
distribute-frac-neg92.4%
distribute-neg-frac292.4%
sub-neg92.4%
distribute-neg-in92.4%
remove-double-neg92.4%
+-commutative92.4%
sub-neg92.4%
Simplified92.4%
Taylor expanded in z around inf 76.6%
*-commutative76.6%
*-un-lft-identity76.6%
times-frac91.6%
Applied egg-rr91.6%
clear-num91.6%
frac-times95.2%
*-un-lft-identity95.2%
Applied egg-rr95.2%
Taylor expanded in t around 0 71.9%
associate-*r/71.9%
neg-mul-171.9%
Simplified71.9%
if -2.1e246 < z Initial program 80.5%
Taylor expanded in a around inf 63.8%
+-commutative63.8%
Simplified63.8%
Final simplification64.2%
(FPCore (x y z t a) :precision binary64 (if (<= z -9e+245) (* z (/ y (- a))) (+ x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -9e+245) {
tmp = z * (y / -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 <= (-9d+245)) then
tmp = z * (y / -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 <= -9e+245) {
tmp = z * (y / -a);
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -9e+245: tmp = z * (y / -a) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -9e+245) tmp = Float64(z * Float64(y / Float64(-a))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -9e+245) tmp = z * (y / -a); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -9e+245], N[(z * N[(y / (-a)), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9 \cdot 10^{+245}:\\
\;\;\;\;z \cdot \frac{y}{-a}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -9e245Initial program 76.6%
sub-neg76.6%
+-commutative76.6%
distribute-frac-neg76.6%
distribute-rgt-neg-out76.6%
associate-/l*92.2%
fma-define92.4%
distribute-frac-neg92.4%
distribute-neg-frac292.4%
sub-neg92.4%
distribute-neg-in92.4%
remove-double-neg92.4%
+-commutative92.4%
sub-neg92.4%
Simplified92.4%
Taylor expanded in z around inf 76.6%
Taylor expanded in t around 0 68.4%
associate-*r/68.4%
*-commutative68.4%
neg-mul-168.4%
distribute-rgt-neg-in68.4%
Simplified68.4%
Taylor expanded in z around 0 68.4%
mul-1-neg68.4%
*-commutative68.4%
associate-*r/68.0%
distribute-rgt-neg-in68.0%
Simplified68.0%
if -9e245 < z Initial program 80.5%
Taylor expanded in a around inf 63.8%
+-commutative63.8%
Simplified63.8%
Final simplification64.0%
(FPCore (x y z t a) :precision binary64 (if (<= z -2.6e+247) (* y (/ z t)) (+ x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.6e+247) {
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 <= (-2.6d+247)) 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 <= -2.6e+247) {
tmp = y * (z / t);
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.6e+247: tmp = y * (z / t) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.6e+247) 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 <= -2.6e+247) tmp = y * (z / t); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.6e+247], N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.6 \cdot 10^{+247}:\\
\;\;\;\;y \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -2.59999999999999991e247Initial program 76.6%
sub-neg76.6%
+-commutative76.6%
distribute-frac-neg76.6%
distribute-rgt-neg-out76.6%
associate-/l*92.2%
fma-define92.4%
distribute-frac-neg92.4%
distribute-neg-frac292.4%
sub-neg92.4%
distribute-neg-in92.4%
remove-double-neg92.4%
+-commutative92.4%
sub-neg92.4%
Simplified92.4%
Taylor expanded in z around inf 76.6%
*-commutative76.6%
*-un-lft-identity76.6%
times-frac91.6%
Applied egg-rr91.6%
Taylor expanded in t around inf 43.2%
associate-/l*58.6%
Simplified58.6%
if -2.59999999999999991e247 < z Initial program 80.5%
Taylor expanded in a around inf 63.8%
+-commutative63.8%
Simplified63.8%
Final simplification63.5%
(FPCore (x y z t a) :precision binary64 (if (<= t -1.45e+224) x (+ x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.45e+224) {
tmp = x;
} 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 (t <= (-1.45d+224)) then
tmp = x
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 (t <= -1.45e+224) {
tmp = x;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.45e+224: tmp = x else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.45e+224) tmp = x; else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -1.45e+224) tmp = x; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.45e+224], x, N[(x + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.45 \cdot 10^{+224}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if t < -1.44999999999999995e224Initial program 30.6%
Taylor expanded in x around inf 73.3%
if -1.44999999999999995e224 < t Initial program 84.1%
Taylor expanded in a around inf 63.3%
+-commutative63.3%
Simplified63.3%
Final simplification64.0%
(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 80.3%
Taylor expanded in x around inf 49.2%
(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 2024101
(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))))