
(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 12 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
(let* ((t_1 (- (+ y x) (* y (/ z a)))))
(if (<= a -4e+56)
t_1
(if (<= a -3.8e+35)
(+ x (/ y (/ t (- z a))))
(if (<= a -1.8e-33)
t_1
(if (<= a -2.05e-78)
(- x (/ (- (* y a) (* y z)) t))
(if (<= a 50000000000000.0) (- x (/ (* y z) (- a t))) t_1)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y + x) - (y * (z / a));
double tmp;
if (a <= -4e+56) {
tmp = t_1;
} else if (a <= -3.8e+35) {
tmp = x + (y / (t / (z - a)));
} else if (a <= -1.8e-33) {
tmp = t_1;
} else if (a <= -2.05e-78) {
tmp = x - (((y * a) - (y * z)) / t);
} else if (a <= 50000000000000.0) {
tmp = x - ((y * z) / (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) :: tmp
t_1 = (y + x) - (y * (z / a))
if (a <= (-4d+56)) then
tmp = t_1
else if (a <= (-3.8d+35)) then
tmp = x + (y / (t / (z - a)))
else if (a <= (-1.8d-33)) then
tmp = t_1
else if (a <= (-2.05d-78)) then
tmp = x - (((y * a) - (y * z)) / t)
else if (a <= 50000000000000.0d0) then
tmp = x - ((y * z) / (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) - (y * (z / a));
double tmp;
if (a <= -4e+56) {
tmp = t_1;
} else if (a <= -3.8e+35) {
tmp = x + (y / (t / (z - a)));
} else if (a <= -1.8e-33) {
tmp = t_1;
} else if (a <= -2.05e-78) {
tmp = x - (((y * a) - (y * z)) / t);
} else if (a <= 50000000000000.0) {
tmp = x - ((y * z) / (a - t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y + x) - (y * (z / a)) tmp = 0 if a <= -4e+56: tmp = t_1 elif a <= -3.8e+35: tmp = x + (y / (t / (z - a))) elif a <= -1.8e-33: tmp = t_1 elif a <= -2.05e-78: tmp = x - (((y * a) - (y * z)) / t) elif a <= 50000000000000.0: tmp = x - ((y * z) / (a - t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y + x) - Float64(y * Float64(z / a))) tmp = 0.0 if (a <= -4e+56) tmp = t_1; elseif (a <= -3.8e+35) tmp = Float64(x + Float64(y / Float64(t / Float64(z - a)))); elseif (a <= -1.8e-33) tmp = t_1; elseif (a <= -2.05e-78) tmp = Float64(x - Float64(Float64(Float64(y * a) - Float64(y * z)) / t)); elseif (a <= 50000000000000.0) tmp = Float64(x - Float64(Float64(y * z) / Float64(a - t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y + x) - (y * (z / a)); tmp = 0.0; if (a <= -4e+56) tmp = t_1; elseif (a <= -3.8e+35) tmp = x + (y / (t / (z - a))); elseif (a <= -1.8e-33) tmp = t_1; elseif (a <= -2.05e-78) tmp = x - (((y * a) - (y * z)) / t); elseif (a <= 50000000000000.0) tmp = x - ((y * z) / (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[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -4e+56], t$95$1, If[LessEqual[a, -3.8e+35], N[(x + N[(y / N[(t / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -1.8e-33], t$95$1, If[LessEqual[a, -2.05e-78], N[(x - N[(N[(N[(y * a), $MachinePrecision] - N[(y * z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 50000000000000.0], N[(x - N[(N[(y * z), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y + x\right) - y \cdot \frac{z}{a}\\
\mathbf{if}\;a \leq -4 \cdot 10^{+56}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq -3.8 \cdot 10^{+35}:\\
\;\;\;\;x + \frac{y}{\frac{t}{z - a}}\\
\mathbf{elif}\;a \leq -1.8 \cdot 10^{-33}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq -2.05 \cdot 10^{-78}:\\
\;\;\;\;x - \frac{y \cdot a - y \cdot z}{t}\\
\mathbf{elif}\;a \leq 50000000000000:\\
\;\;\;\;x - \frac{y \cdot z}{a - t}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if a < -4.00000000000000037e56 or -3.8e35 < a < -1.80000000000000017e-33 or 5e13 < a Initial program 81.3%
associate-*l/96.1%
Simplified96.1%
Taylor expanded in t around 0 89.6%
if -4.00000000000000037e56 < a < -3.8e35Initial program 41.4%
sub-neg41.4%
distribute-frac-neg41.4%
distribute-rgt-neg-out41.4%
+-commutative41.4%
associate-*l/42.0%
distribute-rgt-neg-in42.0%
distribute-lft-neg-in42.0%
distribute-frac-neg42.0%
fma-def42.0%
sub-neg42.0%
distribute-neg-in42.0%
remove-double-neg42.0%
+-commutative42.0%
sub-neg42.0%
Simplified42.0%
fma-udef42.0%
+-commutative42.0%
associate-+r+60.7%
clear-num60.4%
associate-*l/60.4%
*-un-lft-identity60.4%
Applied egg-rr60.4%
Taylor expanded in t around inf 80.3%
neg-mul-180.3%
associate-*l/61.5%
associate-+r+61.5%
neg-mul-161.5%
distribute-rgt1-in61.5%
metadata-eval61.5%
mul0-lft61.5%
associate-*l/80.2%
associate--l+80.2%
associate-*l/99.1%
associate-*l/80.3%
div-sub80.3%
*-commutative80.3%
distribute-rgt-out--80.3%
associate-*l/80.2%
+-lft-identity80.2%
associate-*l/80.3%
associate-/l*99.4%
Simplified99.4%
if -1.80000000000000017e-33 < a < -2.0499999999999999e-78Initial program 71.5%
associate-*l/71.8%
Simplified71.8%
Taylor expanded in t around -inf 85.0%
mul-1-neg85.0%
unsub-neg85.0%
*-commutative85.0%
Simplified85.0%
if -2.0499999999999999e-78 < a < 5e13Initial program 80.8%
sub-neg80.8%
distribute-frac-neg80.8%
distribute-rgt-neg-out80.8%
+-commutative80.8%
associate-*l/78.4%
distribute-rgt-neg-in78.4%
distribute-lft-neg-in78.4%
distribute-frac-neg78.4%
fma-def78.4%
sub-neg78.4%
distribute-neg-in78.4%
remove-double-neg78.4%
+-commutative78.4%
sub-neg78.4%
Simplified78.4%
fma-udef78.4%
+-commutative78.4%
associate-+r+84.8%
clear-num84.8%
associate-*l/85.5%
*-un-lft-identity85.5%
Applied egg-rr85.5%
Taylor expanded in z around inf 90.7%
associate-*r/90.7%
associate-*r*90.7%
neg-mul-190.7%
Simplified90.7%
Final simplification90.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ y (/ t (- z a))))))
(if (<= a -4e+83)
(+ y x)
(if (<= a -6.8e+31)
t_1
(if (<= a -7500000000.0)
(+ y x)
(if (<= a -5.8e-33)
(- x (/ y (/ a z)))
(if (<= a 1.16e-36) t_1 (+ y x))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y / (t / (z - a)));
double tmp;
if (a <= -4e+83) {
tmp = y + x;
} else if (a <= -6.8e+31) {
tmp = t_1;
} else if (a <= -7500000000.0) {
tmp = y + x;
} else if (a <= -5.8e-33) {
tmp = x - (y / (a / z));
} else if (a <= 1.16e-36) {
tmp = t_1;
} else {
tmp = y + x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + (y / (t / (z - a)))
if (a <= (-4d+83)) then
tmp = y + x
else if (a <= (-6.8d+31)) then
tmp = t_1
else if (a <= (-7500000000.0d0)) then
tmp = y + x
else if (a <= (-5.8d-33)) then
tmp = x - (y / (a / z))
else if (a <= 1.16d-36) then
tmp = t_1
else
tmp = y + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y / (t / (z - a)));
double tmp;
if (a <= -4e+83) {
tmp = y + x;
} else if (a <= -6.8e+31) {
tmp = t_1;
} else if (a <= -7500000000.0) {
tmp = y + x;
} else if (a <= -5.8e-33) {
tmp = x - (y / (a / z));
} else if (a <= 1.16e-36) {
tmp = t_1;
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y / (t / (z - a))) tmp = 0 if a <= -4e+83: tmp = y + x elif a <= -6.8e+31: tmp = t_1 elif a <= -7500000000.0: tmp = y + x elif a <= -5.8e-33: tmp = x - (y / (a / z)) elif a <= 1.16e-36: tmp = t_1 else: tmp = y + x return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y / Float64(t / Float64(z - a)))) tmp = 0.0 if (a <= -4e+83) tmp = Float64(y + x); elseif (a <= -6.8e+31) tmp = t_1; elseif (a <= -7500000000.0) tmp = Float64(y + x); elseif (a <= -5.8e-33) tmp = Float64(x - Float64(y / Float64(a / z))); elseif (a <= 1.16e-36) tmp = t_1; else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y / (t / (z - a))); tmp = 0.0; if (a <= -4e+83) tmp = y + x; elseif (a <= -6.8e+31) tmp = t_1; elseif (a <= -7500000000.0) tmp = y + x; elseif (a <= -5.8e-33) tmp = x - (y / (a / z)); elseif (a <= 1.16e-36) tmp = t_1; else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y / N[(t / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -4e+83], N[(y + x), $MachinePrecision], If[LessEqual[a, -6.8e+31], t$95$1, If[LessEqual[a, -7500000000.0], N[(y + x), $MachinePrecision], If[LessEqual[a, -5.8e-33], N[(x - N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.16e-36], t$95$1, N[(y + x), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y}{\frac{t}{z - a}}\\
\mathbf{if}\;a \leq -4 \cdot 10^{+83}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;a \leq -6.8 \cdot 10^{+31}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq -7500000000:\\
\;\;\;\;y + x\\
\mathbf{elif}\;a \leq -5.8 \cdot 10^{-33}:\\
\;\;\;\;x - \frac{y}{\frac{a}{z}}\\
\mathbf{elif}\;a \leq 1.16 \cdot 10^{-36}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if a < -4.00000000000000012e83 or -6.7999999999999996e31 < a < -7.5e9 or 1.16000000000000002e-36 < a Initial program 81.3%
associate-*l/96.4%
Simplified96.4%
Taylor expanded in a around inf 81.6%
+-commutative81.6%
Simplified81.6%
if -4.00000000000000012e83 < a < -6.7999999999999996e31 or -5.80000000000000005e-33 < a < 1.16000000000000002e-36Initial program 77.0%
sub-neg77.0%
distribute-frac-neg77.0%
distribute-rgt-neg-out77.0%
+-commutative77.0%
associate-*l/74.8%
distribute-rgt-neg-in74.8%
distribute-lft-neg-in74.8%
distribute-frac-neg74.8%
fma-def74.8%
sub-neg74.8%
distribute-neg-in74.8%
remove-double-neg74.8%
+-commutative74.8%
sub-neg74.8%
Simplified74.8%
fma-udef74.8%
+-commutative74.8%
associate-+r+81.6%
clear-num81.5%
associate-*l/82.2%
*-un-lft-identity82.2%
Applied egg-rr82.2%
Taylor expanded in t around inf 76.8%
neg-mul-176.8%
associate-*l/75.9%
associate-+r+82.2%
neg-mul-182.2%
distribute-rgt1-in82.2%
metadata-eval82.2%
mul0-lft82.2%
associate-*l/82.2%
associate--l+82.2%
associate-*l/82.3%
associate-*l/82.3%
div-sub82.3%
*-commutative82.3%
distribute-rgt-out--82.3%
associate-*l/82.9%
+-lft-identity82.9%
associate-*l/82.3%
associate-/l*81.7%
Simplified81.7%
if -7.5e9 < a < -5.80000000000000005e-33Initial program 96.3%
sub-neg96.3%
distribute-frac-neg96.3%
distribute-rgt-neg-out96.3%
+-commutative96.3%
associate-*l/96.8%
distribute-rgt-neg-in96.8%
distribute-lft-neg-in96.8%
distribute-frac-neg96.8%
fma-def97.0%
sub-neg97.0%
distribute-neg-in97.0%
remove-double-neg97.0%
+-commutative97.0%
sub-neg97.0%
Simplified97.0%
fma-udef96.8%
+-commutative96.8%
associate-+r+96.8%
clear-num96.8%
associate-*l/96.7%
*-un-lft-identity96.7%
Applied egg-rr96.7%
Taylor expanded in z around inf 91.2%
associate-*r/91.2%
associate-*r*91.2%
neg-mul-191.2%
Simplified91.2%
Taylor expanded in a around inf 81.6%
mul-1-neg81.6%
associate-/l*81.6%
Simplified81.6%
Final simplification81.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ y (/ t (- z a))))) (t_2 (- (+ y x) (* y (/ z a)))))
(if (<= a -3.2e+56)
t_2
(if (<= a -3.8e+35)
t_1
(if (<= a -2.9e-32)
t_2
(if (<= a -3e-77)
t_1
(if (<= a 22000000000000.0) (- x (/ (* y z) (- a t))) t_2)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y / (t / (z - a)));
double t_2 = (y + x) - (y * (z / a));
double tmp;
if (a <= -3.2e+56) {
tmp = t_2;
} else if (a <= -3.8e+35) {
tmp = t_1;
} else if (a <= -2.9e-32) {
tmp = t_2;
} else if (a <= -3e-77) {
tmp = t_1;
} else if (a <= 22000000000000.0) {
tmp = x - ((y * z) / (a - t));
} 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 / (t / (z - a)))
t_2 = (y + x) - (y * (z / a))
if (a <= (-3.2d+56)) then
tmp = t_2
else if (a <= (-3.8d+35)) then
tmp = t_1
else if (a <= (-2.9d-32)) then
tmp = t_2
else if (a <= (-3d-77)) then
tmp = t_1
else if (a <= 22000000000000.0d0) then
tmp = x - ((y * z) / (a - t))
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 / (t / (z - a)));
double t_2 = (y + x) - (y * (z / a));
double tmp;
if (a <= -3.2e+56) {
tmp = t_2;
} else if (a <= -3.8e+35) {
tmp = t_1;
} else if (a <= -2.9e-32) {
tmp = t_2;
} else if (a <= -3e-77) {
tmp = t_1;
} else if (a <= 22000000000000.0) {
tmp = x - ((y * z) / (a - t));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y / (t / (z - a))) t_2 = (y + x) - (y * (z / a)) tmp = 0 if a <= -3.2e+56: tmp = t_2 elif a <= -3.8e+35: tmp = t_1 elif a <= -2.9e-32: tmp = t_2 elif a <= -3e-77: tmp = t_1 elif a <= 22000000000000.0: tmp = x - ((y * z) / (a - t)) else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y / Float64(t / Float64(z - a)))) t_2 = Float64(Float64(y + x) - Float64(y * Float64(z / a))) tmp = 0.0 if (a <= -3.2e+56) tmp = t_2; elseif (a <= -3.8e+35) tmp = t_1; elseif (a <= -2.9e-32) tmp = t_2; elseif (a <= -3e-77) tmp = t_1; elseif (a <= 22000000000000.0) tmp = Float64(x - Float64(Float64(y * z) / Float64(a - t))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y / (t / (z - a))); t_2 = (y + x) - (y * (z / a)); tmp = 0.0; if (a <= -3.2e+56) tmp = t_2; elseif (a <= -3.8e+35) tmp = t_1; elseif (a <= -2.9e-32) tmp = t_2; elseif (a <= -3e-77) tmp = t_1; elseif (a <= 22000000000000.0) tmp = x - ((y * z) / (a - t)); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y / N[(t / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y + x), $MachinePrecision] - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -3.2e+56], t$95$2, If[LessEqual[a, -3.8e+35], t$95$1, If[LessEqual[a, -2.9e-32], t$95$2, If[LessEqual[a, -3e-77], t$95$1, If[LessEqual[a, 22000000000000.0], N[(x - N[(N[(y * z), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y}{\frac{t}{z - a}}\\
t_2 := \left(y + x\right) - y \cdot \frac{z}{a}\\
\mathbf{if}\;a \leq -3.2 \cdot 10^{+56}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq -3.8 \cdot 10^{+35}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq -2.9 \cdot 10^{-32}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq -3 \cdot 10^{-77}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 22000000000000:\\
\;\;\;\;x - \frac{y \cdot z}{a - t}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if a < -3.20000000000000003e56 or -3.8e35 < a < -2.89999999999999996e-32 or 2.2e13 < a Initial program 81.3%
associate-*l/96.1%
Simplified96.1%
Taylor expanded in t around 0 89.6%
if -3.20000000000000003e56 < a < -3.8e35 or -2.89999999999999996e-32 < a < -3.00000000000000016e-77Initial program 63.2%
sub-neg63.2%
distribute-frac-neg63.2%
distribute-rgt-neg-out63.2%
+-commutative63.2%
associate-*l/63.5%
distribute-rgt-neg-in63.5%
distribute-lft-neg-in63.5%
distribute-frac-neg63.5%
fma-def63.3%
sub-neg63.3%
distribute-neg-in63.3%
remove-double-neg63.3%
+-commutative63.3%
sub-neg63.3%
Simplified63.3%
fma-udef63.5%
+-commutative63.5%
associate-+r+74.0%
clear-num74.0%
associate-*l/74.0%
*-un-lft-identity74.0%
Applied egg-rr74.0%
Taylor expanded in t around inf 78.2%
neg-mul-178.2%
associate-*l/73.0%
associate-+r+78.4%
neg-mul-178.4%
distribute-rgt1-in78.4%
metadata-eval78.4%
mul0-lft78.4%
associate-*l/83.6%
associate--l+83.6%
associate-*l/88.9%
associate-*l/83.7%
div-sub83.7%
*-commutative83.7%
distribute-rgt-out--83.7%
associate-*l/83.6%
+-lft-identity83.6%
associate-*l/83.7%
associate-/l*88.8%
Simplified88.8%
if -3.00000000000000016e-77 < a < 2.2e13Initial program 80.8%
sub-neg80.8%
distribute-frac-neg80.8%
distribute-rgt-neg-out80.8%
+-commutative80.8%
associate-*l/78.4%
distribute-rgt-neg-in78.4%
distribute-lft-neg-in78.4%
distribute-frac-neg78.4%
fma-def78.4%
sub-neg78.4%
distribute-neg-in78.4%
remove-double-neg78.4%
+-commutative78.4%
sub-neg78.4%
Simplified78.4%
fma-udef78.4%
+-commutative78.4%
associate-+r+84.8%
clear-num84.8%
associate-*l/85.5%
*-un-lft-identity85.5%
Applied egg-rr85.5%
Taylor expanded in z around inf 90.7%
associate-*r/90.7%
associate-*r*90.7%
neg-mul-190.7%
Simplified90.7%
Final simplification90.1%
(FPCore (x y z t a)
:precision binary64
(if (or (<= a -3.2e+56)
(not
(or (<= a -1.15e+35) (and (not (<= a -3.2e-33)) (<= a 8.1e-41)))))
(- (+ y x) (* y (/ z a)))
(+ x (/ y (/ t (- z a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -3.2e+56) || !((a <= -1.15e+35) || (!(a <= -3.2e-33) && (a <= 8.1e-41)))) {
tmp = (y + x) - (y * (z / a));
} 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 <= (-3.2d+56)) .or. (.not. (a <= (-1.15d+35)) .or. (.not. (a <= (-3.2d-33))) .and. (a <= 8.1d-41))) then
tmp = (y + x) - (y * (z / a))
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 <= -3.2e+56) || !((a <= -1.15e+35) || (!(a <= -3.2e-33) && (a <= 8.1e-41)))) {
tmp = (y + x) - (y * (z / a));
} else {
tmp = x + (y / (t / (z - a)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -3.2e+56) or not ((a <= -1.15e+35) or (not (a <= -3.2e-33) and (a <= 8.1e-41))): tmp = (y + x) - (y * (z / a)) else: tmp = x + (y / (t / (z - a))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -3.2e+56) || !((a <= -1.15e+35) || (!(a <= -3.2e-33) && (a <= 8.1e-41)))) tmp = Float64(Float64(y + x) - Float64(y * Float64(z / a))); else tmp = Float64(x + Float64(y / Float64(t / Float64(z - a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -3.2e+56) || ~(((a <= -1.15e+35) || (~((a <= -3.2e-33)) && (a <= 8.1e-41))))) tmp = (y + x) - (y * (z / a)); else tmp = x + (y / (t / (z - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -3.2e+56], N[Not[Or[LessEqual[a, -1.15e+35], And[N[Not[LessEqual[a, -3.2e-33]], $MachinePrecision], LessEqual[a, 8.1e-41]]]], $MachinePrecision]], N[(N[(y + x), $MachinePrecision] - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(t / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.2 \cdot 10^{+56} \lor \neg \left(a \leq -1.15 \cdot 10^{+35} \lor \neg \left(a \leq -3.2 \cdot 10^{-33}\right) \land a \leq 8.1 \cdot 10^{-41}\right):\\
\;\;\;\;\left(y + x\right) - y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{t}{z - a}}\\
\end{array}
\end{array}
if a < -3.20000000000000003e56 or -1.1499999999999999e35 < a < -3.19999999999999977e-33 or 8.1e-41 < a Initial program 82.4%
associate-*l/95.8%
Simplified95.8%
Taylor expanded in t around 0 88.5%
if -3.20000000000000003e56 < a < -1.1499999999999999e35 or -3.19999999999999977e-33 < a < 8.1e-41Initial program 77.1%
sub-neg77.1%
distribute-frac-neg77.1%
distribute-rgt-neg-out77.1%
+-commutative77.1%
associate-*l/74.8%
distribute-rgt-neg-in74.8%
distribute-lft-neg-in74.8%
distribute-frac-neg74.8%
fma-def74.8%
sub-neg74.8%
distribute-neg-in74.8%
remove-double-neg74.8%
+-commutative74.8%
sub-neg74.8%
Simplified74.8%
fma-udef74.8%
+-commutative74.8%
associate-+r+81.7%
clear-num81.6%
associate-*l/82.4%
*-un-lft-identity82.4%
Applied egg-rr82.4%
Taylor expanded in t around inf 77.5%
neg-mul-177.5%
associate-*l/76.6%
associate-+r+83.1%
neg-mul-183.1%
distribute-rgt1-in83.1%
metadata-eval83.1%
mul0-lft83.1%
associate-*l/83.1%
associate--l+83.1%
associate-*l/83.2%
associate-*l/83.2%
div-sub83.2%
*-commutative83.2%
distribute-rgt-out--83.2%
associate-*l/83.8%
+-lft-identity83.8%
associate-*l/83.2%
associate-/l*82.6%
Simplified82.6%
Final simplification85.6%
(FPCore (x y z t a)
:precision binary64
(if (<= z -3.15e+261)
(/ (- y) (/ a z))
(if (<= z -3.3e+150)
(+ y x)
(if (<= z -2.3e+115)
(* z (/ y t))
(if (<= z 1.95e+170) (+ y x) (/ (* y z) t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.15e+261) {
tmp = -y / (a / z);
} else if (z <= -3.3e+150) {
tmp = y + x;
} else if (z <= -2.3e+115) {
tmp = z * (y / t);
} else if (z <= 1.95e+170) {
tmp = y + 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.15d+261)) then
tmp = -y / (a / z)
else if (z <= (-3.3d+150)) then
tmp = y + x
else if (z <= (-2.3d+115)) then
tmp = z * (y / t)
else if (z <= 1.95d+170) then
tmp = y + 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.15e+261) {
tmp = -y / (a / z);
} else if (z <= -3.3e+150) {
tmp = y + x;
} else if (z <= -2.3e+115) {
tmp = z * (y / t);
} else if (z <= 1.95e+170) {
tmp = y + x;
} else {
tmp = (y * z) / t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.15e+261: tmp = -y / (a / z) elif z <= -3.3e+150: tmp = y + x elif z <= -2.3e+115: tmp = z * (y / t) elif z <= 1.95e+170: tmp = y + x else: tmp = (y * z) / t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.15e+261) tmp = Float64(Float64(-y) / Float64(a / z)); elseif (z <= -3.3e+150) tmp = Float64(y + x); elseif (z <= -2.3e+115) tmp = Float64(z * Float64(y / t)); elseif (z <= 1.95e+170) tmp = Float64(y + x); else tmp = Float64(Float64(y * z) / t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3.15e+261) tmp = -y / (a / z); elseif (z <= -3.3e+150) tmp = y + x; elseif (z <= -2.3e+115) tmp = z * (y / t); elseif (z <= 1.95e+170) tmp = y + x; else tmp = (y * z) / t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.15e+261], N[((-y) / N[(a / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.3e+150], N[(y + x), $MachinePrecision], If[LessEqual[z, -2.3e+115], N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.95e+170], N[(y + x), $MachinePrecision], N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.15 \cdot 10^{+261}:\\
\;\;\;\;\frac{-y}{\frac{a}{z}}\\
\mathbf{elif}\;z \leq -3.3 \cdot 10^{+150}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;z \leq -2.3 \cdot 10^{+115}:\\
\;\;\;\;z \cdot \frac{y}{t}\\
\mathbf{elif}\;z \leq 1.95 \cdot 10^{+170}:\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot z}{t}\\
\end{array}
\end{array}
if z < -3.1500000000000001e261Initial program 79.3%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in t around 0 79.7%
Taylor expanded in x around 0 59.1%
Taylor expanded in z around inf 59.1%
mul-1-neg59.1%
associate-/l*66.2%
distribute-frac-neg66.2%
Simplified66.2%
if -3.1500000000000001e261 < z < -3.29999999999999981e150 or -2.30000000000000004e115 < z < 1.9500000000000001e170Initial program 79.7%
associate-*l/85.6%
Simplified85.6%
Taylor expanded in a around inf 71.4%
+-commutative71.4%
Simplified71.4%
if -3.29999999999999981e150 < z < -2.30000000000000004e115Initial program 67.6%
sub-neg67.6%
distribute-frac-neg67.6%
distribute-rgt-neg-out67.6%
+-commutative67.6%
associate-*l/51.7%
distribute-rgt-neg-in51.7%
distribute-lft-neg-in51.7%
distribute-frac-neg51.7%
fma-def51.7%
sub-neg51.7%
distribute-neg-in51.7%
remove-double-neg51.7%
+-commutative51.7%
sub-neg51.7%
Simplified51.7%
fma-udef51.7%
+-commutative51.7%
associate-+r+51.6%
clear-num51.6%
associate-*l/51.6%
*-un-lft-identity51.6%
Applied egg-rr51.6%
Taylor expanded in z around inf 83.6%
associate-*r/83.6%
associate-*r*83.6%
neg-mul-183.6%
Simplified83.6%
Taylor expanded in a around 0 61.8%
associate-/l*67.4%
Simplified67.4%
Taylor expanded in y around inf 61.8%
associate-*l/77.6%
*-commutative77.6%
Simplified77.6%
if 1.9500000000000001e170 < z Initial program 84.2%
sub-neg84.2%
distribute-frac-neg84.2%
distribute-rgt-neg-out84.2%
+-commutative84.2%
associate-*l/84.0%
distribute-rgt-neg-in84.0%
distribute-lft-neg-in84.0%
distribute-frac-neg84.0%
fma-def84.0%
sub-neg84.0%
distribute-neg-in84.0%
remove-double-neg84.0%
+-commutative84.0%
sub-neg84.0%
Simplified84.0%
fma-udef84.0%
+-commutative84.0%
associate-+r+84.0%
clear-num83.8%
associate-*l/87.4%
*-un-lft-identity87.4%
Applied egg-rr87.4%
Taylor expanded in z around inf 80.1%
associate-*r/80.1%
associate-*r*80.1%
neg-mul-180.1%
Simplified80.1%
Taylor expanded in a around 0 64.3%
associate-/l*63.8%
Simplified63.8%
Taylor expanded in y around inf 48.8%
Final simplification69.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.3e+150) (and (not (<= z -2.75e+115)) (<= z 4.2e+167))) (+ y x) (* z (/ y t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.3e+150) || (!(z <= -2.75e+115) && (z <= 4.2e+167))) {
tmp = y + x;
} else {
tmp = z * (y / t);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-1.3d+150)) .or. (.not. (z <= (-2.75d+115))) .and. (z <= 4.2d+167)) then
tmp = y + x
else
tmp = z * (y / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.3e+150) || (!(z <= -2.75e+115) && (z <= 4.2e+167))) {
tmp = y + x;
} else {
tmp = z * (y / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.3e+150) or (not (z <= -2.75e+115) and (z <= 4.2e+167)): tmp = y + x else: tmp = z * (y / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.3e+150) || (!(z <= -2.75e+115) && (z <= 4.2e+167))) tmp = Float64(y + x); else tmp = Float64(z * Float64(y / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.3e+150) || (~((z <= -2.75e+115)) && (z <= 4.2e+167))) tmp = y + x; else tmp = z * (y / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.3e+150], And[N[Not[LessEqual[z, -2.75e+115]], $MachinePrecision], LessEqual[z, 4.2e+167]]], N[(y + x), $MachinePrecision], N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.3 \cdot 10^{+150} \lor \neg \left(z \leq -2.75 \cdot 10^{+115}\right) \land z \leq 4.2 \cdot 10^{+167}:\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;z \cdot \frac{y}{t}\\
\end{array}
\end{array}
if z < -1.30000000000000003e150 or -2.75e115 < z < 4.1999999999999998e167Initial program 79.6%
associate-*l/86.5%
Simplified86.5%
Taylor expanded in a around inf 68.9%
+-commutative68.9%
Simplified68.9%
if -1.30000000000000003e150 < z < -2.75e115 or 4.1999999999999998e167 < z Initial program 80.9%
sub-neg80.9%
distribute-frac-neg80.9%
distribute-rgt-neg-out80.9%
+-commutative80.9%
associate-*l/77.5%
distribute-rgt-neg-in77.5%
distribute-lft-neg-in77.5%
distribute-frac-neg77.5%
fma-def77.5%
sub-neg77.5%
distribute-neg-in77.5%
remove-double-neg77.5%
+-commutative77.5%
sub-neg77.5%
Simplified77.5%
fma-udef77.5%
+-commutative77.5%
associate-+r+77.5%
clear-num77.4%
associate-*l/80.3%
*-un-lft-identity80.3%
Applied egg-rr80.3%
Taylor expanded in z around inf 80.8%
associate-*r/80.8%
associate-*r*80.8%
neg-mul-180.8%
Simplified80.8%
Taylor expanded in a around 0 63.8%
associate-/l*64.5%
Simplified64.5%
Taylor expanded in y around inf 51.4%
associate-*l/53.3%
*-commutative53.3%
Simplified53.3%
Final simplification67.1%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.05e+150)
(+ y x)
(if (<= z -2.75e+115)
(* z (/ y t))
(if (<= z 1.25e+170) (+ y x) (/ (* y z) t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.05e+150) {
tmp = y + x;
} else if (z <= -2.75e+115) {
tmp = z * (y / t);
} else if (z <= 1.25e+170) {
tmp = y + 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 <= (-1.05d+150)) then
tmp = y + x
else if (z <= (-2.75d+115)) then
tmp = z * (y / t)
else if (z <= 1.25d+170) then
tmp = y + 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 <= -1.05e+150) {
tmp = y + x;
} else if (z <= -2.75e+115) {
tmp = z * (y / t);
} else if (z <= 1.25e+170) {
tmp = y + x;
} else {
tmp = (y * z) / t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.05e+150: tmp = y + x elif z <= -2.75e+115: tmp = z * (y / t) elif z <= 1.25e+170: tmp = y + x else: tmp = (y * z) / t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.05e+150) tmp = Float64(y + x); elseif (z <= -2.75e+115) tmp = Float64(z * Float64(y / t)); elseif (z <= 1.25e+170) tmp = Float64(y + x); else tmp = Float64(Float64(y * z) / t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.05e+150) tmp = y + x; elseif (z <= -2.75e+115) tmp = z * (y / t); elseif (z <= 1.25e+170) tmp = y + x; else tmp = (y * z) / t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.05e+150], N[(y + x), $MachinePrecision], If[LessEqual[z, -2.75e+115], N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.25e+170], N[(y + x), $MachinePrecision], N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.05 \cdot 10^{+150}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;z \leq -2.75 \cdot 10^{+115}:\\
\;\;\;\;z \cdot \frac{y}{t}\\
\mathbf{elif}\;z \leq 1.25 \cdot 10^{+170}:\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot z}{t}\\
\end{array}
\end{array}
if z < -1.04999999999999999e150 or -2.75e115 < z < 1.24999999999999994e170Initial program 79.6%
associate-*l/86.5%
Simplified86.5%
Taylor expanded in a around inf 68.9%
+-commutative68.9%
Simplified68.9%
if -1.04999999999999999e150 < z < -2.75e115Initial program 67.6%
sub-neg67.6%
distribute-frac-neg67.6%
distribute-rgt-neg-out67.6%
+-commutative67.6%
associate-*l/51.7%
distribute-rgt-neg-in51.7%
distribute-lft-neg-in51.7%
distribute-frac-neg51.7%
fma-def51.7%
sub-neg51.7%
distribute-neg-in51.7%
remove-double-neg51.7%
+-commutative51.7%
sub-neg51.7%
Simplified51.7%
fma-udef51.7%
+-commutative51.7%
associate-+r+51.6%
clear-num51.6%
associate-*l/51.6%
*-un-lft-identity51.6%
Applied egg-rr51.6%
Taylor expanded in z around inf 83.6%
associate-*r/83.6%
associate-*r*83.6%
neg-mul-183.6%
Simplified83.6%
Taylor expanded in a around 0 61.8%
associate-/l*67.4%
Simplified67.4%
Taylor expanded in y around inf 61.8%
associate-*l/77.6%
*-commutative77.6%
Simplified77.6%
if 1.24999999999999994e170 < z Initial program 84.2%
sub-neg84.2%
distribute-frac-neg84.2%
distribute-rgt-neg-out84.2%
+-commutative84.2%
associate-*l/84.0%
distribute-rgt-neg-in84.0%
distribute-lft-neg-in84.0%
distribute-frac-neg84.0%
fma-def84.0%
sub-neg84.0%
distribute-neg-in84.0%
remove-double-neg84.0%
+-commutative84.0%
sub-neg84.0%
Simplified84.0%
fma-udef84.0%
+-commutative84.0%
associate-+r+84.0%
clear-num83.8%
associate-*l/87.4%
*-un-lft-identity87.4%
Applied egg-rr87.4%
Taylor expanded in z around inf 80.1%
associate-*r/80.1%
associate-*r*80.1%
neg-mul-180.1%
Simplified80.1%
Taylor expanded in a around 0 64.3%
associate-/l*63.8%
Simplified63.8%
Taylor expanded in y around inf 48.8%
Final simplification67.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -820.0) (not (<= a 4.5e-86))) (+ y x) (+ x (* z (/ y t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -820.0) || !(a <= 4.5e-86)) {
tmp = y + x;
} else {
tmp = x + (z * (y / 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 <= (-820.0d0)) .or. (.not. (a <= 4.5d-86))) then
tmp = y + x
else
tmp = x + (z * (y / 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 <= -820.0) || !(a <= 4.5e-86)) {
tmp = y + x;
} else {
tmp = x + (z * (y / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -820.0) or not (a <= 4.5e-86): tmp = y + x else: tmp = x + (z * (y / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -820.0) || !(a <= 4.5e-86)) tmp = Float64(y + x); else tmp = Float64(x + Float64(z * Float64(y / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -820.0) || ~((a <= 4.5e-86))) tmp = y + x; else tmp = x + (z * (y / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -820.0], N[Not[LessEqual[a, 4.5e-86]], $MachinePrecision]], N[(y + x), $MachinePrecision], N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -820 \lor \neg \left(a \leq 4.5 \cdot 10^{-86}\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y}{t}\\
\end{array}
\end{array}
if a < -820 or 4.4999999999999998e-86 < a Initial program 79.5%
associate-*l/93.2%
Simplified93.2%
Taylor expanded in a around inf 76.9%
+-commutative76.9%
Simplified76.9%
if -820 < a < 4.4999999999999998e-86Initial program 80.2%
sub-neg80.2%
distribute-frac-neg80.2%
distribute-rgt-neg-out80.2%
+-commutative80.2%
associate-*l/77.1%
distribute-rgt-neg-in77.1%
distribute-lft-neg-in77.1%
distribute-frac-neg77.1%
fma-def77.0%
sub-neg77.0%
distribute-neg-in77.0%
remove-double-neg77.0%
+-commutative77.0%
sub-neg77.0%
Simplified77.0%
Taylor expanded in t around inf 72.5%
associate-+r+81.7%
distribute-rgt1-in81.7%
metadata-eval81.7%
mul0-lft81.7%
associate-/l*79.5%
Simplified79.5%
Taylor expanded in a around 0 78.5%
associate-*l/79.2%
*-commutative79.2%
Simplified79.2%
Final simplification78.0%
(FPCore (x y z t a) :precision binary64 (+ (+ y (/ y (/ (- a t) (- t z)))) x))
double code(double x, double y, double z, double t, double a) {
return (y + (y / ((a - t) / (t - z)))) + 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 = (y + (y / ((a - t) / (t - z)))) + x
end function
public static double code(double x, double y, double z, double t, double a) {
return (y + (y / ((a - t) / (t - z)))) + x;
}
def code(x, y, z, t, a): return (y + (y / ((a - t) / (t - z)))) + x
function code(x, y, z, t, a) return Float64(Float64(y + Float64(y / Float64(Float64(a - t) / Float64(t - z)))) + x) end
function tmp = code(x, y, z, t, a) tmp = (y + (y / ((a - t) / (t - z)))) + x; end
code[x_, y_, z_, t_, a_] := N[(N[(y + N[(y / N[(N[(a - t), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}
\\
\left(y + \frac{y}{\frac{a - t}{t - z}}\right) + x
\end{array}
Initial program 79.8%
sub-neg79.8%
distribute-frac-neg79.8%
distribute-rgt-neg-out79.8%
+-commutative79.8%
associate-*l/85.4%
distribute-rgt-neg-in85.4%
distribute-lft-neg-in85.4%
distribute-frac-neg85.4%
fma-def85.4%
sub-neg85.4%
distribute-neg-in85.4%
remove-double-neg85.4%
+-commutative85.4%
sub-neg85.4%
Simplified85.4%
fma-udef85.4%
+-commutative85.4%
associate-+r+89.2%
clear-num89.2%
associate-*l/89.5%
*-un-lft-identity89.5%
Applied egg-rr89.5%
Final simplification89.5%
(FPCore (x y z t a) :precision binary64 (if (<= y -1.15e+115) y (if (<= y 4.2e+174) x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.15e+115) {
tmp = y;
} else if (y <= 4.2e+174) {
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.15d+115)) then
tmp = y
else if (y <= 4.2d+174) 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.15e+115) {
tmp = y;
} else if (y <= 4.2e+174) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -1.15e+115: tmp = y elif y <= 4.2e+174: tmp = x else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -1.15e+115) tmp = y; elseif (y <= 4.2e+174) tmp = x; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -1.15e+115) tmp = y; elseif (y <= 4.2e+174) tmp = x; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -1.15e+115], y, If[LessEqual[y, 4.2e+174], x, y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.15 \cdot 10^{+115}:\\
\;\;\;\;y\\
\mathbf{elif}\;y \leq 4.2 \cdot 10^{+174}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if y < -1.15000000000000002e115 or 4.20000000000000033e174 < y Initial program 58.7%
associate-*l/75.5%
Simplified75.5%
Taylor expanded in t around 0 60.5%
Taylor expanded in x around 0 43.0%
Taylor expanded in z around 0 39.1%
if -1.15000000000000002e115 < y < 4.20000000000000033e174Initial program 88.4%
associate-*l/89.5%
Simplified89.5%
Taylor expanded in x around inf 63.8%
Final simplification56.7%
(FPCore (x y z t a) :precision binary64 (+ y x))
double code(double x, double y, double z, double t, double a) {
return y + 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 = y + x
end function
public static double code(double x, double y, double z, double t, double a) {
return y + x;
}
def code(x, y, z, t, a): return y + x
function code(x, y, z, t, a) return Float64(y + x) end
function tmp = code(x, y, z, t, a) tmp = y + x; end
code[x_, y_, z_, t_, a_] := N[(y + x), $MachinePrecision]
\begin{array}{l}
\\
y + x
\end{array}
Initial program 79.8%
associate-*l/85.4%
Simplified85.4%
Taylor expanded in a around inf 62.9%
+-commutative62.9%
Simplified62.9%
Final simplification62.9%
(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 79.8%
associate-*l/85.4%
Simplified85.4%
Taylor expanded in x around inf 49.1%
Final simplification49.1%
(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 2024018
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, B"
:precision binary64
:herbie-target
(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))))