
(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 10 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.35e+170)
(+ x (* y (+ (/ z t) (* a (+ (/ z (* t t)) (/ -1.0 t))))))
(if (<= t 7.6e+76)
(+ (+ x y) (* (/ y (- a t)) (- t z)))
(+ x (* (- z a) (/ y t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.35e+170) {
tmp = x + (y * ((z / t) + (a * ((z / (t * t)) + (-1.0 / t)))));
} else if (t <= 7.6e+76) {
tmp = (x + y) + ((y / (a - t)) * (t - z));
} else {
tmp = x + ((z - a) * (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 (t <= (-2.35d+170)) then
tmp = x + (y * ((z / t) + (a * ((z / (t * t)) + ((-1.0d0) / t)))))
else if (t <= 7.6d+76) then
tmp = (x + y) + ((y / (a - t)) * (t - z))
else
tmp = x + ((z - a) * (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 (t <= -2.35e+170) {
tmp = x + (y * ((z / t) + (a * ((z / (t * t)) + (-1.0 / t)))));
} else if (t <= 7.6e+76) {
tmp = (x + y) + ((y / (a - t)) * (t - z));
} else {
tmp = x + ((z - a) * (y / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -2.35e+170: tmp = x + (y * ((z / t) + (a * ((z / (t * t)) + (-1.0 / t))))) elif t <= 7.6e+76: tmp = (x + y) + ((y / (a - t)) * (t - z)) else: tmp = x + ((z - a) * (y / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -2.35e+170) tmp = Float64(x + Float64(y * Float64(Float64(z / t) + Float64(a * Float64(Float64(z / Float64(t * t)) + Float64(-1.0 / t)))))); elseif (t <= 7.6e+76) tmp = Float64(Float64(x + y) + Float64(Float64(y / Float64(a - t)) * Float64(t - z))); else tmp = Float64(x + Float64(Float64(z - a) * Float64(y / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -2.35e+170) tmp = x + (y * ((z / t) + (a * ((z / (t * t)) + (-1.0 / t))))); elseif (t <= 7.6e+76) tmp = (x + y) + ((y / (a - t)) * (t - z)); else tmp = x + ((z - a) * (y / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2.35e+170], N[(x + N[(y * N[(N[(z / t), $MachinePrecision] + N[(a * N[(N[(z / N[(t * t), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.6e+76], N[(N[(x + y), $MachinePrecision] + N[(N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z - a), $MachinePrecision] * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.35 \cdot 10^{+170}:\\
\;\;\;\;x + y \cdot \left(\frac{z}{t} + a \cdot \left(\frac{z}{t \cdot t} + \frac{-1}{t}\right)\right)\\
\mathbf{elif}\;t \leq 7.6 \cdot 10^{+76}:\\
\;\;\;\;\left(x + y\right) + \frac{y}{a - t} \cdot \left(t - z\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(z - a\right) \cdot \frac{y}{t}\\
\end{array}
\end{array}
if t < -2.35000000000000002e170Initial program 48.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-eval72.9%
Simplified72.9%
Taylor expanded in a around 0
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6496.5%
Simplified96.5%
if -2.35000000000000002e170 < t < 7.60000000000000049e76Initial program 91.4%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6496.3%
Applied egg-rr96.3%
if 7.60000000000000049e76 < t Initial program 56.3%
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-eval78.8%
Simplified78.8%
Taylor expanded in t around inf
/-lowering-/.f64N/A
Simplified72.0%
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
/-lowering-/.f6477.1%
Applied egg-rr77.1%
Taylor expanded in t around inf
--lowering--.f6496.2%
Simplified96.2%
Final simplification96.3%
(FPCore (x y z t a)
:precision binary64
(if (<= t -1.2e+153)
(+ x (* y (/ (- z a) t)))
(if (<= t 3e+83)
(+ (+ x y) (* (/ y (- a t)) (- t z)))
(+ x (* (- z a) (/ y t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.2e+153) {
tmp = x + (y * ((z - a) / t));
} else if (t <= 3e+83) {
tmp = (x + y) + ((y / (a - t)) * (t - z));
} else {
tmp = x + ((z - a) * (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 (t <= (-1.2d+153)) then
tmp = x + (y * ((z - a) / t))
else if (t <= 3d+83) then
tmp = (x + y) + ((y / (a - t)) * (t - z))
else
tmp = x + ((z - a) * (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 (t <= -1.2e+153) {
tmp = x + (y * ((z - a) / t));
} else if (t <= 3e+83) {
tmp = (x + y) + ((y / (a - t)) * (t - z));
} else {
tmp = x + ((z - a) * (y / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.2e+153: tmp = x + (y * ((z - a) / t)) elif t <= 3e+83: tmp = (x + y) + ((y / (a - t)) * (t - z)) else: tmp = x + ((z - a) * (y / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.2e+153) tmp = Float64(x + Float64(y * Float64(Float64(z - a) / t))); elseif (t <= 3e+83) tmp = Float64(Float64(x + y) + Float64(Float64(y / Float64(a - t)) * Float64(t - z))); else tmp = Float64(x + Float64(Float64(z - a) * Float64(y / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -1.2e+153) tmp = x + (y * ((z - a) / t)); elseif (t <= 3e+83) tmp = (x + y) + ((y / (a - t)) * (t - z)); else tmp = x + ((z - a) * (y / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.2e+153], N[(x + N[(y * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3e+83], N[(N[(x + y), $MachinePrecision] + N[(N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z - a), $MachinePrecision] * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.2 \cdot 10^{+153}:\\
\;\;\;\;x + y \cdot \frac{z - a}{t}\\
\mathbf{elif}\;t \leq 3 \cdot 10^{+83}:\\
\;\;\;\;\left(x + y\right) + \frac{y}{a - t} \cdot \left(t - z\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(z - a\right) \cdot \frac{y}{t}\\
\end{array}
\end{array}
if t < -1.19999999999999996e153Initial program 48.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-eval72.9%
Simplified72.9%
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--.f6496.4%
Simplified96.4%
if -1.19999999999999996e153 < t < 3e83Initial program 91.4%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6496.3%
Applied egg-rr96.3%
if 3e83 < t Initial program 56.3%
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-eval78.8%
Simplified78.8%
Taylor expanded in t around inf
/-lowering-/.f64N/A
Simplified72.0%
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
/-lowering-/.f6477.1%
Applied egg-rr77.1%
Taylor expanded in t around inf
--lowering--.f6496.2%
Simplified96.2%
Final simplification96.3%
(FPCore (x y z t a)
:precision binary64
(if (<= t -2e+170)
(+ x (* y (/ (- z a) t)))
(if (<= t 5.7e+116)
(+ x (* y (+ (/ (- z t) (- t a)) 1.0)))
(+ x (* (- z a) (/ y t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2e+170) {
tmp = x + (y * ((z - a) / t));
} else if (t <= 5.7e+116) {
tmp = x + (y * (((z - t) / (t - a)) + 1.0));
} else {
tmp = x + ((z - a) * (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 (t <= (-2d+170)) then
tmp = x + (y * ((z - a) / t))
else if (t <= 5.7d+116) then
tmp = x + (y * (((z - t) / (t - a)) + 1.0d0))
else
tmp = x + ((z - a) * (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 (t <= -2e+170) {
tmp = x + (y * ((z - a) / t));
} else if (t <= 5.7e+116) {
tmp = x + (y * (((z - t) / (t - a)) + 1.0));
} else {
tmp = x + ((z - a) * (y / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -2e+170: tmp = x + (y * ((z - a) / t)) elif t <= 5.7e+116: tmp = x + (y * (((z - t) / (t - a)) + 1.0)) else: tmp = x + ((z - a) * (y / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -2e+170) tmp = Float64(x + Float64(y * Float64(Float64(z - a) / t))); elseif (t <= 5.7e+116) tmp = Float64(x + Float64(y * Float64(Float64(Float64(z - t) / Float64(t - a)) + 1.0))); else tmp = Float64(x + Float64(Float64(z - a) * Float64(y / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -2e+170) tmp = x + (y * ((z - a) / t)); elseif (t <= 5.7e+116) tmp = x + (y * (((z - t) / (t - a)) + 1.0)); else tmp = x + ((z - a) * (y / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2e+170], N[(x + N[(y * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.7e+116], N[(x + N[(y * N[(N[(N[(z - t), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z - a), $MachinePrecision] * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2 \cdot 10^{+170}:\\
\;\;\;\;x + y \cdot \frac{z - a}{t}\\
\mathbf{elif}\;t \leq 5.7 \cdot 10^{+116}:\\
\;\;\;\;x + y \cdot \left(\frac{z - t}{t - a} + 1\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(z - a\right) \cdot \frac{y}{t}\\
\end{array}
\end{array}
if t < -2.00000000000000007e170Initial program 48.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-eval72.9%
Simplified72.9%
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--.f6496.4%
Simplified96.4%
if -2.00000000000000007e170 < t < 5.69999999999999983e116Initial program 90.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-eval95.6%
Simplified95.6%
if 5.69999999999999983e116 < t Initial program 54.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-eval77.3%
Simplified77.3%
Taylor expanded in t around inf
/-lowering-/.f64N/A
Simplified69.8%
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
/-lowering-/.f6475.7%
Applied egg-rr75.7%
Taylor expanded in t around inf
--lowering--.f6497.8%
Simplified97.8%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (- (+ x y) (* y (/ z a))))) (if (<= a -6e-47) t_1 (if (<= a 2.7e-42) (+ 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 <= -6e-47) {
tmp = t_1;
} else if (a <= 2.7e-42) {
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 <= (-6d-47)) then
tmp = t_1
else if (a <= 2.7d-42) 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 <= -6e-47) {
tmp = t_1;
} else if (a <= 2.7e-42) {
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 <= -6e-47: tmp = t_1 elif a <= 2.7e-42: 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 <= -6e-47) tmp = t_1; elseif (a <= 2.7e-42) 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 <= -6e-47) tmp = t_1; elseif (a <= 2.7e-42) 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, -6e-47], t$95$1, If[LessEqual[a, 2.7e-42], 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 -6 \cdot 10^{-47}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 2.7 \cdot 10^{-42}:\\
\;\;\;\;x + z \cdot \frac{y}{t - a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -6.00000000000000033e-47 or 2.69999999999999999e-42 < a Initial program 81.7%
Taylor expanded in t around 0
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f6487.9%
Simplified87.9%
if -6.00000000000000033e-47 < a < 2.69999999999999999e-42Initial program 75.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-eval86.2%
Simplified86.2%
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--.f6497.1%
Simplified97.1%
Taylor expanded in z around inf
/-lowering-/.f64N/A
--lowering--.f6498.1%
Simplified98.1%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.1e+102) (+ x y) (if (<= a 1.6e-42) (+ x (* z (/ y (- t a)))) (+ x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.1e+102) {
tmp = x + y;
} else if (a <= 1.6e-42) {
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 <= (-1.1d+102)) then
tmp = x + y
else if (a <= 1.6d-42) 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 <= -1.1e+102) {
tmp = x + y;
} else if (a <= 1.6e-42) {
tmp = x + (z * (y / (t - a)));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.1e+102: tmp = x + y elif a <= 1.6e-42: tmp = x + (z * (y / (t - a))) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.1e+102) tmp = Float64(x + y); elseif (a <= 1.6e-42) 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 <= -1.1e+102) tmp = x + y; elseif (a <= 1.6e-42) tmp = x + (z * (y / (t - a))); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.1e+102], N[(x + y), $MachinePrecision], If[LessEqual[a, 1.6e-42], 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 -1.1 \cdot 10^{+102}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq 1.6 \cdot 10^{-42}:\\
\;\;\;\;x + z \cdot \frac{y}{t - a}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if a < -1.10000000000000004e102 or 1.60000000000000012e-42 < a Initial program 82.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-eval92.5%
Simplified92.5%
Taylor expanded in a around inf
+-commutativeN/A
+-lowering-+.f6484.1%
Simplified84.1%
if -1.10000000000000004e102 < a < 1.60000000000000012e-42Initial program 76.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-eval86.9%
Simplified86.9%
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--.f6495.2%
Simplified95.2%
Taylor expanded in z around inf
/-lowering-/.f64N/A
--lowering--.f6493.9%
Simplified93.9%
Final simplification89.0%
(FPCore (x y z t a) :precision binary64 (if (<= a -3.4e-48) (+ x y) (if (<= a 2.5e-42) (+ x (* z (/ y t))) (+ x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.4e-48) {
tmp = x + y;
} else if (a <= 2.5e-42) {
tmp = x + (z * (y / 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 <= (-3.4d-48)) then
tmp = x + y
else if (a <= 2.5d-42) then
tmp = x + (z * (y / 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 <= -3.4e-48) {
tmp = x + y;
} else if (a <= 2.5e-42) {
tmp = x + (z * (y / t));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -3.4e-48: tmp = x + y elif a <= 2.5e-42: tmp = x + (z * (y / t)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -3.4e-48) tmp = Float64(x + y); elseif (a <= 2.5e-42) tmp = Float64(x + Float64(z * Float64(y / t))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -3.4e-48) tmp = x + y; elseif (a <= 2.5e-42) tmp = x + (z * (y / t)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3.4e-48], N[(x + y), $MachinePrecision], If[LessEqual[a, 2.5e-42], N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.4 \cdot 10^{-48}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq 2.5 \cdot 10^{-42}:\\
\;\;\;\;x + z \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if a < -3.40000000000000028e-48 or 2.50000000000000001e-42 < a Initial program 81.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-eval92.1%
Simplified92.1%
Taylor expanded in a around inf
+-commutativeN/A
+-lowering-+.f6480.6%
Simplified80.6%
if -3.40000000000000028e-48 < a < 2.50000000000000001e-42Initial program 75.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-eval86.2%
Simplified86.2%
Taylor expanded in a around 0
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6483.4%
Simplified83.4%
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f6486.2%
Applied egg-rr86.2%
Final simplification82.8%
(FPCore (x y z t a) :precision binary64 (if (<= a -2.5e-47) (+ x y) (if (<= a 2.1e-42) (+ x (* y (/ z t))) (+ x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.5e-47) {
tmp = x + y;
} else if (a <= 2.1e-42) {
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 <= (-2.5d-47)) then
tmp = x + y
else if (a <= 2.1d-42) 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 <= -2.5e-47) {
tmp = x + y;
} else if (a <= 2.1e-42) {
tmp = x + (y * (z / t));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -2.5e-47: tmp = x + y elif a <= 2.1e-42: tmp = x + (y * (z / t)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2.5e-47) tmp = Float64(x + y); elseif (a <= 2.1e-42) 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 <= -2.5e-47) tmp = x + y; elseif (a <= 2.1e-42) tmp = x + (y * (z / t)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.5e-47], N[(x + y), $MachinePrecision], If[LessEqual[a, 2.1e-42], N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.5 \cdot 10^{-47}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq 2.1 \cdot 10^{-42}:\\
\;\;\;\;x + y \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if a < -2.50000000000000006e-47 or 2.10000000000000006e-42 < a Initial program 81.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-eval92.1%
Simplified92.1%
Taylor expanded in a around inf
+-commutativeN/A
+-lowering-+.f6480.6%
Simplified80.6%
if -2.50000000000000006e-47 < a < 2.10000000000000006e-42Initial program 75.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-eval86.2%
Simplified86.2%
Taylor expanded in a around 0
/-lowering-/.f6481.5%
Simplified81.5%
Final simplification81.0%
(FPCore (x y z t a) :precision binary64 (if (<= t -9.5e+211) x (if (<= t 2.5e+86) (+ x y) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -9.5e+211) {
tmp = x;
} else if (t <= 2.5e+86) {
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 <= (-9.5d+211)) then
tmp = x
else if (t <= 2.5d+86) 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 <= -9.5e+211) {
tmp = x;
} else if (t <= 2.5e+86) {
tmp = x + y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -9.5e+211: tmp = x elif t <= 2.5e+86: tmp = x + y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -9.5e+211) tmp = x; elseif (t <= 2.5e+86) 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 <= -9.5e+211) tmp = x; elseif (t <= 2.5e+86) tmp = x + y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -9.5e+211], x, If[LessEqual[t, 2.5e+86], N[(x + y), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -9.5 \cdot 10^{+211}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 2.5 \cdot 10^{+86}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < -9.4999999999999997e211 or 2.4999999999999999e86 < t Initial program 52.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-eval77.1%
Simplified77.1%
Taylor expanded in x around inf
Simplified71.4%
if -9.4999999999999997e211 < t < 2.4999999999999999e86Initial program 90.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%
Taylor expanded in a around inf
+-commutativeN/A
+-lowering-+.f6476.1%
Simplified76.1%
Final simplification74.7%
(FPCore (x y z t a) :precision binary64 (if (<= y -9.2e+143) y (if (<= y 2.25e+187) x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -9.2e+143) {
tmp = y;
} else if (y <= 2.25e+187) {
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 <= (-9.2d+143)) then
tmp = y
else if (y <= 2.25d+187) 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 <= -9.2e+143) {
tmp = y;
} else if (y <= 2.25e+187) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -9.2e+143: tmp = y elif y <= 2.25e+187: tmp = x else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -9.2e+143) tmp = y; elseif (y <= 2.25e+187) tmp = x; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -9.2e+143) tmp = y; elseif (y <= 2.25e+187) tmp = x; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -9.2e+143], y, If[LessEqual[y, 2.25e+187], x, y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.2 \cdot 10^{+143}:\\
\;\;\;\;y\\
\mathbf{elif}\;y \leq 2.25 \cdot 10^{+187}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if y < -9.1999999999999999e143 or 2.25000000000000013e187 < y Initial program 56.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-eval82.4%
Simplified82.4%
Taylor expanded in a around inf
+-commutativeN/A
+-lowering-+.f6440.4%
Simplified40.4%
Taylor expanded in y around inf
Simplified39.5%
if -9.1999999999999999e143 < y < 2.25000000000000013e187Initial program 86.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-eval92.0%
Simplified92.0%
Taylor expanded in x around inf
Simplified70.7%
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
return x;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x
end function
public static double code(double x, double y, double z, double t, double a) {
return x;
}
def code(x, y, z, t, a): return x
function code(x, y, z, t, a) return x end
function tmp = code(x, y, z, t, a) tmp = x; end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 79.3%
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.7%
Simplified89.7%
Taylor expanded in x around inf
Simplified56.0%
(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 2024161
(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))))