
(FPCore (x y z t a) :precision binary64 (- x (/ (- y z) (/ (+ (- t z) 1.0) a))))
double code(double x, double y, double z, double t, double a) {
return x - ((y - z) / (((t - z) + 1.0) / a));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x - ((y - z) / (((t - z) + 1.0d0) / a))
end function
public static double code(double x, double y, double z, double t, double a) {
return x - ((y - z) / (((t - z) + 1.0) / a));
}
def code(x, y, z, t, a): return x - ((y - z) / (((t - z) + 1.0) / a))
function code(x, y, z, t, a) return Float64(x - Float64(Float64(y - z) / Float64(Float64(Float64(t - z) + 1.0) / a))) end
function tmp = code(x, y, z, t, a) tmp = x - ((y - z) / (((t - z) + 1.0) / a)); end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(y - z), $MachinePrecision] / N[(N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (- x (/ (- y z) (/ (+ (- t z) 1.0) a))))
double code(double x, double y, double z, double t, double a) {
return x - ((y - z) / (((t - z) + 1.0) / a));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x - ((y - z) / (((t - z) + 1.0d0) / a))
end function
public static double code(double x, double y, double z, double t, double a) {
return x - ((y - z) / (((t - z) + 1.0) / a));
}
def code(x, y, z, t, a): return x - ((y - z) / (((t - z) + 1.0) / a))
function code(x, y, z, t, a) return Float64(x - Float64(Float64(y - z) / Float64(Float64(Float64(t - z) + 1.0) / a))) end
function tmp = code(x, y, z, t, a) tmp = x - ((y - z) / (((t - z) + 1.0) / a)); end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(y - z), $MachinePrecision] / N[(N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}}
\end{array}
(FPCore (x y z t a) :precision binary64 (+ x (/ a (/ (+ -1.0 (- z t)) (- y z)))))
double code(double x, double y, double z, double t, double a) {
return x + (a / ((-1.0 + (z - t)) / (y - z)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (a / (((-1.0d0) + (z - t)) / (y - z)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (a / ((-1.0 + (z - t)) / (y - z)));
}
def code(x, y, z, t, a): return x + (a / ((-1.0 + (z - t)) / (y - z)))
function code(x, y, z, t, a) return Float64(x + Float64(a / Float64(Float64(-1.0 + Float64(z - t)) / Float64(y - z)))) end
function tmp = code(x, y, z, t, a) tmp = x + (a / ((-1.0 + (z - t)) / (y - z))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(a / N[(N[(-1.0 + N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{a}{\frac{-1 + \left(z - t\right)}{y - z}}
\end{array}
Initial program 97.3%
associate-/r/99.9%
Simplified99.9%
*-commutative99.9%
clear-num99.9%
un-div-inv99.9%
Applied egg-rr99.9%
Final simplification99.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (* y (/ a t)))))
(if (<= t -8.6e-13)
t_1
(if (<= t 7.3e-261) (- x (* a y)) (if (<= t 1650.0) (- x a) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (y * (a / t));
double tmp;
if (t <= -8.6e-13) {
tmp = t_1;
} else if (t <= 7.3e-261) {
tmp = x - (a * y);
} else if (t <= 1650.0) {
tmp = x - 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 * (a / t))
if (t <= (-8.6d-13)) then
tmp = t_1
else if (t <= 7.3d-261) then
tmp = x - (a * y)
else if (t <= 1650.0d0) then
tmp = x - 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 * (a / t));
double tmp;
if (t <= -8.6e-13) {
tmp = t_1;
} else if (t <= 7.3e-261) {
tmp = x - (a * y);
} else if (t <= 1650.0) {
tmp = x - a;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (y * (a / t)) tmp = 0 if t <= -8.6e-13: tmp = t_1 elif t <= 7.3e-261: tmp = x - (a * y) elif t <= 1650.0: tmp = x - a else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(y * Float64(a / t))) tmp = 0.0 if (t <= -8.6e-13) tmp = t_1; elseif (t <= 7.3e-261) tmp = Float64(x - Float64(a * y)); elseif (t <= 1650.0) tmp = Float64(x - a); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - (y * (a / t)); tmp = 0.0; if (t <= -8.6e-13) tmp = t_1; elseif (t <= 7.3e-261) tmp = x - (a * y); elseif (t <= 1650.0) tmp = x - 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[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -8.6e-13], t$95$1, If[LessEqual[t, 7.3e-261], N[(x - N[(a * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1650.0], N[(x - a), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - y \cdot \frac{a}{t}\\
\mathbf{if}\;t \leq -8.6 \cdot 10^{-13}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 7.3 \cdot 10^{-261}:\\
\;\;\;\;x - a \cdot y\\
\mathbf{elif}\;t \leq 1650:\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -8.5999999999999997e-13 or 1650 < t Initial program 97.2%
associate-/r/99.8%
Simplified99.8%
Taylor expanded in y around inf 77.0%
Taylor expanded in t around inf 73.0%
*-commutative73.0%
associate-*r/79.4%
Simplified79.4%
if -8.5999999999999997e-13 < t < 7.29999999999999974e-261Initial program 98.4%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in y around inf 84.4%
Taylor expanded in t around 0 76.3%
Taylor expanded in z around 0 69.0%
if 7.29999999999999974e-261 < t < 1650Initial program 95.7%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in z around inf 76.6%
Final simplification76.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (* a (/ y t)))))
(if (<= t -8.6e-13)
t_1
(if (<= t 3.4e-263) (- x (* a y)) (if (<= t 2400.0) (- x a) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (a * (y / t));
double tmp;
if (t <= -8.6e-13) {
tmp = t_1;
} else if (t <= 3.4e-263) {
tmp = x - (a * y);
} else if (t <= 2400.0) {
tmp = x - a;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x - (a * (y / t))
if (t <= (-8.6d-13)) then
tmp = t_1
else if (t <= 3.4d-263) then
tmp = x - (a * y)
else if (t <= 2400.0d0) then
tmp = x - a
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x - (a * (y / t));
double tmp;
if (t <= -8.6e-13) {
tmp = t_1;
} else if (t <= 3.4e-263) {
tmp = x - (a * y);
} else if (t <= 2400.0) {
tmp = x - a;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (a * (y / t)) tmp = 0 if t <= -8.6e-13: tmp = t_1 elif t <= 3.4e-263: tmp = x - (a * y) elif t <= 2400.0: tmp = x - a else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(a * Float64(y / t))) tmp = 0.0 if (t <= -8.6e-13) tmp = t_1; elseif (t <= 3.4e-263) tmp = Float64(x - Float64(a * y)); elseif (t <= 2400.0) tmp = Float64(x - a); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - (a * (y / t)); tmp = 0.0; if (t <= -8.6e-13) tmp = t_1; elseif (t <= 3.4e-263) tmp = x - (a * y); elseif (t <= 2400.0) tmp = x - a; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -8.6e-13], t$95$1, If[LessEqual[t, 3.4e-263], N[(x - N[(a * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2400.0], N[(x - a), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - a \cdot \frac{y}{t}\\
\mathbf{if}\;t \leq -8.6 \cdot 10^{-13}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 3.4 \cdot 10^{-263}:\\
\;\;\;\;x - a \cdot y\\
\mathbf{elif}\;t \leq 2400:\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -8.5999999999999997e-13 or 2400 < t Initial program 97.2%
associate-/r/99.8%
Simplified99.8%
Taylor expanded in t around inf 83.4%
Taylor expanded in y around inf 80.3%
if -8.5999999999999997e-13 < t < 3.40000000000000004e-263Initial program 98.4%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in y around inf 84.4%
Taylor expanded in t around 0 76.3%
Taylor expanded in z around 0 69.0%
if 3.40000000000000004e-263 < t < 2400Initial program 95.7%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in z around inf 76.6%
Final simplification76.6%
(FPCore (x y z t a)
:precision binary64
(if (<= t -8.6e-13)
(- x (* a (/ y t)))
(if (<= t 2.15e-268)
(- x (* a y))
(if (<= t 1450.0) (- x a) (- x (/ a (/ t y)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -8.6e-13) {
tmp = x - (a * (y / t));
} else if (t <= 2.15e-268) {
tmp = x - (a * y);
} else if (t <= 1450.0) {
tmp = x - a;
} else {
tmp = x - (a / (t / 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 (t <= (-8.6d-13)) then
tmp = x - (a * (y / t))
else if (t <= 2.15d-268) then
tmp = x - (a * y)
else if (t <= 1450.0d0) then
tmp = x - a
else
tmp = x - (a / (t / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -8.6e-13) {
tmp = x - (a * (y / t));
} else if (t <= 2.15e-268) {
tmp = x - (a * y);
} else if (t <= 1450.0) {
tmp = x - a;
} else {
tmp = x - (a / (t / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -8.6e-13: tmp = x - (a * (y / t)) elif t <= 2.15e-268: tmp = x - (a * y) elif t <= 1450.0: tmp = x - a else: tmp = x - (a / (t / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -8.6e-13) tmp = Float64(x - Float64(a * Float64(y / t))); elseif (t <= 2.15e-268) tmp = Float64(x - Float64(a * y)); elseif (t <= 1450.0) tmp = Float64(x - a); else tmp = Float64(x - Float64(a / Float64(t / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -8.6e-13) tmp = x - (a * (y / t)); elseif (t <= 2.15e-268) tmp = x - (a * y); elseif (t <= 1450.0) tmp = x - a; else tmp = x - (a / (t / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -8.6e-13], N[(x - N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.15e-268], N[(x - N[(a * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1450.0], N[(x - a), $MachinePrecision], N[(x - N[(a / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8.6 \cdot 10^{-13}:\\
\;\;\;\;x - a \cdot \frac{y}{t}\\
\mathbf{elif}\;t \leq 2.15 \cdot 10^{-268}:\\
\;\;\;\;x - a \cdot y\\
\mathbf{elif}\;t \leq 1450:\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;x - \frac{a}{\frac{t}{y}}\\
\end{array}
\end{array}
if t < -8.5999999999999997e-13Initial program 95.8%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in t around inf 77.7%
Taylor expanded in y around inf 72.9%
if -8.5999999999999997e-13 < t < 2.15e-268Initial program 98.4%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in y around inf 84.4%
Taylor expanded in t around 0 76.3%
Taylor expanded in z around 0 69.0%
if 2.15e-268 < t < 1450Initial program 95.7%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in z around inf 76.6%
if 1450 < t Initial program 98.6%
associate-/r/99.8%
Simplified99.8%
Taylor expanded in t around inf 89.0%
Taylor expanded in y around inf 87.3%
*-commutative87.3%
clear-num87.4%
un-div-inv87.4%
Applied egg-rr87.4%
Final simplification76.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -0.0001) (not (<= y 2e-11))) (- x (* a (/ y (- (+ t 1.0) z)))) (- x (* a (/ z (+ z (- -1.0 t)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -0.0001) || !(y <= 2e-11)) {
tmp = x - (a * (y / ((t + 1.0) - z)));
} else {
tmp = x - (a * (z / (z + (-1.0 - t))));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((y <= (-0.0001d0)) .or. (.not. (y <= 2d-11))) then
tmp = x - (a * (y / ((t + 1.0d0) - z)))
else
tmp = x - (a * (z / (z + ((-1.0d0) - t))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -0.0001) || !(y <= 2e-11)) {
tmp = x - (a * (y / ((t + 1.0) - z)));
} else {
tmp = x - (a * (z / (z + (-1.0 - t))));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -0.0001) or not (y <= 2e-11): tmp = x - (a * (y / ((t + 1.0) - z))) else: tmp = x - (a * (z / (z + (-1.0 - t)))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -0.0001) || !(y <= 2e-11)) tmp = Float64(x - Float64(a * Float64(y / Float64(Float64(t + 1.0) - z)))); else tmp = Float64(x - Float64(a * Float64(z / Float64(z + Float64(-1.0 - t))))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -0.0001) || ~((y <= 2e-11))) tmp = x - (a * (y / ((t + 1.0) - z))); else tmp = x - (a * (z / (z + (-1.0 - t)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -0.0001], N[Not[LessEqual[y, 2e-11]], $MachinePrecision]], N[(x - N[(a * N[(y / N[(N[(t + 1.0), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(a * N[(z / N[(z + N[(-1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -0.0001 \lor \neg \left(y \leq 2 \cdot 10^{-11}\right):\\
\;\;\;\;x - a \cdot \frac{y}{\left(t + 1\right) - z}\\
\mathbf{else}:\\
\;\;\;\;x - a \cdot \frac{z}{z + \left(-1 - t\right)}\\
\end{array}
\end{array}
if y < -1.00000000000000005e-4 or 1.99999999999999988e-11 < y Initial program 97.2%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in y around inf 91.7%
if -1.00000000000000005e-4 < y < 1.99999999999999988e-11Initial program 97.4%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in y around 0 96.7%
mul-1-neg96.7%
associate--l+96.7%
+-commutative96.7%
distribute-neg-frac296.7%
+-commutative96.7%
distribute-neg-in96.7%
metadata-eval96.7%
unsub-neg96.7%
associate--r-96.7%
Simplified96.7%
Final simplification93.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -0.00051) (not (<= y 1.45e-11))) (- x (* a (/ y (- (+ t 1.0) z)))) (+ x (/ a (+ (/ (+ t 1.0) z) -1.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -0.00051) || !(y <= 1.45e-11)) {
tmp = x - (a * (y / ((t + 1.0) - z)));
} else {
tmp = x + (a / (((t + 1.0) / z) + -1.0));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((y <= (-0.00051d0)) .or. (.not. (y <= 1.45d-11))) then
tmp = x - (a * (y / ((t + 1.0d0) - z)))
else
tmp = x + (a / (((t + 1.0d0) / z) + (-1.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -0.00051) || !(y <= 1.45e-11)) {
tmp = x - (a * (y / ((t + 1.0) - z)));
} else {
tmp = x + (a / (((t + 1.0) / z) + -1.0));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -0.00051) or not (y <= 1.45e-11): tmp = x - (a * (y / ((t + 1.0) - z))) else: tmp = x + (a / (((t + 1.0) / z) + -1.0)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -0.00051) || !(y <= 1.45e-11)) tmp = Float64(x - Float64(a * Float64(y / Float64(Float64(t + 1.0) - z)))); else tmp = Float64(x + Float64(a / Float64(Float64(Float64(t + 1.0) / z) + -1.0))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -0.00051) || ~((y <= 1.45e-11))) tmp = x - (a * (y / ((t + 1.0) - z))); else tmp = x + (a / (((t + 1.0) / z) + -1.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -0.00051], N[Not[LessEqual[y, 1.45e-11]], $MachinePrecision]], N[(x - N[(a * N[(y / N[(N[(t + 1.0), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(a / N[(N[(N[(t + 1.0), $MachinePrecision] / z), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -0.00051 \lor \neg \left(y \leq 1.45 \cdot 10^{-11}\right):\\
\;\;\;\;x - a \cdot \frac{y}{\left(t + 1\right) - z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{a}{\frac{t + 1}{z} + -1}\\
\end{array}
\end{array}
if y < -5.1e-4 or 1.45e-11 < y Initial program 97.2%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in y around inf 91.7%
if -5.1e-4 < y < 1.45e-11Initial program 97.4%
associate-/r/99.9%
Simplified99.9%
*-commutative99.9%
clear-num99.9%
un-div-inv100.0%
Applied egg-rr100.0%
Taylor expanded in y around 0 96.8%
mul-1-neg96.8%
div-sub96.8%
*-inverses96.8%
Simplified96.8%
Final simplification93.9%
(FPCore (x y z t a)
:precision binary64
(if (<= z -3.1e+98)
(+ x (/ a (+ -1.0 (/ t z))))
(if (<= z 1.06e+86)
(- x (* a (/ y (- (+ t 1.0) z))))
(+ x (/ (- y z) (/ z a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.1e+98) {
tmp = x + (a / (-1.0 + (t / z)));
} else if (z <= 1.06e+86) {
tmp = x - (a * (y / ((t + 1.0) - z)));
} 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 <= (-3.1d+98)) then
tmp = x + (a / ((-1.0d0) + (t / z)))
else if (z <= 1.06d+86) then
tmp = x - (a * (y / ((t + 1.0d0) - z)))
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 <= -3.1e+98) {
tmp = x + (a / (-1.0 + (t / z)));
} else if (z <= 1.06e+86) {
tmp = x - (a * (y / ((t + 1.0) - z)));
} else {
tmp = x + ((y - z) / (z / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.1e+98: tmp = x + (a / (-1.0 + (t / z))) elif z <= 1.06e+86: tmp = x - (a * (y / ((t + 1.0) - z))) else: tmp = x + ((y - z) / (z / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.1e+98) tmp = Float64(x + Float64(a / Float64(-1.0 + Float64(t / z)))); elseif (z <= 1.06e+86) tmp = Float64(x - Float64(a * Float64(y / Float64(Float64(t + 1.0) - z)))); else tmp = Float64(x + Float64(Float64(y - z) / Float64(z / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3.1e+98) tmp = x + (a / (-1.0 + (t / z))); elseif (z <= 1.06e+86) tmp = x - (a * (y / ((t + 1.0) - z))); else tmp = x + ((y - z) / (z / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.1e+98], N[(x + N[(a / N[(-1.0 + N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.06e+86], N[(x - N[(a * N[(y / N[(N[(t + 1.0), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - z), $MachinePrecision] / N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.1 \cdot 10^{+98}:\\
\;\;\;\;x + \frac{a}{-1 + \frac{t}{z}}\\
\mathbf{elif}\;z \leq 1.06 \cdot 10^{+86}:\\
\;\;\;\;x - a \cdot \frac{y}{\left(t + 1\right) - z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y - z}{\frac{z}{a}}\\
\end{array}
\end{array}
if z < -3.10000000000000019e98Initial program 90.8%
associate-/r/100.0%
Simplified100.0%
*-commutative100.0%
clear-num99.9%
un-div-inv100.0%
Applied egg-rr100.0%
Taylor expanded in y around 0 93.4%
mul-1-neg93.4%
div-sub93.4%
*-inverses93.4%
Simplified93.4%
Taylor expanded in t around inf 93.4%
if -3.10000000000000019e98 < z < 1.06e86Initial program 98.7%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in y around inf 92.5%
if 1.06e86 < z Initial program 97.8%
Taylor expanded in z around inf 97.1%
mul-1-neg94.8%
Simplified97.1%
Final simplification93.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -8.5e+85) (not (<= z 2.6e+82))) (- x a) (+ x (* a (/ y (- -1.0 t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -8.5e+85) || !(z <= 2.6e+82)) {
tmp = x - a;
} else {
tmp = x + (a * (y / (-1.0 - t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-8.5d+85)) .or. (.not. (z <= 2.6d+82))) then
tmp = x - a
else
tmp = x + (a * (y / ((-1.0d0) - t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -8.5e+85) || !(z <= 2.6e+82)) {
tmp = x - a;
} else {
tmp = x + (a * (y / (-1.0 - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -8.5e+85) or not (z <= 2.6e+82): tmp = x - a else: tmp = x + (a * (y / (-1.0 - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -8.5e+85) || !(z <= 2.6e+82)) tmp = Float64(x - a); else tmp = Float64(x + Float64(a * Float64(y / Float64(-1.0 - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -8.5e+85) || ~((z <= 2.6e+82))) tmp = x - a; else tmp = x + (a * (y / (-1.0 - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -8.5e+85], N[Not[LessEqual[z, 2.6e+82]], $MachinePrecision]], N[(x - a), $MachinePrecision], N[(x + N[(a * N[(y / N[(-1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.5 \cdot 10^{+85} \lor \neg \left(z \leq 2.6 \cdot 10^{+82}\right):\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;x + a \cdot \frac{y}{-1 - t}\\
\end{array}
\end{array}
if z < -8.4999999999999994e85 or 2.5999999999999998e82 < z Initial program 94.5%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in z around inf 82.3%
if -8.4999999999999994e85 < z < 2.5999999999999998e82Initial program 98.7%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around 0 87.0%
Final simplification85.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -8500000000000.0) (not (<= z 3900000.0))) (+ x (* a (/ (- y z) z))) (+ x (* a (/ y (- -1.0 t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -8500000000000.0) || !(z <= 3900000.0)) {
tmp = x + (a * ((y - z) / z));
} else {
tmp = x + (a * (y / (-1.0 - t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-8500000000000.0d0)) .or. (.not. (z <= 3900000.0d0))) then
tmp = x + (a * ((y - z) / z))
else
tmp = x + (a * (y / ((-1.0d0) - t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -8500000000000.0) || !(z <= 3900000.0)) {
tmp = x + (a * ((y - z) / z));
} else {
tmp = x + (a * (y / (-1.0 - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -8500000000000.0) or not (z <= 3900000.0): tmp = x + (a * ((y - z) / z)) else: tmp = x + (a * (y / (-1.0 - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -8500000000000.0) || !(z <= 3900000.0)) tmp = Float64(x + Float64(a * Float64(Float64(y - z) / z))); else tmp = Float64(x + Float64(a * Float64(y / Float64(-1.0 - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -8500000000000.0) || ~((z <= 3900000.0))) tmp = x + (a * ((y - z) / z)); else tmp = x + (a * (y / (-1.0 - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -8500000000000.0], N[Not[LessEqual[z, 3900000.0]], $MachinePrecision]], N[(x + N[(a * N[(N[(y - z), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(a * N[(y / N[(-1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8500000000000 \lor \neg \left(z \leq 3900000\right):\\
\;\;\;\;x + a \cdot \frac{y - z}{z}\\
\mathbf{else}:\\
\;\;\;\;x + a \cdot \frac{y}{-1 - t}\\
\end{array}
\end{array}
if z < -8.5e12 or 3.9e6 < z Initial program 94.5%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 86.2%
mul-1-neg86.2%
Simplified86.2%
Taylor expanded in z around 0 86.2%
neg-mul-186.2%
unsub-neg86.2%
Simplified86.2%
if -8.5e12 < z < 3.9e6Initial program 99.8%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around 0 93.9%
Final simplification90.2%
(FPCore (x y z t a) :precision binary64 (if (<= t -1.05e+18) (- x (* a (/ y t))) (if (<= t 8000.0) (- x (* y (/ a (- 1.0 z)))) (- x (/ a (/ t y))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.05e+18) {
tmp = x - (a * (y / t));
} else if (t <= 8000.0) {
tmp = x - (y * (a / (1.0 - z)));
} else {
tmp = x - (a / (t / 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 (t <= (-1.05d+18)) then
tmp = x - (a * (y / t))
else if (t <= 8000.0d0) then
tmp = x - (y * (a / (1.0d0 - z)))
else
tmp = x - (a / (t / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.05e+18) {
tmp = x - (a * (y / t));
} else if (t <= 8000.0) {
tmp = x - (y * (a / (1.0 - z)));
} else {
tmp = x - (a / (t / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.05e+18: tmp = x - (a * (y / t)) elif t <= 8000.0: tmp = x - (y * (a / (1.0 - z))) else: tmp = x - (a / (t / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.05e+18) tmp = Float64(x - Float64(a * Float64(y / t))); elseif (t <= 8000.0) tmp = Float64(x - Float64(y * Float64(a / Float64(1.0 - z)))); else tmp = Float64(x - Float64(a / Float64(t / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -1.05e+18) tmp = x - (a * (y / t)); elseif (t <= 8000.0) tmp = x - (y * (a / (1.0 - z))); else tmp = x - (a / (t / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.05e+18], N[(x - N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8000.0], N[(x - N[(y * N[(a / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(a / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.05 \cdot 10^{+18}:\\
\;\;\;\;x - a \cdot \frac{y}{t}\\
\mathbf{elif}\;t \leq 8000:\\
\;\;\;\;x - y \cdot \frac{a}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{a}{\frac{t}{y}}\\
\end{array}
\end{array}
if t < -1.05e18Initial program 95.1%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in t around inf 84.0%
Taylor expanded in y around inf 76.5%
if -1.05e18 < t < 8e3Initial program 97.5%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in y around inf 76.2%
Taylor expanded in t around 0 74.3%
associate-*l/78.3%
*-commutative78.3%
Simplified78.3%
if 8e3 < t Initial program 98.6%
associate-/r/99.8%
Simplified99.8%
Taylor expanded in t around inf 89.0%
Taylor expanded in y around inf 87.3%
*-commutative87.3%
clear-num87.4%
un-div-inv87.4%
Applied egg-rr87.4%
Final simplification80.5%
(FPCore (x y z t a)
:precision binary64
(if (<= z -68000000000.0)
(+ x (* a (/ (- y z) z)))
(if (<= z 50000000.0)
(+ x (* a (/ y (- -1.0 t))))
(+ x (/ a (/ z (- y z)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -68000000000.0) {
tmp = x + (a * ((y - z) / z));
} else if (z <= 50000000.0) {
tmp = x + (a * (y / (-1.0 - t)));
} else {
tmp = x + (a / (z / (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) :: tmp
if (z <= (-68000000000.0d0)) then
tmp = x + (a * ((y - z) / z))
else if (z <= 50000000.0d0) then
tmp = x + (a * (y / ((-1.0d0) - t)))
else
tmp = x + (a / (z / (y - 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 <= -68000000000.0) {
tmp = x + (a * ((y - z) / z));
} else if (z <= 50000000.0) {
tmp = x + (a * (y / (-1.0 - t)));
} else {
tmp = x + (a / (z / (y - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -68000000000.0: tmp = x + (a * ((y - z) / z)) elif z <= 50000000.0: tmp = x + (a * (y / (-1.0 - t))) else: tmp = x + (a / (z / (y - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -68000000000.0) tmp = Float64(x + Float64(a * Float64(Float64(y - z) / z))); elseif (z <= 50000000.0) tmp = Float64(x + Float64(a * Float64(y / Float64(-1.0 - t)))); else tmp = Float64(x + Float64(a / Float64(z / Float64(y - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -68000000000.0) tmp = x + (a * ((y - z) / z)); elseif (z <= 50000000.0) tmp = x + (a * (y / (-1.0 - t))); else tmp = x + (a / (z / (y - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -68000000000.0], N[(x + N[(a * N[(N[(y - z), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 50000000.0], N[(x + N[(a * N[(y / N[(-1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(a / N[(z / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -68000000000:\\
\;\;\;\;x + a \cdot \frac{y - z}{z}\\
\mathbf{elif}\;z \leq 50000000:\\
\;\;\;\;x + a \cdot \frac{y}{-1 - t}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{a}{\frac{z}{y - z}}\\
\end{array}
\end{array}
if z < -6.8e10Initial program 93.5%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 87.8%
mul-1-neg87.8%
Simplified87.8%
Taylor expanded in z around 0 87.8%
neg-mul-187.8%
unsub-neg87.8%
Simplified87.8%
if -6.8e10 < z < 5e7Initial program 99.8%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around 0 93.9%
if 5e7 < z Initial program 95.4%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 84.7%
mul-1-neg84.7%
Simplified84.7%
Taylor expanded in z around 0 84.7%
neg-mul-184.7%
unsub-neg84.7%
Simplified84.7%
*-commutative84.7%
clear-num84.7%
un-div-inv84.7%
Applied egg-rr84.7%
Final simplification90.2%
(FPCore (x y z t a) :precision binary64 (if (<= z -47000000.0) (+ x (* a (/ (- y z) z))) (if (<= z 7e+78) (+ x (* a (/ y (- -1.0 t)))) (+ x (/ (- y z) (/ z a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -47000000.0) {
tmp = x + (a * ((y - z) / z));
} else if (z <= 7e+78) {
tmp = x + (a * (y / (-1.0 - 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 <= (-47000000.0d0)) then
tmp = x + (a * ((y - z) / z))
else if (z <= 7d+78) then
tmp = x + (a * (y / ((-1.0d0) - 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 <= -47000000.0) {
tmp = x + (a * ((y - z) / z));
} else if (z <= 7e+78) {
tmp = x + (a * (y / (-1.0 - t)));
} else {
tmp = x + ((y - z) / (z / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -47000000.0: tmp = x + (a * ((y - z) / z)) elif z <= 7e+78: tmp = x + (a * (y / (-1.0 - t))) else: tmp = x + ((y - z) / (z / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -47000000.0) tmp = Float64(x + Float64(a * Float64(Float64(y - z) / z))); elseif (z <= 7e+78) tmp = Float64(x + Float64(a * Float64(y / Float64(-1.0 - t)))); else tmp = Float64(x + Float64(Float64(y - z) / Float64(z / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -47000000.0) tmp = x + (a * ((y - z) / z)); elseif (z <= 7e+78) tmp = x + (a * (y / (-1.0 - t))); else tmp = x + ((y - z) / (z / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -47000000.0], N[(x + N[(a * N[(N[(y - z), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7e+78], N[(x + N[(a * N[(y / N[(-1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - z), $MachinePrecision] / N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -47000000:\\
\;\;\;\;x + a \cdot \frac{y - z}{z}\\
\mathbf{elif}\;z \leq 7 \cdot 10^{+78}:\\
\;\;\;\;x + a \cdot \frac{y}{-1 - t}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y - z}{\frac{z}{a}}\\
\end{array}
\end{array}
if z < -4.7e7Initial program 93.5%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 87.8%
mul-1-neg87.8%
Simplified87.8%
Taylor expanded in z around 0 87.8%
neg-mul-187.8%
unsub-neg87.8%
Simplified87.8%
if -4.7e7 < z < 7.0000000000000003e78Initial program 98.6%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around 0 89.4%
if 7.0000000000000003e78 < z Initial program 97.8%
Taylor expanded in z around inf 97.1%
mul-1-neg94.8%
Simplified97.1%
Final simplification90.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -9.2e-23) (not (<= z 4.5e-49))) (- x a) (- x (* a y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -9.2e-23) || !(z <= 4.5e-49)) {
tmp = x - a;
} else {
tmp = x - (a * 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.2d-23)) .or. (.not. (z <= 4.5d-49))) then
tmp = x - a
else
tmp = x - (a * 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.2e-23) || !(z <= 4.5e-49)) {
tmp = x - a;
} else {
tmp = x - (a * y);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -9.2e-23) or not (z <= 4.5e-49): tmp = x - a else: tmp = x - (a * y) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -9.2e-23) || !(z <= 4.5e-49)) tmp = Float64(x - a); else tmp = Float64(x - Float64(a * y)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -9.2e-23) || ~((z <= 4.5e-49))) tmp = x - a; else tmp = x - (a * y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -9.2e-23], N[Not[LessEqual[z, 4.5e-49]], $MachinePrecision]], N[(x - a), $MachinePrecision], N[(x - N[(a * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.2 \cdot 10^{-23} \lor \neg \left(z \leq 4.5 \cdot 10^{-49}\right):\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;x - a \cdot y\\
\end{array}
\end{array}
if z < -9.2000000000000004e-23 or 4.5000000000000002e-49 < z Initial program 95.0%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 71.1%
if -9.2000000000000004e-23 < z < 4.5000000000000002e-49Initial program 99.9%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in y around inf 95.7%
Taylor expanded in t around 0 69.9%
Taylor expanded in z around 0 69.9%
Final simplification70.5%
(FPCore (x y z t a) :precision binary64 (+ x (* a (/ (- y z) (+ -1.0 (- z t))))))
double code(double x, double y, double z, double t, double a) {
return x + (a * ((y - z) / (-1.0 + (z - t))));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (a * ((y - z) / ((-1.0d0) + (z - t))))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (a * ((y - z) / (-1.0 + (z - t))));
}
def code(x, y, z, t, a): return x + (a * ((y - z) / (-1.0 + (z - t))))
function code(x, y, z, t, a) return Float64(x + Float64(a * Float64(Float64(y - z) / Float64(-1.0 + Float64(z - t))))) end
function tmp = code(x, y, z, t, a) tmp = x + (a * ((y - z) / (-1.0 + (z - t)))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(a * N[(N[(y - z), $MachinePrecision] / N[(-1.0 + N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + a \cdot \frac{y - z}{-1 + \left(z - t\right)}
\end{array}
Initial program 97.3%
associate-/r/99.9%
Simplified99.9%
Final simplification99.9%
(FPCore (x y z t a) :precision binary64 (if (<= y -9.5e+239) (* a (/ y z)) (- x a)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -9.5e+239) {
tmp = a * (y / z);
} else {
tmp = x - a;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (y <= (-9.5d+239)) then
tmp = a * (y / z)
else
tmp = x - a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -9.5e+239) {
tmp = a * (y / z);
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -9.5e+239: tmp = a * (y / z) else: tmp = x - a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -9.5e+239) tmp = Float64(a * Float64(y / z)); else tmp = Float64(x - a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -9.5e+239) tmp = a * (y / z); else tmp = x - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -9.5e+239], N[(a * N[(y / z), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.5 \cdot 10^{+239}:\\
\;\;\;\;a \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if y < -9.5000000000000008e239Initial program 99.9%
associate-/r/99.7%
Simplified99.7%
Taylor expanded in z around inf 67.2%
mul-1-neg67.2%
Simplified67.2%
Taylor expanded in y around inf 40.4%
associate-/l*53.3%
Simplified53.3%
if -9.5000000000000008e239 < y Initial program 97.0%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 65.1%
Final simplification64.2%
(FPCore (x y z t a) :precision binary64 (if (<= t 2.7e+116) (- x a) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 2.7e+116) {
tmp = x - a;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= 2.7d+116) then
tmp = x - a
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 2.7e+116) {
tmp = x - a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 2.7e+116: tmp = x - a else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 2.7e+116) tmp = Float64(x - a); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= 2.7e+116) tmp = x - a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 2.7e+116], N[(x - a), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 2.7 \cdot 10^{+116}:\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < 2.7e116Initial program 97.2%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 63.1%
if 2.7e116 < t Initial program 97.8%
associate-/r/99.8%
Simplified99.8%
Taylor expanded in z around inf 45.0%
mul-1-neg45.0%
Simplified45.0%
Taylor expanded in x around inf 66.9%
Final simplification63.8%
(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%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 59.1%
mul-1-neg59.1%
Simplified59.1%
Taylor expanded in x around inf 54.5%
Final simplification54.5%
(FPCore (x y z t a) :precision binary64 (- x (* (/ (- y z) (+ (- t z) 1.0)) a)))
double code(double x, double y, double z, double t, double a) {
return x - (((y - z) / ((t - z) + 1.0)) * a);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x - (((y - z) / ((t - z) + 1.0d0)) * a)
end function
public static double code(double x, double y, double z, double t, double a) {
return x - (((y - z) / ((t - z) + 1.0)) * a);
}
def code(x, y, z, t, a): return x - (((y - z) / ((t - z) + 1.0)) * a)
function code(x, y, z, t, a) return Float64(x - Float64(Float64(Float64(y - z) / Float64(Float64(t - z) + 1.0)) * a)) end
function tmp = code(x, y, z, t, a) tmp = x - (((y - z) / ((t - z) + 1.0)) * a); end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(N[(y - z), $MachinePrecision] / N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{y - z}{\left(t - z\right) + 1} \cdot a
\end{array}
herbie shell --seed 2024096
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.SparkLine:renderSparkLine from Chart-1.5.3"
:precision binary64
:alt
(- x (* (/ (- y z) (+ (- t z) 1.0)) a))
(- x (/ (- y z) (/ (+ (- t z) 1.0) a))))