
(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
(if (<= t -2.5e+96)
(+ (- x (* a (/ y t))) (* y (/ z t)))
(if (<= t 3.5e+24)
(+ (+ x y) (* (/ y (- a t)) (- t z)))
(- x (* y (/ (- a z) t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.5e+96) {
tmp = (x - (a * (y / t))) + (y * (z / t));
} else if (t <= 3.5e+24) {
tmp = (x + y) + ((y / (a - t)) * (t - z));
} else {
tmp = x - (y * ((a - 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 <= (-2.5d+96)) then
tmp = (x - (a * (y / t))) + (y * (z / t))
else if (t <= 3.5d+24) then
tmp = (x + y) + ((y / (a - t)) * (t - z))
else
tmp = x - (y * ((a - 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 <= -2.5e+96) {
tmp = (x - (a * (y / t))) + (y * (z / t));
} else if (t <= 3.5e+24) {
tmp = (x + y) + ((y / (a - t)) * (t - z));
} else {
tmp = x - (y * ((a - z) / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -2.5e+96: tmp = (x - (a * (y / t))) + (y * (z / t)) elif t <= 3.5e+24: tmp = (x + y) + ((y / (a - t)) * (t - z)) else: tmp = x - (y * ((a - z) / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -2.5e+96) tmp = Float64(Float64(x - Float64(a * Float64(y / t))) + Float64(y * Float64(z / t))); elseif (t <= 3.5e+24) tmp = Float64(Float64(x + y) + Float64(Float64(y / Float64(a - t)) * Float64(t - z))); else tmp = Float64(x - Float64(y * Float64(Float64(a - z) / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -2.5e+96) tmp = (x - (a * (y / t))) + (y * (z / t)); elseif (t <= 3.5e+24) tmp = (x + y) + ((y / (a - t)) * (t - z)); else tmp = x - (y * ((a - z) / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2.5e+96], N[(N[(x - N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.5e+24], N[(N[(x + y), $MachinePrecision] + N[(N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(y * N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.5 \cdot 10^{+96}:\\
\;\;\;\;\left(x - a \cdot \frac{y}{t}\right) + y \cdot \frac{z}{t}\\
\mathbf{elif}\;t \leq 3.5 \cdot 10^{+24}:\\
\;\;\;\;\left(x + y\right) + \frac{y}{a - t} \cdot \left(t - z\right)\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot \frac{a - z}{t}\\
\end{array}
\end{array}
if t < -2.5000000000000002e96Initial program 56.9%
Taylor expanded in t around inf 78.7%
sub-neg78.7%
mul-1-neg78.7%
unsub-neg78.7%
associate-/l*81.1%
mul-1-neg81.1%
remove-double-neg81.1%
associate-/l*90.5%
Simplified90.5%
if -2.5000000000000002e96 < t < 3.5000000000000002e24Initial program 90.2%
associate-/l*93.9%
*-commutative93.9%
Applied egg-rr93.9%
if 3.5000000000000002e24 < t Initial program 62.3%
Taylor expanded in t around -inf 83.9%
mul-1-neg83.9%
unsub-neg83.9%
*-commutative83.9%
Simplified83.9%
Taylor expanded in y around 0 84.1%
associate-*r/89.5%
Simplified89.5%
Final simplification92.4%
(FPCore (x y z t a)
:precision binary64
(if (<= a -1e+50)
(+ x y)
(if (<= a -2.2e-218)
(* y (/ z (- t a)))
(if (<= a 6.6e-78) x (if (<= a 1.66e-43) (* y (/ (- z a) t)) (+ x y))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1e+50) {
tmp = x + y;
} else if (a <= -2.2e-218) {
tmp = y * (z / (t - a));
} else if (a <= 6.6e-78) {
tmp = x;
} else if (a <= 1.66e-43) {
tmp = y * ((z - a) / 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 (a <= (-1d+50)) then
tmp = x + y
else if (a <= (-2.2d-218)) then
tmp = y * (z / (t - a))
else if (a <= 6.6d-78) then
tmp = x
else if (a <= 1.66d-43) then
tmp = y * ((z - a) / 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 (a <= -1e+50) {
tmp = x + y;
} else if (a <= -2.2e-218) {
tmp = y * (z / (t - a));
} else if (a <= 6.6e-78) {
tmp = x;
} else if (a <= 1.66e-43) {
tmp = y * ((z - a) / t);
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1e+50: tmp = x + y elif a <= -2.2e-218: tmp = y * (z / (t - a)) elif a <= 6.6e-78: tmp = x elif a <= 1.66e-43: tmp = y * ((z - a) / t) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1e+50) tmp = Float64(x + y); elseif (a <= -2.2e-218) tmp = Float64(y * Float64(z / Float64(t - a))); elseif (a <= 6.6e-78) tmp = x; elseif (a <= 1.66e-43) tmp = Float64(y * Float64(Float64(z - a) / t)); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1e+50) tmp = x + y; elseif (a <= -2.2e-218) tmp = y * (z / (t - a)); elseif (a <= 6.6e-78) tmp = x; elseif (a <= 1.66e-43) tmp = y * ((z - a) / t); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1e+50], N[(x + y), $MachinePrecision], If[LessEqual[a, -2.2e-218], N[(y * N[(z / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6.6e-78], x, If[LessEqual[a, 1.66e-43], N[(y * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1 \cdot 10^{+50}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq -2.2 \cdot 10^{-218}:\\
\;\;\;\;y \cdot \frac{z}{t - a}\\
\mathbf{elif}\;a \leq 6.6 \cdot 10^{-78}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 1.66 \cdot 10^{-43}:\\
\;\;\;\;y \cdot \frac{z - a}{t}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if a < -1.0000000000000001e50 or 1.66e-43 < a Initial program 80.8%
sub-neg80.8%
+-commutative80.8%
distribute-frac-neg80.8%
distribute-rgt-neg-out80.8%
associate-/l*90.4%
fma-define90.6%
distribute-frac-neg90.6%
distribute-neg-frac290.6%
sub-neg90.6%
distribute-neg-in90.6%
remove-double-neg90.6%
+-commutative90.6%
sub-neg90.6%
Simplified90.6%
Taylor expanded in a around inf 76.6%
+-commutative76.6%
Simplified76.6%
if -1.0000000000000001e50 < a < -2.20000000000000007e-218Initial program 77.4%
sub-neg77.4%
+-commutative77.4%
distribute-frac-neg77.4%
distribute-rgt-neg-out77.4%
associate-/l*76.3%
fma-define76.1%
distribute-frac-neg76.1%
distribute-neg-frac276.1%
sub-neg76.1%
distribute-neg-in76.1%
remove-double-neg76.1%
+-commutative76.1%
sub-neg76.1%
Simplified76.1%
Taylor expanded in z around inf 54.1%
associate-/l*54.1%
Simplified54.1%
if -2.20000000000000007e-218 < a < 6.59999999999999963e-78Initial program 77.2%
sub-neg77.2%
+-commutative77.2%
distribute-frac-neg77.2%
distribute-rgt-neg-out77.2%
associate-/l*76.8%
fma-define76.7%
distribute-frac-neg76.7%
distribute-neg-frac276.7%
sub-neg76.7%
distribute-neg-in76.7%
remove-double-neg76.7%
+-commutative76.7%
sub-neg76.7%
Simplified76.7%
Taylor expanded in t around inf 68.3%
distribute-rgt1-in68.3%
metadata-eval68.3%
mul0-lft68.3%
Simplified68.3%
Taylor expanded in x around 0 68.3%
if 6.59999999999999963e-78 < a < 1.66e-43Initial program 67.6%
Taylor expanded in t around -inf 76.2%
mul-1-neg76.2%
unsub-neg76.2%
*-commutative76.2%
Simplified76.2%
Taylor expanded in y around 0 76.2%
associate-*r/76.0%
Simplified76.0%
Taylor expanded in x around 0 76.2%
mul-1-neg76.2%
associate-/l*76.0%
distribute-rgt-neg-in76.0%
distribute-frac-neg76.0%
neg-sub076.0%
sub-neg76.0%
+-commutative76.0%
associate--r+76.0%
neg-sub076.0%
remove-double-neg76.0%
Simplified76.0%
Final simplification69.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- (+ x y) (* y (/ z a)))))
(if (<= a -1.2e+43)
t_1
(if (<= a 7.5e-124)
(+ x (/ (* y z) (- t a)))
(if (<= a 2.12e-26) (+ x (* y (/ (- z a) t))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (x + y) - (y * (z / a));
double tmp;
if (a <= -1.2e+43) {
tmp = t_1;
} else if (a <= 7.5e-124) {
tmp = x + ((y * z) / (t - a));
} else if (a <= 2.12e-26) {
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 = (x + y) - (y * (z / a))
if (a <= (-1.2d+43)) then
tmp = t_1
else if (a <= 7.5d-124) then
tmp = x + ((y * z) / (t - a))
else if (a <= 2.12d-26) 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 = (x + y) - (y * (z / a));
double tmp;
if (a <= -1.2e+43) {
tmp = t_1;
} else if (a <= 7.5e-124) {
tmp = x + ((y * z) / (t - a));
} else if (a <= 2.12e-26) {
tmp = x + (y * ((z - a) / t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (x + y) - (y * (z / a)) tmp = 0 if a <= -1.2e+43: tmp = t_1 elif a <= 7.5e-124: tmp = x + ((y * z) / (t - a)) elif a <= 2.12e-26: tmp = x + (y * ((z - a) / t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(x + y) - Float64(y * Float64(z / a))) tmp = 0.0 if (a <= -1.2e+43) tmp = t_1; elseif (a <= 7.5e-124) tmp = Float64(x + Float64(Float64(y * z) / Float64(t - a))); elseif (a <= 2.12e-26) tmp = Float64(x + Float64(y * Float64(Float64(z - a) / t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (x + y) - (y * (z / a)); tmp = 0.0; if (a <= -1.2e+43) tmp = t_1; elseif (a <= 7.5e-124) tmp = x + ((y * z) / (t - a)); elseif (a <= 2.12e-26) 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[(x + y), $MachinePrecision] - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.2e+43], t$95$1, If[LessEqual[a, 7.5e-124], N[(x + N[(N[(y * z), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.12e-26], N[(x + N[(y * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x + y\right) - y \cdot \frac{z}{a}\\
\mathbf{if}\;a \leq -1.2 \cdot 10^{+43}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 7.5 \cdot 10^{-124}:\\
\;\;\;\;x + \frac{y \cdot z}{t - a}\\
\mathbf{elif}\;a \leq 2.12 \cdot 10^{-26}:\\
\;\;\;\;x + y \cdot \frac{z - a}{t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -1.20000000000000012e43 or 2.12000000000000002e-26 < a Initial program 79.8%
Taylor expanded in t around 0 80.2%
associate-/l*87.8%
Simplified87.8%
if -1.20000000000000012e43 < a < 7.4999999999999996e-124Initial program 79.2%
associate-/l*76.6%
*-commutative76.6%
Applied egg-rr76.6%
Taylor expanded in z around inf 78.0%
Taylor expanded in x around inf 91.9%
if 7.4999999999999996e-124 < a < 2.12000000000000002e-26Initial program 68.1%
Taylor expanded in t around -inf 73.1%
mul-1-neg73.1%
unsub-neg73.1%
*-commutative73.1%
Simplified73.1%
Taylor expanded in y around 0 73.1%
associate-*r/81.7%
Simplified81.7%
Final simplification89.1%
(FPCore (x y z t a)
:precision binary64
(if (<= t -2.3e+86)
(+ (- x (* a (/ y t))) (* y (/ z t)))
(if (<= t 2.8e+18)
(- (+ x y) (/ (* y z) (- a t)))
(+ x (* y (/ (- z a) t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.3e+86) {
tmp = (x - (a * (y / t))) + (y * (z / t));
} else if (t <= 2.8e+18) {
tmp = (x + y) - ((y * z) / (a - t));
} else {
tmp = x + (y * ((z - a) / t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-2.3d+86)) then
tmp = (x - (a * (y / t))) + (y * (z / t))
else if (t <= 2.8d+18) then
tmp = (x + y) - ((y * z) / (a - t))
else
tmp = x + (y * ((z - a) / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.3e+86) {
tmp = (x - (a * (y / t))) + (y * (z / t));
} else if (t <= 2.8e+18) {
tmp = (x + y) - ((y * z) / (a - t));
} else {
tmp = x + (y * ((z - a) / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -2.3e+86: tmp = (x - (a * (y / t))) + (y * (z / t)) elif t <= 2.8e+18: tmp = (x + y) - ((y * z) / (a - t)) else: tmp = x + (y * ((z - a) / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -2.3e+86) tmp = Float64(Float64(x - Float64(a * Float64(y / t))) + Float64(y * Float64(z / t))); elseif (t <= 2.8e+18) tmp = Float64(Float64(x + y) - Float64(Float64(y * z) / Float64(a - t))); else tmp = Float64(x + Float64(y * Float64(Float64(z - a) / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -2.3e+86) tmp = (x - (a * (y / t))) + (y * (z / t)); elseif (t <= 2.8e+18) tmp = (x + y) - ((y * z) / (a - t)); else tmp = x + (y * ((z - a) / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2.3e+86], N[(N[(x - N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.8e+18], N[(N[(x + y), $MachinePrecision] - N[(N[(y * z), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.3 \cdot 10^{+86}:\\
\;\;\;\;\left(x - a \cdot \frac{y}{t}\right) + y \cdot \frac{z}{t}\\
\mathbf{elif}\;t \leq 2.8 \cdot 10^{+18}:\\
\;\;\;\;\left(x + y\right) - \frac{y \cdot z}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z - a}{t}\\
\end{array}
\end{array}
if t < -2.2999999999999999e86Initial program 54.3%
Taylor expanded in t around inf 74.4%
sub-neg74.4%
mul-1-neg74.4%
unsub-neg74.4%
associate-/l*76.7%
mul-1-neg76.7%
remove-double-neg76.7%
associate-/l*85.5%
Simplified85.5%
if -2.2999999999999999e86 < t < 2.8e18Initial program 92.4%
associate-/l*94.2%
*-commutative94.2%
Applied egg-rr94.2%
Taylor expanded in z around inf 91.9%
if 2.8e18 < t Initial program 61.3%
Taylor expanded in t around -inf 82.5%
mul-1-neg82.5%
unsub-neg82.5%
*-commutative82.5%
Simplified82.5%
Taylor expanded in y around 0 82.7%
associate-*r/88.0%
Simplified88.0%
Final simplification89.9%
(FPCore (x y z t a)
:precision binary64
(if (<= t -6e+86)
(+ x (/ 1.0 (/ (/ t y) (- z a))))
(if (<= t 3e+18)
(- (+ x y) (/ (* y z) (- a t)))
(- x (* y (/ (- a z) t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -6e+86) {
tmp = x + (1.0 / ((t / y) / (z - a)));
} else if (t <= 3e+18) {
tmp = (x + y) - ((y * z) / (a - t));
} else {
tmp = x - (y * ((a - 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 <= (-6d+86)) then
tmp = x + (1.0d0 / ((t / y) / (z - a)))
else if (t <= 3d+18) then
tmp = (x + y) - ((y * z) / (a - t))
else
tmp = x - (y * ((a - 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 <= -6e+86) {
tmp = x + (1.0 / ((t / y) / (z - a)));
} else if (t <= 3e+18) {
tmp = (x + y) - ((y * z) / (a - t));
} else {
tmp = x - (y * ((a - z) / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -6e+86: tmp = x + (1.0 / ((t / y) / (z - a))) elif t <= 3e+18: tmp = (x + y) - ((y * z) / (a - t)) else: tmp = x - (y * ((a - z) / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -6e+86) tmp = Float64(x + Float64(1.0 / Float64(Float64(t / y) / Float64(z - a)))); elseif (t <= 3e+18) tmp = Float64(Float64(x + y) - Float64(Float64(y * z) / Float64(a - t))); else tmp = Float64(x - Float64(y * Float64(Float64(a - z) / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -6e+86) tmp = x + (1.0 / ((t / y) / (z - a))); elseif (t <= 3e+18) tmp = (x + y) - ((y * z) / (a - t)); else tmp = x - (y * ((a - z) / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -6e+86], N[(x + N[(1.0 / N[(N[(t / y), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3e+18], N[(N[(x + y), $MachinePrecision] - N[(N[(y * z), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(y * N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6 \cdot 10^{+86}:\\
\;\;\;\;x + \frac{1}{\frac{\frac{t}{y}}{z - a}}\\
\mathbf{elif}\;t \leq 3 \cdot 10^{+18}:\\
\;\;\;\;\left(x + y\right) - \frac{y \cdot z}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot \frac{a - z}{t}\\
\end{array}
\end{array}
if t < -5.99999999999999954e86Initial program 54.3%
Taylor expanded in t around -inf 74.4%
mul-1-neg74.4%
unsub-neg74.4%
*-commutative74.4%
Simplified74.4%
clear-num74.4%
inv-pow74.4%
distribute-lft-out--74.6%
Applied egg-rr74.6%
unpow-174.6%
associate-/r*83.4%
Simplified83.4%
if -5.99999999999999954e86 < t < 3e18Initial program 92.4%
associate-/l*94.2%
*-commutative94.2%
Applied egg-rr94.2%
Taylor expanded in z around inf 91.9%
if 3e18 < t Initial program 61.3%
Taylor expanded in t around -inf 82.5%
mul-1-neg82.5%
unsub-neg82.5%
*-commutative82.5%
Simplified82.5%
Taylor expanded in y around 0 82.7%
associate-*r/88.0%
Simplified88.0%
Final simplification89.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -2.2e+79) (not (<= a 3e+112))) (+ x y) (+ x (/ (* y z) (- t a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.2e+79) || !(a <= 3e+112)) {
tmp = x + y;
} else {
tmp = x + ((y * z) / (t - a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-2.2d+79)) .or. (.not. (a <= 3d+112))) then
tmp = x + y
else
tmp = x + ((y * z) / (t - a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.2e+79) || !(a <= 3e+112)) {
tmp = x + y;
} else {
tmp = x + ((y * z) / (t - a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -2.2e+79) or not (a <= 3e+112): tmp = x + y else: tmp = x + ((y * z) / (t - a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -2.2e+79) || !(a <= 3e+112)) tmp = Float64(x + y); else tmp = Float64(x + Float64(Float64(y * z) / Float64(t - a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -2.2e+79) || ~((a <= 3e+112))) tmp = x + y; else tmp = x + ((y * z) / (t - a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -2.2e+79], N[Not[LessEqual[a, 3e+112]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(N[(y * z), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.2 \cdot 10^{+79} \lor \neg \left(a \leq 3 \cdot 10^{+112}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot z}{t - a}\\
\end{array}
\end{array}
if a < -2.1999999999999999e79 or 2.99999999999999979e112 < a Initial program 77.8%
sub-neg77.8%
+-commutative77.8%
distribute-frac-neg77.8%
distribute-rgt-neg-out77.8%
associate-/l*91.7%
fma-define91.8%
distribute-frac-neg91.8%
distribute-neg-frac291.8%
sub-neg91.8%
distribute-neg-in91.8%
remove-double-neg91.8%
+-commutative91.8%
sub-neg91.8%
Simplified91.8%
Taylor expanded in a around inf 80.6%
+-commutative80.6%
Simplified80.6%
if -2.1999999999999999e79 < a < 2.99999999999999979e112Initial program 79.0%
associate-/l*78.5%
*-commutative78.5%
Applied egg-rr78.5%
Taylor expanded in z around inf 78.8%
Taylor expanded in x around inf 83.7%
Final simplification82.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -3.2e+103) (not (<= a 2.25e-38))) (+ x y) (+ x (* y (/ (- z a) t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -3.2e+103) || !(a <= 2.25e-38)) {
tmp = x + y;
} else {
tmp = x + (y * ((z - a) / t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-3.2d+103)) .or. (.not. (a <= 2.25d-38))) then
tmp = x + y
else
tmp = x + (y * ((z - a) / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -3.2e+103) || !(a <= 2.25e-38)) {
tmp = x + y;
} else {
tmp = x + (y * ((z - a) / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -3.2e+103) or not (a <= 2.25e-38): tmp = x + y else: tmp = x + (y * ((z - a) / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -3.2e+103) || !(a <= 2.25e-38)) tmp = Float64(x + y); else tmp = Float64(x + Float64(y * Float64(Float64(z - a) / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -3.2e+103) || ~((a <= 2.25e-38))) tmp = x + y; else tmp = x + (y * ((z - a) / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -3.2e+103], N[Not[LessEqual[a, 2.25e-38]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(y * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.2 \cdot 10^{+103} \lor \neg \left(a \leq 2.25 \cdot 10^{-38}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z - a}{t}\\
\end{array}
\end{array}
if a < -3.19999999999999993e103 or 2.25000000000000004e-38 < a Initial program 81.1%
sub-neg81.1%
+-commutative81.1%
distribute-frac-neg81.1%
distribute-rgt-neg-out81.1%
associate-/l*90.2%
fma-define90.3%
distribute-frac-neg90.3%
distribute-neg-frac290.3%
sub-neg90.3%
distribute-neg-in90.3%
remove-double-neg90.3%
+-commutative90.3%
sub-neg90.3%
Simplified90.3%
Taylor expanded in a around inf 78.7%
+-commutative78.7%
Simplified78.7%
if -3.19999999999999993e103 < a < 2.25000000000000004e-38Initial program 76.5%
Taylor expanded in t around -inf 75.9%
mul-1-neg75.9%
unsub-neg75.9%
*-commutative75.9%
Simplified75.9%
Taylor expanded in y around 0 75.9%
associate-*r/74.5%
Simplified74.5%
Final simplification76.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1e+43) (not (<= a 2.05e-66))) (+ x y) (+ x (/ (* y z) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1e+43) || !(a <= 2.05e-66)) {
tmp = x + y;
} else {
tmp = x + ((y * z) / t);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-1d+43)) .or. (.not. (a <= 2.05d-66))) then
tmp = x + y
else
tmp = x + ((y * z) / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1e+43) || !(a <= 2.05e-66)) {
tmp = x + y;
} else {
tmp = x + ((y * z) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1e+43) or not (a <= 2.05e-66): tmp = x + y else: tmp = x + ((y * z) / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1e+43) || !(a <= 2.05e-66)) tmp = Float64(x + y); else tmp = Float64(x + Float64(Float64(y * z) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1e+43) || ~((a <= 2.05e-66))) tmp = x + y; else tmp = x + ((y * z) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1e+43], N[Not[LessEqual[a, 2.05e-66]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1 \cdot 10^{+43} \lor \neg \left(a \leq 2.05 \cdot 10^{-66}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot z}{t}\\
\end{array}
\end{array}
if a < -1.00000000000000001e43 or 2.04999999999999999e-66 < a Initial program 78.7%
sub-neg78.7%
+-commutative78.7%
distribute-frac-neg78.7%
distribute-rgt-neg-out78.7%
associate-/l*88.3%
fma-define88.4%
distribute-frac-neg88.4%
distribute-neg-frac288.4%
sub-neg88.4%
distribute-neg-in88.4%
remove-double-neg88.4%
+-commutative88.4%
sub-neg88.4%
Simplified88.4%
Taylor expanded in a around inf 73.0%
+-commutative73.0%
Simplified73.0%
if -1.00000000000000001e43 < a < 2.04999999999999999e-66Initial program 78.4%
associate-/l*76.9%
*-commutative76.9%
Applied egg-rr76.9%
Taylor expanded in z around inf 77.4%
Taylor expanded in x around inf 91.0%
Taylor expanded in t around inf 76.8%
Final simplification74.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2.8e+60) (not (<= z 5.4e+240))) (* y (/ z (- t a))) (+ x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.8e+60) || !(z <= 5.4e+240)) {
tmp = y * (z / (t - a));
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-2.8d+60)) .or. (.not. (z <= 5.4d+240))) then
tmp = y * (z / (t - a))
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.8e+60) || !(z <= 5.4e+240)) {
tmp = y * (z / (t - a));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2.8e+60) or not (z <= 5.4e+240): tmp = y * (z / (t - a)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2.8e+60) || !(z <= 5.4e+240)) tmp = Float64(y * Float64(z / Float64(t - a))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -2.8e+60) || ~((z <= 5.4e+240))) tmp = y * (z / (t - a)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.8e+60], N[Not[LessEqual[z, 5.4e+240]], $MachinePrecision]], N[(y * N[(z / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.8 \cdot 10^{+60} \lor \neg \left(z \leq 5.4 \cdot 10^{+240}\right):\\
\;\;\;\;y \cdot \frac{z}{t - a}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -2.8e60 or 5.3999999999999997e240 < z Initial program 79.7%
sub-neg79.7%
+-commutative79.7%
distribute-frac-neg79.7%
distribute-rgt-neg-out79.7%
associate-/l*88.8%
fma-define88.8%
distribute-frac-neg88.8%
distribute-neg-frac288.8%
sub-neg88.8%
distribute-neg-in88.8%
remove-double-neg88.8%
+-commutative88.8%
sub-neg88.8%
Simplified88.8%
Taylor expanded in z around inf 51.5%
associate-/l*60.6%
Simplified60.6%
if -2.8e60 < z < 5.3999999999999997e240Initial program 78.1%
sub-neg78.1%
+-commutative78.1%
distribute-frac-neg78.1%
distribute-rgt-neg-out78.1%
associate-/l*81.0%
fma-define81.0%
distribute-frac-neg81.0%
distribute-neg-frac281.0%
sub-neg81.0%
distribute-neg-in81.0%
remove-double-neg81.0%
+-commutative81.0%
sub-neg81.0%
Simplified81.0%
Taylor expanded in a around inf 68.1%
+-commutative68.1%
Simplified68.1%
Final simplification66.1%
(FPCore (x y z t a) :precision binary64 (if (<= t -1.62e+184) x (if (<= t 1.35e+64) (+ x y) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.62e+184) {
tmp = x;
} else if (t <= 1.35e+64) {
tmp = x + y;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-1.62d+184)) then
tmp = x
else if (t <= 1.35d+64) then
tmp = x + y
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.62e+184) {
tmp = x;
} else if (t <= 1.35e+64) {
tmp = x + y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.62e+184: tmp = x elif t <= 1.35e+64: tmp = x + y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.62e+184) tmp = x; elseif (t <= 1.35e+64) tmp = Float64(x + y); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -1.62e+184) tmp = x; elseif (t <= 1.35e+64) tmp = x + y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.62e+184], x, If[LessEqual[t, 1.35e+64], N[(x + y), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.62 \cdot 10^{+184}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 1.35 \cdot 10^{+64}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < -1.61999999999999999e184 or 1.35e64 < t Initial program 58.4%
sub-neg58.4%
+-commutative58.4%
distribute-frac-neg58.4%
distribute-rgt-neg-out58.4%
associate-/l*63.9%
fma-define63.8%
distribute-frac-neg63.8%
distribute-neg-frac263.8%
sub-neg63.8%
distribute-neg-in63.8%
remove-double-neg63.8%
+-commutative63.8%
sub-neg63.8%
Simplified63.8%
Taylor expanded in t around inf 65.5%
distribute-rgt1-in65.5%
metadata-eval65.5%
mul0-lft65.5%
Simplified65.5%
Taylor expanded in x around 0 65.5%
if -1.61999999999999999e184 < t < 1.35e64Initial program 86.2%
sub-neg86.2%
+-commutative86.2%
distribute-frac-neg86.2%
distribute-rgt-neg-out86.2%
associate-/l*90.3%
fma-define90.3%
distribute-frac-neg90.3%
distribute-neg-frac290.3%
sub-neg90.3%
distribute-neg-in90.3%
remove-double-neg90.3%
+-commutative90.3%
sub-neg90.3%
Simplified90.3%
Taylor expanded in a around inf 63.0%
+-commutative63.0%
Simplified63.0%
Final simplification63.7%
(FPCore (x y z t a) :precision binary64 (if (<= y -6.5e+113) y (if (<= y 2.8e+100) x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -6.5e+113) {
tmp = y;
} else if (y <= 2.8e+100) {
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 <= (-6.5d+113)) then
tmp = y
else if (y <= 2.8d+100) 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 <= -6.5e+113) {
tmp = y;
} else if (y <= 2.8e+100) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -6.5e+113: tmp = y elif y <= 2.8e+100: tmp = x else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -6.5e+113) tmp = y; elseif (y <= 2.8e+100) tmp = x; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -6.5e+113) tmp = y; elseif (y <= 2.8e+100) tmp = x; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -6.5e+113], y, If[LessEqual[y, 2.8e+100], x, y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.5 \cdot 10^{+113}:\\
\;\;\;\;y\\
\mathbf{elif}\;y \leq 2.8 \cdot 10^{+100}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if y < -6.5000000000000001e113 or 2.7999999999999998e100 < y Initial program 59.0%
sub-neg59.0%
+-commutative59.0%
distribute-frac-neg59.0%
distribute-rgt-neg-out59.0%
associate-/l*74.9%
fma-define74.8%
distribute-frac-neg74.8%
distribute-neg-frac274.8%
sub-neg74.8%
distribute-neg-in74.8%
remove-double-neg74.8%
+-commutative74.8%
sub-neg74.8%
Simplified74.8%
Taylor expanded in a around inf 41.5%
+-commutative41.5%
Simplified41.5%
Taylor expanded in y around inf 35.5%
if -6.5000000000000001e113 < y < 2.7999999999999998e100Initial program 87.0%
sub-neg87.0%
+-commutative87.0%
distribute-frac-neg87.0%
distribute-rgt-neg-out87.0%
associate-/l*86.6%
fma-define86.6%
distribute-frac-neg86.6%
distribute-neg-frac286.6%
sub-neg86.6%
distribute-neg-in86.6%
remove-double-neg86.6%
+-commutative86.6%
sub-neg86.6%
Simplified86.6%
Taylor expanded in t around inf 64.4%
distribute-rgt1-in64.4%
metadata-eval64.4%
mul0-lft64.4%
Simplified64.4%
Taylor expanded in x around 0 64.4%
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
return x;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x
end function
public static double code(double x, double y, double z, double t, double a) {
return x;
}
def code(x, y, z, t, a): return x
function code(x, y, z, t, a) return x end
function tmp = code(x, y, z, t, a) tmp = x; end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 78.6%
sub-neg78.6%
+-commutative78.6%
distribute-frac-neg78.6%
distribute-rgt-neg-out78.6%
associate-/l*83.1%
fma-define83.0%
distribute-frac-neg83.0%
distribute-neg-frac283.0%
sub-neg83.0%
distribute-neg-in83.0%
remove-double-neg83.0%
+-commutative83.0%
sub-neg83.0%
Simplified83.0%
Taylor expanded in t around inf 49.1%
distribute-rgt1-in49.1%
metadata-eval49.1%
mul0-lft49.1%
Simplified49.1%
Taylor expanded in x around 0 49.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 2024141
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, B"
:precision binary64
:alt
(! :herbie-platform default (if (< (- (+ x y) (/ (* (- z t) y) (- a t))) -13664970889390727/100000000000000000000000) (- (+ y x) (* (* (- z t) (/ 1 (- a t))) y)) (if (< (- (+ x y) (/ (* (- z t) y) (- a t))) 14754293444577233/1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (/ (- (* y (- a z)) (* x t)) (- a t)) (- (+ y x) (* (* (- z t) (/ 1 (- a t))) y)))))
(- (+ x y) (/ (* (- z t) y) (- a t))))