
(FPCore (x y z t a) :precision binary64 (- x (/ (- y z) (/ (+ (- t z) 1.0) a))))
double code(double x, double y, double z, double t, double a) {
return x - ((y - z) / (((t - z) + 1.0) / a));
}
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 - z) + 1.0d0) / a))
end function
public static double code(double x, double y, double z, double t, double a) {
return x - ((y - z) / (((t - z) + 1.0) / a));
}
def code(x, y, z, t, a): return x - ((y - z) / (((t - z) + 1.0) / a))
function code(x, y, z, t, a) return Float64(x - Float64(Float64(y - z) / Float64(Float64(Float64(t - z) + 1.0) / a))) end
function tmp = code(x, y, z, t, a) tmp = x - ((y - z) / (((t - z) + 1.0) / a)); end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(y - z), $MachinePrecision] / N[(N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (- x (/ (- y z) (/ (+ (- t z) 1.0) a))))
double code(double x, double y, double z, double t, double a) {
return x - ((y - z) / (((t - z) + 1.0) / a));
}
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 - z) + 1.0d0) / a))
end function
public static double code(double x, double y, double z, double t, double a) {
return x - ((y - z) / (((t - z) + 1.0) / a));
}
def code(x, y, z, t, a): return x - ((y - z) / (((t - z) + 1.0) / a))
function code(x, y, z, t, a) return Float64(x - Float64(Float64(y - z) / Float64(Float64(Float64(t - z) + 1.0) / a))) end
function tmp = code(x, y, z, t, a) tmp = x - ((y - z) / (((t - z) + 1.0) / a)); end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(y - z), $MachinePrecision] / N[(N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}}
\end{array}
(FPCore (x y z t a) :precision binary64 (+ x (* a (/ (- y z) (+ -1.0 (- z t))))))
double code(double x, double y, double z, double t, double a) {
return x + (a * ((y - z) / (-1.0 + (z - 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 + (a * ((y - z) / ((-1.0d0) + (z - t))))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (a * ((y - z) / (-1.0 + (z - t))));
}
def code(x, y, z, t, a): return x + (a * ((y - z) / (-1.0 + (z - t))))
function code(x, y, z, t, a) return Float64(x + Float64(a * Float64(Float64(y - z) / Float64(-1.0 + Float64(z - t))))) end
function tmp = code(x, y, z, t, a) tmp = x + (a * ((y - z) / (-1.0 + (z - t)))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(a * N[(N[(y - z), $MachinePrecision] / N[(-1.0 + N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + a \cdot \frac{y - z}{-1 + \left(z - t\right)}
\end{array}
Initial program 97.6%
associate-/r/N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
+-lowering-+.f64N/A
--lowering--.f6499.2%
Applied egg-rr99.2%
Final simplification99.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ a (/ t (- z y))))))
(if (<= t -5.2e+27)
t_1
(if (<= t 4e-276)
(- x a)
(if (<= t 1.85e-21) (+ x (/ y (/ (+ z -1.0) a))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (a / (t / (z - y)));
double tmp;
if (t <= -5.2e+27) {
tmp = t_1;
} else if (t <= 4e-276) {
tmp = x - a;
} else if (t <= 1.85e-21) {
tmp = x + (y / ((z + -1.0) / 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 + (a / (t / (z - y)))
if (t <= (-5.2d+27)) then
tmp = t_1
else if (t <= 4d-276) then
tmp = x - a
else if (t <= 1.85d-21) then
tmp = x + (y / ((z + (-1.0d0)) / 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 + (a / (t / (z - y)));
double tmp;
if (t <= -5.2e+27) {
tmp = t_1;
} else if (t <= 4e-276) {
tmp = x - a;
} else if (t <= 1.85e-21) {
tmp = x + (y / ((z + -1.0) / a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (a / (t / (z - y))) tmp = 0 if t <= -5.2e+27: tmp = t_1 elif t <= 4e-276: tmp = x - a elif t <= 1.85e-21: tmp = x + (y / ((z + -1.0) / a)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(a / Float64(t / Float64(z - y)))) tmp = 0.0 if (t <= -5.2e+27) tmp = t_1; elseif (t <= 4e-276) tmp = Float64(x - a); elseif (t <= 1.85e-21) tmp = Float64(x + Float64(y / Float64(Float64(z + -1.0) / a))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (a / (t / (z - y))); tmp = 0.0; if (t <= -5.2e+27) tmp = t_1; elseif (t <= 4e-276) tmp = x - a; elseif (t <= 1.85e-21) tmp = x + (y / ((z + -1.0) / a)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(a / N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.2e+27], t$95$1, If[LessEqual[t, 4e-276], N[(x - a), $MachinePrecision], If[LessEqual[t, 1.85e-21], N[(x + N[(y / N[(N[(z + -1.0), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{a}{\frac{t}{z - y}}\\
\mathbf{if}\;t \leq -5.2 \cdot 10^{+27}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 4 \cdot 10^{-276}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;t \leq 1.85 \cdot 10^{-21}:\\
\;\;\;\;x + \frac{y}{\frac{z + -1}{a}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -5.20000000000000018e27 or 1.8500000000000001e-21 < t Initial program 99.1%
Taylor expanded in t around inf
/-lowering-/.f6487.1%
Simplified87.1%
associate-/r/N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6485.6%
Applied egg-rr85.6%
*-commutativeN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f6485.6%
Applied egg-rr85.6%
if -5.20000000000000018e27 < t < 4e-276Initial program 95.2%
Taylor expanded in z around inf
--lowering--.f6472.4%
Simplified72.4%
if 4e-276 < t < 1.8500000000000001e-21Initial program 98.0%
Taylor expanded in y around inf
Simplified81.6%
Taylor expanded in t around 0
/-lowering-/.f64N/A
--lowering--.f6481.6%
Simplified81.6%
Final simplification80.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ a (/ t (- z y))))))
(if (<= t -2.7e+28)
t_1
(if (<= t 3.2e-275) (- x a) (if (<= t 1.26e-18) (- x (* y a)) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (a / (t / (z - y)));
double tmp;
if (t <= -2.7e+28) {
tmp = t_1;
} else if (t <= 3.2e-275) {
tmp = x - a;
} else if (t <= 1.26e-18) {
tmp = x - (y * 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 + (a / (t / (z - y)))
if (t <= (-2.7d+28)) then
tmp = t_1
else if (t <= 3.2d-275) then
tmp = x - a
else if (t <= 1.26d-18) then
tmp = x - (y * 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 + (a / (t / (z - y)));
double tmp;
if (t <= -2.7e+28) {
tmp = t_1;
} else if (t <= 3.2e-275) {
tmp = x - a;
} else if (t <= 1.26e-18) {
tmp = x - (y * a);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (a / (t / (z - y))) tmp = 0 if t <= -2.7e+28: tmp = t_1 elif t <= 3.2e-275: tmp = x - a elif t <= 1.26e-18: tmp = x - (y * a) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(a / Float64(t / Float64(z - y)))) tmp = 0.0 if (t <= -2.7e+28) tmp = t_1; elseif (t <= 3.2e-275) tmp = Float64(x - a); elseif (t <= 1.26e-18) tmp = Float64(x - Float64(y * a)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (a / (t / (z - y))); tmp = 0.0; if (t <= -2.7e+28) tmp = t_1; elseif (t <= 3.2e-275) tmp = x - a; elseif (t <= 1.26e-18) tmp = x - (y * a); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(a / N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.7e+28], t$95$1, If[LessEqual[t, 3.2e-275], N[(x - a), $MachinePrecision], If[LessEqual[t, 1.26e-18], N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{a}{\frac{t}{z - y}}\\
\mathbf{if}\;t \leq -2.7 \cdot 10^{+28}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 3.2 \cdot 10^{-275}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;t \leq 1.26 \cdot 10^{-18}:\\
\;\;\;\;x - y \cdot a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -2.7000000000000002e28 or 1.26000000000000004e-18 < t Initial program 99.1%
Taylor expanded in t around inf
/-lowering-/.f6487.8%
Simplified87.8%
associate-/r/N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6486.3%
Applied egg-rr86.3%
*-commutativeN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f6486.3%
Applied egg-rr86.3%
if -2.7000000000000002e28 < t < 3.2e-275Initial program 95.2%
Taylor expanded in z around inf
--lowering--.f6472.4%
Simplified72.4%
if 3.2e-275 < t < 1.26000000000000004e-18Initial program 98.1%
Taylor expanded in z around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f6472.8%
Simplified72.8%
Taylor expanded in t around 0
--lowering--.f64N/A
*-lowering-*.f6472.8%
Simplified72.8%
Final simplification79.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* a (/ (- z y) t)))))
(if (<= t -8.2e+27)
t_1
(if (<= t 7.2e-281) (- x a) (if (<= t 1.3e-18) (- x (* y a)) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (a * ((z - y) / t));
double tmp;
if (t <= -8.2e+27) {
tmp = t_1;
} else if (t <= 7.2e-281) {
tmp = x - a;
} else if (t <= 1.3e-18) {
tmp = x - (y * 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 + (a * ((z - y) / t))
if (t <= (-8.2d+27)) then
tmp = t_1
else if (t <= 7.2d-281) then
tmp = x - a
else if (t <= 1.3d-18) then
tmp = x - (y * 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 + (a * ((z - y) / t));
double tmp;
if (t <= -8.2e+27) {
tmp = t_1;
} else if (t <= 7.2e-281) {
tmp = x - a;
} else if (t <= 1.3e-18) {
tmp = x - (y * a);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (a * ((z - y) / t)) tmp = 0 if t <= -8.2e+27: tmp = t_1 elif t <= 7.2e-281: tmp = x - a elif t <= 1.3e-18: tmp = x - (y * a) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(a * Float64(Float64(z - y) / t))) tmp = 0.0 if (t <= -8.2e+27) tmp = t_1; elseif (t <= 7.2e-281) tmp = Float64(x - a); elseif (t <= 1.3e-18) tmp = Float64(x - Float64(y * a)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (a * ((z - y) / t)); tmp = 0.0; if (t <= -8.2e+27) tmp = t_1; elseif (t <= 7.2e-281) tmp = x - a; elseif (t <= 1.3e-18) tmp = x - (y * a); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(a * N[(N[(z - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -8.2e+27], t$95$1, If[LessEqual[t, 7.2e-281], N[(x - a), $MachinePrecision], If[LessEqual[t, 1.3e-18], N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + a \cdot \frac{z - y}{t}\\
\mathbf{if}\;t \leq -8.2 \cdot 10^{+27}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 7.2 \cdot 10^{-281}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;t \leq 1.3 \cdot 10^{-18}:\\
\;\;\;\;x - y \cdot a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -8.2000000000000005e27 or 1.3e-18 < t Initial program 99.1%
Taylor expanded in t around inf
/-lowering-/.f6487.8%
Simplified87.8%
associate-/r/N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6486.3%
Applied egg-rr86.3%
if -8.2000000000000005e27 < t < 7.20000000000000013e-281Initial program 95.2%
Taylor expanded in z around inf
--lowering--.f6472.4%
Simplified72.4%
if 7.20000000000000013e-281 < t < 1.3e-18Initial program 98.1%
Taylor expanded in z around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f6472.8%
Simplified72.8%
Taylor expanded in t around 0
--lowering--.f64N/A
*-lowering-*.f6472.8%
Simplified72.8%
Final simplification79.0%
(FPCore (x y z t a)
:precision binary64
(if (<= z -4e+94)
(+ x (* a (/ z (- (+ t 1.0) z))))
(if (<= z 5.4e+14)
(+ x (/ (- y z) (/ (- -1.0 t) a)))
(+ x (* a (/ (- y z) (+ z -1.0)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4e+94) {
tmp = x + (a * (z / ((t + 1.0) - z)));
} else if (z <= 5.4e+14) {
tmp = x + ((y - z) / ((-1.0 - t) / a));
} else {
tmp = x + (a * ((y - z) / (z + -1.0)));
}
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 <= (-4d+94)) then
tmp = x + (a * (z / ((t + 1.0d0) - z)))
else if (z <= 5.4d+14) then
tmp = x + ((y - z) / (((-1.0d0) - t) / a))
else
tmp = x + (a * ((y - z) / (z + (-1.0d0))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4e+94) {
tmp = x + (a * (z / ((t + 1.0) - z)));
} else if (z <= 5.4e+14) {
tmp = x + ((y - z) / ((-1.0 - t) / a));
} else {
tmp = x + (a * ((y - z) / (z + -1.0)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -4e+94: tmp = x + (a * (z / ((t + 1.0) - z))) elif z <= 5.4e+14: tmp = x + ((y - z) / ((-1.0 - t) / a)) else: tmp = x + (a * ((y - z) / (z + -1.0))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -4e+94) tmp = Float64(x + Float64(a * Float64(z / Float64(Float64(t + 1.0) - z)))); elseif (z <= 5.4e+14) tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(-1.0 - t) / a))); else tmp = Float64(x + Float64(a * Float64(Float64(y - z) / Float64(z + -1.0)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -4e+94) tmp = x + (a * (z / ((t + 1.0) - z))); elseif (z <= 5.4e+14) tmp = x + ((y - z) / ((-1.0 - t) / a)); else tmp = x + (a * ((y - z) / (z + -1.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4e+94], N[(x + N[(a * N[(z / N[(N[(t + 1.0), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.4e+14], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(-1.0 - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(a * N[(N[(y - z), $MachinePrecision] / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4 \cdot 10^{+94}:\\
\;\;\;\;x + a \cdot \frac{z}{\left(t + 1\right) - z}\\
\mathbf{elif}\;z \leq 5.4 \cdot 10^{+14}:\\
\;\;\;\;x + \frac{y - z}{\frac{-1 - t}{a}}\\
\mathbf{else}:\\
\;\;\;\;x + a \cdot \frac{y - z}{z + -1}\\
\end{array}
\end{array}
if z < -4.0000000000000001e94Initial program 93.7%
Taylor expanded in y around 0
cancel-sign-sub-invN/A
metadata-evalN/A
*-lft-identityN/A
+-lowering-+.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
+-lowering-+.f6492.0%
Simplified92.0%
if -4.0000000000000001e94 < z < 5.4e14Initial program 99.8%
Taylor expanded in t around inf
Simplified97.8%
if 5.4e14 < z Initial program 95.5%
associate-/r/N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
+-lowering-+.f64N/A
--lowering--.f64100.0%
Applied egg-rr100.0%
Taylor expanded in t around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6490.6%
Simplified90.6%
Final simplification94.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (- z y) (/ t a)))))
(if (<= t -9.5e+28)
t_1
(if (<= t 1.7e+60) (+ x (* a (/ (- y z) (+ z -1.0)))) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((z - y) / (t / a));
double tmp;
if (t <= -9.5e+28) {
tmp = t_1;
} else if (t <= 1.7e+60) {
tmp = x + (a * ((y - z) / (z + -1.0)));
} 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 + ((z - y) / (t / a))
if (t <= (-9.5d+28)) then
tmp = t_1
else if (t <= 1.7d+60) then
tmp = x + (a * ((y - z) / (z + (-1.0d0))))
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 + ((z - y) / (t / a));
double tmp;
if (t <= -9.5e+28) {
tmp = t_1;
} else if (t <= 1.7e+60) {
tmp = x + (a * ((y - z) / (z + -1.0)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((z - y) / (t / a)) tmp = 0 if t <= -9.5e+28: tmp = t_1 elif t <= 1.7e+60: tmp = x + (a * ((y - z) / (z + -1.0))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(z - y) / Float64(t / a))) tmp = 0.0 if (t <= -9.5e+28) tmp = t_1; elseif (t <= 1.7e+60) tmp = Float64(x + Float64(a * Float64(Float64(y - z) / Float64(z + -1.0)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((z - y) / (t / a)); tmp = 0.0; if (t <= -9.5e+28) tmp = t_1; elseif (t <= 1.7e+60) tmp = x + (a * ((y - z) / (z + -1.0))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(z - y), $MachinePrecision] / N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -9.5e+28], t$95$1, If[LessEqual[t, 1.7e+60], N[(x + N[(a * N[(N[(y - z), $MachinePrecision] / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{z - y}{\frac{t}{a}}\\
\mathbf{if}\;t \leq -9.5 \cdot 10^{+28}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.7 \cdot 10^{+60}:\\
\;\;\;\;x + a \cdot \frac{y - z}{z + -1}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -9.49999999999999927e28 or 1.7e60 < t Initial program 98.9%
Taylor expanded in t around inf
/-lowering-/.f6491.5%
Simplified91.5%
if -9.49999999999999927e28 < t < 1.7e60Initial program 96.7%
associate-/r/N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
+-lowering-+.f64N/A
--lowering--.f64100.0%
Applied egg-rr100.0%
Taylor expanded in t around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6496.2%
Simplified96.2%
Final simplification94.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* a (/ z (- (+ t 1.0) z))))))
(if (<= z -1.62e+94)
t_1
(if (<= z 5.1e+50) (+ x (* a (/ y (+ z (- -1.0 t))))) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (a * (z / ((t + 1.0) - z)));
double tmp;
if (z <= -1.62e+94) {
tmp = t_1;
} else if (z <= 5.1e+50) {
tmp = x + (a * (y / (z + (-1.0 - 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 + (a * (z / ((t + 1.0d0) - z)))
if (z <= (-1.62d+94)) then
tmp = t_1
else if (z <= 5.1d+50) then
tmp = x + (a * (y / (z + ((-1.0d0) - 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 + (a * (z / ((t + 1.0) - z)));
double tmp;
if (z <= -1.62e+94) {
tmp = t_1;
} else if (z <= 5.1e+50) {
tmp = x + (a * (y / (z + (-1.0 - t))));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (a * (z / ((t + 1.0) - z))) tmp = 0 if z <= -1.62e+94: tmp = t_1 elif z <= 5.1e+50: tmp = x + (a * (y / (z + (-1.0 - t)))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(a * Float64(z / Float64(Float64(t + 1.0) - z)))) tmp = 0.0 if (z <= -1.62e+94) tmp = t_1; elseif (z <= 5.1e+50) tmp = Float64(x + Float64(a * Float64(y / Float64(z + Float64(-1.0 - t))))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (a * (z / ((t + 1.0) - z))); tmp = 0.0; if (z <= -1.62e+94) tmp = t_1; elseif (z <= 5.1e+50) tmp = x + (a * (y / (z + (-1.0 - t)))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(a * N[(z / N[(N[(t + 1.0), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.62e+94], t$95$1, If[LessEqual[z, 5.1e+50], N[(x + N[(a * N[(y / N[(z + N[(-1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + a \cdot \frac{z}{\left(t + 1\right) - z}\\
\mathbf{if}\;z \leq -1.62 \cdot 10^{+94}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 5.1 \cdot 10^{+50}:\\
\;\;\;\;x + a \cdot \frac{y}{z + \left(-1 - t\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.61999999999999997e94 or 5.0999999999999998e50 < z Initial program 94.3%
Taylor expanded in y around 0
cancel-sign-sub-invN/A
metadata-evalN/A
*-lft-identityN/A
+-lowering-+.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
+-lowering-+.f6492.6%
Simplified92.6%
if -1.61999999999999997e94 < z < 5.0999999999999998e50Initial program 99.8%
Taylor expanded in y around inf
Simplified92.5%
associate-/r/N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
associate-+r-N/A
--lowering--.f64N/A
+-commutativeN/A
+-lowering-+.f6492.4%
Applied egg-rr92.4%
Final simplification92.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* a (/ z (- (+ t 1.0) z))))))
(if (<= z -4.1e+23)
t_1
(if (<= z 2.3e-38) (+ x (* y (* a (/ 1.0 (- -1.0 t))))) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (a * (z / ((t + 1.0) - z)));
double tmp;
if (z <= -4.1e+23) {
tmp = t_1;
} else if (z <= 2.3e-38) {
tmp = x + (y * (a * (1.0 / (-1.0 - 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 + (a * (z / ((t + 1.0d0) - z)))
if (z <= (-4.1d+23)) then
tmp = t_1
else if (z <= 2.3d-38) then
tmp = x + (y * (a * (1.0d0 / ((-1.0d0) - 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 + (a * (z / ((t + 1.0) - z)));
double tmp;
if (z <= -4.1e+23) {
tmp = t_1;
} else if (z <= 2.3e-38) {
tmp = x + (y * (a * (1.0 / (-1.0 - t))));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (a * (z / ((t + 1.0) - z))) tmp = 0 if z <= -4.1e+23: tmp = t_1 elif z <= 2.3e-38: tmp = x + (y * (a * (1.0 / (-1.0 - t)))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(a * Float64(z / Float64(Float64(t + 1.0) - z)))) tmp = 0.0 if (z <= -4.1e+23) tmp = t_1; elseif (z <= 2.3e-38) tmp = Float64(x + Float64(y * Float64(a * Float64(1.0 / Float64(-1.0 - t))))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (a * (z / ((t + 1.0) - z))); tmp = 0.0; if (z <= -4.1e+23) tmp = t_1; elseif (z <= 2.3e-38) tmp = x + (y * (a * (1.0 / (-1.0 - t)))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(a * N[(z / N[(N[(t + 1.0), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.1e+23], t$95$1, If[LessEqual[z, 2.3e-38], N[(x + N[(y * N[(a * N[(1.0 / N[(-1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + a \cdot \frac{z}{\left(t + 1\right) - z}\\
\mathbf{if}\;z \leq -4.1 \cdot 10^{+23}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.3 \cdot 10^{-38}:\\
\;\;\;\;x + y \cdot \left(a \cdot \frac{1}{-1 - t}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -4.09999999999999996e23 or 2.30000000000000002e-38 < z Initial program 95.6%
Taylor expanded in y around 0
cancel-sign-sub-invN/A
metadata-evalN/A
*-lft-identityN/A
+-lowering-+.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
+-lowering-+.f6487.3%
Simplified87.3%
if -4.09999999999999996e23 < z < 2.30000000000000002e-38Initial program 99.8%
Taylor expanded in z around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f6491.6%
Simplified91.6%
div-invN/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f6497.7%
Applied egg-rr97.7%
Final simplification92.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* a (/ z (- (+ t 1.0) z))))))
(if (<= z -8.5e+20)
t_1
(if (<= z 1.95e-38) (+ x (/ (* y a) (- -1.0 t))) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (a * (z / ((t + 1.0) - z)));
double tmp;
if (z <= -8.5e+20) {
tmp = t_1;
} else if (z <= 1.95e-38) {
tmp = x + ((y * a) / (-1.0 - 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 + (a * (z / ((t + 1.0d0) - z)))
if (z <= (-8.5d+20)) then
tmp = t_1
else if (z <= 1.95d-38) then
tmp = x + ((y * a) / ((-1.0d0) - 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 + (a * (z / ((t + 1.0) - z)));
double tmp;
if (z <= -8.5e+20) {
tmp = t_1;
} else if (z <= 1.95e-38) {
tmp = x + ((y * a) / (-1.0 - t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (a * (z / ((t + 1.0) - z))) tmp = 0 if z <= -8.5e+20: tmp = t_1 elif z <= 1.95e-38: tmp = x + ((y * a) / (-1.0 - t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(a * Float64(z / Float64(Float64(t + 1.0) - z)))) tmp = 0.0 if (z <= -8.5e+20) tmp = t_1; elseif (z <= 1.95e-38) tmp = Float64(x + Float64(Float64(y * a) / Float64(-1.0 - t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (a * (z / ((t + 1.0) - z))); tmp = 0.0; if (z <= -8.5e+20) tmp = t_1; elseif (z <= 1.95e-38) tmp = x + ((y * a) / (-1.0 - t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(a * N[(z / N[(N[(t + 1.0), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -8.5e+20], t$95$1, If[LessEqual[z, 1.95e-38], N[(x + N[(N[(y * a), $MachinePrecision] / N[(-1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + a \cdot \frac{z}{\left(t + 1\right) - z}\\
\mathbf{if}\;z \leq -8.5 \cdot 10^{+20}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.95 \cdot 10^{-38}:\\
\;\;\;\;x + \frac{y \cdot a}{-1 - t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -8.5e20 or 1.95e-38 < z Initial program 95.6%
Taylor expanded in y around 0
cancel-sign-sub-invN/A
metadata-evalN/A
*-lft-identityN/A
+-lowering-+.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
+-lowering-+.f6487.3%
Simplified87.3%
if -8.5e20 < z < 1.95e-38Initial program 99.8%
Taylor expanded in z around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f6491.6%
Simplified91.6%
Final simplification89.3%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.65e+94) (- x a) (if (<= z 9.2e+52) (+ x (/ (* y a) (- -1.0 t))) (- x a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.65e+94) {
tmp = x - a;
} else if (z <= 9.2e+52) {
tmp = x + ((y * a) / (-1.0 - t));
} else {
tmp = x - 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 (z <= (-1.65d+94)) then
tmp = x - a
else if (z <= 9.2d+52) then
tmp = x + ((y * a) / ((-1.0d0) - t))
else
tmp = x - a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.65e+94) {
tmp = x - a;
} else if (z <= 9.2e+52) {
tmp = x + ((y * a) / (-1.0 - t));
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.65e+94: tmp = x - a elif z <= 9.2e+52: tmp = x + ((y * a) / (-1.0 - t)) else: tmp = x - a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.65e+94) tmp = Float64(x - a); elseif (z <= 9.2e+52) tmp = Float64(x + Float64(Float64(y * a) / Float64(-1.0 - t))); else tmp = Float64(x - a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.65e+94) tmp = x - a; elseif (z <= 9.2e+52) tmp = x + ((y * a) / (-1.0 - t)); else tmp = x - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.65e+94], N[(x - a), $MachinePrecision], If[LessEqual[z, 9.2e+52], N[(x + N[(N[(y * a), $MachinePrecision] / N[(-1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.65 \cdot 10^{+94}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq 9.2 \cdot 10^{+52}:\\
\;\;\;\;x + \frac{y \cdot a}{-1 - t}\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -1.65e94 or 9.1999999999999999e52 < z Initial program 94.2%
Taylor expanded in z around inf
--lowering--.f6482.4%
Simplified82.4%
if -1.65e94 < z < 9.1999999999999999e52Initial program 99.8%
Taylor expanded in z around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f6484.8%
Simplified84.8%
Final simplification83.9%
(FPCore (x y z t a) :precision binary64 (if (<= z -2.5e+95) (- x a) (if (<= z 3.5e+54) (+ x (* a (/ y (- z t)))) (- x a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.5e+95) {
tmp = x - a;
} else if (z <= 3.5e+54) {
tmp = x + (a * (y / (z - t)));
} else {
tmp = x - 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 (z <= (-2.5d+95)) then
tmp = x - a
else if (z <= 3.5d+54) then
tmp = x + (a * (y / (z - t)))
else
tmp = x - a
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.5e+95) {
tmp = x - a;
} else if (z <= 3.5e+54) {
tmp = x + (a * (y / (z - t)));
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.5e+95: tmp = x - a elif z <= 3.5e+54: tmp = x + (a * (y / (z - t))) else: tmp = x - a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.5e+95) tmp = Float64(x - a); elseif (z <= 3.5e+54) tmp = Float64(x + Float64(a * Float64(y / Float64(z - t)))); else tmp = Float64(x - a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.5e+95) tmp = x - a; elseif (z <= 3.5e+54) tmp = x + (a * (y / (z - t))); else tmp = x - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.5e+95], N[(x - a), $MachinePrecision], If[LessEqual[z, 3.5e+54], N[(x + N[(a * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.5 \cdot 10^{+95}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{+54}:\\
\;\;\;\;x + a \cdot \frac{y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -2.50000000000000012e95 or 3.5000000000000001e54 < z Initial program 94.2%
Taylor expanded in z around inf
--lowering--.f6482.4%
Simplified82.4%
if -2.50000000000000012e95 < z < 3.5000000000000001e54Initial program 99.8%
Taylor expanded in y around inf
Simplified92.6%
associate-/r/N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
associate-+r-N/A
--lowering--.f64N/A
+-commutativeN/A
+-lowering-+.f6492.5%
Applied egg-rr92.5%
Taylor expanded in t around inf
Simplified73.6%
Final simplification77.1%
(FPCore (x y z t a) :precision binary64 (if (<= z -7e+22) (- x a) (if (<= z 35000000000000.0) (- x (* y a)) (- x a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -7e+22) {
tmp = x - a;
} else if (z <= 35000000000000.0) {
tmp = x - (y * a);
} else {
tmp = x - 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 (z <= (-7d+22)) then
tmp = x - a
else if (z <= 35000000000000.0d0) then
tmp = x - (y * a)
else
tmp = x - a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -7e+22) {
tmp = x - a;
} else if (z <= 35000000000000.0) {
tmp = x - (y * a);
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -7e+22: tmp = x - a elif z <= 35000000000000.0: tmp = x - (y * a) else: tmp = x - a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -7e+22) tmp = Float64(x - a); elseif (z <= 35000000000000.0) tmp = Float64(x - Float64(y * a)); else tmp = Float64(x - a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -7e+22) tmp = x - a; elseif (z <= 35000000000000.0) tmp = x - (y * a); else tmp = x - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -7e+22], N[(x - a), $MachinePrecision], If[LessEqual[z, 35000000000000.0], N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7 \cdot 10^{+22}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq 35000000000000:\\
\;\;\;\;x - y \cdot a\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -7e22 or 3.5e13 < z Initial program 95.2%
Taylor expanded in z around inf
--lowering--.f6477.1%
Simplified77.1%
if -7e22 < z < 3.5e13Initial program 99.8%
Taylor expanded in z around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f6488.9%
Simplified88.9%
Taylor expanded in t around 0
--lowering--.f64N/A
*-lowering-*.f6472.8%
Simplified72.8%
Final simplification74.8%
(FPCore (x y z t a) :precision binary64 (if (<= z -8.8e+18) (- x a) (if (<= z 4.1e+15) x (- x a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -8.8e+18) {
tmp = x - a;
} else if (z <= 4.1e+15) {
tmp = x;
} else {
tmp = x - 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 (z <= (-8.8d+18)) then
tmp = x - a
else if (z <= 4.1d+15) then
tmp = x
else
tmp = x - a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -8.8e+18) {
tmp = x - a;
} else if (z <= 4.1e+15) {
tmp = x;
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -8.8e+18: tmp = x - a elif z <= 4.1e+15: tmp = x else: tmp = x - a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -8.8e+18) tmp = Float64(x - a); elseif (z <= 4.1e+15) tmp = x; else tmp = Float64(x - a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -8.8e+18) tmp = x - a; elseif (z <= 4.1e+15) tmp = x; else tmp = x - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -8.8e+18], N[(x - a), $MachinePrecision], If[LessEqual[z, 4.1e+15], x, N[(x - a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.8 \cdot 10^{+18}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq 4.1 \cdot 10^{+15}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -8.8e18 or 4.1e15 < z Initial program 95.2%
Taylor expanded in z around inf
--lowering--.f6477.7%
Simplified77.7%
if -8.8e18 < z < 4.1e15Initial program 99.8%
Taylor expanded in x around inf
Simplified57.7%
(FPCore (x y z t a) :precision binary64 (if (<= x -5e-181) x (if (<= x 1.2e-172) (- 0.0 a) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -5e-181) {
tmp = x;
} else if (x <= 1.2e-172) {
tmp = 0.0 - a;
} 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 (x <= (-5d-181)) then
tmp = x
else if (x <= 1.2d-172) then
tmp = 0.0d0 - a
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 (x <= -5e-181) {
tmp = x;
} else if (x <= 1.2e-172) {
tmp = 0.0 - a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -5e-181: tmp = x elif x <= 1.2e-172: tmp = 0.0 - a else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -5e-181) tmp = x; elseif (x <= 1.2e-172) tmp = Float64(0.0 - a); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -5e-181) tmp = x; elseif (x <= 1.2e-172) tmp = 0.0 - a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -5e-181], x, If[LessEqual[x, 1.2e-172], N[(0.0 - a), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5 \cdot 10^{-181}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 1.2 \cdot 10^{-172}:\\
\;\;\;\;0 - a\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -5.0000000000000001e-181 or 1.2e-172 < x Initial program 99.4%
Taylor expanded in x around inf
Simplified64.3%
if -5.0000000000000001e-181 < x < 1.2e-172Initial program 92.5%
Taylor expanded in z around inf
--lowering--.f6436.4%
Simplified36.4%
Taylor expanded in x around 0
mul-1-negN/A
neg-sub0N/A
--lowering--.f6435.6%
Simplified35.6%
sub0-negN/A
neg-lowering-neg.f6435.6%
Applied egg-rr35.6%
Final simplification57.1%
(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 97.6%
Taylor expanded in x around inf
Simplified51.0%
(FPCore (x y z t a) :precision binary64 (- x (* (/ (- y z) (+ (- t z) 1.0)) a)))
double code(double x, double y, double z, double t, double a) {
return x - (((y - z) / ((t - z) + 1.0)) * a);
}
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 - z) + 1.0d0)) * a)
end function
public static double code(double x, double y, double z, double t, double a) {
return x - (((y - z) / ((t - z) + 1.0)) * a);
}
def code(x, y, z, t, a): return x - (((y - z) / ((t - z) + 1.0)) * a)
function code(x, y, z, t, a) return Float64(x - Float64(Float64(Float64(y - z) / Float64(Float64(t - z) + 1.0)) * a)) end
function tmp = code(x, y, z, t, a) tmp = x - (((y - z) / ((t - z) + 1.0)) * a); end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(N[(y - z), $MachinePrecision] / N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{y - z}{\left(t - z\right) + 1} \cdot a
\end{array}
herbie shell --seed 2024161
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.SparkLine:renderSparkLine from Chart-1.5.3"
:precision binary64
:alt
(! :herbie-platform default (- x (* (/ (- y z) (+ (- t z) 1)) a)))
(- x (/ (- y z) (/ (+ (- t z) 1.0) a))))