
(FPCore (x y z t a) :precision binary64 (+ x (* y (/ (- z t) (- a t)))))
double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / (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) / (a - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / (a - t)));
}
def code(x, y, z, t, a): return x + (y * ((z - t) / (a - t)))
function code(x, y, z, t, a) return Float64(x + Float64(y * Float64(Float64(z - t) / Float64(a - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y * ((z - t) / (a - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \frac{z - t}{a - t}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (* y (/ (- z t) (- a t)))))
double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / (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) / (a - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / (a - t)));
}
def code(x, y, z, t, a): return x + (y * ((z - t) / (a - t)))
function code(x, y, z, t, a) return Float64(x + Float64(y * Float64(Float64(z - t) / Float64(a - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y * ((z - t) / (a - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \frac{z - t}{a - t}
\end{array}
(FPCore (x y z t a) :precision binary64 (if (<= z 2e+86) (+ x (/ y (/ (- a t) (- z t)))) (+ x (* (- z t) (/ y (- a t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= 2e+86) {
tmp = x + (y / ((a - t) / (z - t)));
} else {
tmp = x + ((z - t) * (y / (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 (z <= 2d+86) then
tmp = x + (y / ((a - t) / (z - t)))
else
tmp = x + ((z - t) * (y / (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 (z <= 2e+86) {
tmp = x + (y / ((a - t) / (z - t)));
} else {
tmp = x + ((z - t) * (y / (a - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= 2e+86: tmp = x + (y / ((a - t) / (z - t))) else: tmp = x + ((z - t) * (y / (a - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= 2e+86) tmp = Float64(x + Float64(y / Float64(Float64(a - t) / Float64(z - t)))); else tmp = Float64(x + Float64(Float64(z - t) * Float64(y / Float64(a - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= 2e+86) tmp = x + (y / ((a - t) / (z - t))); else tmp = x + ((z - t) * (y / (a - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, 2e+86], N[(x + N[(y / N[(N[(a - t), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z - t), $MachinePrecision] * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq 2 \cdot 10^{+86}:\\
\;\;\;\;x + \frac{y}{\frac{a - t}{z - t}}\\
\mathbf{else}:\\
\;\;\;\;x + \left(z - t\right) \cdot \frac{y}{a - t}\\
\end{array}
\end{array}
if z < 2e86Initial program 98.6%
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6498.9%
Applied egg-rr98.9%
if 2e86 < z Initial program 84.9%
clear-numN/A
associate-/r/N/A
associate-*r*N/A
div-invN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6499.8%
Applied egg-rr99.8%
Final simplification99.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* z (/ y (- a t)))))
(if (<= z -1.9e+235)
t_1
(if (<= z -5.5e+129)
(+ y x)
(if (<= z -4.2e+92) t_1 (if (<= z 1.55e+148) (+ y x) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = z * (y / (a - t));
double tmp;
if (z <= -1.9e+235) {
tmp = t_1;
} else if (z <= -5.5e+129) {
tmp = y + x;
} else if (z <= -4.2e+92) {
tmp = t_1;
} else if (z <= 1.55e+148) {
tmp = y + x;
} 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 = z * (y / (a - t))
if (z <= (-1.9d+235)) then
tmp = t_1
else if (z <= (-5.5d+129)) then
tmp = y + x
else if (z <= (-4.2d+92)) then
tmp = t_1
else if (z <= 1.55d+148) then
tmp = y + x
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 = z * (y / (a - t));
double tmp;
if (z <= -1.9e+235) {
tmp = t_1;
} else if (z <= -5.5e+129) {
tmp = y + x;
} else if (z <= -4.2e+92) {
tmp = t_1;
} else if (z <= 1.55e+148) {
tmp = y + x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = z * (y / (a - t)) tmp = 0 if z <= -1.9e+235: tmp = t_1 elif z <= -5.5e+129: tmp = y + x elif z <= -4.2e+92: tmp = t_1 elif z <= 1.55e+148: tmp = y + x else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(z * Float64(y / Float64(a - t))) tmp = 0.0 if (z <= -1.9e+235) tmp = t_1; elseif (z <= -5.5e+129) tmp = Float64(y + x); elseif (z <= -4.2e+92) tmp = t_1; elseif (z <= 1.55e+148) tmp = Float64(y + x); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = z * (y / (a - t)); tmp = 0.0; if (z <= -1.9e+235) tmp = t_1; elseif (z <= -5.5e+129) tmp = y + x; elseif (z <= -4.2e+92) tmp = t_1; elseif (z <= 1.55e+148) tmp = y + x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.9e+235], t$95$1, If[LessEqual[z, -5.5e+129], N[(y + x), $MachinePrecision], If[LessEqual[z, -4.2e+92], t$95$1, If[LessEqual[z, 1.55e+148], N[(y + x), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \frac{y}{a - t}\\
\mathbf{if}\;z \leq -1.9 \cdot 10^{+235}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -5.5 \cdot 10^{+129}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;z \leq -4.2 \cdot 10^{+92}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.55 \cdot 10^{+148}:\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.89999999999999988e235 or -5.49999999999999984e129 < z < -4.19999999999999972e92 or 1.54999999999999988e148 < z Initial program 86.7%
clear-numN/A
associate-/r/N/A
associate-*r*N/A
div-invN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6498.1%
Applied egg-rr98.1%
Taylor expanded in z around inf
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f6462.8%
Simplified62.8%
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6478.6%
Applied egg-rr78.6%
if -1.89999999999999988e235 < z < -5.49999999999999984e129 or -4.19999999999999972e92 < z < 1.54999999999999988e148Initial program 99.4%
Taylor expanded in t around inf
+-commutativeN/A
+-lowering-+.f6472.2%
Simplified72.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ z (- a t)))))
(if (<= z -2.65e+234)
t_1
(if (<= z -1e+130)
(+ y x)
(if (<= z -5.4e+90) t_1 (if (<= z 1.92e+149) (+ y x) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (z / (a - t));
double tmp;
if (z <= -2.65e+234) {
tmp = t_1;
} else if (z <= -1e+130) {
tmp = y + x;
} else if (z <= -5.4e+90) {
tmp = t_1;
} else if (z <= 1.92e+149) {
tmp = y + x;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = y * (z / (a - t))
if (z <= (-2.65d+234)) then
tmp = t_1
else if (z <= (-1d+130)) then
tmp = y + x
else if (z <= (-5.4d+90)) then
tmp = t_1
else if (z <= 1.92d+149) then
tmp = y + x
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 * (z / (a - t));
double tmp;
if (z <= -2.65e+234) {
tmp = t_1;
} else if (z <= -1e+130) {
tmp = y + x;
} else if (z <= -5.4e+90) {
tmp = t_1;
} else if (z <= 1.92e+149) {
tmp = y + x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (z / (a - t)) tmp = 0 if z <= -2.65e+234: tmp = t_1 elif z <= -1e+130: tmp = y + x elif z <= -5.4e+90: tmp = t_1 elif z <= 1.92e+149: tmp = y + x else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(z / Float64(a - t))) tmp = 0.0 if (z <= -2.65e+234) tmp = t_1; elseif (z <= -1e+130) tmp = Float64(y + x); elseif (z <= -5.4e+90) tmp = t_1; elseif (z <= 1.92e+149) tmp = Float64(y + x); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * (z / (a - t)); tmp = 0.0; if (z <= -2.65e+234) tmp = t_1; elseif (z <= -1e+130) tmp = y + x; elseif (z <= -5.4e+90) tmp = t_1; elseif (z <= 1.92e+149) tmp = y + x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.65e+234], t$95$1, If[LessEqual[z, -1e+130], N[(y + x), $MachinePrecision], If[LessEqual[z, -5.4e+90], t$95$1, If[LessEqual[z, 1.92e+149], N[(y + x), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{z}{a - t}\\
\mathbf{if}\;z \leq -2.65 \cdot 10^{+234}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1 \cdot 10^{+130}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;z \leq -5.4 \cdot 10^{+90}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.92 \cdot 10^{+149}:\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.64999999999999999e234 or -1.0000000000000001e130 < z < -5.4e90 or 1.91999999999999996e149 < z Initial program 86.7%
Taylor expanded in z around inf
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6469.2%
Simplified69.2%
if -2.64999999999999999e234 < z < -1.0000000000000001e130 or -5.4e90 < z < 1.91999999999999996e149Initial program 99.4%
Taylor expanded in t around inf
+-commutativeN/A
+-lowering-+.f6472.2%
Simplified72.2%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (- x (* y (+ -1.0 (/ z t)))))) (if (<= t -5.5e+94) t_1 (if (<= t 1.4e+71) (+ x (* z (/ y (- a t)))) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (y * (-1.0 + (z / t)));
double tmp;
if (t <= -5.5e+94) {
tmp = t_1;
} else if (t <= 1.4e+71) {
tmp = x + (z * (y / (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 * ((-1.0d0) + (z / t)))
if (t <= (-5.5d+94)) then
tmp = t_1
else if (t <= 1.4d+71) then
tmp = x + (z * (y / (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 * (-1.0 + (z / t)));
double tmp;
if (t <= -5.5e+94) {
tmp = t_1;
} else if (t <= 1.4e+71) {
tmp = x + (z * (y / (a - t)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (y * (-1.0 + (z / t))) tmp = 0 if t <= -5.5e+94: tmp = t_1 elif t <= 1.4e+71: tmp = x + (z * (y / (a - t))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(y * Float64(-1.0 + Float64(z / t)))) tmp = 0.0 if (t <= -5.5e+94) tmp = t_1; elseif (t <= 1.4e+71) tmp = Float64(x + Float64(z * Float64(y / Float64(a - t)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - (y * (-1.0 + (z / t))); tmp = 0.0; if (t <= -5.5e+94) tmp = t_1; elseif (t <= 1.4e+71) tmp = x + (z * (y / (a - t))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(y * N[(-1.0 + N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.5e+94], t$95$1, If[LessEqual[t, 1.4e+71], N[(x + N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - y \cdot \left(-1 + \frac{z}{t}\right)\\
\mathbf{if}\;t \leq -5.5 \cdot 10^{+94}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.4 \cdot 10^{+71}:\\
\;\;\;\;x + z \cdot \frac{y}{a - t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -5.4999999999999997e94 or 1.40000000000000001e71 < t Initial program 99.9%
Taylor expanded in a around 0
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
div-subN/A
sub-negN/A
*-inversesN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f6493.8%
Simplified93.8%
if -5.4999999999999997e94 < t < 1.40000000000000001e71Initial program 94.6%
+-lowering-+.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6491.7%
Simplified91.7%
Taylor expanded in z around inf
Simplified82.5%
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6488.9%
Applied egg-rr88.9%
(FPCore (x y z t a) :precision binary64 (if (<= t -2.4e+95) (+ y x) (if (<= t 1.5e+72) (+ x (* z (/ y (- a t)))) (+ y x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.4e+95) {
tmp = y + x;
} else if (t <= 1.5e+72) {
tmp = x + (z * (y / (a - t)));
} else {
tmp = y + x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-2.4d+95)) then
tmp = y + x
else if (t <= 1.5d+72) then
tmp = x + (z * (y / (a - t)))
else
tmp = y + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.4e+95) {
tmp = y + x;
} else if (t <= 1.5e+72) {
tmp = x + (z * (y / (a - t)));
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -2.4e+95: tmp = y + x elif t <= 1.5e+72: tmp = x + (z * (y / (a - t))) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -2.4e+95) tmp = Float64(y + x); elseif (t <= 1.5e+72) tmp = Float64(x + Float64(z * Float64(y / Float64(a - t)))); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -2.4e+95) tmp = y + x; elseif (t <= 1.5e+72) tmp = x + (z * (y / (a - t))); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2.4e+95], N[(y + x), $MachinePrecision], If[LessEqual[t, 1.5e+72], N[(x + N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.4 \cdot 10^{+95}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;t \leq 1.5 \cdot 10^{+72}:\\
\;\;\;\;x + z \cdot \frac{y}{a - t}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if t < -2.4e95 or 1.50000000000000001e72 < t Initial program 99.9%
Taylor expanded in t around inf
+-commutativeN/A
+-lowering-+.f6488.8%
Simplified88.8%
if -2.4e95 < t < 1.50000000000000001e72Initial program 94.6%
+-lowering-+.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6491.7%
Simplified91.7%
Taylor expanded in z around inf
Simplified82.5%
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6488.9%
Applied egg-rr88.9%
(FPCore (x y z t a) :precision binary64 (if (<= t -5.5e+94) (+ y x) (if (<= t 3.4e+80) (+ x (* y (/ (- z t) a))) (+ y x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -5.5e+94) {
tmp = y + x;
} else if (t <= 3.4e+80) {
tmp = x + (y * ((z - t) / a));
} else {
tmp = y + x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-5.5d+94)) then
tmp = y + x
else if (t <= 3.4d+80) then
tmp = x + (y * ((z - t) / a))
else
tmp = y + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -5.5e+94) {
tmp = y + x;
} else if (t <= 3.4e+80) {
tmp = x + (y * ((z - t) / a));
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -5.5e+94: tmp = y + x elif t <= 3.4e+80: tmp = x + (y * ((z - t) / a)) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -5.5e+94) tmp = Float64(y + x); elseif (t <= 3.4e+80) tmp = Float64(x + Float64(y * Float64(Float64(z - t) / a))); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -5.5e+94) tmp = y + x; elseif (t <= 3.4e+80) tmp = x + (y * ((z - t) / a)); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -5.5e+94], N[(y + x), $MachinePrecision], If[LessEqual[t, 3.4e+80], N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.5 \cdot 10^{+94}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;t \leq 3.4 \cdot 10^{+80}:\\
\;\;\;\;x + y \cdot \frac{z - t}{a}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if t < -5.4999999999999997e94 or 3.39999999999999992e80 < t Initial program 99.9%
Taylor expanded in t around inf
+-commutativeN/A
+-lowering-+.f6489.6%
Simplified89.6%
if -5.4999999999999997e94 < t < 3.39999999999999992e80Initial program 94.6%
Taylor expanded in a around inf
+-lowering-+.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6477.6%
Simplified77.6%
(FPCore (x y z t a) :precision binary64 (if (<= t -6.2e+94) (+ y x) (if (<= t 8.4e+67) (+ x (* z (/ y a))) (+ y x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -6.2e+94) {
tmp = y + x;
} else if (t <= 8.4e+67) {
tmp = x + (z * (y / a));
} else {
tmp = y + x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-6.2d+94)) then
tmp = y + x
else if (t <= 8.4d+67) then
tmp = x + (z * (y / a))
else
tmp = y + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -6.2e+94) {
tmp = y + x;
} else if (t <= 8.4e+67) {
tmp = x + (z * (y / a));
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -6.2e+94: tmp = y + x elif t <= 8.4e+67: tmp = x + (z * (y / a)) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -6.2e+94) tmp = Float64(y + x); elseif (t <= 8.4e+67) tmp = Float64(x + Float64(z * Float64(y / a))); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -6.2e+94) tmp = y + x; elseif (t <= 8.4e+67) tmp = x + (z * (y / a)); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -6.2e+94], N[(y + x), $MachinePrecision], If[LessEqual[t, 8.4e+67], N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.2 \cdot 10^{+94}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;t \leq 8.4 \cdot 10^{+67}:\\
\;\;\;\;x + z \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if t < -6.19999999999999983e94 or 8.4000000000000005e67 < t Initial program 99.9%
Taylor expanded in t around inf
+-commutativeN/A
+-lowering-+.f6488.8%
Simplified88.8%
if -6.19999999999999983e94 < t < 8.4000000000000005e67Initial program 94.6%
Taylor expanded in t around 0
/-lowering-/.f6474.2%
Simplified74.2%
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f6475.3%
Applied egg-rr75.3%
(FPCore (x y z t a) :precision binary64 (if (<= t -5e+94) (+ y x) (if (<= t 1e+69) (+ x (* y (/ z a))) (+ y x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -5e+94) {
tmp = y + x;
} else if (t <= 1e+69) {
tmp = x + (y * (z / a));
} else {
tmp = y + x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-5d+94)) then
tmp = y + x
else if (t <= 1d+69) then
tmp = x + (y * (z / a))
else
tmp = y + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -5e+94) {
tmp = y + x;
} else if (t <= 1e+69) {
tmp = x + (y * (z / a));
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -5e+94: tmp = y + x elif t <= 1e+69: tmp = x + (y * (z / a)) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -5e+94) tmp = Float64(y + x); elseif (t <= 1e+69) tmp = Float64(x + Float64(y * Float64(z / a))); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -5e+94) tmp = y + x; elseif (t <= 1e+69) tmp = x + (y * (z / a)); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -5e+94], N[(y + x), $MachinePrecision], If[LessEqual[t, 1e+69], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5 \cdot 10^{+94}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;t \leq 10^{+69}:\\
\;\;\;\;x + y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if t < -5.0000000000000001e94 or 1.0000000000000001e69 < t Initial program 99.9%
Taylor expanded in t around inf
+-commutativeN/A
+-lowering-+.f6488.8%
Simplified88.8%
if -5.0000000000000001e94 < t < 1.0000000000000001e69Initial program 94.6%
Taylor expanded in t around 0
/-lowering-/.f6474.2%
Simplified74.2%
(FPCore (x y z t a) :precision binary64 (if (<= y -9.8e+135) (* y (/ z a)) (if (<= y 2.35e+132) (+ y x) (* y (- 1.0 (/ z t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -9.8e+135) {
tmp = y * (z / a);
} else if (y <= 2.35e+132) {
tmp = y + x;
} else {
tmp = y * (1.0 - (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 (y <= (-9.8d+135)) then
tmp = y * (z / a)
else if (y <= 2.35d+132) then
tmp = y + x
else
tmp = y * (1.0d0 - (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 (y <= -9.8e+135) {
tmp = y * (z / a);
} else if (y <= 2.35e+132) {
tmp = y + x;
} else {
tmp = y * (1.0 - (z / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -9.8e+135: tmp = y * (z / a) elif y <= 2.35e+132: tmp = y + x else: tmp = y * (1.0 - (z / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -9.8e+135) tmp = Float64(y * Float64(z / a)); elseif (y <= 2.35e+132) tmp = Float64(y + x); else tmp = Float64(y * Float64(1.0 - Float64(z / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -9.8e+135) tmp = y * (z / a); elseif (y <= 2.35e+132) tmp = y + x; else tmp = y * (1.0 - (z / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -9.8e+135], N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.35e+132], N[(y + x), $MachinePrecision], N[(y * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.8 \cdot 10^{+135}:\\
\;\;\;\;y \cdot \frac{z}{a}\\
\mathbf{elif}\;y \leq 2.35 \cdot 10^{+132}:\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\
\end{array}
\end{array}
if y < -9.8000000000000002e135Initial program 99.8%
clear-numN/A
associate-/r/N/A
associate-*r*N/A
div-invN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6497.2%
Applied egg-rr97.2%
Taylor expanded in z around inf
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f6442.4%
Simplified42.4%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6458.1%
Applied egg-rr58.1%
Taylor expanded in a around inf
Simplified54.1%
if -9.8000000000000002e135 < y < 2.35e132Initial program 95.4%
Taylor expanded in t around inf
+-commutativeN/A
+-lowering-+.f6470.3%
Simplified70.3%
if 2.35e132 < y Initial program 99.8%
clear-numN/A
associate-/r/N/A
associate-*r*N/A
div-invN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6496.8%
Applied egg-rr96.8%
Taylor expanded in a around 0
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
div-subN/A
*-inversesN/A
--lowering--.f64N/A
/-lowering-/.f6456.2%
Simplified56.2%
Taylor expanded in x around 0
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
mul-1-negN/A
sub-negN/A
--lowering--.f64N/A
/-lowering-/.f6453.0%
Simplified53.0%
Final simplification66.0%
(FPCore (x y z t a) :precision binary64 (if (<= z 5.3e+160) (+ x (* y (/ (- z t) (- a t)))) (+ x (* z (/ y (- a t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= 5.3e+160) {
tmp = x + (y * ((z - t) / (a - t)));
} else {
tmp = x + (z * (y / (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 (z <= 5.3d+160) then
tmp = x + (y * ((z - t) / (a - t)))
else
tmp = x + (z * (y / (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 (z <= 5.3e+160) {
tmp = x + (y * ((z - t) / (a - t)));
} else {
tmp = x + (z * (y / (a - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= 5.3e+160: tmp = x + (y * ((z - t) / (a - t))) else: tmp = x + (z * (y / (a - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= 5.3e+160) tmp = Float64(x + Float64(y * Float64(Float64(z - t) / Float64(a - t)))); else tmp = Float64(x + Float64(z * Float64(y / Float64(a - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= 5.3e+160) tmp = x + (y * ((z - t) / (a - t))); else tmp = x + (z * (y / (a - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, 5.3e+160], N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq 5.3 \cdot 10^{+160}:\\
\;\;\;\;x + y \cdot \frac{z - t}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y}{a - t}\\
\end{array}
\end{array}
if z < 5.3000000000000001e160Initial program 98.7%
if 5.3000000000000001e160 < z Initial program 76.1%
+-lowering-+.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6480.7%
Simplified80.7%
Taylor expanded in z around inf
Simplified79.6%
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6498.6%
Applied egg-rr98.6%
(FPCore (x y z t a) :precision binary64 (if (<= y -1.22e+128) y (if (<= y 5.6e+103) x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.22e+128) {
tmp = y;
} else if (y <= 5.6e+103) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (y <= (-1.22d+128)) then
tmp = y
else if (y <= 5.6d+103) then
tmp = x
else
tmp = y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.22e+128) {
tmp = y;
} else if (y <= 5.6e+103) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -1.22e+128: tmp = y elif y <= 5.6e+103: tmp = x else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -1.22e+128) tmp = y; elseif (y <= 5.6e+103) tmp = x; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -1.22e+128) tmp = y; elseif (y <= 5.6e+103) tmp = x; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -1.22e+128], y, If[LessEqual[y, 5.6e+103], x, y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.22 \cdot 10^{+128}:\\
\;\;\;\;y\\
\mathbf{elif}\;y \leq 5.6 \cdot 10^{+103}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if y < -1.22000000000000009e128 or 5.60000000000000017e103 < y Initial program 99.8%
Taylor expanded in t around inf
+-commutativeN/A
+-lowering-+.f6435.4%
Simplified35.4%
Taylor expanded in y around inf
Simplified31.8%
if -1.22000000000000009e128 < y < 5.60000000000000017e103Initial program 95.2%
Taylor expanded in x around inf
Simplified63.3%
(FPCore (x y z t a) :precision binary64 (+ (/ (- z t) (/ (- a t) y)) x))
double code(double x, double y, double z, double t, double a) {
return ((z - t) / ((a - t) / y)) + x;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((z - t) / ((a - t) / y)) + x
end function
public static double code(double x, double y, double z, double t, double a) {
return ((z - t) / ((a - t) / y)) + x;
}
def code(x, y, z, t, a): return ((z - t) / ((a - t) / y)) + x
function code(x, y, z, t, a) return Float64(Float64(Float64(z - t) / Float64(Float64(a - t) / y)) + x) end
function tmp = code(x, y, z, t, a) tmp = ((z - t) / ((a - t) / y)) + x; end
code[x_, y_, z_, t_, a_] := N[(N[(N[(z - t), $MachinePrecision] / N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}
\\
\frac{z - t}{\frac{a - t}{y}} + x
\end{array}
Initial program 96.6%
clear-numN/A
associate-/r/N/A
associate-*r*N/A
div-invN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6497.5%
Applied egg-rr97.5%
associate-/r/N/A
+-commutativeN/A
+-lowering-+.f64N/A
associate-/r/N/A
*-commutativeN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6497.6%
Applied egg-rr97.6%
(FPCore (x y z t a) :precision binary64 (+ x (* (- z t) (/ y (- a t)))))
double code(double x, double y, double z, double t, double a) {
return x + ((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 + ((z - t) * (y / (a - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((z - t) * (y / (a - t)));
}
def code(x, y, z, t, a): return x + ((z - t) * (y / (a - t)))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(z - t) * Float64(y / Float64(a - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + ((z - t) * (y / (a - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(z - t), $MachinePrecision] * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(z - t\right) \cdot \frac{y}{a - t}
\end{array}
Initial program 96.6%
clear-numN/A
associate-/r/N/A
associate-*r*N/A
div-invN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6497.5%
Applied egg-rr97.5%
Final simplification97.5%
(FPCore (x y z t a) :precision binary64 (if (<= z -2.4e+234) (* y (/ z a)) (+ y x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.4e+234) {
tmp = y * (z / a);
} else {
tmp = y + x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-2.4d+234)) then
tmp = y * (z / a)
else
tmp = y + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.4e+234) {
tmp = y * (z / a);
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.4e+234: tmp = y * (z / a) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.4e+234) tmp = Float64(y * Float64(z / a)); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.4e+234) tmp = y * (z / a); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.4e+234], N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.4 \cdot 10^{+234}:\\
\;\;\;\;y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if z < -2.40000000000000011e234Initial program 89.9%
clear-numN/A
associate-/r/N/A
associate-*r*N/A
div-invN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6494.8%
Applied egg-rr94.8%
Taylor expanded in z around inf
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f6474.9%
Simplified74.9%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6479.6%
Applied egg-rr79.6%
Taylor expanded in a around inf
Simplified64.3%
if -2.40000000000000011e234 < z Initial program 97.1%
Taylor expanded in t around inf
+-commutativeN/A
+-lowering-+.f6464.2%
Simplified64.2%
Final simplification64.2%
(FPCore (x y z t a) :precision binary64 (if (<= a 1.52e+134) (+ y x) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= 1.52e+134) {
tmp = y + x;
} 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 (a <= 1.52d+134) then
tmp = y + x
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 (a <= 1.52e+134) {
tmp = y + x;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= 1.52e+134: tmp = y + x else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= 1.52e+134) tmp = Float64(y + x); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= 1.52e+134) tmp = y + x; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, 1.52e+134], N[(y + x), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 1.52 \cdot 10^{+134}:\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < 1.5200000000000001e134Initial program 96.1%
Taylor expanded in t around inf
+-commutativeN/A
+-lowering-+.f6461.7%
Simplified61.7%
if 1.5200000000000001e134 < a Initial program 99.9%
Taylor expanded in x around inf
Simplified67.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 96.6%
Taylor expanded in x around inf
Simplified47.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (/ (- z t) (- a t))))))
(if (< y -8.508084860551241e-17)
t_1
(if (< y 2.894426862792089e-49)
(+ x (* (* y (- z t)) (/ 1.0 (- a t))))
t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * ((z - t) / (a - t)));
double tmp;
if (y < -8.508084860551241e-17) {
tmp = t_1;
} else if (y < 2.894426862792089e-49) {
tmp = x + ((y * (z - t)) * (1.0 / (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 * ((z - t) / (a - t)))
if (y < (-8.508084860551241d-17)) then
tmp = t_1
else if (y < 2.894426862792089d-49) then
tmp = x + ((y * (z - t)) * (1.0d0 / (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 * ((z - t) / (a - t)));
double tmp;
if (y < -8.508084860551241e-17) {
tmp = t_1;
} else if (y < 2.894426862792089e-49) {
tmp = x + ((y * (z - t)) * (1.0 / (a - t)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * ((z - t) / (a - t))) tmp = 0 if y < -8.508084860551241e-17: tmp = t_1 elif y < 2.894426862792089e-49: tmp = x + ((y * (z - t)) * (1.0 / (a - t))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y * Float64(Float64(z - t) / Float64(a - t)))) tmp = 0.0 if (y < -8.508084860551241e-17) tmp = t_1; elseif (y < 2.894426862792089e-49) tmp = Float64(x + Float64(Float64(y * Float64(z - t)) * Float64(1.0 / Float64(a - t)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y * ((z - t) / (a - t))); tmp = 0.0; if (y < -8.508084860551241e-17) tmp = t_1; elseif (y < 2.894426862792089e-49) tmp = x + ((y * (z - t)) * (1.0 / (a - t))); 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[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[y, -8.508084860551241e-17], t$95$1, If[Less[y, 2.894426862792089e-49], N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z - t}{a - t}\\
\mathbf{if}\;y < -8.508084860551241 \cdot 10^{-17}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y < 2.894426862792089 \cdot 10^{-49}:\\
\;\;\;\;x + \left(y \cdot \left(z - t\right)\right) \cdot \frac{1}{a - t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024139
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisLine from plot-0.2.3.4, B"
:precision binary64
:alt
(! :herbie-platform default (if (< y -8508084860551241/100000000000000000000000000000000) (+ x (* y (/ (- z t) (- a t)))) (if (< y 2894426862792089/10000000000000000000000000000000000000000000000000000000000000000) (+ x (* (* y (- z t)) (/ 1 (- a t)))) (+ x (* y (/ (- z t) (- a t)))))))
(+ x (* y (/ (- z t) (- a t)))))