
(FPCore (x y z t a) :precision binary64 (+ x (* y (/ (- z t) (- z a)))))
double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / (z - 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 - a)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / (z - a)));
}
def code(x, y, z, t, a): return x + (y * ((z - t) / (z - a)))
function code(x, y, z, t, a) return Float64(x + Float64(y * Float64(Float64(z - t) / Float64(z - a)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y * ((z - t) / (z - a))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \frac{z - t}{z - a}
\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) (- z a)))))
double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / (z - 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 - a)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / (z - a)));
}
def code(x, y, z, t, a): return x + (y * ((z - t) / (z - a)))
function code(x, y, z, t, a) return Float64(x + Float64(y * Float64(Float64(z - t) / Float64(z - a)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y * ((z - t) / (z - a))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \frac{z - t}{z - a}
\end{array}
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (/ (- z t) (- z a)))) (if (<= t_1 -5e+277) (- x (* t (/ y (- z a)))) (+ x (* t_1 y)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (z - t) / (z - a);
double tmp;
if (t_1 <= -5e+277) {
tmp = x - (t * (y / (z - a)));
} else {
tmp = x + (t_1 * y);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (z - t) / (z - a)
if (t_1 <= (-5d+277)) then
tmp = x - (t * (y / (z - a)))
else
tmp = x + (t_1 * y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (z - t) / (z - a);
double tmp;
if (t_1 <= -5e+277) {
tmp = x - (t * (y / (z - a)));
} else {
tmp = x + (t_1 * y);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (z - t) / (z - a) tmp = 0 if t_1 <= -5e+277: tmp = x - (t * (y / (z - a))) else: tmp = x + (t_1 * y) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(z - t) / Float64(z - a)) tmp = 0.0 if (t_1 <= -5e+277) tmp = Float64(x - Float64(t * Float64(y / Float64(z - a)))); else tmp = Float64(x + Float64(t_1 * y)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (z - t) / (z - a); tmp = 0.0; if (t_1 <= -5e+277) tmp = x - (t * (y / (z - a))); else tmp = x + (t_1 * y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+277], N[(x - N[(t * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t$95$1 * y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z - t}{z - a}\\
\mathbf{if}\;t_1 \leq -5 \cdot 10^{+277}:\\
\;\;\;\;x - t \cdot \frac{y}{z - a}\\
\mathbf{else}:\\
\;\;\;\;x + t_1 \cdot y\\
\end{array}
\end{array}
if (/.f64 (-.f64 z t) (-.f64 z a)) < -4.99999999999999982e277Initial program 27.3%
Taylor expanded in t around inf 27.3%
neg-mul-127.3%
distribute-neg-frac27.3%
Simplified27.3%
Taylor expanded in x around 0 99.3%
+-commutative99.3%
mul-1-neg99.3%
associate-*l/99.5%
distribute-lft-neg-in99.5%
cancel-sign-sub-inv99.5%
Simplified99.5%
if -4.99999999999999982e277 < (/.f64 (-.f64 z t) (-.f64 z a)) Initial program 99.9%
Final simplification99.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (* t (/ y z)))))
(if (<= z -4.5e+93)
(+ x y)
(if (<= z -3.4e-27)
t_1
(if (<= z -1.62e-87)
(+ x (/ y (/ a t)))
(if (<= z -5.1e-115)
t_1
(if (<= z 1.1e-194)
(+ x (* y (/ t a)))
(if (<= z 1.8e+32) t_1 (+ x y)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (t * (y / z));
double tmp;
if (z <= -4.5e+93) {
tmp = x + y;
} else if (z <= -3.4e-27) {
tmp = t_1;
} else if (z <= -1.62e-87) {
tmp = x + (y / (a / t));
} else if (z <= -5.1e-115) {
tmp = t_1;
} else if (z <= 1.1e-194) {
tmp = x + (y * (t / a));
} else if (z <= 1.8e+32) {
tmp = t_1;
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x - (t * (y / z))
if (z <= (-4.5d+93)) then
tmp = x + y
else if (z <= (-3.4d-27)) then
tmp = t_1
else if (z <= (-1.62d-87)) then
tmp = x + (y / (a / t))
else if (z <= (-5.1d-115)) then
tmp = t_1
else if (z <= 1.1d-194) then
tmp = x + (y * (t / a))
else if (z <= 1.8d+32) then
tmp = t_1
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x - (t * (y / z));
double tmp;
if (z <= -4.5e+93) {
tmp = x + y;
} else if (z <= -3.4e-27) {
tmp = t_1;
} else if (z <= -1.62e-87) {
tmp = x + (y / (a / t));
} else if (z <= -5.1e-115) {
tmp = t_1;
} else if (z <= 1.1e-194) {
tmp = x + (y * (t / a));
} else if (z <= 1.8e+32) {
tmp = t_1;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (t * (y / z)) tmp = 0 if z <= -4.5e+93: tmp = x + y elif z <= -3.4e-27: tmp = t_1 elif z <= -1.62e-87: tmp = x + (y / (a / t)) elif z <= -5.1e-115: tmp = t_1 elif z <= 1.1e-194: tmp = x + (y * (t / a)) elif z <= 1.8e+32: tmp = t_1 else: tmp = x + y return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(t * Float64(y / z))) tmp = 0.0 if (z <= -4.5e+93) tmp = Float64(x + y); elseif (z <= -3.4e-27) tmp = t_1; elseif (z <= -1.62e-87) tmp = Float64(x + Float64(y / Float64(a / t))); elseif (z <= -5.1e-115) tmp = t_1; elseif (z <= 1.1e-194) tmp = Float64(x + Float64(y * Float64(t / a))); elseif (z <= 1.8e+32) tmp = t_1; else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - (t * (y / z)); tmp = 0.0; if (z <= -4.5e+93) tmp = x + y; elseif (z <= -3.4e-27) tmp = t_1; elseif (z <= -1.62e-87) tmp = x + (y / (a / t)); elseif (z <= -5.1e-115) tmp = t_1; elseif (z <= 1.1e-194) tmp = x + (y * (t / a)); elseif (z <= 1.8e+32) tmp = t_1; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.5e+93], N[(x + y), $MachinePrecision], If[LessEqual[z, -3.4e-27], t$95$1, If[LessEqual[z, -1.62e-87], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -5.1e-115], t$95$1, If[LessEqual[z, 1.1e-194], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.8e+32], t$95$1, N[(x + y), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - t \cdot \frac{y}{z}\\
\mathbf{if}\;z \leq -4.5 \cdot 10^{+93}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq -3.4 \cdot 10^{-27}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.62 \cdot 10^{-87}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\
\mathbf{elif}\;z \leq -5.1 \cdot 10^{-115}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{-194}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{+32}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -4.49999999999999991e93 or 1.7999999999999998e32 < z Initial program 99.9%
Taylor expanded in z around inf 81.6%
if -4.49999999999999991e93 < z < -3.3999999999999997e-27 or -1.6200000000000001e-87 < z < -5.0999999999999997e-115 or 1.1000000000000001e-194 < z < 1.7999999999999998e32Initial program 93.0%
Taylor expanded in t around inf 76.3%
neg-mul-176.3%
distribute-neg-frac76.3%
Simplified76.3%
Taylor expanded in z around inf 73.5%
+-commutative73.5%
mul-1-neg73.5%
unsub-neg73.5%
associate-/l*69.8%
associate-/r/72.2%
Simplified72.2%
if -3.3999999999999997e-27 < z < -1.6200000000000001e-87Initial program 99.9%
Taylor expanded in z around 0 74.5%
associate-/l*87.0%
Simplified87.0%
if -5.0999999999999997e-115 < z < 1.1000000000000001e-194Initial program 98.4%
Taylor expanded in z around 0 88.8%
Final simplification80.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (/ t (/ z y)))))
(if (<= z -2.7e+94)
(+ x y)
(if (<= z -9.5e-28)
t_1
(if (<= z -1.6e-87)
(+ x (/ y (/ a t)))
(if (<= z -5e-115)
(- x (* t (/ y z)))
(if (<= z 1.1e-194)
(+ x (* y (/ t a)))
(if (<= z 2.8e+32) t_1 (+ x y)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (t / (z / y));
double tmp;
if (z <= -2.7e+94) {
tmp = x + y;
} else if (z <= -9.5e-28) {
tmp = t_1;
} else if (z <= -1.6e-87) {
tmp = x + (y / (a / t));
} else if (z <= -5e-115) {
tmp = x - (t * (y / z));
} else if (z <= 1.1e-194) {
tmp = x + (y * (t / a));
} else if (z <= 2.8e+32) {
tmp = t_1;
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x - (t / (z / y))
if (z <= (-2.7d+94)) then
tmp = x + y
else if (z <= (-9.5d-28)) then
tmp = t_1
else if (z <= (-1.6d-87)) then
tmp = x + (y / (a / t))
else if (z <= (-5d-115)) then
tmp = x - (t * (y / z))
else if (z <= 1.1d-194) then
tmp = x + (y * (t / a))
else if (z <= 2.8d+32) then
tmp = t_1
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x - (t / (z / y));
double tmp;
if (z <= -2.7e+94) {
tmp = x + y;
} else if (z <= -9.5e-28) {
tmp = t_1;
} else if (z <= -1.6e-87) {
tmp = x + (y / (a / t));
} else if (z <= -5e-115) {
tmp = x - (t * (y / z));
} else if (z <= 1.1e-194) {
tmp = x + (y * (t / a));
} else if (z <= 2.8e+32) {
tmp = t_1;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (t / (z / y)) tmp = 0 if z <= -2.7e+94: tmp = x + y elif z <= -9.5e-28: tmp = t_1 elif z <= -1.6e-87: tmp = x + (y / (a / t)) elif z <= -5e-115: tmp = x - (t * (y / z)) elif z <= 1.1e-194: tmp = x + (y * (t / a)) elif z <= 2.8e+32: tmp = t_1 else: tmp = x + y return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(t / Float64(z / y))) tmp = 0.0 if (z <= -2.7e+94) tmp = Float64(x + y); elseif (z <= -9.5e-28) tmp = t_1; elseif (z <= -1.6e-87) tmp = Float64(x + Float64(y / Float64(a / t))); elseif (z <= -5e-115) tmp = Float64(x - Float64(t * Float64(y / z))); elseif (z <= 1.1e-194) tmp = Float64(x + Float64(y * Float64(t / a))); elseif (z <= 2.8e+32) tmp = t_1; else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - (t / (z / y)); tmp = 0.0; if (z <= -2.7e+94) tmp = x + y; elseif (z <= -9.5e-28) tmp = t_1; elseif (z <= -1.6e-87) tmp = x + (y / (a / t)); elseif (z <= -5e-115) tmp = x - (t * (y / z)); elseif (z <= 1.1e-194) tmp = x + (y * (t / a)); elseif (z <= 2.8e+32) tmp = t_1; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(t / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.7e+94], N[(x + y), $MachinePrecision], If[LessEqual[z, -9.5e-28], t$95$1, If[LessEqual[z, -1.6e-87], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -5e-115], N[(x - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.1e-194], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.8e+32], t$95$1, N[(x + y), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \frac{t}{\frac{z}{y}}\\
\mathbf{if}\;z \leq -2.7 \cdot 10^{+94}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq -9.5 \cdot 10^{-28}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.6 \cdot 10^{-87}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\
\mathbf{elif}\;z \leq -5 \cdot 10^{-115}:\\
\;\;\;\;x - t \cdot \frac{y}{z}\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{-194}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{+32}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -2.7000000000000001e94 or 2.8e32 < z Initial program 99.9%
Taylor expanded in z around inf 81.6%
if -2.7000000000000001e94 < z < -9.50000000000000001e-28 or 1.1000000000000001e-194 < z < 2.8e32Initial program 94.8%
Taylor expanded in t around inf 78.9%
neg-mul-178.9%
distribute-neg-frac78.9%
Simplified78.9%
Taylor expanded in x around 0 82.6%
+-commutative82.6%
mul-1-neg82.6%
associate-*l/82.7%
distribute-lft-neg-in82.7%
cancel-sign-sub-inv82.7%
Simplified82.7%
Taylor expanded in z around inf 73.3%
*-commutative73.3%
associate-/l*71.9%
Simplified71.9%
if -9.50000000000000001e-28 < z < -1.59999999999999989e-87Initial program 99.9%
Taylor expanded in z around 0 74.5%
associate-/l*87.0%
Simplified87.0%
if -1.59999999999999989e-87 < z < -5.0000000000000003e-115Initial program 76.9%
Taylor expanded in t around inf 52.6%
neg-mul-152.6%
distribute-neg-frac52.6%
Simplified52.6%
Taylor expanded in z around inf 75.3%
+-commutative75.3%
mul-1-neg75.3%
unsub-neg75.3%
associate-/l*52.8%
associate-/r/75.5%
Simplified75.5%
if -5.0000000000000003e-115 < z < 1.1000000000000001e-194Initial program 98.4%
Taylor expanded in z around 0 88.8%
Final simplification80.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (/ t (/ z y)))))
(if (<= z -6.5e+93)
(+ x y)
(if (<= z -1.7e-27)
t_1
(if (<= z -1.62e-87)
(+ x (/ y (/ a t)))
(if (<= z -5.1e-115)
(/ (* (- z t) y) z)
(if (<= z 1.08e-194)
(+ x (* y (/ t a)))
(if (<= z 2.35e+34) t_1 (+ x y)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (t / (z / y));
double tmp;
if (z <= -6.5e+93) {
tmp = x + y;
} else if (z <= -1.7e-27) {
tmp = t_1;
} else if (z <= -1.62e-87) {
tmp = x + (y / (a / t));
} else if (z <= -5.1e-115) {
tmp = ((z - t) * y) / z;
} else if (z <= 1.08e-194) {
tmp = x + (y * (t / a));
} else if (z <= 2.35e+34) {
tmp = t_1;
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x - (t / (z / y))
if (z <= (-6.5d+93)) then
tmp = x + y
else if (z <= (-1.7d-27)) then
tmp = t_1
else if (z <= (-1.62d-87)) then
tmp = x + (y / (a / t))
else if (z <= (-5.1d-115)) then
tmp = ((z - t) * y) / z
else if (z <= 1.08d-194) then
tmp = x + (y * (t / a))
else if (z <= 2.35d+34) then
tmp = t_1
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x - (t / (z / y));
double tmp;
if (z <= -6.5e+93) {
tmp = x + y;
} else if (z <= -1.7e-27) {
tmp = t_1;
} else if (z <= -1.62e-87) {
tmp = x + (y / (a / t));
} else if (z <= -5.1e-115) {
tmp = ((z - t) * y) / z;
} else if (z <= 1.08e-194) {
tmp = x + (y * (t / a));
} else if (z <= 2.35e+34) {
tmp = t_1;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (t / (z / y)) tmp = 0 if z <= -6.5e+93: tmp = x + y elif z <= -1.7e-27: tmp = t_1 elif z <= -1.62e-87: tmp = x + (y / (a / t)) elif z <= -5.1e-115: tmp = ((z - t) * y) / z elif z <= 1.08e-194: tmp = x + (y * (t / a)) elif z <= 2.35e+34: tmp = t_1 else: tmp = x + y return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(t / Float64(z / y))) tmp = 0.0 if (z <= -6.5e+93) tmp = Float64(x + y); elseif (z <= -1.7e-27) tmp = t_1; elseif (z <= -1.62e-87) tmp = Float64(x + Float64(y / Float64(a / t))); elseif (z <= -5.1e-115) tmp = Float64(Float64(Float64(z - t) * y) / z); elseif (z <= 1.08e-194) tmp = Float64(x + Float64(y * Float64(t / a))); elseif (z <= 2.35e+34) tmp = t_1; else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - (t / (z / y)); tmp = 0.0; if (z <= -6.5e+93) tmp = x + y; elseif (z <= -1.7e-27) tmp = t_1; elseif (z <= -1.62e-87) tmp = x + (y / (a / t)); elseif (z <= -5.1e-115) tmp = ((z - t) * y) / z; elseif (z <= 1.08e-194) tmp = x + (y * (t / a)); elseif (z <= 2.35e+34) tmp = t_1; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(t / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.5e+93], N[(x + y), $MachinePrecision], If[LessEqual[z, -1.7e-27], t$95$1, If[LessEqual[z, -1.62e-87], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -5.1e-115], N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 1.08e-194], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.35e+34], t$95$1, N[(x + y), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \frac{t}{\frac{z}{y}}\\
\mathbf{if}\;z \leq -6.5 \cdot 10^{+93}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq -1.7 \cdot 10^{-27}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.62 \cdot 10^{-87}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\
\mathbf{elif}\;z \leq -5.1 \cdot 10^{-115}:\\
\;\;\;\;\frac{\left(z - t\right) \cdot y}{z}\\
\mathbf{elif}\;z \leq 1.08 \cdot 10^{-194}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{elif}\;z \leq 2.35 \cdot 10^{+34}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -6.4999999999999998e93 or 2.35000000000000007e34 < z Initial program 99.9%
Taylor expanded in z around inf 81.6%
if -6.4999999999999998e93 < z < -1.69999999999999985e-27 or 1.08e-194 < z < 2.35000000000000007e34Initial program 94.8%
Taylor expanded in t around inf 78.9%
neg-mul-178.9%
distribute-neg-frac78.9%
Simplified78.9%
Taylor expanded in x around 0 82.6%
+-commutative82.6%
mul-1-neg82.6%
associate-*l/82.7%
distribute-lft-neg-in82.7%
cancel-sign-sub-inv82.7%
Simplified82.7%
Taylor expanded in z around inf 73.3%
*-commutative73.3%
associate-/l*71.9%
Simplified71.9%
if -1.69999999999999985e-27 < z < -1.6200000000000001e-87Initial program 99.9%
Taylor expanded in z around 0 74.5%
associate-/l*87.0%
Simplified87.0%
if -1.6200000000000001e-87 < z < -5.0999999999999997e-115Initial program 76.9%
Taylor expanded in a around 0 99.4%
+-commutative99.4%
*-commutative99.4%
associate-/l*76.9%
Simplified76.9%
Taylor expanded in x around 0 80.8%
if -5.0999999999999997e-115 < z < 1.08e-194Initial program 98.4%
Taylor expanded in z around 0 88.8%
Final simplification81.1%
(FPCore (x y z t a)
:precision binary64
(if (<= z -8.2e+92)
(+ x y)
(if (<= z -2.8e-27)
(- x (/ t (/ z y)))
(if (<= z -1.6e-87)
(+ x (/ y (/ a t)))
(if (<= z -5.1e-115)
(/ (* (- z t) y) z)
(if (<= z 1.1e-194)
(+ x (* y (/ t a)))
(if (<= z 2.3e+34) (- x (/ (* t y) z)) (+ x y))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -8.2e+92) {
tmp = x + y;
} else if (z <= -2.8e-27) {
tmp = x - (t / (z / y));
} else if (z <= -1.6e-87) {
tmp = x + (y / (a / t));
} else if (z <= -5.1e-115) {
tmp = ((z - t) * y) / z;
} else if (z <= 1.1e-194) {
tmp = x + (y * (t / a));
} else if (z <= 2.3e+34) {
tmp = x - ((t * y) / z);
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-8.2d+92)) then
tmp = x + y
else if (z <= (-2.8d-27)) then
tmp = x - (t / (z / y))
else if (z <= (-1.6d-87)) then
tmp = x + (y / (a / t))
else if (z <= (-5.1d-115)) then
tmp = ((z - t) * y) / z
else if (z <= 1.1d-194) then
tmp = x + (y * (t / a))
else if (z <= 2.3d+34) then
tmp = x - ((t * y) / z)
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -8.2e+92) {
tmp = x + y;
} else if (z <= -2.8e-27) {
tmp = x - (t / (z / y));
} else if (z <= -1.6e-87) {
tmp = x + (y / (a / t));
} else if (z <= -5.1e-115) {
tmp = ((z - t) * y) / z;
} else if (z <= 1.1e-194) {
tmp = x + (y * (t / a));
} else if (z <= 2.3e+34) {
tmp = x - ((t * y) / z);
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -8.2e+92: tmp = x + y elif z <= -2.8e-27: tmp = x - (t / (z / y)) elif z <= -1.6e-87: tmp = x + (y / (a / t)) elif z <= -5.1e-115: tmp = ((z - t) * y) / z elif z <= 1.1e-194: tmp = x + (y * (t / a)) elif z <= 2.3e+34: tmp = x - ((t * y) / z) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -8.2e+92) tmp = Float64(x + y); elseif (z <= -2.8e-27) tmp = Float64(x - Float64(t / Float64(z / y))); elseif (z <= -1.6e-87) tmp = Float64(x + Float64(y / Float64(a / t))); elseif (z <= -5.1e-115) tmp = Float64(Float64(Float64(z - t) * y) / z); elseif (z <= 1.1e-194) tmp = Float64(x + Float64(y * Float64(t / a))); elseif (z <= 2.3e+34) tmp = Float64(x - Float64(Float64(t * y) / z)); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -8.2e+92) tmp = x + y; elseif (z <= -2.8e-27) tmp = x - (t / (z / y)); elseif (z <= -1.6e-87) tmp = x + (y / (a / t)); elseif (z <= -5.1e-115) tmp = ((z - t) * y) / z; elseif (z <= 1.1e-194) tmp = x + (y * (t / a)); elseif (z <= 2.3e+34) tmp = x - ((t * y) / z); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -8.2e+92], N[(x + y), $MachinePrecision], If[LessEqual[z, -2.8e-27], N[(x - N[(t / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.6e-87], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -5.1e-115], N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 1.1e-194], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.3e+34], N[(x - N[(N[(t * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.2 \cdot 10^{+92}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq -2.8 \cdot 10^{-27}:\\
\;\;\;\;x - \frac{t}{\frac{z}{y}}\\
\mathbf{elif}\;z \leq -1.6 \cdot 10^{-87}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\
\mathbf{elif}\;z \leq -5.1 \cdot 10^{-115}:\\
\;\;\;\;\frac{\left(z - t\right) \cdot y}{z}\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{-194}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{elif}\;z \leq 2.3 \cdot 10^{+34}:\\
\;\;\;\;x - \frac{t \cdot y}{z}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -8.20000000000000047e92 or 2.2999999999999998e34 < z Initial program 99.9%
Taylor expanded in z around inf 81.6%
if -8.20000000000000047e92 < z < -2.8e-27Initial program 96.4%
Taylor expanded in t around inf 86.2%
neg-mul-186.2%
distribute-neg-frac86.2%
Simplified86.2%
Taylor expanded in x around 0 89.6%
+-commutative89.6%
mul-1-neg89.6%
associate-*l/89.6%
distribute-lft-neg-in89.6%
cancel-sign-sub-inv89.6%
Simplified89.6%
Taylor expanded in z around inf 82.5%
*-commutative82.5%
associate-/l*82.5%
Simplified82.5%
if -2.8e-27 < z < -1.59999999999999989e-87Initial program 99.9%
Taylor expanded in z around 0 74.5%
associate-/l*87.0%
Simplified87.0%
if -1.59999999999999989e-87 < z < -5.0999999999999997e-115Initial program 76.9%
Taylor expanded in a around 0 99.4%
+-commutative99.4%
*-commutative99.4%
associate-/l*76.9%
Simplified76.9%
Taylor expanded in x around 0 80.8%
if -5.0999999999999997e-115 < z < 1.1000000000000001e-194Initial program 98.4%
Taylor expanded in z around 0 88.8%
if 1.1000000000000001e-194 < z < 2.2999999999999998e34Initial program 93.8%
Taylor expanded in a around 0 67.6%
+-commutative67.6%
*-commutative67.6%
associate-/l*65.0%
Simplified65.0%
Taylor expanded in z around 0 67.6%
associate-*r/67.6%
associate-*r*67.6%
neg-mul-167.6%
*-commutative67.6%
Simplified67.6%
Final simplification81.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (/ z (- z a))))))
(if (<= z -6.8e+90)
t_1
(if (<= z -5200000000000.0)
(- x (/ y (/ z t)))
(if (or (<= z -1.06e-27) (not (<= z 2.9e-155)))
t_1
(+ x (* t (/ y a))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * (z / (z - a)));
double tmp;
if (z <= -6.8e+90) {
tmp = t_1;
} else if (z <= -5200000000000.0) {
tmp = x - (y / (z / t));
} else if ((z <= -1.06e-27) || !(z <= 2.9e-155)) {
tmp = t_1;
} else {
tmp = x + (t * (y / 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) :: t_1
real(8) :: tmp
t_1 = x + (y * (z / (z - a)))
if (z <= (-6.8d+90)) then
tmp = t_1
else if (z <= (-5200000000000.0d0)) then
tmp = x - (y / (z / t))
else if ((z <= (-1.06d-27)) .or. (.not. (z <= 2.9d-155))) then
tmp = t_1
else
tmp = x + (t * (y / a))
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 / (z - a)));
double tmp;
if (z <= -6.8e+90) {
tmp = t_1;
} else if (z <= -5200000000000.0) {
tmp = x - (y / (z / t));
} else if ((z <= -1.06e-27) || !(z <= 2.9e-155)) {
tmp = t_1;
} else {
tmp = x + (t * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * (z / (z - a))) tmp = 0 if z <= -6.8e+90: tmp = t_1 elif z <= -5200000000000.0: tmp = x - (y / (z / t)) elif (z <= -1.06e-27) or not (z <= 2.9e-155): tmp = t_1 else: tmp = x + (t * (y / a)) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y * Float64(z / Float64(z - a)))) tmp = 0.0 if (z <= -6.8e+90) tmp = t_1; elseif (z <= -5200000000000.0) tmp = Float64(x - Float64(y / Float64(z / t))); elseif ((z <= -1.06e-27) || !(z <= 2.9e-155)) tmp = t_1; else tmp = Float64(x + Float64(t * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y * (z / (z - a))); tmp = 0.0; if (z <= -6.8e+90) tmp = t_1; elseif (z <= -5200000000000.0) tmp = x - (y / (z / t)); elseif ((z <= -1.06e-27) || ~((z <= 2.9e-155))) tmp = t_1; else tmp = x + (t * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.8e+90], t$95$1, If[LessEqual[z, -5200000000000.0], N[(x - N[(y / N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -1.06e-27], N[Not[LessEqual[z, 2.9e-155]], $MachinePrecision]], t$95$1, N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z}{z - a}\\
\mathbf{if}\;z \leq -6.8 \cdot 10^{+90}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -5200000000000:\\
\;\;\;\;x - \frac{y}{\frac{z}{t}}\\
\mathbf{elif}\;z \leq -1.06 \cdot 10^{-27} \lor \neg \left(z \leq 2.9 \cdot 10^{-155}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\end{array}
\end{array}
if z < -6.80000000000000036e90 or -5.2e12 < z < -1.05999999999999998e-27 or 2.9000000000000001e-155 < z Initial program 97.9%
Taylor expanded in t around 0 83.4%
if -6.80000000000000036e90 < z < -5.2e12Initial program 99.8%
Taylor expanded in a around 0 93.9%
+-commutative93.9%
*-commutative93.9%
associate-/l*94.0%
Simplified94.0%
Taylor expanded in z around 0 93.9%
mul-1-neg93.9%
associate-/l*94.0%
distribute-neg-frac94.0%
Simplified94.0%
if -1.05999999999999998e-27 < z < 2.9000000000000001e-155Initial program 96.0%
Taylor expanded in t around inf 88.0%
neg-mul-188.0%
distribute-neg-frac88.0%
Simplified88.0%
Taylor expanded in z around 0 73.8%
associate-*l/79.8%
*-commutative79.8%
Simplified79.8%
Final simplification82.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -9.6e-77) (not (<= t 5e-63))) (- x (* t (/ y (- z a)))) (+ x (* y (/ z (- z a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -9.6e-77) || !(t <= 5e-63)) {
tmp = x - (t * (y / (z - a)));
} else {
tmp = x + (y * (z / (z - a)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((t <= (-9.6d-77)) .or. (.not. (t <= 5d-63))) then
tmp = x - (t * (y / (z - a)))
else
tmp = x + (y * (z / (z - a)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -9.6e-77) || !(t <= 5e-63)) {
tmp = x - (t * (y / (z - a)));
} else {
tmp = x + (y * (z / (z - a)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -9.6e-77) or not (t <= 5e-63): tmp = x - (t * (y / (z - a))) else: tmp = x + (y * (z / (z - a))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -9.6e-77) || !(t <= 5e-63)) tmp = Float64(x - Float64(t * Float64(y / Float64(z - a)))); else tmp = Float64(x + Float64(y * Float64(z / Float64(z - a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -9.6e-77) || ~((t <= 5e-63))) tmp = x - (t * (y / (z - a))); else tmp = x + (y * (z / (z - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -9.6e-77], N[Not[LessEqual[t, 5e-63]], $MachinePrecision]], N[(x - N[(t * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -9.6 \cdot 10^{-77} \lor \neg \left(t \leq 5 \cdot 10^{-63}\right):\\
\;\;\;\;x - t \cdot \frac{y}{z - a}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{z - a}\\
\end{array}
\end{array}
if t < -9.59999999999999961e-77 or 5.0000000000000002e-63 < t Initial program 95.5%
Taylor expanded in t around inf 84.4%
neg-mul-184.4%
distribute-neg-frac84.4%
Simplified84.4%
Taylor expanded in x around 0 82.5%
+-commutative82.5%
mul-1-neg82.5%
associate-*l/88.6%
distribute-lft-neg-in88.6%
cancel-sign-sub-inv88.6%
Simplified88.6%
if -9.59999999999999961e-77 < t < 5.0000000000000002e-63Initial program 99.9%
Taylor expanded in t around 0 91.2%
Final simplification89.7%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.62e-12) (+ x (* y (/ z (- z a)))) (if (<= a 4.3e-52) (+ x (* y (/ (- z t) z))) (+ x (* y (/ t a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.62e-12) {
tmp = x + (y * (z / (z - a)));
} else if (a <= 4.3e-52) {
tmp = x + (y * ((z - t) / z));
} else {
tmp = x + (y * (t / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-1.62d-12)) then
tmp = x + (y * (z / (z - a)))
else if (a <= 4.3d-52) then
tmp = x + (y * ((z - t) / z))
else
tmp = x + (y * (t / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.62e-12) {
tmp = x + (y * (z / (z - a)));
} else if (a <= 4.3e-52) {
tmp = x + (y * ((z - t) / z));
} else {
tmp = x + (y * (t / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.62e-12: tmp = x + (y * (z / (z - a))) elif a <= 4.3e-52: tmp = x + (y * ((z - t) / z)) else: tmp = x + (y * (t / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.62e-12) tmp = Float64(x + Float64(y * Float64(z / Float64(z - a)))); elseif (a <= 4.3e-52) tmp = Float64(x + Float64(y * Float64(Float64(z - t) / z))); else tmp = Float64(x + Float64(y * Float64(t / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.62e-12) tmp = x + (y * (z / (z - a))); elseif (a <= 4.3e-52) tmp = x + (y * ((z - t) / z)); else tmp = x + (y * (t / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.62e-12], N[(x + N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4.3e-52], N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.62 \cdot 10^{-12}:\\
\;\;\;\;x + y \cdot \frac{z}{z - a}\\
\mathbf{elif}\;a \leq 4.3 \cdot 10^{-52}:\\
\;\;\;\;x + y \cdot \frac{z - t}{z}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\end{array}
\end{array}
if a < -1.62e-12Initial program 99.8%
Taylor expanded in t around 0 77.4%
if -1.62e-12 < a < 4.3000000000000003e-52Initial program 94.4%
Taylor expanded in a around 0 83.2%
if 4.3000000000000003e-52 < a Initial program 99.9%
Taylor expanded in z around 0 83.8%
Final simplification81.7%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.6e-12) (+ x (* y (/ z (- z a)))) (if (<= a 1.22e-51) (+ x (/ (- z t) (/ z y))) (+ x (* y (/ t a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.6e-12) {
tmp = x + (y * (z / (z - a)));
} else if (a <= 1.22e-51) {
tmp = x + ((z - t) / (z / y));
} else {
tmp = x + (y * (t / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-1.6d-12)) then
tmp = x + (y * (z / (z - a)))
else if (a <= 1.22d-51) then
tmp = x + ((z - t) / (z / y))
else
tmp = x + (y * (t / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.6e-12) {
tmp = x + (y * (z / (z - a)));
} else if (a <= 1.22e-51) {
tmp = x + ((z - t) / (z / y));
} else {
tmp = x + (y * (t / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.6e-12: tmp = x + (y * (z / (z - a))) elif a <= 1.22e-51: tmp = x + ((z - t) / (z / y)) else: tmp = x + (y * (t / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.6e-12) tmp = Float64(x + Float64(y * Float64(z / Float64(z - a)))); elseif (a <= 1.22e-51) tmp = Float64(x + Float64(Float64(z - t) / Float64(z / y))); else tmp = Float64(x + Float64(y * Float64(t / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.6e-12) tmp = x + (y * (z / (z - a))); elseif (a <= 1.22e-51) tmp = x + ((z - t) / (z / y)); else tmp = x + (y * (t / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.6e-12], N[(x + N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.22e-51], N[(x + N[(N[(z - t), $MachinePrecision] / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.6 \cdot 10^{-12}:\\
\;\;\;\;x + y \cdot \frac{z}{z - a}\\
\mathbf{elif}\;a \leq 1.22 \cdot 10^{-51}:\\
\;\;\;\;x + \frac{z - t}{\frac{z}{y}}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\end{array}
\end{array}
if a < -1.6e-12Initial program 99.8%
Taylor expanded in t around 0 77.4%
if -1.6e-12 < a < 1.21999999999999998e-51Initial program 94.4%
*-commutative94.4%
associate-*l/89.5%
associate-/l*95.1%
Applied egg-rr95.1%
Taylor expanded in z around inf 84.1%
if 1.21999999999999998e-51 < a Initial program 99.9%
Taylor expanded in z around 0 83.8%
Final simplification82.2%
(FPCore (x y z t a) :precision binary64 (if (<= a -2.6e-11) (+ x (* y (/ z (- z a)))) (if (<= a 1.38e-52) (+ x (/ y (/ z (- z t)))) (+ x (* y (/ t a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.6e-11) {
tmp = x + (y * (z / (z - a)));
} else if (a <= 1.38e-52) {
tmp = x + (y / (z / (z - t)));
} else {
tmp = x + (y * (t / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-2.6d-11)) then
tmp = x + (y * (z / (z - a)))
else if (a <= 1.38d-52) then
tmp = x + (y / (z / (z - t)))
else
tmp = x + (y * (t / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.6e-11) {
tmp = x + (y * (z / (z - a)));
} else if (a <= 1.38e-52) {
tmp = x + (y / (z / (z - t)));
} else {
tmp = x + (y * (t / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -2.6e-11: tmp = x + (y * (z / (z - a))) elif a <= 1.38e-52: tmp = x + (y / (z / (z - t))) else: tmp = x + (y * (t / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2.6e-11) tmp = Float64(x + Float64(y * Float64(z / Float64(z - a)))); elseif (a <= 1.38e-52) tmp = Float64(x + Float64(y / Float64(z / Float64(z - t)))); else tmp = Float64(x + Float64(y * Float64(t / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -2.6e-11) tmp = x + (y * (z / (z - a))); elseif (a <= 1.38e-52) tmp = x + (y / (z / (z - t))); else tmp = x + (y * (t / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.6e-11], N[(x + N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.38e-52], N[(x + N[(y / N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.6 \cdot 10^{-11}:\\
\;\;\;\;x + y \cdot \frac{z}{z - a}\\
\mathbf{elif}\;a \leq 1.38 \cdot 10^{-52}:\\
\;\;\;\;x + \frac{y}{\frac{z}{z - t}}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\end{array}
\end{array}
if a < -2.6000000000000001e-11Initial program 99.8%
Taylor expanded in t around 0 77.4%
if -2.6000000000000001e-11 < a < 1.38000000000000008e-52Initial program 94.4%
Taylor expanded in a around 0 77.6%
+-commutative77.6%
*-commutative77.6%
associate-/l*84.5%
Simplified84.5%
if 1.38000000000000008e-52 < a Initial program 99.9%
Taylor expanded in z around 0 83.8%
Final simplification82.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -5.7e+78) (not (<= y 1.35e+161))) (* y (- 1.0 (/ t z))) (+ x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -5.7e+78) || !(y <= 1.35e+161)) {
tmp = y * (1.0 - (t / z));
} 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 ((y <= (-5.7d+78)) .or. (.not. (y <= 1.35d+161))) then
tmp = y * (1.0d0 - (t / z))
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 ((y <= -5.7e+78) || !(y <= 1.35e+161)) {
tmp = y * (1.0 - (t / z));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -5.7e+78) or not (y <= 1.35e+161): tmp = y * (1.0 - (t / z)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -5.7e+78) || !(y <= 1.35e+161)) tmp = Float64(y * Float64(1.0 - Float64(t / z))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -5.7e+78) || ~((y <= 1.35e+161))) tmp = y * (1.0 - (t / z)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -5.7e+78], N[Not[LessEqual[y, 1.35e+161]], $MachinePrecision]], N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.7 \cdot 10^{+78} \lor \neg \left(y \leq 1.35 \cdot 10^{+161}\right):\\
\;\;\;\;y \cdot \left(1 - \frac{t}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if y < -5.69999999999999986e78 or 1.3499999999999999e161 < y Initial program 99.9%
Taylor expanded in a around 0 44.1%
+-commutative44.1%
*-commutative44.1%
associate-/l*56.6%
Simplified56.6%
Taylor expanded in y around inf 51.1%
if -5.69999999999999986e78 < y < 1.3499999999999999e161Initial program 96.4%
Taylor expanded in z around inf 67.1%
Final simplification62.7%
(FPCore (x y z t a) :precision binary64 (if (<= z -4.3e+102) (+ x y) (if (<= z 2700000.0) (+ x (* y (/ t a))) (+ x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4.3e+102) {
tmp = x + y;
} else if (z <= 2700000.0) {
tmp = x + (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 (z <= (-4.3d+102)) then
tmp = x + y
else if (z <= 2700000.0d0) then
tmp = x + (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 (z <= -4.3e+102) {
tmp = x + y;
} else if (z <= 2700000.0) {
tmp = x + (y * (t / a));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -4.3e+102: tmp = x + y elif z <= 2700000.0: tmp = x + (y * (t / a)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -4.3e+102) tmp = Float64(x + y); elseif (z <= 2700000.0) tmp = Float64(x + 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 (z <= -4.3e+102) tmp = x + y; elseif (z <= 2700000.0) tmp = x + (y * (t / a)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4.3e+102], N[(x + y), $MachinePrecision], If[LessEqual[z, 2700000.0], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.3 \cdot 10^{+102}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq 2700000:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -4.3000000000000001e102 or 2.7e6 < z Initial program 99.9%
Taylor expanded in z around inf 80.2%
if -4.3000000000000001e102 < z < 2.7e6Initial program 95.8%
Taylor expanded in z around 0 72.8%
Final simplification75.5%
(FPCore (x y z t a) :precision binary64 (if (<= z -2.6e+102) (+ x y) (if (<= z 44000000.0) (+ x (/ y (/ a t))) (+ x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.6e+102) {
tmp = x + y;
} else if (z <= 44000000.0) {
tmp = x + (y / (a / t));
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-2.6d+102)) then
tmp = x + y
else if (z <= 44000000.0d0) then
tmp = x + (y / (a / t))
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.6e+102) {
tmp = x + y;
} else if (z <= 44000000.0) {
tmp = x + (y / (a / t));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.6e+102: tmp = x + y elif z <= 44000000.0: tmp = x + (y / (a / t)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.6e+102) tmp = Float64(x + y); elseif (z <= 44000000.0) tmp = Float64(x + Float64(y / Float64(a / t))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.6e+102) tmp = x + y; elseif (z <= 44000000.0) tmp = x + (y / (a / t)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.6e+102], N[(x + y), $MachinePrecision], If[LessEqual[z, 44000000.0], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.6 \cdot 10^{+102}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq 44000000:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -2.60000000000000006e102 or 4.4e7 < z Initial program 99.9%
Taylor expanded in z around inf 80.2%
if -2.60000000000000006e102 < z < 4.4e7Initial program 95.8%
Taylor expanded in z around 0 68.3%
associate-/l*72.8%
Simplified72.8%
Final simplification75.5%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.2e-27) (+ x y) (if (<= z 9e-27) x (+ x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.2e-27) {
tmp = x + y;
} else if (z <= 9e-27) {
tmp = x;
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-1.2d-27)) then
tmp = x + y
else if (z <= 9d-27) then
tmp = x
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.2e-27) {
tmp = x + y;
} else if (z <= 9e-27) {
tmp = x;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.2e-27: tmp = x + y elif z <= 9e-27: tmp = x else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.2e-27) tmp = Float64(x + y); elseif (z <= 9e-27) tmp = x; else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.2e-27) tmp = x + y; elseif (z <= 9e-27) tmp = x; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.2e-27], N[(x + y), $MachinePrecision], If[LessEqual[z, 9e-27], x, N[(x + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.2 \cdot 10^{-27}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq 9 \cdot 10^{-27}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -1.20000000000000001e-27 or 9.0000000000000003e-27 < z Initial program 99.2%
Taylor expanded in z around inf 74.4%
if -1.20000000000000001e-27 < z < 9.0000000000000003e-27Initial program 95.3%
Taylor expanded in x around inf 47.4%
Final simplification61.4%
(FPCore (x y z t a) :precision binary64 (if (<= x -1.75e-246) x (if (<= x 8.8e-114) y x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -1.75e-246) {
tmp = x;
} else if (x <= 8.8e-114) {
tmp = 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 (x <= (-1.75d-246)) then
tmp = x
else if (x <= 8.8d-114) then
tmp = 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 (x <= -1.75e-246) {
tmp = x;
} else if (x <= 8.8e-114) {
tmp = y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -1.75e-246: tmp = x elif x <= 8.8e-114: tmp = y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -1.75e-246) tmp = x; elseif (x <= 8.8e-114) tmp = y; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -1.75e-246) tmp = x; elseif (x <= 8.8e-114) tmp = y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -1.75e-246], x, If[LessEqual[x, 8.8e-114], y, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.75 \cdot 10^{-246}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 8.8 \cdot 10^{-114}:\\
\;\;\;\;y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -1.7500000000000001e-246 or 8.80000000000000045e-114 < x Initial program 97.0%
Taylor expanded in x around inf 62.2%
if -1.7500000000000001e-246 < x < 8.80000000000000045e-114Initial program 98.4%
Taylor expanded in a around 0 56.3%
+-commutative56.3%
*-commutative56.3%
associate-/l*61.1%
Simplified61.1%
Taylor expanded in y around inf 53.3%
Taylor expanded in t around 0 33.9%
Final simplification55.4%
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
return x;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x
end function
public static double code(double x, double y, double z, double t, double a) {
return x;
}
def code(x, y, z, t, a): return x
function code(x, y, z, t, a) return x end
function tmp = code(x, y, z, t, a) tmp = x; end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 97.3%
Taylor expanded in x around inf 51.1%
Final simplification51.1%
(FPCore (x y z t a) :precision binary64 (+ x (/ y (/ (- z a) (- z t)))))
double code(double x, double y, double z, double t, double a) {
return x + (y / ((z - a) / (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 + (y / ((z - a) / (z - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y / ((z - a) / (z - t)));
}
def code(x, y, z, t, a): return x + (y / ((z - a) / (z - t)))
function code(x, y, z, t, a) return Float64(x + Float64(y / Float64(Float64(z - a) / Float64(z - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y / ((z - a) / (z - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y / N[(N[(z - a), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y}{\frac{z - a}{z - t}}
\end{array}
herbie shell --seed 2023196
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisLine from plot-0.2.3.4, A"
:precision binary64
:herbie-target
(+ x (/ y (/ (- z a) (- z t))))
(+ x (* y (/ (- z t) (- z a)))))