
(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 12 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 (+ 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}
Initial program 99.0%
Final simplification99.0%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.7e+170)
(+ x y)
(if (<= z -11800000.0)
(- x (* y (/ t z)))
(if (<= z -6.2e-79)
(- x (* z (/ y a)))
(if (<= z -1.46e-94)
(* y (- 1.0 (/ t z)))
(if (<= z 8.8e+74) (+ x (* y (/ t a))) (+ x y)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.7e+170) {
tmp = x + y;
} else if (z <= -11800000.0) {
tmp = x - (y * (t / z));
} else if (z <= -6.2e-79) {
tmp = x - (z * (y / a));
} else if (z <= -1.46e-94) {
tmp = y * (1.0 - (t / z));
} else if (z <= 8.8e+74) {
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 <= (-1.7d+170)) then
tmp = x + y
else if (z <= (-11800000.0d0)) then
tmp = x - (y * (t / z))
else if (z <= (-6.2d-79)) then
tmp = x - (z * (y / a))
else if (z <= (-1.46d-94)) then
tmp = y * (1.0d0 - (t / z))
else if (z <= 8.8d+74) 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 <= -1.7e+170) {
tmp = x + y;
} else if (z <= -11800000.0) {
tmp = x - (y * (t / z));
} else if (z <= -6.2e-79) {
tmp = x - (z * (y / a));
} else if (z <= -1.46e-94) {
tmp = y * (1.0 - (t / z));
} else if (z <= 8.8e+74) {
tmp = x + (y * (t / a));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.7e+170: tmp = x + y elif z <= -11800000.0: tmp = x - (y * (t / z)) elif z <= -6.2e-79: tmp = x - (z * (y / a)) elif z <= -1.46e-94: tmp = y * (1.0 - (t / z)) elif z <= 8.8e+74: tmp = x + (y * (t / a)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.7e+170) tmp = Float64(x + y); elseif (z <= -11800000.0) tmp = Float64(x - Float64(y * Float64(t / z))); elseif (z <= -6.2e-79) tmp = Float64(x - Float64(z * Float64(y / a))); elseif (z <= -1.46e-94) tmp = Float64(y * Float64(1.0 - Float64(t / z))); elseif (z <= 8.8e+74) 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 <= -1.7e+170) tmp = x + y; elseif (z <= -11800000.0) tmp = x - (y * (t / z)); elseif (z <= -6.2e-79) tmp = x - (z * (y / a)); elseif (z <= -1.46e-94) tmp = y * (1.0 - (t / z)); elseif (z <= 8.8e+74) tmp = x + (y * (t / a)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.7e+170], N[(x + y), $MachinePrecision], If[LessEqual[z, -11800000.0], N[(x - N[(y * N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -6.2e-79], N[(x - N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.46e-94], N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.8e+74], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.7 \cdot 10^{+170}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq -11800000:\\
\;\;\;\;x - y \cdot \frac{t}{z}\\
\mathbf{elif}\;z \leq -6.2 \cdot 10^{-79}:\\
\;\;\;\;x - z \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq -1.46 \cdot 10^{-94}:\\
\;\;\;\;y \cdot \left(1 - \frac{t}{z}\right)\\
\mathbf{elif}\;z \leq 8.8 \cdot 10^{+74}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -1.7000000000000001e170 or 8.8000000000000005e74 < z Initial program 99.9%
Taylor expanded in z around inf 90.1%
if -1.7000000000000001e170 < z < -1.18e7Initial program 99.9%
associate-*r/88.9%
add-cube-cbrt88.3%
associate-/r*88.2%
associate-/l*99.1%
pow299.1%
Applied egg-rr99.1%
associate-/l/99.1%
Simplified99.1%
Taylor expanded in t around inf 75.3%
*-commutative75.3%
associate-*r/75.3%
mul-1-neg75.3%
distribute-rgt-neg-out75.3%
associate-/l*80.6%
Simplified80.6%
Taylor expanded in x around 0 75.3%
*-commutative75.3%
associate-*r/80.6%
neg-mul-180.6%
sub-neg80.6%
Simplified80.6%
Taylor expanded in z around inf 69.5%
if -1.18e7 < z < -6.1999999999999999e-79Initial program 96.5%
Taylor expanded in a around inf 81.7%
mul-1-neg81.7%
associate-/l*75.9%
Simplified75.9%
Taylor expanded in z around inf 75.8%
Taylor expanded in x around 0 75.8%
associate-/l*70.0%
mul-1-neg70.0%
sub-neg70.0%
associate-/r/81.4%
*-commutative81.4%
Simplified81.4%
if -6.1999999999999999e-79 < z < -1.4599999999999999e-94Initial program 100.0%
Taylor expanded in a around 0 79.8%
div-sub79.8%
*-inverses79.8%
Simplified79.8%
Taylor expanded in x around 0 79.8%
if -1.4599999999999999e-94 < z < 8.8000000000000005e74Initial program 98.3%
Taylor expanded in z around 0 85.6%
associate-/l*87.1%
associate-/r/89.4%
Simplified89.4%
Final simplification86.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (- 1.0 (/ t z)))) (t_2 (+ x t_1)))
(if (<= z -2.25e+36)
t_2
(if (<= z -6.2e-79)
(- x (* z (/ y a)))
(if (<= z -1.46e-94)
t_1
(if (<= z 3.2e-63) (+ x (* y (/ t a))) t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (1.0 - (t / z));
double t_2 = x + t_1;
double tmp;
if (z <= -2.25e+36) {
tmp = t_2;
} else if (z <= -6.2e-79) {
tmp = x - (z * (y / a));
} else if (z <= -1.46e-94) {
tmp = t_1;
} else if (z <= 3.2e-63) {
tmp = x + (y * (t / a));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = y * (1.0d0 - (t / z))
t_2 = x + t_1
if (z <= (-2.25d+36)) then
tmp = t_2
else if (z <= (-6.2d-79)) then
tmp = x - (z * (y / a))
else if (z <= (-1.46d-94)) then
tmp = t_1
else if (z <= 3.2d-63) then
tmp = x + (y * (t / a))
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y * (1.0 - (t / z));
double t_2 = x + t_1;
double tmp;
if (z <= -2.25e+36) {
tmp = t_2;
} else if (z <= -6.2e-79) {
tmp = x - (z * (y / a));
} else if (z <= -1.46e-94) {
tmp = t_1;
} else if (z <= 3.2e-63) {
tmp = x + (y * (t / a));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (1.0 - (t / z)) t_2 = x + t_1 tmp = 0 if z <= -2.25e+36: tmp = t_2 elif z <= -6.2e-79: tmp = x - (z * (y / a)) elif z <= -1.46e-94: tmp = t_1 elif z <= 3.2e-63: tmp = x + (y * (t / a)) else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(1.0 - Float64(t / z))) t_2 = Float64(x + t_1) tmp = 0.0 if (z <= -2.25e+36) tmp = t_2; elseif (z <= -6.2e-79) tmp = Float64(x - Float64(z * Float64(y / a))); elseif (z <= -1.46e-94) tmp = t_1; elseif (z <= 3.2e-63) tmp = Float64(x + Float64(y * Float64(t / a))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * (1.0 - (t / z)); t_2 = x + t_1; tmp = 0.0; if (z <= -2.25e+36) tmp = t_2; elseif (z <= -6.2e-79) tmp = x - (z * (y / a)); elseif (z <= -1.46e-94) tmp = t_1; elseif (z <= 3.2e-63) tmp = x + (y * (t / a)); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + t$95$1), $MachinePrecision]}, If[LessEqual[z, -2.25e+36], t$95$2, If[LessEqual[z, -6.2e-79], N[(x - N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.46e-94], t$95$1, If[LessEqual[z, 3.2e-63], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(1 - \frac{t}{z}\right)\\
t_2 := x + t_1\\
\mathbf{if}\;z \leq -2.25 \cdot 10^{+36}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -6.2 \cdot 10^{-79}:\\
\;\;\;\;x - z \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq -1.46 \cdot 10^{-94}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 3.2 \cdot 10^{-63}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -2.24999999999999998e36 or 3.19999999999999989e-63 < z Initial program 99.2%
Taylor expanded in a around 0 88.2%
div-sub88.2%
*-inverses88.2%
Simplified88.2%
if -2.24999999999999998e36 < z < -6.1999999999999999e-79Initial program 97.9%
Taylor expanded in a around inf 77.4%
mul-1-neg77.4%
associate-/l*77.5%
Simplified77.5%
Taylor expanded in z around inf 66.4%
Taylor expanded in x around 0 66.4%
associate-/l*66.5%
mul-1-neg66.5%
sub-neg66.5%
associate-/r/73.6%
*-commutative73.6%
Simplified73.6%
if -6.1999999999999999e-79 < z < -1.4599999999999999e-94Initial program 100.0%
Taylor expanded in a around 0 79.8%
div-sub79.8%
*-inverses79.8%
Simplified79.8%
Taylor expanded in x around 0 79.8%
if -1.4599999999999999e-94 < z < 3.19999999999999989e-63Initial program 98.9%
Taylor expanded in z around 0 88.0%
associate-/l*89.9%
associate-/r/93.9%
Simplified93.9%
Final simplification88.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (- 1.0 (/ t z)))))
(if (<= z -1.1e+36)
(+ x t_1)
(if (<= z -6.2e-79)
(- x (* z (/ y a)))
(if (<= z -1.18e-94)
t_1
(if (<= z 4.6e-64) (+ x (* y (/ t a))) (+ x (* y (/ z (- z a))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (1.0 - (t / z));
double tmp;
if (z <= -1.1e+36) {
tmp = x + t_1;
} else if (z <= -6.2e-79) {
tmp = x - (z * (y / a));
} else if (z <= -1.18e-94) {
tmp = t_1;
} else if (z <= 4.6e-64) {
tmp = x + (y * (t / 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) :: t_1
real(8) :: tmp
t_1 = y * (1.0d0 - (t / z))
if (z <= (-1.1d+36)) then
tmp = x + t_1
else if (z <= (-6.2d-79)) then
tmp = x - (z * (y / a))
else if (z <= (-1.18d-94)) then
tmp = t_1
else if (z <= 4.6d-64) then
tmp = x + (y * (t / 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 t_1 = y * (1.0 - (t / z));
double tmp;
if (z <= -1.1e+36) {
tmp = x + t_1;
} else if (z <= -6.2e-79) {
tmp = x - (z * (y / a));
} else if (z <= -1.18e-94) {
tmp = t_1;
} else if (z <= 4.6e-64) {
tmp = x + (y * (t / a));
} else {
tmp = x + (y * (z / (z - a)));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (1.0 - (t / z)) tmp = 0 if z <= -1.1e+36: tmp = x + t_1 elif z <= -6.2e-79: tmp = x - (z * (y / a)) elif z <= -1.18e-94: tmp = t_1 elif z <= 4.6e-64: tmp = x + (y * (t / a)) else: tmp = x + (y * (z / (z - a))) return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(1.0 - Float64(t / z))) tmp = 0.0 if (z <= -1.1e+36) tmp = Float64(x + t_1); elseif (z <= -6.2e-79) tmp = Float64(x - Float64(z * Float64(y / a))); elseif (z <= -1.18e-94) tmp = t_1; elseif (z <= 4.6e-64) tmp = Float64(x + Float64(y * Float64(t / 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) t_1 = y * (1.0 - (t / z)); tmp = 0.0; if (z <= -1.1e+36) tmp = x + t_1; elseif (z <= -6.2e-79) tmp = x - (z * (y / a)); elseif (z <= -1.18e-94) tmp = t_1; elseif (z <= 4.6e-64) tmp = x + (y * (t / a)); else tmp = x + (y * (z / (z - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.1e+36], N[(x + t$95$1), $MachinePrecision], If[LessEqual[z, -6.2e-79], N[(x - N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.18e-94], t$95$1, If[LessEqual[z, 4.6e-64], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(1 - \frac{t}{z}\right)\\
\mathbf{if}\;z \leq -1.1 \cdot 10^{+36}:\\
\;\;\;\;x + t_1\\
\mathbf{elif}\;z \leq -6.2 \cdot 10^{-79}:\\
\;\;\;\;x - z \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq -1.18 \cdot 10^{-94}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 4.6 \cdot 10^{-64}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{z - a}\\
\end{array}
\end{array}
if z < -1.1e36Initial program 99.9%
Taylor expanded in a around 0 88.0%
div-sub88.0%
*-inverses88.0%
Simplified88.0%
if -1.1e36 < z < -6.1999999999999999e-79Initial program 97.9%
Taylor expanded in a around inf 77.4%
mul-1-neg77.4%
associate-/l*77.5%
Simplified77.5%
Taylor expanded in z around inf 66.4%
Taylor expanded in x around 0 66.4%
associate-/l*66.5%
mul-1-neg66.5%
sub-neg66.5%
associate-/r/73.6%
*-commutative73.6%
Simplified73.6%
if -6.1999999999999999e-79 < z < -1.18e-94Initial program 100.0%
Taylor expanded in a around 0 79.8%
div-sub79.8%
*-inverses79.8%
Simplified79.8%
Taylor expanded in x around 0 79.8%
if -1.18e-94 < z < 4.6000000000000003e-64Initial program 98.9%
Taylor expanded in z around 0 88.8%
associate-/l*90.8%
associate-/r/94.8%
Simplified94.8%
if 4.6000000000000003e-64 < z Initial program 98.8%
Taylor expanded in t around 0 68.4%
associate-*r/90.1%
Simplified90.1%
Final simplification89.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (- 1.0 (/ t z))))))
(if (<= z -3.8)
t_1
(if (<= z -9.2e-67)
(+ x (/ (* y z) (- z a)))
(if (<= z -7e-95)
t_1
(if (<= z 6.5e-65) (+ x (* y (/ t a))) (+ x (* y (/ z (- z a))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * (1.0 - (t / z)));
double tmp;
if (z <= -3.8) {
tmp = t_1;
} else if (z <= -9.2e-67) {
tmp = x + ((y * z) / (z - a));
} else if (z <= -7e-95) {
tmp = t_1;
} else if (z <= 6.5e-65) {
tmp = x + (y * (t / 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) :: t_1
real(8) :: tmp
t_1 = x + (y * (1.0d0 - (t / z)))
if (z <= (-3.8d0)) then
tmp = t_1
else if (z <= (-9.2d-67)) then
tmp = x + ((y * z) / (z - a))
else if (z <= (-7d-95)) then
tmp = t_1
else if (z <= 6.5d-65) then
tmp = x + (y * (t / 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 t_1 = x + (y * (1.0 - (t / z)));
double tmp;
if (z <= -3.8) {
tmp = t_1;
} else if (z <= -9.2e-67) {
tmp = x + ((y * z) / (z - a));
} else if (z <= -7e-95) {
tmp = t_1;
} else if (z <= 6.5e-65) {
tmp = x + (y * (t / a));
} else {
tmp = x + (y * (z / (z - a)));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * (1.0 - (t / z))) tmp = 0 if z <= -3.8: tmp = t_1 elif z <= -9.2e-67: tmp = x + ((y * z) / (z - a)) elif z <= -7e-95: tmp = t_1 elif z <= 6.5e-65: tmp = x + (y * (t / a)) else: tmp = x + (y * (z / (z - a))) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y * Float64(1.0 - Float64(t / z)))) tmp = 0.0 if (z <= -3.8) tmp = t_1; elseif (z <= -9.2e-67) tmp = Float64(x + Float64(Float64(y * z) / Float64(z - a))); elseif (z <= -7e-95) tmp = t_1; elseif (z <= 6.5e-65) tmp = Float64(x + Float64(y * Float64(t / 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) t_1 = x + (y * (1.0 - (t / z))); tmp = 0.0; if (z <= -3.8) tmp = t_1; elseif (z <= -9.2e-67) tmp = x + ((y * z) / (z - a)); elseif (z <= -7e-95) tmp = t_1; elseif (z <= 6.5e-65) tmp = x + (y * (t / a)); else tmp = x + (y * (z / (z - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.8], t$95$1, If[LessEqual[z, -9.2e-67], N[(x + N[(N[(y * z), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -7e-95], t$95$1, If[LessEqual[z, 6.5e-65], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \left(1 - \frac{t}{z}\right)\\
\mathbf{if}\;z \leq -3.8:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -9.2 \cdot 10^{-67}:\\
\;\;\;\;x + \frac{y \cdot z}{z - a}\\
\mathbf{elif}\;z \leq -7 \cdot 10^{-95}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 6.5 \cdot 10^{-65}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{z - a}\\
\end{array}
\end{array}
if z < -3.7999999999999998 or -9.2000000000000002e-67 < z < -6.9999999999999994e-95Initial program 99.9%
Taylor expanded in a around 0 82.5%
div-sub82.6%
*-inverses82.6%
Simplified82.6%
if -3.7999999999999998 < z < -9.2000000000000002e-67Initial program 95.7%
Taylor expanded in t around 0 84.5%
if -6.9999999999999994e-95 < z < 6.5e-65Initial program 98.9%
Taylor expanded in z around 0 88.8%
associate-/l*90.8%
associate-/r/94.8%
Simplified94.8%
if 6.5e-65 < z Initial program 98.8%
Taylor expanded in t around 0 68.4%
associate-*r/90.1%
Simplified90.1%
Final simplification89.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* t (/ y a)))))
(if (<= z -1.9e+77)
(+ x y)
(if (<= z -2.55e-39)
t_1
(if (<= z -1.46e-94)
(* y (- 1.0 (/ t z)))
(if (<= z 3e+74) t_1 (+ x y)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (t * (y / a));
double tmp;
if (z <= -1.9e+77) {
tmp = x + y;
} else if (z <= -2.55e-39) {
tmp = t_1;
} else if (z <= -1.46e-94) {
tmp = y * (1.0 - (t / z));
} else if (z <= 3e+74) {
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 / a))
if (z <= (-1.9d+77)) then
tmp = x + y
else if (z <= (-2.55d-39)) then
tmp = t_1
else if (z <= (-1.46d-94)) then
tmp = y * (1.0d0 - (t / z))
else if (z <= 3d+74) 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 / a));
double tmp;
if (z <= -1.9e+77) {
tmp = x + y;
} else if (z <= -2.55e-39) {
tmp = t_1;
} else if (z <= -1.46e-94) {
tmp = y * (1.0 - (t / z));
} else if (z <= 3e+74) {
tmp = t_1;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (t * (y / a)) tmp = 0 if z <= -1.9e+77: tmp = x + y elif z <= -2.55e-39: tmp = t_1 elif z <= -1.46e-94: tmp = y * (1.0 - (t / z)) elif z <= 3e+74: tmp = t_1 else: tmp = x + y return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(t * Float64(y / a))) tmp = 0.0 if (z <= -1.9e+77) tmp = Float64(x + y); elseif (z <= -2.55e-39) tmp = t_1; elseif (z <= -1.46e-94) tmp = Float64(y * Float64(1.0 - Float64(t / z))); elseif (z <= 3e+74) 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 / a)); tmp = 0.0; if (z <= -1.9e+77) tmp = x + y; elseif (z <= -2.55e-39) tmp = t_1; elseif (z <= -1.46e-94) tmp = y * (1.0 - (t / z)); elseif (z <= 3e+74) 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 / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.9e+77], N[(x + y), $MachinePrecision], If[LessEqual[z, -2.55e-39], t$95$1, If[LessEqual[z, -1.46e-94], N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3e+74], t$95$1, N[(x + y), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + t \cdot \frac{y}{a}\\
\mathbf{if}\;z \leq -1.9 \cdot 10^{+77}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq -2.55 \cdot 10^{-39}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.46 \cdot 10^{-94}:\\
\;\;\;\;y \cdot \left(1 - \frac{t}{z}\right)\\
\mathbf{elif}\;z \leq 3 \cdot 10^{+74}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -1.9000000000000001e77 or 3e74 < z Initial program 99.9%
Taylor expanded in z around inf 84.7%
if -1.9000000000000001e77 < z < -2.54999999999999994e-39 or -1.4599999999999999e-94 < z < 3e74Initial program 98.2%
Taylor expanded in z around 0 82.6%
div-inv82.5%
associate-*l*83.7%
div-inv83.7%
Applied egg-rr83.7%
if -2.54999999999999994e-39 < z < -1.4599999999999999e-94Initial program 99.9%
Taylor expanded in a around 0 66.2%
div-sub66.2%
*-inverses66.2%
Simplified66.2%
Taylor expanded in x around 0 52.4%
Final simplification82.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (/ t a)))))
(if (<= z -2.1e+77)
(+ x y)
(if (<= z -2.6e-39)
t_1
(if (<= z -1.46e-94)
(* y (- 1.0 (/ t z)))
(if (<= z 4.7e+73) t_1 (+ x y)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * (t / a));
double tmp;
if (z <= -2.1e+77) {
tmp = x + y;
} else if (z <= -2.6e-39) {
tmp = t_1;
} else if (z <= -1.46e-94) {
tmp = y * (1.0 - (t / z));
} else if (z <= 4.7e+73) {
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 + (y * (t / a))
if (z <= (-2.1d+77)) then
tmp = x + y
else if (z <= (-2.6d-39)) then
tmp = t_1
else if (z <= (-1.46d-94)) then
tmp = y * (1.0d0 - (t / z))
else if (z <= 4.7d+73) 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 + (y * (t / a));
double tmp;
if (z <= -2.1e+77) {
tmp = x + y;
} else if (z <= -2.6e-39) {
tmp = t_1;
} else if (z <= -1.46e-94) {
tmp = y * (1.0 - (t / z));
} else if (z <= 4.7e+73) {
tmp = t_1;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * (t / a)) tmp = 0 if z <= -2.1e+77: tmp = x + y elif z <= -2.6e-39: tmp = t_1 elif z <= -1.46e-94: tmp = y * (1.0 - (t / z)) elif z <= 4.7e+73: tmp = t_1 else: tmp = x + y return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y * Float64(t / a))) tmp = 0.0 if (z <= -2.1e+77) tmp = Float64(x + y); elseif (z <= -2.6e-39) tmp = t_1; elseif (z <= -1.46e-94) tmp = Float64(y * Float64(1.0 - Float64(t / z))); elseif (z <= 4.7e+73) tmp = t_1; else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y * (t / a)); tmp = 0.0; if (z <= -2.1e+77) tmp = x + y; elseif (z <= -2.6e-39) tmp = t_1; elseif (z <= -1.46e-94) tmp = y * (1.0 - (t / z)); elseif (z <= 4.7e+73) 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[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.1e+77], N[(x + y), $MachinePrecision], If[LessEqual[z, -2.6e-39], t$95$1, If[LessEqual[z, -1.46e-94], N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.7e+73], t$95$1, N[(x + y), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{t}{a}\\
\mathbf{if}\;z \leq -2.1 \cdot 10^{+77}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq -2.6 \cdot 10^{-39}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.46 \cdot 10^{-94}:\\
\;\;\;\;y \cdot \left(1 - \frac{t}{z}\right)\\
\mathbf{elif}\;z \leq 4.7 \cdot 10^{+73}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -2.0999999999999999e77 or 4.7000000000000002e73 < z Initial program 99.9%
Taylor expanded in z around inf 84.7%
if -2.0999999999999999e77 < z < -2.6e-39 or -1.4599999999999999e-94 < z < 4.7000000000000002e73Initial program 98.2%
Taylor expanded in z around 0 82.6%
associate-/l*83.8%
associate-/r/85.8%
Simplified85.8%
if -2.6e-39 < z < -1.4599999999999999e-94Initial program 99.9%
Taylor expanded in a around 0 66.2%
div-sub66.2%
*-inverses66.2%
Simplified66.2%
Taylor expanded in x around 0 52.4%
Final simplification83.5%
(FPCore (x y z t a)
:precision binary64
(if (<= z -2.7e+82)
(+ x (* y (- 1.0 (/ t z))))
(if (<= z 2.6e+73)
(+ x (/ y (/ (- z a) (- t))))
(+ x (* y (/ z (- z a)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.7e+82) {
tmp = x + (y * (1.0 - (t / z)));
} else if (z <= 2.6e+73) {
tmp = x + (y / ((z - a) / -t));
} 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 (z <= (-2.7d+82)) then
tmp = x + (y * (1.0d0 - (t / z)))
else if (z <= 2.6d+73) then
tmp = x + (y / ((z - a) / -t))
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 (z <= -2.7e+82) {
tmp = x + (y * (1.0 - (t / z)));
} else if (z <= 2.6e+73) {
tmp = x + (y / ((z - a) / -t));
} else {
tmp = x + (y * (z / (z - a)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.7e+82: tmp = x + (y * (1.0 - (t / z))) elif z <= 2.6e+73: tmp = x + (y / ((z - a) / -t)) else: tmp = x + (y * (z / (z - a))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.7e+82) tmp = Float64(x + Float64(y * Float64(1.0 - Float64(t / z)))); elseif (z <= 2.6e+73) tmp = Float64(x + Float64(y / Float64(Float64(z - a) / Float64(-t)))); 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 (z <= -2.7e+82) tmp = x + (y * (1.0 - (t / z))); elseif (z <= 2.6e+73) tmp = x + (y / ((z - a) / -t)); else tmp = x + (y * (z / (z - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.7e+82], N[(x + N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.6e+73], N[(x + N[(y / N[(N[(z - a), $MachinePrecision] / (-t)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.7 \cdot 10^{+82}:\\
\;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{+73}:\\
\;\;\;\;x + \frac{y}{\frac{z - a}{-t}}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{z - a}\\
\end{array}
\end{array}
if z < -2.6999999999999999e82Initial program 99.9%
Taylor expanded in a around 0 90.1%
div-sub90.2%
*-inverses90.2%
Simplified90.2%
if -2.6999999999999999e82 < z < 2.6000000000000001e73Initial program 98.4%
associate-*r/94.0%
add-cube-cbrt93.5%
associate-/r*93.6%
associate-/l*98.2%
pow298.2%
Applied egg-rr98.2%
associate-/l/98.0%
Simplified98.0%
Taylor expanded in t around inf 87.4%
*-commutative87.4%
associate-*r/87.4%
mul-1-neg87.4%
distribute-rgt-neg-out87.4%
associate-/l*91.3%
Simplified91.3%
if 2.6000000000000001e73 < z Initial program 99.9%
Taylor expanded in t around 0 63.5%
associate-*r/94.0%
Simplified94.0%
Final simplification91.7%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.75e+170)
(+ x y)
(if (<= z -1.65e-97)
(- x (* y (/ t z)))
(if (<= z 1.22e+76) (+ x (* y (/ t a))) (+ x y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.75e+170) {
tmp = x + y;
} else if (z <= -1.65e-97) {
tmp = x - (y * (t / z));
} else if (z <= 1.22e+76) {
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 <= (-1.75d+170)) then
tmp = x + y
else if (z <= (-1.65d-97)) then
tmp = x - (y * (t / z))
else if (z <= 1.22d+76) 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 <= -1.75e+170) {
tmp = x + y;
} else if (z <= -1.65e-97) {
tmp = x - (y * (t / z));
} else if (z <= 1.22e+76) {
tmp = x + (y * (t / a));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.75e+170: tmp = x + y elif z <= -1.65e-97: tmp = x - (y * (t / z)) elif z <= 1.22e+76: tmp = x + (y * (t / a)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.75e+170) tmp = Float64(x + y); elseif (z <= -1.65e-97) tmp = Float64(x - Float64(y * Float64(t / z))); elseif (z <= 1.22e+76) 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 <= -1.75e+170) tmp = x + y; elseif (z <= -1.65e-97) tmp = x - (y * (t / z)); elseif (z <= 1.22e+76) tmp = x + (y * (t / a)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.75e+170], N[(x + y), $MachinePrecision], If[LessEqual[z, -1.65e-97], N[(x - N[(y * N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.22e+76], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.75 \cdot 10^{+170}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq -1.65 \cdot 10^{-97}:\\
\;\;\;\;x - y \cdot \frac{t}{z}\\
\mathbf{elif}\;z \leq 1.22 \cdot 10^{+76}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -1.75000000000000003e170 or 1.22000000000000002e76 < z Initial program 99.9%
Taylor expanded in z around inf 90.1%
if -1.75000000000000003e170 < z < -1.6500000000000001e-97Initial program 98.9%
associate-*r/93.1%
add-cube-cbrt92.3%
associate-/r*92.3%
associate-/l*99.0%
pow299.0%
Applied egg-rr99.0%
associate-/l/97.3%
Simplified97.3%
Taylor expanded in t around inf 72.5%
*-commutative72.5%
associate-*r/72.5%
mul-1-neg72.5%
distribute-rgt-neg-out72.5%
associate-/l*75.8%
Simplified75.8%
Taylor expanded in x around 0 72.5%
*-commutative72.5%
associate-*r/75.8%
neg-mul-175.8%
sub-neg75.8%
Simplified75.8%
Taylor expanded in z around inf 63.5%
if -1.6500000000000001e-97 < z < 1.22000000000000002e76Initial program 98.3%
Taylor expanded in z around 0 85.6%
associate-/l*87.1%
associate-/r/89.4%
Simplified89.4%
Final simplification84.1%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.4e+83) (+ x (* y (- 1.0 (/ t z)))) (if (<= z 6.7e+75) (- x (* y (/ t (- z a)))) (+ x (* y (/ z (- z a)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.4e+83) {
tmp = x + (y * (1.0 - (t / z)));
} else if (z <= 6.7e+75) {
tmp = x - (y * (t / (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 (z <= (-1.4d+83)) then
tmp = x + (y * (1.0d0 - (t / z)))
else if (z <= 6.7d+75) then
tmp = x - (y * (t / (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 (z <= -1.4e+83) {
tmp = x + (y * (1.0 - (t / z)));
} else if (z <= 6.7e+75) {
tmp = x - (y * (t / (z - a)));
} else {
tmp = x + (y * (z / (z - a)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.4e+83: tmp = x + (y * (1.0 - (t / z))) elif z <= 6.7e+75: tmp = x - (y * (t / (z - a))) else: tmp = x + (y * (z / (z - a))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.4e+83) tmp = Float64(x + Float64(y * Float64(1.0 - Float64(t / z)))); elseif (z <= 6.7e+75) tmp = Float64(x - Float64(y * Float64(t / 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 (z <= -1.4e+83) tmp = x + (y * (1.0 - (t / z))); elseif (z <= 6.7e+75) tmp = x - (y * (t / (z - a))); else tmp = x + (y * (z / (z - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.4e+83], N[(x + N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.7e+75], N[(x - N[(y * N[(t / 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}\;z \leq -1.4 \cdot 10^{+83}:\\
\;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\
\mathbf{elif}\;z \leq 6.7 \cdot 10^{+75}:\\
\;\;\;\;x - y \cdot \frac{t}{z - a}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{z - a}\\
\end{array}
\end{array}
if z < -1.4e83Initial program 99.9%
Taylor expanded in a around 0 90.1%
div-sub90.2%
*-inverses90.2%
Simplified90.2%
if -1.4e83 < z < 6.7000000000000001e75Initial program 98.4%
associate-*r/94.0%
add-cube-cbrt93.5%
associate-/r*93.6%
associate-/l*98.2%
pow298.2%
Applied egg-rr98.2%
associate-/l/98.0%
Simplified98.0%
Taylor expanded in t around inf 87.4%
*-commutative87.4%
associate-*r/87.4%
mul-1-neg87.4%
distribute-rgt-neg-out87.4%
associate-/l*91.3%
Simplified91.3%
Taylor expanded in x around 0 87.4%
*-commutative87.4%
associate-*r/90.9%
neg-mul-190.9%
sub-neg90.9%
Simplified90.9%
if 6.7000000000000001e75 < z Initial program 99.9%
Taylor expanded in t around 0 63.5%
associate-*r/94.0%
Simplified94.0%
Final simplification91.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.65e+81) (not (<= z 2.3e+71))) (+ x y) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.65e+81) || !(z <= 2.3e+71)) {
tmp = x + y;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-1.65d+81)) .or. (.not. (z <= 2.3d+71))) then
tmp = x + y
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.65e+81) || !(z <= 2.3e+71)) {
tmp = x + y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.65e+81) or not (z <= 2.3e+71): tmp = x + y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.65e+81) || !(z <= 2.3e+71)) tmp = Float64(x + y); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.65e+81) || ~((z <= 2.3e+71))) tmp = x + y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.65e+81], N[Not[LessEqual[z, 2.3e+71]], $MachinePrecision]], N[(x + y), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.65 \cdot 10^{+81} \lor \neg \left(z \leq 2.3 \cdot 10^{+71}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.65e81 or 2.3000000000000002e71 < z Initial program 99.9%
Taylor expanded in z around inf 85.4%
if -1.65e81 < z < 2.3000000000000002e71Initial program 98.4%
Taylor expanded in z around 0 76.9%
Taylor expanded in x around inf 55.9%
Final simplification66.9%
(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 99.0%
Taylor expanded in z around 0 62.6%
Taylor expanded in x around inf 52.4%
Final simplification52.4%
(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 2023301
(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)))))