
(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 16 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 (/ (+ (- t z) 1.0) (- y z)))))
double code(double x, double y, double z, double t, double a) {
return x - (a / (((t - z) + 1.0) / (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 / (((t - z) + 1.0d0) / (y - z)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x - (a / (((t - z) + 1.0) / (y - z)));
}
def code(x, y, z, t, a): return x - (a / (((t - z) + 1.0) / (y - z)))
function code(x, y, z, t, a) return Float64(x - Float64(a / Float64(Float64(Float64(t - z) + 1.0) / Float64(y - z)))) end
function tmp = code(x, y, z, t, a) tmp = x - (a / (((t - z) + 1.0) / (y - z))); end
code[x_, y_, z_, t_, a_] := N[(x - N[(a / N[(N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{a}{\frac{\left(t - z\right) + 1}{y - z}}
\end{array}
Initial program 94.8%
associate-/r/99.2%
*-commutative99.2%
Simplified99.2%
clear-num99.2%
un-div-inv99.2%
Applied egg-rr99.2%
Final simplification99.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ a (+ -1.0 (/ 1.0 z))))))
(if (<= t -1.35e+231)
(+ x (/ a (/ t z)))
(if (<= t -1.35e-292)
t_1
(if (<= t 3.4e-152)
(- x (* a y))
(if (<= t 7.2e+74) t_1 (- x (/ a (/ t y)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (a / (-1.0 + (1.0 / z)));
double tmp;
if (t <= -1.35e+231) {
tmp = x + (a / (t / z));
} else if (t <= -1.35e-292) {
tmp = t_1;
} else if (t <= 3.4e-152) {
tmp = x - (a * y);
} else if (t <= 7.2e+74) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = x + (a / ((-1.0d0) + (1.0d0 / z)))
if (t <= (-1.35d+231)) then
tmp = x + (a / (t / z))
else if (t <= (-1.35d-292)) then
tmp = t_1
else if (t <= 3.4d-152) then
tmp = x - (a * y)
else if (t <= 7.2d+74) then
tmp = t_1
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 t_1 = x + (a / (-1.0 + (1.0 / z)));
double tmp;
if (t <= -1.35e+231) {
tmp = x + (a / (t / z));
} else if (t <= -1.35e-292) {
tmp = t_1;
} else if (t <= 3.4e-152) {
tmp = x - (a * y);
} else if (t <= 7.2e+74) {
tmp = t_1;
} else {
tmp = x - (a / (t / y));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (a / (-1.0 + (1.0 / z))) tmp = 0 if t <= -1.35e+231: tmp = x + (a / (t / z)) elif t <= -1.35e-292: tmp = t_1 elif t <= 3.4e-152: tmp = x - (a * y) elif t <= 7.2e+74: tmp = t_1 else: tmp = x - (a / (t / y)) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(a / Float64(-1.0 + Float64(1.0 / z)))) tmp = 0.0 if (t <= -1.35e+231) tmp = Float64(x + Float64(a / Float64(t / z))); elseif (t <= -1.35e-292) tmp = t_1; elseif (t <= 3.4e-152) tmp = Float64(x - Float64(a * y)); elseif (t <= 7.2e+74) tmp = t_1; else tmp = Float64(x - Float64(a / Float64(t / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (a / (-1.0 + (1.0 / z))); tmp = 0.0; if (t <= -1.35e+231) tmp = x + (a / (t / z)); elseif (t <= -1.35e-292) tmp = t_1; elseif (t <= 3.4e-152) tmp = x - (a * y); elseif (t <= 7.2e+74) tmp = t_1; else tmp = x - (a / (t / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(a / N[(-1.0 + N[(1.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.35e+231], N[(x + N[(a / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.35e-292], t$95$1, If[LessEqual[t, 3.4e-152], N[(x - N[(a * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.2e+74], t$95$1, N[(x - N[(a / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{a}{-1 + \frac{1}{z}}\\
\mathbf{if}\;t \leq -1.35 \cdot 10^{+231}:\\
\;\;\;\;x + \frac{a}{\frac{t}{z}}\\
\mathbf{elif}\;t \leq -1.35 \cdot 10^{-292}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 3.4 \cdot 10^{-152}:\\
\;\;\;\;x - a \cdot y\\
\mathbf{elif}\;t \leq 7.2 \cdot 10^{+74}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x - \frac{a}{\frac{t}{y}}\\
\end{array}
\end{array}
if t < -1.35e231Initial program 95.1%
associate-/r/94.7%
*-commutative94.7%
Simplified94.7%
Taylor expanded in t around inf 89.6%
Taylor expanded in y around 0 64.8%
mul-1-neg64.8%
associate-/l*74.9%
Simplified74.9%
if -1.35e231 < t < -1.35e-292 or 3.39999999999999984e-152 < t < 7.19999999999999975e74Initial program 95.1%
associate-/r/99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in t around 0 87.4%
Taylor expanded in y around 0 70.1%
sub-neg70.1%
mul-1-neg70.1%
remove-double-neg70.1%
associate-/l*78.8%
div-sub78.8%
*-inverses78.8%
Simplified78.8%
if -1.35e-292 < t < 3.39999999999999984e-152Initial program 99.8%
associate-/r/99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in z around 0 74.9%
associate-/l*74.9%
Simplified74.9%
Taylor expanded in t around 0 74.9%
if 7.19999999999999975e74 < t Initial program 90.5%
associate-/r/98.0%
*-commutative98.0%
Simplified98.0%
Taylor expanded in t around inf 89.4%
Taylor expanded in y around inf 72.4%
associate-/l*82.1%
Simplified82.1%
Final simplification78.6%
(FPCore (x y z t a) :precision binary64 (if (<= z -4.2e+174) (- x a) (if (<= z 4e+133) (- x (* a (/ y (- (+ t 1.0) z)))) (- x a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4.2e+174) {
tmp = x - a;
} else if (z <= 4e+133) {
tmp = x - (a * (y / ((t + 1.0) - 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 (z <= (-4.2d+174)) then
tmp = x - a
else if (z <= 4d+133) then
tmp = x - (a * (y / ((t + 1.0d0) - 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 (z <= -4.2e+174) {
tmp = x - a;
} else if (z <= 4e+133) {
tmp = x - (a * (y / ((t + 1.0) - z)));
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -4.2e+174: tmp = x - a elif z <= 4e+133: tmp = x - (a * (y / ((t + 1.0) - z))) else: tmp = x - a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -4.2e+174) tmp = Float64(x - a); elseif (z <= 4e+133) tmp = Float64(x - Float64(a * Float64(y / Float64(Float64(t + 1.0) - z)))); else tmp = Float64(x - a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -4.2e+174) tmp = x - a; elseif (z <= 4e+133) tmp = x - (a * (y / ((t + 1.0) - z))); else tmp = x - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4.2e+174], N[(x - a), $MachinePrecision], If[LessEqual[z, 4e+133], N[(x - N[(a * N[(y / N[(N[(t + 1.0), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.2 \cdot 10^{+174}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq 4 \cdot 10^{+133}:\\
\;\;\;\;x - a \cdot \frac{y}{\left(t + 1\right) - z}\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -4.20000000000000033e174 or 4.0000000000000001e133 < z Initial program 91.3%
associate-/r/99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in z around inf 87.1%
if -4.20000000000000033e174 < z < 4.0000000000000001e133Initial program 96.0%
associate-/r/98.9%
*-commutative98.9%
Simplified98.9%
Taylor expanded in y around inf 86.2%
Final simplification86.4%
(FPCore (x y z t a)
:precision binary64
(if (<= t -8e+51)
(- x (* (- y z) (/ a t)))
(if (<= t 1.5e+74)
(+ x (* a (/ (- z y) (- 1.0 z))))
(+ x (* a (/ (- z y) t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -8e+51) {
tmp = x - ((y - z) * (a / t));
} else if (t <= 1.5e+74) {
tmp = x + (a * ((z - y) / (1.0 - z)));
} else {
tmp = x + (a * ((z - y) / 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 (t <= (-8d+51)) then
tmp = x - ((y - z) * (a / t))
else if (t <= 1.5d+74) then
tmp = x + (a * ((z - y) / (1.0d0 - z)))
else
tmp = x + (a * ((z - y) / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -8e+51) {
tmp = x - ((y - z) * (a / t));
} else if (t <= 1.5e+74) {
tmp = x + (a * ((z - y) / (1.0 - z)));
} else {
tmp = x + (a * ((z - y) / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -8e+51: tmp = x - ((y - z) * (a / t)) elif t <= 1.5e+74: tmp = x + (a * ((z - y) / (1.0 - z))) else: tmp = x + (a * ((z - y) / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -8e+51) tmp = Float64(x - Float64(Float64(y - z) * Float64(a / t))); elseif (t <= 1.5e+74) tmp = Float64(x + Float64(a * Float64(Float64(z - y) / Float64(1.0 - z)))); else tmp = Float64(x + Float64(a * Float64(Float64(z - y) / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -8e+51) tmp = x - ((y - z) * (a / t)); elseif (t <= 1.5e+74) tmp = x + (a * ((z - y) / (1.0 - z))); else tmp = x + (a * ((z - y) / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -8e+51], N[(x - N[(N[(y - z), $MachinePrecision] * N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.5e+74], N[(x + N[(a * N[(N[(z - y), $MachinePrecision] / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(a * N[(N[(z - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8 \cdot 10^{+51}:\\
\;\;\;\;x - \left(y - z\right) \cdot \frac{a}{t}\\
\mathbf{elif}\;t \leq 1.5 \cdot 10^{+74}:\\
\;\;\;\;x + a \cdot \frac{z - y}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;x + a \cdot \frac{z - y}{t}\\
\end{array}
\end{array}
if t < -8e51Initial program 96.7%
associate-/r/98.3%
*-commutative98.3%
Simplified98.3%
Taylor expanded in t around inf 75.0%
associate-/l*82.8%
associate-/r/84.2%
Simplified84.2%
if -8e51 < t < 1.5e74Initial program 95.6%
associate-/r/99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in t around 0 96.7%
if 1.5e74 < t Initial program 90.5%
associate-/r/98.0%
*-commutative98.0%
Simplified98.0%
Taylor expanded in t around inf 89.4%
Final simplification92.3%
(FPCore (x y z t a)
:precision binary64
(if (<= t -13.0)
(+ x (* a (/ z (+ t (- 1.0 z)))))
(if (<= t 4.8e+72)
(+ x (* a (/ (- z y) (- 1.0 z))))
(+ x (* a (/ (- z y) t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -13.0) {
tmp = x + (a * (z / (t + (1.0 - z))));
} else if (t <= 4.8e+72) {
tmp = x + (a * ((z - y) / (1.0 - z)));
} else {
tmp = x + (a * ((z - y) / 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 (t <= (-13.0d0)) then
tmp = x + (a * (z / (t + (1.0d0 - z))))
else if (t <= 4.8d+72) then
tmp = x + (a * ((z - y) / (1.0d0 - z)))
else
tmp = x + (a * ((z - y) / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -13.0) {
tmp = x + (a * (z / (t + (1.0 - z))));
} else if (t <= 4.8e+72) {
tmp = x + (a * ((z - y) / (1.0 - z)));
} else {
tmp = x + (a * ((z - y) / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -13.0: tmp = x + (a * (z / (t + (1.0 - z)))) elif t <= 4.8e+72: tmp = x + (a * ((z - y) / (1.0 - z))) else: tmp = x + (a * ((z - y) / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -13.0) tmp = Float64(x + Float64(a * Float64(z / Float64(t + Float64(1.0 - z))))); elseif (t <= 4.8e+72) tmp = Float64(x + Float64(a * Float64(Float64(z - y) / Float64(1.0 - z)))); else tmp = Float64(x + Float64(a * Float64(Float64(z - y) / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -13.0) tmp = x + (a * (z / (t + (1.0 - z)))); elseif (t <= 4.8e+72) tmp = x + (a * ((z - y) / (1.0 - z))); else tmp = x + (a * ((z - y) / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -13.0], N[(x + N[(a * N[(z / N[(t + N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.8e+72], N[(x + N[(a * N[(N[(z - y), $MachinePrecision] / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(a * N[(N[(z - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -13:\\
\;\;\;\;x + a \cdot \frac{z}{t + \left(1 - z\right)}\\
\mathbf{elif}\;t \leq 4.8 \cdot 10^{+72}:\\
\;\;\;\;x + a \cdot \frac{z - y}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;x + a \cdot \frac{z - y}{t}\\
\end{array}
\end{array}
if t < -13Initial program 96.2%
associate-/r/98.5%
*-commutative98.5%
Simplified98.5%
Taylor expanded in y around 0 87.6%
associate-*r/87.6%
neg-mul-187.6%
+-commutative87.6%
associate--l+87.6%
Simplified87.6%
if -13 < t < 4.8000000000000002e72Initial program 95.7%
associate-/r/99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in t around 0 97.3%
if 4.8000000000000002e72 < t Initial program 90.5%
associate-/r/98.0%
*-commutative98.0%
Simplified98.0%
Taylor expanded in t around inf 89.4%
Final simplification93.1%
(FPCore (x y z t a)
:precision binary64
(if (<= t -1250.0)
(+ x (/ a (+ (/ (+ t 1.0) z) -1.0)))
(if (<= t 5e+72)
(+ x (* a (/ (- z y) (- 1.0 z))))
(+ x (* a (/ (- z y) t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1250.0) {
tmp = x + (a / (((t + 1.0) / z) + -1.0));
} else if (t <= 5e+72) {
tmp = x + (a * ((z - y) / (1.0 - z)));
} else {
tmp = x + (a * ((z - y) / 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 (t <= (-1250.0d0)) then
tmp = x + (a / (((t + 1.0d0) / z) + (-1.0d0)))
else if (t <= 5d+72) then
tmp = x + (a * ((z - y) / (1.0d0 - z)))
else
tmp = x + (a * ((z - y) / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1250.0) {
tmp = x + (a / (((t + 1.0) / z) + -1.0));
} else if (t <= 5e+72) {
tmp = x + (a * ((z - y) / (1.0 - z)));
} else {
tmp = x + (a * ((z - y) / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1250.0: tmp = x + (a / (((t + 1.0) / z) + -1.0)) elif t <= 5e+72: tmp = x + (a * ((z - y) / (1.0 - z))) else: tmp = x + (a * ((z - y) / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1250.0) tmp = Float64(x + Float64(a / Float64(Float64(Float64(t + 1.0) / z) + -1.0))); elseif (t <= 5e+72) tmp = Float64(x + Float64(a * Float64(Float64(z - y) / Float64(1.0 - z)))); else tmp = Float64(x + Float64(a * Float64(Float64(z - y) / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -1250.0) tmp = x + (a / (((t + 1.0) / z) + -1.0)); elseif (t <= 5e+72) tmp = x + (a * ((z - y) / (1.0 - z))); else tmp = x + (a * ((z - y) / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1250.0], N[(x + N[(a / N[(N[(N[(t + 1.0), $MachinePrecision] / z), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5e+72], N[(x + N[(a * N[(N[(z - y), $MachinePrecision] / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(a * N[(N[(z - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1250:\\
\;\;\;\;x + \frac{a}{\frac{t + 1}{z} + -1}\\
\mathbf{elif}\;t \leq 5 \cdot 10^{+72}:\\
\;\;\;\;x + a \cdot \frac{z - y}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;x + a \cdot \frac{z - y}{t}\\
\end{array}
\end{array}
if t < -1250Initial program 96.2%
associate-/r/98.5%
*-commutative98.5%
Simplified98.5%
clear-num98.5%
un-div-inv98.5%
Applied egg-rr98.5%
Taylor expanded in y around 0 73.9%
mul-1-neg73.9%
associate-/l*87.6%
distribute-neg-frac87.6%
div-sub87.6%
sub-neg87.6%
*-inverses87.6%
metadata-eval87.6%
Simplified87.6%
if -1250 < t < 4.99999999999999992e72Initial program 95.7%
associate-/r/99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in t around 0 97.3%
if 4.99999999999999992e72 < t Initial program 90.5%
associate-/r/98.0%
*-commutative98.0%
Simplified98.0%
Taylor expanded in t around inf 89.4%
Final simplification93.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (* a (/ y t)))))
(if (<= t -3.6e+134)
t_1
(if (<= t -5.6e-257) (- x a) (if (<= t 1.1) (- x (* a y)) 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 <= -3.6e+134) {
tmp = t_1;
} else if (t <= -5.6e-257) {
tmp = x - a;
} else if (t <= 1.1) {
tmp = x - (a * y);
} 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 <= (-3.6d+134)) then
tmp = t_1
else if (t <= (-5.6d-257)) then
tmp = x - a
else if (t <= 1.1d0) then
tmp = x - (a * y)
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 <= -3.6e+134) {
tmp = t_1;
} else if (t <= -5.6e-257) {
tmp = x - a;
} else if (t <= 1.1) {
tmp = x - (a * y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (a * (y / t)) tmp = 0 if t <= -3.6e+134: tmp = t_1 elif t <= -5.6e-257: tmp = x - a elif t <= 1.1: tmp = x - (a * y) 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 <= -3.6e+134) tmp = t_1; elseif (t <= -5.6e-257) tmp = Float64(x - a); elseif (t <= 1.1) tmp = Float64(x - Float64(a * y)); 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 <= -3.6e+134) tmp = t_1; elseif (t <= -5.6e-257) tmp = x - a; elseif (t <= 1.1) tmp = x - (a * y); 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, -3.6e+134], t$95$1, If[LessEqual[t, -5.6e-257], N[(x - a), $MachinePrecision], If[LessEqual[t, 1.1], N[(x - N[(a * y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - a \cdot \frac{y}{t}\\
\mathbf{if}\;t \leq -3.6 \cdot 10^{+134}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -5.6 \cdot 10^{-257}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;t \leq 1.1:\\
\;\;\;\;x - a \cdot y\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -3.59999999999999988e134 or 1.1000000000000001 < t Initial program 92.1%
associate-/r/98.1%
*-commutative98.1%
Simplified98.1%
Taylor expanded in t around inf 85.5%
Taylor expanded in y around inf 76.5%
if -3.59999999999999988e134 < t < -5.60000000000000002e-257Initial program 95.7%
associate-/r/99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in z around inf 76.2%
if -5.60000000000000002e-257 < t < 1.1000000000000001Initial program 98.4%
associate-/r/100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in z around 0 71.9%
associate-/l*71.9%
Simplified71.9%
Taylor expanded in t around 0 71.9%
Final simplification75.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (/ a (/ t y)))))
(if (<= t -6.4e+133)
t_1
(if (<= t -5.4e-253) (- x a) (if (<= t 1.0) (- x (* a y)) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (a / (t / y));
double tmp;
if (t <= -6.4e+133) {
tmp = t_1;
} else if (t <= -5.4e-253) {
tmp = x - a;
} else if (t <= 1.0) {
tmp = x - (a * y);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x - (a / (t / y))
if (t <= (-6.4d+133)) then
tmp = t_1
else if (t <= (-5.4d-253)) then
tmp = x - a
else if (t <= 1.0d0) then
tmp = x - (a * y)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x - (a / (t / y));
double tmp;
if (t <= -6.4e+133) {
tmp = t_1;
} else if (t <= -5.4e-253) {
tmp = x - a;
} else if (t <= 1.0) {
tmp = x - (a * y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (a / (t / y)) tmp = 0 if t <= -6.4e+133: tmp = t_1 elif t <= -5.4e-253: tmp = x - a elif t <= 1.0: tmp = x - (a * y) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(a / Float64(t / y))) tmp = 0.0 if (t <= -6.4e+133) tmp = t_1; elseif (t <= -5.4e-253) tmp = Float64(x - a); elseif (t <= 1.0) tmp = Float64(x - Float64(a * y)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - (a / (t / y)); tmp = 0.0; if (t <= -6.4e+133) tmp = t_1; elseif (t <= -5.4e-253) tmp = x - a; elseif (t <= 1.0) tmp = x - (a * y); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(a / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.4e+133], t$95$1, If[LessEqual[t, -5.4e-253], N[(x - a), $MachinePrecision], If[LessEqual[t, 1.0], N[(x - N[(a * y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \frac{a}{\frac{t}{y}}\\
\mathbf{if}\;t \leq -6.4 \cdot 10^{+133}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -5.4 \cdot 10^{-253}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;t \leq 1:\\
\;\;\;\;x - a \cdot y\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -6.39999999999999994e133 or 1 < t Initial program 92.1%
associate-/r/98.1%
*-commutative98.1%
Simplified98.1%
Taylor expanded in t around inf 85.5%
Taylor expanded in y around inf 70.3%
associate-/l*76.5%
Simplified76.5%
if -6.39999999999999994e133 < t < -5.39999999999999998e-253Initial program 95.7%
associate-/r/99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in z around inf 76.2%
if -5.39999999999999998e-253 < t < 1Initial program 98.4%
associate-/r/100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in z around 0 71.9%
associate-/l*71.9%
Simplified71.9%
Taylor expanded in t around 0 71.9%
Final simplification75.2%
(FPCore (x y z t a)
:precision binary64
(if (<= t -2.1e+135)
(+ x (/ a (/ t z)))
(if (<= t -3.4e-252)
(- x a)
(if (<= t 1.0) (- x (* a y)) (- x (/ a (/ t y)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.1e+135) {
tmp = x + (a / (t / z));
} else if (t <= -3.4e-252) {
tmp = x - a;
} else if (t <= 1.0) {
tmp = x - (a * y);
} 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 <= (-2.1d+135)) then
tmp = x + (a / (t / z))
else if (t <= (-3.4d-252)) then
tmp = x - a
else if (t <= 1.0d0) then
tmp = x - (a * y)
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 <= -2.1e+135) {
tmp = x + (a / (t / z));
} else if (t <= -3.4e-252) {
tmp = x - a;
} else if (t <= 1.0) {
tmp = x - (a * y);
} else {
tmp = x - (a / (t / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -2.1e+135: tmp = x + (a / (t / z)) elif t <= -3.4e-252: tmp = x - a elif t <= 1.0: tmp = x - (a * y) else: tmp = x - (a / (t / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -2.1e+135) tmp = Float64(x + Float64(a / Float64(t / z))); elseif (t <= -3.4e-252) tmp = Float64(x - a); elseif (t <= 1.0) tmp = Float64(x - Float64(a * y)); 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 <= -2.1e+135) tmp = x + (a / (t / z)); elseif (t <= -3.4e-252) tmp = x - a; elseif (t <= 1.0) tmp = x - (a * y); else tmp = x - (a / (t / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2.1e+135], N[(x + N[(a / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -3.4e-252], N[(x - a), $MachinePrecision], If[LessEqual[t, 1.0], N[(x - N[(a * y), $MachinePrecision]), $MachinePrecision], N[(x - N[(a / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.1 \cdot 10^{+135}:\\
\;\;\;\;x + \frac{a}{\frac{t}{z}}\\
\mathbf{elif}\;t \leq -3.4 \cdot 10^{-252}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;t \leq 1:\\
\;\;\;\;x - a \cdot y\\
\mathbf{else}:\\
\;\;\;\;x - \frac{a}{\frac{t}{y}}\\
\end{array}
\end{array}
if t < -2.1000000000000001e135Initial program 95.5%
associate-/r/97.7%
*-commutative97.7%
Simplified97.7%
Taylor expanded in t around inf 87.0%
Taylor expanded in y around 0 69.9%
mul-1-neg69.9%
associate-/l*76.3%
Simplified76.3%
if -2.1000000000000001e135 < t < -3.4e-252Initial program 95.7%
associate-/r/99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in z around inf 76.2%
if -3.4e-252 < t < 1Initial program 98.4%
associate-/r/100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in z around 0 71.9%
associate-/l*71.9%
Simplified71.9%
Taylor expanded in t around 0 71.9%
if 1 < t Initial program 89.7%
associate-/r/98.4%
*-commutative98.4%
Simplified98.4%
Taylor expanded in t around inf 84.5%
Taylor expanded in y around inf 69.7%
associate-/l*77.2%
Simplified77.2%
Final simplification75.4%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.45e+173) (- x a) (if (<= z 8.8e+24) (- x (* a (/ y (+ t 1.0)))) (- x a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.45e+173) {
tmp = x - a;
} else if (z <= 8.8e+24) {
tmp = x - (a * (y / (t + 1.0)));
} else {
tmp = x - a;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-1.45d+173)) then
tmp = x - a
else if (z <= 8.8d+24) then
tmp = x - (a * (y / (t + 1.0d0)))
else
tmp = x - a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.45e+173) {
tmp = x - a;
} else if (z <= 8.8e+24) {
tmp = x - (a * (y / (t + 1.0)));
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.45e+173: tmp = x - a elif z <= 8.8e+24: tmp = x - (a * (y / (t + 1.0))) else: tmp = x - a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.45e+173) tmp = Float64(x - a); elseif (z <= 8.8e+24) tmp = Float64(x - Float64(a * Float64(y / Float64(t + 1.0)))); else tmp = Float64(x - a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.45e+173) tmp = x - a; elseif (z <= 8.8e+24) tmp = x - (a * (y / (t + 1.0))); else tmp = x - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.45e+173], N[(x - a), $MachinePrecision], If[LessEqual[z, 8.8e+24], N[(x - N[(a * N[(y / N[(t + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.45 \cdot 10^{+173}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq 8.8 \cdot 10^{+24}:\\
\;\;\;\;x - a \cdot \frac{y}{t + 1}\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -1.45000000000000003e173 or 8.80000000000000007e24 < z Initial program 91.3%
associate-/r/99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in z around inf 80.8%
if -1.45000000000000003e173 < z < 8.80000000000000007e24Initial program 96.6%
associate-/r/98.8%
*-commutative98.8%
Simplified98.8%
Taylor expanded in z around 0 86.2%
Final simplification84.4%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.5e+173) (- x a) (if (<= z 1.35e+25) (- x (/ a (/ (+ t 1.0) y))) (- x a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.5e+173) {
tmp = x - a;
} else if (z <= 1.35e+25) {
tmp = x - (a / ((t + 1.0) / y));
} else {
tmp = x - a;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-1.5d+173)) then
tmp = x - a
else if (z <= 1.35d+25) then
tmp = x - (a / ((t + 1.0d0) / y))
else
tmp = x - a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.5e+173) {
tmp = x - a;
} else if (z <= 1.35e+25) {
tmp = x - (a / ((t + 1.0) / y));
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.5e+173: tmp = x - a elif z <= 1.35e+25: tmp = x - (a / ((t + 1.0) / y)) else: tmp = x - a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.5e+173) tmp = Float64(x - a); elseif (z <= 1.35e+25) tmp = Float64(x - Float64(a / Float64(Float64(t + 1.0) / y))); else tmp = Float64(x - a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.5e+173) tmp = x - a; elseif (z <= 1.35e+25) tmp = x - (a / ((t + 1.0) / y)); else tmp = x - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.5e+173], N[(x - a), $MachinePrecision], If[LessEqual[z, 1.35e+25], N[(x - N[(a / N[(N[(t + 1.0), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.5 \cdot 10^{+173}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq 1.35 \cdot 10^{+25}:\\
\;\;\;\;x - \frac{a}{\frac{t + 1}{y}}\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -1.4999999999999999e173 or 1.35e25 < z Initial program 91.3%
associate-/r/99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in z around inf 80.8%
if -1.4999999999999999e173 < z < 1.35e25Initial program 96.6%
associate-/r/98.8%
*-commutative98.8%
Simplified98.8%
Taylor expanded in z around 0 82.9%
associate-/l*86.3%
Simplified86.3%
Final simplification84.5%
(FPCore (x y z t a) :precision binary64 (+ x (* a (/ (- z y) (+ (- t z) 1.0)))))
double code(double x, double y, double z, double t, double a) {
return x + (a * ((z - y) / ((t - z) + 1.0)));
}
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 * ((z - y) / ((t - z) + 1.0d0)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (a * ((z - y) / ((t - z) + 1.0)));
}
def code(x, y, z, t, a): return x + (a * ((z - y) / ((t - z) + 1.0)))
function code(x, y, z, t, a) return Float64(x + Float64(a * Float64(Float64(z - y) / Float64(Float64(t - z) + 1.0)))) end
function tmp = code(x, y, z, t, a) tmp = x + (a * ((z - y) / ((t - z) + 1.0))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(a * N[(N[(z - y), $MachinePrecision] / N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + a \cdot \frac{z - y}{\left(t - z\right) + 1}
\end{array}
Initial program 94.8%
associate-/r/99.2%
*-commutative99.2%
Simplified99.2%
Final simplification99.2%
(FPCore (x y z t a) :precision binary64 (if (<= z -8.5e-7) (- x a) (if (<= z 3.05e+22) (- x (* a y)) (- x a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -8.5e-7) {
tmp = x - a;
} else if (z <= 3.05e+22) {
tmp = x - (a * y);
} else {
tmp = x - a;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-8.5d-7)) then
tmp = x - a
else if (z <= 3.05d+22) then
tmp = x - (a * y)
else
tmp = x - a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -8.5e-7) {
tmp = x - a;
} else if (z <= 3.05e+22) {
tmp = x - (a * y);
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -8.5e-7: tmp = x - a elif z <= 3.05e+22: tmp = x - (a * y) else: tmp = x - a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -8.5e-7) tmp = Float64(x - a); elseif (z <= 3.05e+22) tmp = Float64(x - Float64(a * y)); else tmp = Float64(x - a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -8.5e-7) tmp = x - a; elseif (z <= 3.05e+22) tmp = x - (a * y); else tmp = x - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -8.5e-7], N[(x - a), $MachinePrecision], If[LessEqual[z, 3.05e+22], N[(x - N[(a * y), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.5 \cdot 10^{-7}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq 3.05 \cdot 10^{+22}:\\
\;\;\;\;x - a \cdot y\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -8.50000000000000014e-7 or 3.0499999999999999e22 < z Initial program 92.5%
associate-/r/99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in z around inf 74.0%
if -8.50000000000000014e-7 < z < 3.0499999999999999e22Initial program 97.1%
associate-/r/98.5%
*-commutative98.5%
Simplified98.5%
Taylor expanded in z around 0 90.7%
associate-/l*92.9%
Simplified92.9%
Taylor expanded in t around 0 74.6%
Final simplification74.3%
(FPCore (x y z t a) :precision binary64 (if (<= z -8.4e+15) (- x a) (if (<= z 3.1e+22) x (- x a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -8.4e+15) {
tmp = x - a;
} else if (z <= 3.1e+22) {
tmp = x;
} else {
tmp = x - a;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-8.4d+15)) then
tmp = x - a
else if (z <= 3.1d+22) then
tmp = x
else
tmp = x - a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -8.4e+15) {
tmp = x - a;
} else if (z <= 3.1e+22) {
tmp = x;
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -8.4e+15: tmp = x - a elif z <= 3.1e+22: tmp = x else: tmp = x - a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -8.4e+15) tmp = Float64(x - a); elseif (z <= 3.1e+22) tmp = x; else tmp = Float64(x - a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -8.4e+15) tmp = x - a; elseif (z <= 3.1e+22) tmp = x; else tmp = x - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -8.4e+15], N[(x - a), $MachinePrecision], If[LessEqual[z, 3.1e+22], x, N[(x - a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.4 \cdot 10^{+15}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq 3.1 \cdot 10^{+22}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -8.4e15 or 3.1000000000000002e22 < z Initial program 92.4%
associate-/r/99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in z around inf 74.5%
if -8.4e15 < z < 3.1000000000000002e22Initial program 97.1%
associate-/r/98.5%
*-commutative98.5%
Simplified98.5%
Taylor expanded in t around 0 76.1%
Taylor expanded in x around inf 63.9%
Final simplification69.0%
(FPCore (x y z t a) :precision binary64 (if (<= z -2.6e+235) (- a) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.6e+235) {
tmp = -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 (z <= (-2.6d+235)) then
tmp = -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 (z <= -2.6e+235) {
tmp = -a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.6e+235: tmp = -a else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.6e+235) tmp = Float64(-a); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.6e+235) tmp = -a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.6e+235], (-a), x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.6 \cdot 10^{+235}:\\
\;\;\;\;-a\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -2.5999999999999998e235Initial program 87.8%
associate-/r/99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in t around 0 95.4%
Taylor expanded in x around 0 23.0%
mul-1-neg23.0%
associate-*r/83.2%
distribute-lft-neg-in83.2%
Simplified83.2%
Taylor expanded in z around inf 77.9%
mul-1-neg77.9%
Simplified77.9%
if -2.5999999999999998e235 < z Initial program 95.3%
associate-/r/99.1%
*-commutative99.1%
Simplified99.1%
Taylor expanded in t around 0 77.6%
Taylor expanded in x around inf 59.3%
Final simplification60.5%
(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 94.8%
associate-/r/99.2%
*-commutative99.2%
Simplified99.2%
Taylor expanded in t around 0 78.7%
Taylor expanded in x around inf 56.5%
Final simplification56.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 2023297
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.SparkLine:renderSparkLine from Chart-1.5.3"
:precision binary64
:herbie-target
(- x (* (/ (- y z) (+ (- t z) 1.0)) a))
(- x (/ (- y z) (/ (+ (- t z) 1.0) a))))