
(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 (+ (+ x y) (/ (* y (- z t)) (- t a)))))
(if (<= t_1 -4e-196)
(+ x (* y (+ (/ (- z t) (- t a)) 1.0)))
(if (<= t_1 0.0)
(+ x (/ y (/ t (- z a))))
(+ x (* z (+ (/ y (- t a)) (/ (* y (+ (/ t (- a t)) 1.0)) z))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (x + y) + ((y * (z - t)) / (t - a));
double tmp;
if (t_1 <= -4e-196) {
tmp = x + (y * (((z - t) / (t - a)) + 1.0));
} else if (t_1 <= 0.0) {
tmp = x + (y / (t / (z - a)));
} else {
tmp = x + (z * ((y / (t - a)) + ((y * ((t / (a - t)) + 1.0)) / z)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (x + y) + ((y * (z - t)) / (t - a))
if (t_1 <= (-4d-196)) then
tmp = x + (y * (((z - t) / (t - a)) + 1.0d0))
else if (t_1 <= 0.0d0) then
tmp = x + (y / (t / (z - a)))
else
tmp = x + (z * ((y / (t - a)) + ((y * ((t / (a - t)) + 1.0d0)) / z)))
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 - t)) / (t - a));
double tmp;
if (t_1 <= -4e-196) {
tmp = x + (y * (((z - t) / (t - a)) + 1.0));
} else if (t_1 <= 0.0) {
tmp = x + (y / (t / (z - a)));
} else {
tmp = x + (z * ((y / (t - a)) + ((y * ((t / (a - t)) + 1.0)) / z)));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (x + y) + ((y * (z - t)) / (t - a)) tmp = 0 if t_1 <= -4e-196: tmp = x + (y * (((z - t) / (t - a)) + 1.0)) elif t_1 <= 0.0: tmp = x + (y / (t / (z - a))) else: tmp = x + (z * ((y / (t - a)) + ((y * ((t / (a - t)) + 1.0)) / z))) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(x + y) + Float64(Float64(y * Float64(z - t)) / Float64(t - a))) tmp = 0.0 if (t_1 <= -4e-196) tmp = Float64(x + Float64(y * Float64(Float64(Float64(z - t) / Float64(t - a)) + 1.0))); elseif (t_1 <= 0.0) tmp = Float64(x + Float64(y / Float64(t / Float64(z - a)))); else tmp = Float64(x + Float64(z * Float64(Float64(y / Float64(t - a)) + Float64(Float64(y * Float64(Float64(t / Float64(a - t)) + 1.0)) / z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (x + y) + ((y * (z - t)) / (t - a)); tmp = 0.0; if (t_1 <= -4e-196) tmp = x + (y * (((z - t) / (t - a)) + 1.0)); elseif (t_1 <= 0.0) tmp = x + (y / (t / (z - a))); else tmp = x + (z * ((y / (t - a)) + ((y * ((t / (a - t)) + 1.0)) / z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x + y), $MachinePrecision] + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -4e-196], N[(x + N[(y * N[(N[(N[(z - t), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[(x + N[(y / N[(t / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision] + N[(N[(y * N[(N[(t / N[(a - t), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x + y\right) + \frac{y \cdot \left(z - t\right)}{t - a}\\
\mathbf{if}\;t\_1 \leq -4 \cdot 10^{-196}:\\
\;\;\;\;x + y \cdot \left(\frac{z - t}{t - a} + 1\right)\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;x + \frac{y}{\frac{t}{z - a}}\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \left(\frac{y}{t - a} + \frac{y \cdot \left(\frac{t}{a - t} + 1\right)}{z}\right)\\
\end{array}
\end{array}
if (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < -4.0000000000000002e-196Initial program 87.1%
associate--l+N/A
+-lowering-+.f64N/A
associate-*l/N/A
cancel-sign-sub-invN/A
distribute-rgt1-inN/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-evalN/A
+-lowering-+.f64N/A
distribute-frac-neg2N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
--lowering--.f64N/A
metadata-eval97.0%
Simplified97.0%
if -4.0000000000000002e-196 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 0.0Initial program 11.8%
associate--l+N/A
+-lowering-+.f64N/A
associate-*l/N/A
cancel-sign-sub-invN/A
distribute-rgt1-inN/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-evalN/A
+-lowering-+.f64N/A
distribute-frac-neg2N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
--lowering--.f64N/A
metadata-eval46.2%
Simplified46.2%
Taylor expanded in t around inf
+-lowering-+.f64N/A
associate-/l*N/A
mul-1-negN/A
sub-negN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6499.6%
Simplified99.6%
+-commutativeN/A
+-lowering-+.f64N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f6499.9%
Applied egg-rr99.9%
if 0.0 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) Initial program 85.4%
associate--l+N/A
+-lowering-+.f64N/A
associate-*l/N/A
cancel-sign-sub-invN/A
distribute-rgt1-inN/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-evalN/A
+-lowering-+.f64N/A
distribute-frac-neg2N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
--lowering--.f64N/A
metadata-eval93.0%
Simplified93.0%
Taylor expanded in z around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6493.4%
Simplified93.4%
Final simplification95.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (+ (/ (- z t) (- t a)) 1.0))))
(t_2 (+ (+ x y) (/ (* y (- z t)) (- t a)))))
(if (<= t_2 -4e-196) t_1 (if (<= t_2 0.0) (+ x (/ y (/ t (- z a)))) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * (((z - t) / (t - a)) + 1.0));
double t_2 = (x + y) + ((y * (z - t)) / (t - a));
double tmp;
if (t_2 <= -4e-196) {
tmp = t_1;
} else if (t_2 <= 0.0) {
tmp = x + (y / (t / (z - a)));
} 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 = x + (y * (((z - t) / (t - a)) + 1.0d0))
t_2 = (x + y) + ((y * (z - t)) / (t - a))
if (t_2 <= (-4d-196)) then
tmp = t_1
else if (t_2 <= 0.0d0) then
tmp = x + (y / (t / (z - a)))
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 * (((z - t) / (t - a)) + 1.0));
double t_2 = (x + y) + ((y * (z - t)) / (t - a));
double tmp;
if (t_2 <= -4e-196) {
tmp = t_1;
} else if (t_2 <= 0.0) {
tmp = x + (y / (t / (z - a)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * (((z - t) / (t - a)) + 1.0)) t_2 = (x + y) + ((y * (z - t)) / (t - a)) tmp = 0 if t_2 <= -4e-196: tmp = t_1 elif t_2 <= 0.0: tmp = x + (y / (t / (z - a))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y * Float64(Float64(Float64(z - t) / Float64(t - a)) + 1.0))) t_2 = Float64(Float64(x + y) + Float64(Float64(y * Float64(z - t)) / Float64(t - a))) tmp = 0.0 if (t_2 <= -4e-196) tmp = t_1; elseif (t_2 <= 0.0) tmp = Float64(x + Float64(y / Float64(t / Float64(z - a)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y * (((z - t) / (t - a)) + 1.0)); t_2 = (x + y) + ((y * (z - t)) / (t - a)); tmp = 0.0; if (t_2 <= -4e-196) tmp = t_1; elseif (t_2 <= 0.0) tmp = x + (y / (t / (z - a))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y * N[(N[(N[(z - t), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + y), $MachinePrecision] + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -4e-196], t$95$1, If[LessEqual[t$95$2, 0.0], N[(x + N[(y / N[(t / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \left(\frac{z - t}{t - a} + 1\right)\\
t_2 := \left(x + y\right) + \frac{y \cdot \left(z - t\right)}{t - a}\\
\mathbf{if}\;t\_2 \leq -4 \cdot 10^{-196}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;x + \frac{y}{\frac{t}{z - a}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < -4.0000000000000002e-196 or 0.0 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) Initial program 86.2%
associate--l+N/A
+-lowering-+.f64N/A
associate-*l/N/A
cancel-sign-sub-invN/A
distribute-rgt1-inN/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-evalN/A
+-lowering-+.f64N/A
distribute-frac-neg2N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
--lowering--.f64N/A
metadata-eval94.9%
Simplified94.9%
if -4.0000000000000002e-196 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 0.0Initial program 11.8%
associate--l+N/A
+-lowering-+.f64N/A
associate-*l/N/A
cancel-sign-sub-invN/A
distribute-rgt1-inN/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-evalN/A
+-lowering-+.f64N/A
distribute-frac-neg2N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
--lowering--.f64N/A
metadata-eval46.2%
Simplified46.2%
Taylor expanded in t around inf
+-lowering-+.f64N/A
associate-/l*N/A
mul-1-negN/A
sub-negN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6499.6%
Simplified99.6%
+-commutativeN/A
+-lowering-+.f64N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f6499.9%
Applied egg-rr99.9%
Final simplification95.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ (- z a) t))))
(if (<= a -8.8e-24)
(+ x y)
(if (<= a -4.7e-197)
t_1
(if (<= a 2e-181) x (if (<= a 1.02e-122) t_1 (+ x y)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * ((z - a) / t);
double tmp;
if (a <= -8.8e-24) {
tmp = x + y;
} else if (a <= -4.7e-197) {
tmp = t_1;
} else if (a <= 2e-181) {
tmp = x;
} else if (a <= 1.02e-122) {
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 = y * ((z - a) / t)
if (a <= (-8.8d-24)) then
tmp = x + y
else if (a <= (-4.7d-197)) then
tmp = t_1
else if (a <= 2d-181) then
tmp = x
else if (a <= 1.02d-122) 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 = y * ((z - a) / t);
double tmp;
if (a <= -8.8e-24) {
tmp = x + y;
} else if (a <= -4.7e-197) {
tmp = t_1;
} else if (a <= 2e-181) {
tmp = x;
} else if (a <= 1.02e-122) {
tmp = t_1;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * ((z - a) / t) tmp = 0 if a <= -8.8e-24: tmp = x + y elif a <= -4.7e-197: tmp = t_1 elif a <= 2e-181: tmp = x elif a <= 1.02e-122: tmp = t_1 else: tmp = x + y return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(Float64(z - a) / t)) tmp = 0.0 if (a <= -8.8e-24) tmp = Float64(x + y); elseif (a <= -4.7e-197) tmp = t_1; elseif (a <= 2e-181) tmp = x; elseif (a <= 1.02e-122) tmp = t_1; else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * ((z - a) / t); tmp = 0.0; if (a <= -8.8e-24) tmp = x + y; elseif (a <= -4.7e-197) tmp = t_1; elseif (a <= 2e-181) tmp = x; elseif (a <= 1.02e-122) tmp = t_1; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -8.8e-24], N[(x + y), $MachinePrecision], If[LessEqual[a, -4.7e-197], t$95$1, If[LessEqual[a, 2e-181], x, If[LessEqual[a, 1.02e-122], t$95$1, N[(x + y), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{z - a}{t}\\
\mathbf{if}\;a \leq -8.8 \cdot 10^{-24}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq -4.7 \cdot 10^{-197}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 2 \cdot 10^{-181}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 1.02 \cdot 10^{-122}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if a < -8.80000000000000006e-24 or 1.02000000000000002e-122 < a Initial program 83.1%
associate--l+N/A
+-lowering-+.f64N/A
associate-*l/N/A
cancel-sign-sub-invN/A
distribute-rgt1-inN/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-evalN/A
+-lowering-+.f64N/A
distribute-frac-neg2N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
--lowering--.f64N/A
metadata-eval94.1%
Simplified94.1%
Taylor expanded in a around inf
+-commutativeN/A
+-lowering-+.f6466.1%
Simplified66.1%
if -8.80000000000000006e-24 < a < -4.7000000000000001e-197 or 2.00000000000000009e-181 < a < 1.02000000000000002e-122Initial program 68.9%
associate--l+N/A
+-lowering-+.f64N/A
associate-*l/N/A
cancel-sign-sub-invN/A
distribute-rgt1-inN/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-evalN/A
+-lowering-+.f64N/A
distribute-frac-neg2N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
--lowering--.f64N/A
metadata-eval79.2%
Simplified79.2%
Taylor expanded in t around inf
+-lowering-+.f64N/A
associate-/l*N/A
mul-1-negN/A
sub-negN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6482.8%
Simplified82.8%
Taylor expanded in x around 0
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6461.4%
Simplified61.4%
if -4.7000000000000001e-197 < a < 2.00000000000000009e-181Initial program 77.7%
associate--l+N/A
+-lowering-+.f64N/A
associate-*l/N/A
cancel-sign-sub-invN/A
distribute-rgt1-inN/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-evalN/A
+-lowering-+.f64N/A
distribute-frac-neg2N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
--lowering--.f64N/A
metadata-eval89.4%
Simplified89.4%
Taylor expanded in x around inf
Simplified66.4%
Final simplification65.3%
(FPCore (x y z t a) :precision binary64 (if (<= a -1e+110) (+ x (* y (+ (/ t (- a t)) 1.0))) (if (<= a 2e+53) (+ x (* z (/ y (- t a)))) (- (+ x y) (* y (/ z a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1e+110) {
tmp = x + (y * ((t / (a - t)) + 1.0));
} else if (a <= 2e+53) {
tmp = x + (z * (y / (t - a)));
} else {
tmp = (x + y) - (y * (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 <= (-1d+110)) then
tmp = x + (y * ((t / (a - t)) + 1.0d0))
else if (a <= 2d+53) then
tmp = x + (z * (y / (t - a)))
else
tmp = (x + y) - (y * (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 <= -1e+110) {
tmp = x + (y * ((t / (a - t)) + 1.0));
} else if (a <= 2e+53) {
tmp = x + (z * (y / (t - a)));
} else {
tmp = (x + y) - (y * (z / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1e+110: tmp = x + (y * ((t / (a - t)) + 1.0)) elif a <= 2e+53: tmp = x + (z * (y / (t - a))) else: tmp = (x + y) - (y * (z / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1e+110) tmp = Float64(x + Float64(y * Float64(Float64(t / Float64(a - t)) + 1.0))); elseif (a <= 2e+53) tmp = Float64(x + Float64(z * Float64(y / Float64(t - a)))); else tmp = Float64(Float64(x + y) - Float64(y * Float64(z / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1e+110) tmp = x + (y * ((t / (a - t)) + 1.0)); elseif (a <= 2e+53) tmp = x + (z * (y / (t - a))); else tmp = (x + y) - (y * (z / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1e+110], N[(x + N[(y * N[(N[(t / N[(a - t), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2e+53], N[(x + N[(z * N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + y), $MachinePrecision] - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1 \cdot 10^{+110}:\\
\;\;\;\;x + y \cdot \left(\frac{t}{a - t} + 1\right)\\
\mathbf{elif}\;a \leq 2 \cdot 10^{+53}:\\
\;\;\;\;x + z \cdot \frac{y}{t - a}\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) - y \cdot \frac{z}{a}\\
\end{array}
\end{array}
if a < -1e110Initial program 79.0%
associate--l+N/A
+-lowering-+.f64N/A
associate-*l/N/A
cancel-sign-sub-invN/A
distribute-rgt1-inN/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-evalN/A
+-lowering-+.f64N/A
distribute-frac-neg2N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
--lowering--.f64N/A
metadata-eval94.4%
Simplified94.4%
Taylor expanded in z around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6486.9%
Simplified86.9%
if -1e110 < a < 2e53Initial program 80.0%
associate--l+N/A
+-lowering-+.f64N/A
associate-*l/N/A
cancel-sign-sub-invN/A
distribute-rgt1-inN/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-evalN/A
+-lowering-+.f64N/A
distribute-frac-neg2N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
--lowering--.f64N/A
metadata-eval89.3%
Simplified89.3%
Taylor expanded in z around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6491.3%
Simplified91.3%
Taylor expanded in z around inf
/-lowering-/.f64N/A
--lowering--.f6490.7%
Simplified90.7%
if 2e53 < a Initial program 78.2%
Taylor expanded in t around 0
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f6486.5%
Simplified86.5%
Final simplification89.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- (+ x y) (* y (/ z a)))))
(if (<= a -3.1e+106)
t_1
(if (<= a 1.6e+55) (+ x (* z (/ y (- t a)))) 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 <= -3.1e+106) {
tmp = t_1;
} else if (a <= 1.6e+55) {
tmp = x + (z * (y / (t - a)));
} 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 <= (-3.1d+106)) then
tmp = t_1
else if (a <= 1.6d+55) then
tmp = x + (z * (y / (t - a)))
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 <= -3.1e+106) {
tmp = t_1;
} else if (a <= 1.6e+55) {
tmp = x + (z * (y / (t - a)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (x + y) - (y * (z / a)) tmp = 0 if a <= -3.1e+106: tmp = t_1 elif a <= 1.6e+55: tmp = x + (z * (y / (t - a))) 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 <= -3.1e+106) tmp = t_1; elseif (a <= 1.6e+55) tmp = Float64(x + Float64(z * Float64(y / Float64(t - a)))); 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 <= -3.1e+106) tmp = t_1; elseif (a <= 1.6e+55) tmp = x + (z * (y / (t - a))); 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, -3.1e+106], t$95$1, If[LessEqual[a, 1.6e+55], N[(x + N[(z * N[(y / N[(t - a), $MachinePrecision]), $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 -3.1 \cdot 10^{+106}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.6 \cdot 10^{+55}:\\
\;\;\;\;x + z \cdot \frac{y}{t - a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -3.0999999999999999e106 or 1.6000000000000001e55 < a Initial program 78.6%
Taylor expanded in t around 0
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f6485.9%
Simplified85.9%
if -3.0999999999999999e106 < a < 1.6000000000000001e55Initial program 80.0%
associate--l+N/A
+-lowering-+.f64N/A
associate-*l/N/A
cancel-sign-sub-invN/A
distribute-rgt1-inN/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-evalN/A
+-lowering-+.f64N/A
distribute-frac-neg2N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
--lowering--.f64N/A
metadata-eval89.3%
Simplified89.3%
Taylor expanded in z around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6491.3%
Simplified91.3%
Taylor expanded in z around inf
/-lowering-/.f64N/A
--lowering--.f6490.7%
Simplified90.7%
(FPCore (x y z t a) :precision binary64 (if (<= a -4.9e+188) (+ x y) (if (<= a 2.8e+126) (+ x (* z (/ y (- t a)))) (+ x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -4.9e+188) {
tmp = x + y;
} else if (a <= 2.8e+126) {
tmp = x + (z * (y / (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 (a <= (-4.9d+188)) then
tmp = x + y
else if (a <= 2.8d+126) then
tmp = x + (z * (y / (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 (a <= -4.9e+188) {
tmp = x + y;
} else if (a <= 2.8e+126) {
tmp = x + (z * (y / (t - a)));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -4.9e+188: tmp = x + y elif a <= 2.8e+126: tmp = x + (z * (y / (t - a))) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -4.9e+188) tmp = Float64(x + y); elseif (a <= 2.8e+126) tmp = Float64(x + Float64(z * Float64(y / 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 (a <= -4.9e+188) tmp = x + y; elseif (a <= 2.8e+126) tmp = x + (z * (y / (t - a))); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -4.9e+188], N[(x + y), $MachinePrecision], If[LessEqual[a, 2.8e+126], N[(x + N[(z * N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.9 \cdot 10^{+188}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq 2.8 \cdot 10^{+126}:\\
\;\;\;\;x + z \cdot \frac{y}{t - a}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if a < -4.9e188 or 2.80000000000000009e126 < a Initial program 79.0%
associate--l+N/A
+-lowering-+.f64N/A
associate-*l/N/A
cancel-sign-sub-invN/A
distribute-rgt1-inN/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-evalN/A
+-lowering-+.f64N/A
distribute-frac-neg2N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
--lowering--.f64N/A
metadata-eval94.2%
Simplified94.2%
Taylor expanded in a around inf
+-commutativeN/A
+-lowering-+.f6487.8%
Simplified87.8%
if -4.9e188 < a < 2.80000000000000009e126Initial program 79.6%
associate--l+N/A
+-lowering-+.f64N/A
associate-*l/N/A
cancel-sign-sub-invN/A
distribute-rgt1-inN/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-evalN/A
+-lowering-+.f64N/A
distribute-frac-neg2N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
--lowering--.f64N/A
metadata-eval89.6%
Simplified89.6%
Taylor expanded in z around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6490.4%
Simplified90.4%
Taylor expanded in z around inf
/-lowering-/.f64N/A
--lowering--.f6487.1%
Simplified87.1%
Final simplification87.2%
(FPCore (x y z t a) :precision binary64 (if (<= a -5.5e+25) (+ x y) (if (<= a 3.8e+52) (+ x (* y (/ (- z a) t))) (+ x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -5.5e+25) {
tmp = x + y;
} else if (a <= 3.8e+52) {
tmp = x + (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 <= (-5.5d+25)) then
tmp = x + y
else if (a <= 3.8d+52) then
tmp = x + (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 <= -5.5e+25) {
tmp = x + y;
} else if (a <= 3.8e+52) {
tmp = x + (y * ((z - a) / t));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -5.5e+25: tmp = x + y elif a <= 3.8e+52: tmp = x + (y * ((z - a) / t)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -5.5e+25) tmp = Float64(x + y); elseif (a <= 3.8e+52) tmp = Float64(x + 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 <= -5.5e+25) tmp = x + y; elseif (a <= 3.8e+52) tmp = x + (y * ((z - a) / t)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -5.5e+25], N[(x + y), $MachinePrecision], If[LessEqual[a, 3.8e+52], N[(x + N[(y * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.5 \cdot 10^{+25}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq 3.8 \cdot 10^{+52}:\\
\;\;\;\;x + y \cdot \frac{z - a}{t}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if a < -5.50000000000000018e25 or 3.8e52 < a Initial program 80.6%
associate--l+N/A
+-lowering-+.f64N/A
associate-*l/N/A
cancel-sign-sub-invN/A
distribute-rgt1-inN/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-evalN/A
+-lowering-+.f64N/A
distribute-frac-neg2N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
--lowering--.f64N/A
metadata-eval94.0%
Simplified94.0%
Taylor expanded in a around inf
+-commutativeN/A
+-lowering-+.f6476.4%
Simplified76.4%
if -5.50000000000000018e25 < a < 3.8e52Initial program 78.8%
associate--l+N/A
+-lowering-+.f64N/A
associate-*l/N/A
cancel-sign-sub-invN/A
distribute-rgt1-inN/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-evalN/A
+-lowering-+.f64N/A
distribute-frac-neg2N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
--lowering--.f64N/A
metadata-eval88.4%
Simplified88.4%
Taylor expanded in t around inf
+-lowering-+.f64N/A
associate-/l*N/A
mul-1-negN/A
sub-negN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6483.1%
Simplified83.1%
Final simplification80.5%
(FPCore (x y z t a) :precision binary64 (if (<= a -520000.0) (+ x y) (if (<= a 2e+53) (+ x (* y (/ z t))) (+ x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -520000.0) {
tmp = x + y;
} else if (a <= 2e+53) {
tmp = x + (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 (a <= (-520000.0d0)) then
tmp = x + y
else if (a <= 2d+53) then
tmp = x + (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 (a <= -520000.0) {
tmp = x + y;
} else if (a <= 2e+53) {
tmp = x + (y * (z / t));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -520000.0: tmp = x + y elif a <= 2e+53: tmp = x + (y * (z / t)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -520000.0) tmp = Float64(x + y); elseif (a <= 2e+53) tmp = Float64(x + 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 (a <= -520000.0) tmp = x + y; elseif (a <= 2e+53) tmp = x + (y * (z / t)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -520000.0], N[(x + y), $MachinePrecision], If[LessEqual[a, 2e+53], N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -520000:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq 2 \cdot 10^{+53}:\\
\;\;\;\;x + y \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if a < -5.2e5 or 2e53 < a Initial program 80.0%
associate--l+N/A
+-lowering-+.f64N/A
associate-*l/N/A
cancel-sign-sub-invN/A
distribute-rgt1-inN/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-evalN/A
+-lowering-+.f64N/A
distribute-frac-neg2N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
--lowering--.f64N/A
metadata-eval93.3%
Simplified93.3%
Taylor expanded in a around inf
+-commutativeN/A
+-lowering-+.f6474.4%
Simplified74.4%
if -5.2e5 < a < 2e53Initial program 79.2%
associate--l+N/A
+-lowering-+.f64N/A
associate-*l/N/A
cancel-sign-sub-invN/A
distribute-rgt1-inN/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-evalN/A
+-lowering-+.f64N/A
distribute-frac-neg2N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
--lowering--.f64N/A
metadata-eval88.7%
Simplified88.7%
Taylor expanded in a around 0
/-lowering-/.f6480.3%
Simplified80.3%
Final simplification77.9%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.7e+100) (+ x y) (if (<= a 9.6e+49) x (+ x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.7e+100) {
tmp = x + y;
} else if (a <= 9.6e+49) {
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 (a <= (-1.7d+100)) then
tmp = x + y
else if (a <= 9.6d+49) 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 (a <= -1.7e+100) {
tmp = x + y;
} else if (a <= 9.6e+49) {
tmp = x;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.7e+100: tmp = x + y elif a <= 9.6e+49: tmp = x else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.7e+100) tmp = Float64(x + y); elseif (a <= 9.6e+49) tmp = x; else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.7e+100) tmp = x + y; elseif (a <= 9.6e+49) tmp = x; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.7e+100], N[(x + y), $MachinePrecision], If[LessEqual[a, 9.6e+49], x, N[(x + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.7 \cdot 10^{+100}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq 9.6 \cdot 10^{+49}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if a < -1.69999999999999997e100 or 9.5999999999999999e49 < a Initial program 78.6%
associate--l+N/A
+-lowering-+.f64N/A
associate-*l/N/A
cancel-sign-sub-invN/A
distribute-rgt1-inN/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-evalN/A
+-lowering-+.f64N/A
distribute-frac-neg2N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
--lowering--.f64N/A
metadata-eval93.0%
Simplified93.0%
Taylor expanded in a around inf
+-commutativeN/A
+-lowering-+.f6476.5%
Simplified76.5%
if -1.69999999999999997e100 < a < 9.5999999999999999e49Initial program 80.0%
associate--l+N/A
+-lowering-+.f64N/A
associate-*l/N/A
cancel-sign-sub-invN/A
distribute-rgt1-inN/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-evalN/A
+-lowering-+.f64N/A
distribute-frac-neg2N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
--lowering--.f64N/A
metadata-eval89.3%
Simplified89.3%
Taylor expanded in x around inf
Simplified51.3%
Final simplification59.8%
(FPCore (x y z t a) :precision binary64 (if (<= z 5.8e+245) (+ x y) (/ (* y z) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= 5.8e+245) {
tmp = x + y;
} else {
tmp = (y * z) / t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= 5.8d+245) then
tmp = x + y
else
tmp = (y * z) / t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= 5.8e+245) {
tmp = x + y;
} else {
tmp = (y * z) / t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= 5.8e+245: tmp = x + y else: tmp = (y * z) / t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= 5.8e+245) tmp = Float64(x + y); 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 <= 5.8e+245) tmp = x + y; else tmp = (y * z) / t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, 5.8e+245], N[(x + y), $MachinePrecision], N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq 5.8 \cdot 10^{+245}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot z}{t}\\
\end{array}
\end{array}
if z < 5.8000000000000003e245Initial program 80.2%
associate--l+N/A
+-lowering-+.f64N/A
associate-*l/N/A
cancel-sign-sub-invN/A
distribute-rgt1-inN/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-evalN/A
+-lowering-+.f64N/A
distribute-frac-neg2N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
--lowering--.f64N/A
metadata-eval90.1%
Simplified90.1%
Taylor expanded in a around inf
+-commutativeN/A
+-lowering-+.f6458.6%
Simplified58.6%
if 5.8000000000000003e245 < z Initial program 68.4%
associate--l+N/A
+-lowering-+.f64N/A
associate-*l/N/A
cancel-sign-sub-invN/A
distribute-rgt1-inN/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-evalN/A
+-lowering-+.f64N/A
distribute-frac-neg2N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
--lowering--.f64N/A
metadata-eval98.1%
Simplified98.1%
Taylor expanded in t around inf
+-lowering-+.f64N/A
associate-/l*N/A
mul-1-negN/A
sub-negN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6480.4%
Simplified80.4%
Taylor expanded in z around inf
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6455.5%
Simplified55.5%
Final simplification58.5%
(FPCore (x y z t a) :precision binary64 (if (<= a 1.55e+150) x y))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= 1.55e+150) {
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 (a <= 1.55d+150) 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 (a <= 1.55e+150) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= 1.55e+150: tmp = x else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= 1.55e+150) tmp = x; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= 1.55e+150) tmp = x; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, 1.55e+150], x, y]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 1.55 \cdot 10^{+150}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if a < 1.55000000000000007e150Initial program 79.5%
associate--l+N/A
+-lowering-+.f64N/A
associate-*l/N/A
cancel-sign-sub-invN/A
distribute-rgt1-inN/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-evalN/A
+-lowering-+.f64N/A
distribute-frac-neg2N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
--lowering--.f64N/A
metadata-eval90.4%
Simplified90.4%
Taylor expanded in x around inf
Simplified50.1%
if 1.55000000000000007e150 < a Initial program 79.8%
associate--l+N/A
+-lowering-+.f64N/A
associate-*l/N/A
cancel-sign-sub-invN/A
distribute-rgt1-inN/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-evalN/A
+-lowering-+.f64N/A
distribute-frac-neg2N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
--lowering--.f64N/A
metadata-eval91.8%
Simplified91.8%
Taylor expanded in a around inf
+-commutativeN/A
+-lowering-+.f6485.9%
Simplified85.9%
Taylor expanded in y around inf
Simplified67.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.5%
associate--l+N/A
+-lowering-+.f64N/A
associate-*l/N/A
cancel-sign-sub-invN/A
distribute-rgt1-inN/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-evalN/A
+-lowering-+.f64N/A
distribute-frac-neg2N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
--lowering--.f64N/A
metadata-eval90.5%
Simplified90.5%
Taylor expanded in x around inf
Simplified46.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- (+ y x) (* (* (- z t) (/ 1.0 (- a t))) y)))
(t_2 (- (+ x y) (/ (* (- z t) y) (- a t)))))
(if (< t_2 -1.3664970889390727e-7)
t_1
(if (< t_2 1.4754293444577233e-239)
(/ (- (* y (- a z)) (* x t)) (- a t))
t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y + x) - (((z - t) * (1.0 / (a - t))) * y);
double t_2 = (x + y) - (((z - t) * y) / (a - t));
double tmp;
if (t_2 < -1.3664970889390727e-7) {
tmp = t_1;
} else if (t_2 < 1.4754293444577233e-239) {
tmp = ((y * (a - z)) - (x * t)) / (a - t);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (y + x) - (((z - t) * (1.0d0 / (a - t))) * y)
t_2 = (x + y) - (((z - t) * y) / (a - t))
if (t_2 < (-1.3664970889390727d-7)) then
tmp = t_1
else if (t_2 < 1.4754293444577233d-239) then
tmp = ((y * (a - z)) - (x * t)) / (a - t)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (y + x) - (((z - t) * (1.0 / (a - t))) * y);
double t_2 = (x + y) - (((z - t) * y) / (a - t));
double tmp;
if (t_2 < -1.3664970889390727e-7) {
tmp = t_1;
} else if (t_2 < 1.4754293444577233e-239) {
tmp = ((y * (a - z)) - (x * t)) / (a - t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y + x) - (((z - t) * (1.0 / (a - t))) * y) t_2 = (x + y) - (((z - t) * y) / (a - t)) tmp = 0 if t_2 < -1.3664970889390727e-7: tmp = t_1 elif t_2 < 1.4754293444577233e-239: tmp = ((y * (a - z)) - (x * t)) / (a - t) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y + x) - Float64(Float64(Float64(z - t) * Float64(1.0 / Float64(a - t))) * y)) t_2 = Float64(Float64(x + y) - Float64(Float64(Float64(z - t) * y) / Float64(a - t))) tmp = 0.0 if (t_2 < -1.3664970889390727e-7) tmp = t_1; elseif (t_2 < 1.4754293444577233e-239) tmp = Float64(Float64(Float64(y * Float64(a - z)) - Float64(x * t)) / Float64(a - t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y + x) - (((z - t) * (1.0 / (a - t))) * y); t_2 = (x + y) - (((z - t) * y) / (a - t)); tmp = 0.0; if (t_2 < -1.3664970889390727e-7) tmp = t_1; elseif (t_2 < 1.4754293444577233e-239) tmp = ((y * (a - z)) - (x * t)) / (a - t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y + x), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * N[(1.0 / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + y), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t$95$2, -1.3664970889390727e-7], t$95$1, If[Less[t$95$2, 1.4754293444577233e-239], N[(N[(N[(y * N[(a - z), $MachinePrecision]), $MachinePrecision] - N[(x * t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y + x\right) - \left(\left(z - t\right) \cdot \frac{1}{a - t}\right) \cdot y\\
t_2 := \left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}\\
\mathbf{if}\;t\_2 < -1.3664970889390727 \cdot 10^{-7}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 < 1.4754293444577233 \cdot 10^{-239}:\\
\;\;\;\;\frac{y \cdot \left(a - z\right) - x \cdot t}{a - t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024160
(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))))