
(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(Float64(y * 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[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - t\right)}{z - a}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 13 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(Float64(y * 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[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - t\right)}{z - a}
\end{array}
(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(Float64(y / 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[(N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y}{z - a} \cdot \left(z - t\right)
\end{array}
Initial program 84.5%
associate-*l/96.9%
Simplified96.9%
Final simplification96.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (/ z (- z a))))))
(if (<= z -3.8e+107)
t_1
(if (<= z -4.6e+68)
(+ x (* y (/ t a)))
(if (<= z -1.15e-100)
t_1
(if (<= z -1.25e-198)
(+ x (/ (* y (- z t)) z))
(if (<= z 6e-26)
(+ x (/ (* y t) a))
(if (<= z 2.3e+150) (- x (* t (/ y z))) t_1))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * (z / (z - a)));
double tmp;
if (z <= -3.8e+107) {
tmp = t_1;
} else if (z <= -4.6e+68) {
tmp = x + (y * (t / a));
} else if (z <= -1.15e-100) {
tmp = t_1;
} else if (z <= -1.25e-198) {
tmp = x + ((y * (z - t)) / z);
} else if (z <= 6e-26) {
tmp = x + ((y * t) / a);
} else if (z <= 2.3e+150) {
tmp = x - (t * (y / z));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + (y * (z / (z - a)))
if (z <= (-3.8d+107)) then
tmp = t_1
else if (z <= (-4.6d+68)) then
tmp = x + (y * (t / a))
else if (z <= (-1.15d-100)) then
tmp = t_1
else if (z <= (-1.25d-198)) then
tmp = x + ((y * (z - t)) / z)
else if (z <= 6d-26) then
tmp = x + ((y * t) / a)
else if (z <= 2.3d+150) then
tmp = x - (t * (y / z))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * (z / (z - a)));
double tmp;
if (z <= -3.8e+107) {
tmp = t_1;
} else if (z <= -4.6e+68) {
tmp = x + (y * (t / a));
} else if (z <= -1.15e-100) {
tmp = t_1;
} else if (z <= -1.25e-198) {
tmp = x + ((y * (z - t)) / z);
} else if (z <= 6e-26) {
tmp = x + ((y * t) / a);
} else if (z <= 2.3e+150) {
tmp = x - (t * (y / z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * (z / (z - a))) tmp = 0 if z <= -3.8e+107: tmp = t_1 elif z <= -4.6e+68: tmp = x + (y * (t / a)) elif z <= -1.15e-100: tmp = t_1 elif z <= -1.25e-198: tmp = x + ((y * (z - t)) / z) elif z <= 6e-26: tmp = x + ((y * t) / a) elif z <= 2.3e+150: tmp = x - (t * (y / z)) else: tmp = t_1 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 <= -3.8e+107) tmp = t_1; elseif (z <= -4.6e+68) tmp = Float64(x + Float64(y * Float64(t / a))); elseif (z <= -1.15e-100) tmp = t_1; elseif (z <= -1.25e-198) tmp = Float64(x + Float64(Float64(y * Float64(z - t)) / z)); elseif (z <= 6e-26) tmp = Float64(x + Float64(Float64(y * t) / a)); elseif (z <= 2.3e+150) tmp = Float64(x - Float64(t * Float64(y / z))); else tmp = t_1; 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 <= -3.8e+107) tmp = t_1; elseif (z <= -4.6e+68) tmp = x + (y * (t / a)); elseif (z <= -1.15e-100) tmp = t_1; elseif (z <= -1.25e-198) tmp = x + ((y * (z - t)) / z); elseif (z <= 6e-26) tmp = x + ((y * t) / a); elseif (z <= 2.3e+150) tmp = x - (t * (y / z)); else tmp = t_1; 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, -3.8e+107], t$95$1, If[LessEqual[z, -4.6e+68], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.15e-100], t$95$1, If[LessEqual[z, -1.25e-198], N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6e-26], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.3e+150], N[(x - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z}{z - a}\\
\mathbf{if}\;z \leq -3.8 \cdot 10^{+107}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -4.6 \cdot 10^{+68}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{elif}\;z \leq -1.15 \cdot 10^{-100}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.25 \cdot 10^{-198}:\\
\;\;\;\;x + \frac{y \cdot \left(z - t\right)}{z}\\
\mathbf{elif}\;z \leq 6 \cdot 10^{-26}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\mathbf{elif}\;z \leq 2.3 \cdot 10^{+150}:\\
\;\;\;\;x - t \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -3.7999999999999998e107 or -4.6e68 < z < -1.14999999999999997e-100 or 2.30000000000000001e150 < z Initial program 72.0%
associate-*l/96.3%
Simplified96.3%
Taylor expanded in t around 0 68.8%
*-commutative68.8%
associate-/l*89.6%
associate-/r/91.6%
Simplified91.6%
if -3.7999999999999998e107 < z < -4.6e68Initial program 92.2%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in z around 0 89.0%
+-commutative89.0%
associate-/l*96.6%
associate-/r/96.8%
Simplified96.8%
if -1.14999999999999997e-100 < z < -1.25e-198Initial program 99.9%
associate-*l/93.1%
Simplified93.1%
Taylor expanded in a around 0 78.6%
if -1.25e-198 < z < 6.00000000000000023e-26Initial program 98.7%
associate-*l/96.3%
Simplified96.3%
Taylor expanded in z around 0 83.0%
if 6.00000000000000023e-26 < z < 2.30000000000000001e150Initial program 83.1%
Taylor expanded in z around 0 80.6%
mul-1-neg80.6%
distribute-lft-neg-out80.6%
*-commutative80.6%
Simplified80.6%
Taylor expanded in z around inf 79.1%
mul-1-neg79.1%
associate-*r/85.3%
distribute-rgt-neg-in85.3%
Simplified85.3%
Final simplification87.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (/ z (- z a))))))
(if (<= z -3.8e+107)
t_1
(if (<= z -3.1e+68)
(+ x (* y (/ t a)))
(if (<= z -8.6e-103)
t_1
(if (<= z -6.9e-192)
(+ x (/ (* y (- z t)) z))
(if (<= z 9.2e-29)
(+ x (/ (* y t) a))
(+ x (* (- z t) (/ y z))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * (z / (z - a)));
double tmp;
if (z <= -3.8e+107) {
tmp = t_1;
} else if (z <= -3.1e+68) {
tmp = x + (y * (t / a));
} else if (z <= -8.6e-103) {
tmp = t_1;
} else if (z <= -6.9e-192) {
tmp = x + ((y * (z - t)) / z);
} else if (z <= 9.2e-29) {
tmp = x + ((y * t) / a);
} else {
tmp = x + ((z - t) * (y / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + (y * (z / (z - a)))
if (z <= (-3.8d+107)) then
tmp = t_1
else if (z <= (-3.1d+68)) then
tmp = x + (y * (t / a))
else if (z <= (-8.6d-103)) then
tmp = t_1
else if (z <= (-6.9d-192)) then
tmp = x + ((y * (z - t)) / z)
else if (z <= 9.2d-29) then
tmp = x + ((y * t) / a)
else
tmp = x + ((z - t) * (y / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * (z / (z - a)));
double tmp;
if (z <= -3.8e+107) {
tmp = t_1;
} else if (z <= -3.1e+68) {
tmp = x + (y * (t / a));
} else if (z <= -8.6e-103) {
tmp = t_1;
} else if (z <= -6.9e-192) {
tmp = x + ((y * (z - t)) / z);
} else if (z <= 9.2e-29) {
tmp = x + ((y * t) / a);
} else {
tmp = x + ((z - t) * (y / z));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * (z / (z - a))) tmp = 0 if z <= -3.8e+107: tmp = t_1 elif z <= -3.1e+68: tmp = x + (y * (t / a)) elif z <= -8.6e-103: tmp = t_1 elif z <= -6.9e-192: tmp = x + ((y * (z - t)) / z) elif z <= 9.2e-29: tmp = x + ((y * t) / a) else: tmp = x + ((z - t) * (y / z)) 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 <= -3.8e+107) tmp = t_1; elseif (z <= -3.1e+68) tmp = Float64(x + Float64(y * Float64(t / a))); elseif (z <= -8.6e-103) tmp = t_1; elseif (z <= -6.9e-192) tmp = Float64(x + Float64(Float64(y * Float64(z - t)) / z)); elseif (z <= 9.2e-29) tmp = Float64(x + Float64(Float64(y * t) / a)); else tmp = Float64(x + Float64(Float64(z - t) * Float64(y / z))); 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 <= -3.8e+107) tmp = t_1; elseif (z <= -3.1e+68) tmp = x + (y * (t / a)); elseif (z <= -8.6e-103) tmp = t_1; elseif (z <= -6.9e-192) tmp = x + ((y * (z - t)) / z); elseif (z <= 9.2e-29) tmp = x + ((y * t) / a); else tmp = x + ((z - t) * (y / z)); 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, -3.8e+107], t$95$1, If[LessEqual[z, -3.1e+68], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -8.6e-103], t$95$1, If[LessEqual[z, -6.9e-192], N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.2e-29], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z - t), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z}{z - a}\\
\mathbf{if}\;z \leq -3.8 \cdot 10^{+107}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -3.1 \cdot 10^{+68}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{elif}\;z \leq -8.6 \cdot 10^{-103}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -6.9 \cdot 10^{-192}:\\
\;\;\;\;x + \frac{y \cdot \left(z - t\right)}{z}\\
\mathbf{elif}\;z \leq 9.2 \cdot 10^{-29}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\mathbf{else}:\\
\;\;\;\;x + \left(z - t\right) \cdot \frac{y}{z}\\
\end{array}
\end{array}
if z < -3.7999999999999998e107 or -3.0999999999999998e68 < z < -8.60000000000000045e-103Initial program 76.5%
associate-*l/94.8%
Simplified94.8%
Taylor expanded in t around 0 72.0%
*-commutative72.0%
associate-/l*85.3%
associate-/r/88.0%
Simplified88.0%
if -3.7999999999999998e107 < z < -3.0999999999999998e68Initial program 92.2%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in z around 0 89.0%
+-commutative89.0%
associate-/l*96.6%
associate-/r/96.8%
Simplified96.8%
if -8.60000000000000045e-103 < z < -6.90000000000000016e-192Initial program 99.9%
associate-*l/93.1%
Simplified93.1%
Taylor expanded in a around 0 78.6%
if -6.90000000000000016e-192 < z < 9.19999999999999965e-29Initial program 98.7%
associate-*l/96.3%
Simplified96.3%
Taylor expanded in z around 0 83.0%
if 9.19999999999999965e-29 < z Initial program 74.0%
associate-*l/99.8%
Simplified99.8%
Taylor expanded in a around 0 70.6%
+-commutative70.6%
associate-/l*90.5%
associate-/r/90.4%
Simplified90.4%
Final simplification87.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ y (/ z (- z t))))))
(if (<= z -3.8e+107)
t_1
(if (<= z -5.8e-104)
(+ x (* y (/ t a)))
(if (<= z -6.9e-192)
(+ x (/ (* y (- z t)) z))
(if (<= z 1.7e-32) (+ x (/ (* y t) a)) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y / (z / (z - t)));
double tmp;
if (z <= -3.8e+107) {
tmp = t_1;
} else if (z <= -5.8e-104) {
tmp = x + (y * (t / a));
} else if (z <= -6.9e-192) {
tmp = x + ((y * (z - t)) / z);
} else if (z <= 1.7e-32) {
tmp = x + ((y * t) / a);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + (y / (z / (z - t)))
if (z <= (-3.8d+107)) then
tmp = t_1
else if (z <= (-5.8d-104)) then
tmp = x + (y * (t / a))
else if (z <= (-6.9d-192)) then
tmp = x + ((y * (z - t)) / z)
else if (z <= 1.7d-32) then
tmp = x + ((y * t) / a)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y / (z / (z - t)));
double tmp;
if (z <= -3.8e+107) {
tmp = t_1;
} else if (z <= -5.8e-104) {
tmp = x + (y * (t / a));
} else if (z <= -6.9e-192) {
tmp = x + ((y * (z - t)) / z);
} else if (z <= 1.7e-32) {
tmp = x + ((y * t) / a);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y / (z / (z - t))) tmp = 0 if z <= -3.8e+107: tmp = t_1 elif z <= -5.8e-104: tmp = x + (y * (t / a)) elif z <= -6.9e-192: tmp = x + ((y * (z - t)) / z) elif z <= 1.7e-32: tmp = x + ((y * t) / a) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y / Float64(z / Float64(z - t)))) tmp = 0.0 if (z <= -3.8e+107) tmp = t_1; elseif (z <= -5.8e-104) tmp = Float64(x + Float64(y * Float64(t / a))); elseif (z <= -6.9e-192) tmp = Float64(x + Float64(Float64(y * Float64(z - t)) / z)); elseif (z <= 1.7e-32) tmp = Float64(x + Float64(Float64(y * t) / a)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y / (z / (z - t))); tmp = 0.0; if (z <= -3.8e+107) tmp = t_1; elseif (z <= -5.8e-104) tmp = x + (y * (t / a)); elseif (z <= -6.9e-192) tmp = x + ((y * (z - t)) / z); elseif (z <= 1.7e-32) tmp = x + ((y * t) / a); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y / N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.8e+107], t$95$1, If[LessEqual[z, -5.8e-104], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -6.9e-192], N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.7e-32], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y}{\frac{z}{z - t}}\\
\mathbf{if}\;z \leq -3.8 \cdot 10^{+107}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -5.8 \cdot 10^{-104}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{elif}\;z \leq -6.9 \cdot 10^{-192}:\\
\;\;\;\;x + \frac{y \cdot \left(z - t\right)}{z}\\
\mathbf{elif}\;z \leq 1.7 \cdot 10^{-32}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -3.7999999999999998e107 or 1.69999999999999989e-32 < z Initial program 72.6%
associate-*l/97.6%
Simplified97.6%
Taylor expanded in a around 0 69.0%
+-commutative69.0%
associate-/l*92.0%
Simplified92.0%
if -3.7999999999999998e107 < z < -5.8000000000000002e-104Initial program 89.9%
associate-*l/97.3%
Simplified97.3%
Taylor expanded in z around 0 75.7%
+-commutative75.7%
associate-/l*80.6%
associate-/r/83.3%
Simplified83.3%
if -5.8000000000000002e-104 < z < -6.90000000000000016e-192Initial program 99.9%
associate-*l/93.1%
Simplified93.1%
Taylor expanded in a around 0 78.6%
if -6.90000000000000016e-192 < z < 1.69999999999999989e-32Initial program 98.7%
associate-*l/96.3%
Simplified96.3%
Taylor expanded in z around 0 83.0%
Final simplification87.3%
(FPCore (x y z t a)
:precision binary64
(if (<= z -3.8e+107)
(+ x y)
(if (<= z 8e-26)
(+ x (* t (/ y a)))
(if (<= z 1.25e+157) (- x (* t (/ y z))) (+ x y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.8e+107) {
tmp = x + y;
} else if (z <= 8e-26) {
tmp = x + (t * (y / a));
} else if (z <= 1.25e+157) {
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 <= (-3.8d+107)) then
tmp = x + y
else if (z <= 8d-26) then
tmp = x + (t * (y / a))
else if (z <= 1.25d+157) 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 <= -3.8e+107) {
tmp = x + y;
} else if (z <= 8e-26) {
tmp = x + (t * (y / a));
} else if (z <= 1.25e+157) {
tmp = x - (t * (y / z));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.8e+107: tmp = x + y elif z <= 8e-26: tmp = x + (t * (y / a)) elif z <= 1.25e+157: tmp = x - (t * (y / z)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.8e+107) tmp = Float64(x + y); elseif (z <= 8e-26) tmp = Float64(x + Float64(t * Float64(y / a))); elseif (z <= 1.25e+157) tmp = Float64(x - Float64(t * Float64(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 <= -3.8e+107) tmp = x + y; elseif (z <= 8e-26) tmp = x + (t * (y / a)); elseif (z <= 1.25e+157) tmp = x - (t * (y / z)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.8e+107], N[(x + y), $MachinePrecision], If[LessEqual[z, 8e-26], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.25e+157], N[(x - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.8 \cdot 10^{+107}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq 8 \cdot 10^{-26}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq 1.25 \cdot 10^{+157}:\\
\;\;\;\;x - t \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -3.7999999999999998e107 or 1.24999999999999994e157 < z Initial program 66.9%
associate-*l/96.3%
Simplified96.3%
Taylor expanded in z around inf 89.3%
+-commutative89.3%
Simplified89.3%
if -3.7999999999999998e107 < z < 8.0000000000000003e-26Initial program 96.3%
Taylor expanded in z around 0 88.3%
mul-1-neg88.3%
distribute-lft-neg-out88.3%
*-commutative88.3%
Simplified88.3%
Taylor expanded in z around 0 77.5%
associate-*r/78.9%
Simplified78.9%
if 8.0000000000000003e-26 < z < 1.24999999999999994e157Initial program 82.2%
Taylor expanded in z around 0 79.8%
mul-1-neg79.8%
distribute-lft-neg-out79.8%
*-commutative79.8%
Simplified79.8%
Taylor expanded in z around inf 78.3%
mul-1-neg78.3%
associate-*r/84.1%
distribute-rgt-neg-in84.1%
Simplified84.1%
Final simplification83.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -3.8e+107) (not (<= z 1.22e-45))) (+ x (/ y (/ z (- z t)))) (+ x (* (/ y a) (- t z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -3.8e+107) || !(z <= 1.22e-45)) {
tmp = x + (y / (z / (z - t)));
} else {
tmp = x + ((y / a) * (t - z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-3.8d+107)) .or. (.not. (z <= 1.22d-45))) then
tmp = x + (y / (z / (z - t)))
else
tmp = x + ((y / a) * (t - z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -3.8e+107) || !(z <= 1.22e-45)) {
tmp = x + (y / (z / (z - t)));
} else {
tmp = x + ((y / a) * (t - z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -3.8e+107) or not (z <= 1.22e-45): tmp = x + (y / (z / (z - t))) else: tmp = x + ((y / a) * (t - z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -3.8e+107) || !(z <= 1.22e-45)) tmp = Float64(x + Float64(y / Float64(z / Float64(z - t)))); else tmp = Float64(x + Float64(Float64(y / a) * Float64(t - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -3.8e+107) || ~((z <= 1.22e-45))) tmp = x + (y / (z / (z - t))); else tmp = x + ((y / a) * (t - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -3.8e+107], N[Not[LessEqual[z, 1.22e-45]], $MachinePrecision]], N[(x + N[(y / N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.8 \cdot 10^{+107} \lor \neg \left(z \leq 1.22 \cdot 10^{-45}\right):\\
\;\;\;\;x + \frac{y}{\frac{z}{z - t}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{a} \cdot \left(t - z\right)\\
\end{array}
\end{array}
if z < -3.7999999999999998e107 or 1.22000000000000007e-45 < z Initial program 73.2%
associate-*l/97.6%
Simplified97.6%
Taylor expanded in a around 0 69.0%
+-commutative69.0%
associate-/l*91.5%
Simplified91.5%
if -3.7999999999999998e107 < z < 1.22000000000000007e-45Initial program 96.2%
associate-*l/96.1%
Simplified96.1%
Taylor expanded in a around inf 83.7%
mul-1-neg83.7%
unsub-neg83.7%
associate-/l*82.8%
associate-/r/83.7%
Simplified83.7%
Final simplification87.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -3.8e+107) (not (<= z 21000000000000.0))) (+ x (/ y (/ z (- z t)))) (- x (/ (* y t) (- z a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -3.8e+107) || !(z <= 21000000000000.0)) {
tmp = x + (y / (z / (z - t)));
} else {
tmp = x - ((y * t) / (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 ((z <= (-3.8d+107)) .or. (.not. (z <= 21000000000000.0d0))) then
tmp = x + (y / (z / (z - t)))
else
tmp = x - ((y * t) / (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 ((z <= -3.8e+107) || !(z <= 21000000000000.0)) {
tmp = x + (y / (z / (z - t)));
} else {
tmp = x - ((y * t) / (z - a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -3.8e+107) or not (z <= 21000000000000.0): tmp = x + (y / (z / (z - t))) else: tmp = x - ((y * t) / (z - a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -3.8e+107) || !(z <= 21000000000000.0)) tmp = Float64(x + Float64(y / Float64(z / Float64(z - t)))); else tmp = Float64(x - Float64(Float64(y * t) / Float64(z - a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -3.8e+107) || ~((z <= 21000000000000.0))) tmp = x + (y / (z / (z - t))); else tmp = x - ((y * t) / (z - a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -3.8e+107], N[Not[LessEqual[z, 21000000000000.0]], $MachinePrecision]], N[(x + N[(y / N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(y * t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.8 \cdot 10^{+107} \lor \neg \left(z \leq 21000000000000\right):\\
\;\;\;\;x + \frac{y}{\frac{z}{z - t}}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y \cdot t}{z - a}\\
\end{array}
\end{array}
if z < -3.7999999999999998e107 or 2.1e13 < z Initial program 71.5%
associate-*l/97.4%
Simplified97.4%
Taylor expanded in a around 0 68.5%
+-commutative68.5%
associate-/l*93.1%
Simplified93.1%
if -3.7999999999999998e107 < z < 2.1e13Initial program 95.8%
Taylor expanded in z around 0 88.3%
mul-1-neg88.3%
distribute-lft-neg-out88.3%
*-commutative88.3%
Simplified88.3%
Final simplification90.6%
(FPCore (x y z t a) :precision binary64 (if (<= t -2.1e+225) (- x (* t (/ y z))) (if (<= t 3e-47) (+ x (* y (/ z (- z a)))) (+ x (* t (/ y a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.1e+225) {
tmp = x - (t * (y / z));
} else if (t <= 3e-47) {
tmp = x + (y * (z / (z - a)));
} 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) :: tmp
if (t <= (-2.1d+225)) then
tmp = x - (t * (y / z))
else if (t <= 3d-47) then
tmp = x + (y * (z / (z - a)))
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 tmp;
if (t <= -2.1e+225) {
tmp = x - (t * (y / z));
} else if (t <= 3e-47) {
tmp = x + (y * (z / (z - a)));
} else {
tmp = x + (t * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -2.1e+225: tmp = x - (t * (y / z)) elif t <= 3e-47: tmp = x + (y * (z / (z - a))) else: tmp = x + (t * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -2.1e+225) tmp = Float64(x - Float64(t * Float64(y / z))); elseif (t <= 3e-47) tmp = Float64(x + Float64(y * Float64(z / Float64(z - a)))); else tmp = Float64(x + Float64(t * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -2.1e+225) tmp = x - (t * (y / z)); elseif (t <= 3e-47) tmp = x + (y * (z / (z - a))); else tmp = x + (t * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2.1e+225], N[(x - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3e-47], N[(x + N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.1 \cdot 10^{+225}:\\
\;\;\;\;x - t \cdot \frac{y}{z}\\
\mathbf{elif}\;t \leq 3 \cdot 10^{-47}:\\
\;\;\;\;x + y \cdot \frac{z}{z - a}\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\end{array}
\end{array}
if t < -2.1e225Initial program 75.5%
Taylor expanded in z around 0 75.5%
mul-1-neg75.5%
distribute-lft-neg-out75.5%
*-commutative75.5%
Simplified75.5%
Taylor expanded in z around inf 70.3%
mul-1-neg70.3%
associate-*r/89.5%
distribute-rgt-neg-in89.5%
Simplified89.5%
if -2.1e225 < t < 3.00000000000000017e-47Initial program 82.6%
associate-*l/95.0%
Simplified95.0%
Taylor expanded in t around 0 69.1%
*-commutative69.1%
associate-/l*81.4%
associate-/r/83.5%
Simplified83.5%
if 3.00000000000000017e-47 < t Initial program 90.4%
Taylor expanded in z around 0 89.3%
mul-1-neg89.3%
distribute-lft-neg-out89.3%
*-commutative89.3%
Simplified89.3%
Taylor expanded in z around 0 73.3%
associate-*r/76.8%
Simplified76.8%
Final simplification81.9%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.15e+47) (+ x y) (if (<= z 2.25e-243) x (if (<= z 8.1e-78) (* y (/ t a)) (+ x y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.15e+47) {
tmp = x + y;
} else if (z <= 2.25e-243) {
tmp = x;
} else if (z <= 8.1e-78) {
tmp = 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 <= (-1.15d+47)) then
tmp = x + y
else if (z <= 2.25d-243) then
tmp = x
else if (z <= 8.1d-78) then
tmp = 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 <= -1.15e+47) {
tmp = x + y;
} else if (z <= 2.25e-243) {
tmp = x;
} else if (z <= 8.1e-78) {
tmp = y * (t / a);
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.15e+47: tmp = x + y elif z <= 2.25e-243: tmp = x elif z <= 8.1e-78: tmp = y * (t / a) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.15e+47) tmp = Float64(x + y); elseif (z <= 2.25e-243) tmp = x; elseif (z <= 8.1e-78) tmp = 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 <= -1.15e+47) tmp = x + y; elseif (z <= 2.25e-243) tmp = x; elseif (z <= 8.1e-78) tmp = y * (t / a); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.15e+47], N[(x + y), $MachinePrecision], If[LessEqual[z, 2.25e-243], x, If[LessEqual[z, 8.1e-78], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.15 \cdot 10^{+47}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq 2.25 \cdot 10^{-243}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 8.1 \cdot 10^{-78}:\\
\;\;\;\;y \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -1.1499999999999999e47 or 8.10000000000000029e-78 < z Initial program 75.0%
associate-*l/97.9%
Simplified97.9%
Taylor expanded in z around inf 78.2%
+-commutative78.2%
Simplified78.2%
if -1.1499999999999999e47 < z < 2.25000000000000009e-243Initial program 96.0%
associate-*l/93.5%
Simplified93.5%
Taylor expanded in x around inf 56.2%
if 2.25000000000000009e-243 < z < 8.10000000000000029e-78Initial program 99.9%
associate-*l/99.7%
Simplified99.7%
Taylor expanded in a around inf 89.3%
mul-1-neg89.3%
unsub-neg89.3%
associate-/l*81.2%
associate-/r/89.2%
Simplified89.2%
Taylor expanded in x around 0 59.4%
mul-1-neg59.4%
associate-/l*54.2%
distribute-neg-frac54.2%
Simplified54.2%
Taylor expanded in z around 0 51.7%
associate-*r/51.7%
neg-mul-151.7%
Simplified51.7%
Taylor expanded in y around 0 54.5%
*-commutative54.5%
associate-*r/51.8%
Simplified51.8%
Final simplification68.2%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.45e+47) (+ x y) (if (<= z 1.25e-243) x (if (<= z 6.5e-79) (* t (/ y a)) (+ x y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.45e+47) {
tmp = x + y;
} else if (z <= 1.25e-243) {
tmp = x;
} else if (z <= 6.5e-79) {
tmp = t * (y / 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 <= (-1.45d+47)) then
tmp = x + y
else if (z <= 1.25d-243) then
tmp = x
else if (z <= 6.5d-79) then
tmp = t * (y / 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 <= -1.45e+47) {
tmp = x + y;
} else if (z <= 1.25e-243) {
tmp = x;
} else if (z <= 6.5e-79) {
tmp = t * (y / a);
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.45e+47: tmp = x + y elif z <= 1.25e-243: tmp = x elif z <= 6.5e-79: tmp = t * (y / a) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.45e+47) tmp = Float64(x + y); elseif (z <= 1.25e-243) tmp = x; elseif (z <= 6.5e-79) tmp = Float64(t * Float64(y / a)); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.45e+47) tmp = x + y; elseif (z <= 1.25e-243) tmp = x; elseif (z <= 6.5e-79) tmp = t * (y / a); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.45e+47], N[(x + y), $MachinePrecision], If[LessEqual[z, 1.25e-243], x, If[LessEqual[z, 6.5e-79], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.45 \cdot 10^{+47}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq 1.25 \cdot 10^{-243}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 6.5 \cdot 10^{-79}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -1.4499999999999999e47 or 6.5000000000000003e-79 < z Initial program 75.0%
associate-*l/97.9%
Simplified97.9%
Taylor expanded in z around inf 78.2%
+-commutative78.2%
Simplified78.2%
if -1.4499999999999999e47 < z < 1.25e-243Initial program 96.0%
associate-*l/93.5%
Simplified93.5%
Taylor expanded in x around inf 56.2%
if 1.25e-243 < z < 6.5000000000000003e-79Initial program 99.9%
associate-*l/99.7%
Simplified99.7%
Taylor expanded in a around inf 89.3%
mul-1-neg89.3%
unsub-neg89.3%
associate-/l*81.2%
associate-/r/89.2%
Simplified89.2%
Taylor expanded in x around 0 59.4%
mul-1-neg59.4%
associate-/l*54.2%
distribute-neg-frac54.2%
Simplified54.2%
Taylor expanded in z around 0 51.7%
associate-*r/51.7%
neg-mul-151.7%
Simplified51.7%
associate-/r/54.5%
frac-2neg54.5%
remove-double-neg54.5%
remove-double-neg54.5%
Applied egg-rr54.5%
Final simplification68.6%
(FPCore (x y z t a) :precision binary64 (if (<= z -9.5e+107) (+ x y) (if (<= z 2.6e+38) (+ x (* t (/ y a))) (+ x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -9.5e+107) {
tmp = x + y;
} else if (z <= 2.6e+38) {
tmp = x + (t * (y / 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 <= (-9.5d+107)) then
tmp = x + y
else if (z <= 2.6d+38) then
tmp = x + (t * (y / 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 <= -9.5e+107) {
tmp = x + y;
} else if (z <= 2.6e+38) {
tmp = x + (t * (y / a));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -9.5e+107: tmp = x + y elif z <= 2.6e+38: tmp = x + (t * (y / a)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -9.5e+107) tmp = Float64(x + y); elseif (z <= 2.6e+38) tmp = Float64(x + Float64(t * Float64(y / a))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -9.5e+107) tmp = x + y; elseif (z <= 2.6e+38) tmp = x + (t * (y / a)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -9.5e+107], N[(x + y), $MachinePrecision], If[LessEqual[z, 2.6e+38], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.5 \cdot 10^{+107}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{+38}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -9.50000000000000019e107 or 2.5999999999999999e38 < z Initial program 71.1%
associate-*l/97.3%
Simplified97.3%
Taylor expanded in z around inf 84.1%
+-commutative84.1%
Simplified84.1%
if -9.50000000000000019e107 < z < 2.5999999999999999e38Initial program 95.3%
Taylor expanded in z around 0 87.4%
mul-1-neg87.4%
distribute-lft-neg-out87.4%
*-commutative87.4%
Simplified87.4%
Taylor expanded in z around 0 75.4%
associate-*r/78.0%
Simplified78.0%
Final simplification80.7%
(FPCore (x y z t a) :precision binary64 (if (<= z -2.15e+47) (+ x y) (if (<= z 6.5e+42) x (+ x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.15e+47) {
tmp = x + y;
} else if (z <= 6.5e+42) {
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 <= (-2.15d+47)) then
tmp = x + y
else if (z <= 6.5d+42) 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 <= -2.15e+47) {
tmp = x + y;
} else if (z <= 6.5e+42) {
tmp = x;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.15e+47: tmp = x + y elif z <= 6.5e+42: tmp = x else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.15e+47) tmp = Float64(x + y); elseif (z <= 6.5e+42) 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 <= -2.15e+47) tmp = x + y; elseif (z <= 6.5e+42) tmp = x; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.15e+47], N[(x + y), $MachinePrecision], If[LessEqual[z, 6.5e+42], x, N[(x + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.15 \cdot 10^{+47}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq 6.5 \cdot 10^{+42}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -2.14999999999999997e47 or 6.50000000000000052e42 < z Initial program 72.6%
associate-*l/97.6%
Simplified97.6%
Taylor expanded in z around inf 81.7%
+-commutative81.7%
Simplified81.7%
if -2.14999999999999997e47 < z < 6.50000000000000052e42Initial program 96.2%
associate-*l/96.2%
Simplified96.2%
Taylor expanded in x around inf 50.5%
Final simplification66.0%
(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 84.5%
associate-*l/96.9%
Simplified96.9%
Taylor expanded in x around inf 53.1%
Final simplification53.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 2023283
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, A"
:precision binary64
:herbie-target
(+ x (/ y (/ (- z a) (- z t))))
(+ x (/ (* y (- z t)) (- z a))))