
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y x) (- z t)) (- a t))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (a - 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 - x) * (z - t)) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (a - t));
}
def code(x, y, z, t, a): return x + (((y - x) * (z - t)) / (a - t))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - x) * (z - t)) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 23 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y x) (- z t)) (- a t))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (a - 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 - x) * (z - t)) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (a - t));
}
def code(x, y, z, t, a): return x + (((y - x) * (z - t)) / (a - t))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - x) * (z - t)) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ t (- y x))))
(if (<= t -5.5e+91)
(+ y (/ (- a z) t_1))
(if (<= t 4.7e+164)
(- x (/ (- x y) (/ (- a t) (- z t))))
(+ (- y (/ z t_1)) (/ a t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t / (y - x);
double tmp;
if (t <= -5.5e+91) {
tmp = y + ((a - z) / t_1);
} else if (t <= 4.7e+164) {
tmp = x - ((x - y) / ((a - t) / (z - t)));
} else {
tmp = (y - (z / t_1)) + (a / 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 = t / (y - x)
if (t <= (-5.5d+91)) then
tmp = y + ((a - z) / t_1)
else if (t <= 4.7d+164) then
tmp = x - ((x - y) / ((a - t) / (z - t)))
else
tmp = (y - (z / t_1)) + (a / 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 = t / (y - x);
double tmp;
if (t <= -5.5e+91) {
tmp = y + ((a - z) / t_1);
} else if (t <= 4.7e+164) {
tmp = x - ((x - y) / ((a - t) / (z - t)));
} else {
tmp = (y - (z / t_1)) + (a / t_1);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t / (y - x) tmp = 0 if t <= -5.5e+91: tmp = y + ((a - z) / t_1) elif t <= 4.7e+164: tmp = x - ((x - y) / ((a - t) / (z - t))) else: tmp = (y - (z / t_1)) + (a / t_1) return tmp
function code(x, y, z, t, a) t_1 = Float64(t / Float64(y - x)) tmp = 0.0 if (t <= -5.5e+91) tmp = Float64(y + Float64(Float64(a - z) / t_1)); elseif (t <= 4.7e+164) tmp = Float64(x - Float64(Float64(x - y) / Float64(Float64(a - t) / Float64(z - t)))); else tmp = Float64(Float64(y - Float64(z / t_1)) + Float64(a / t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t / (y - x); tmp = 0.0; if (t <= -5.5e+91) tmp = y + ((a - z) / t_1); elseif (t <= 4.7e+164) tmp = x - ((x - y) / ((a - t) / (z - t))); else tmp = (y - (z / t_1)) + (a / t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t / N[(y - x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.5e+91], N[(y + N[(N[(a - z), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.7e+164], N[(x - N[(N[(x - y), $MachinePrecision] / N[(N[(a - t), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y - N[(z / t$95$1), $MachinePrecision]), $MachinePrecision] + N[(a / t$95$1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{y - x}\\
\mathbf{if}\;t \leq -5.5 \cdot 10^{+91}:\\
\;\;\;\;y + \frac{a - z}{t_1}\\
\mathbf{elif}\;t \leq 4.7 \cdot 10^{+164}:\\
\;\;\;\;x - \frac{x - y}{\frac{a - t}{z - t}}\\
\mathbf{else}:\\
\;\;\;\;\left(y - \frac{z}{t_1}\right) + \frac{a}{t_1}\\
\end{array}
\end{array}
if t < -5.4999999999999998e91Initial program 34.4%
associate-/l*57.1%
Simplified57.1%
Taylor expanded in t around inf 60.2%
sub-neg60.2%
+-commutative60.2%
mul-1-neg60.2%
unsub-neg60.2%
associate-/l*69.6%
mul-1-neg69.6%
remove-double-neg69.6%
associate-/l*88.5%
Simplified88.5%
associate-+l-88.5%
sub-div88.5%
Applied egg-rr88.5%
if -5.4999999999999998e91 < t < 4.69999999999999955e164Initial program 84.4%
associate-/l*94.2%
Simplified94.2%
if 4.69999999999999955e164 < t Initial program 27.1%
associate-/l*62.4%
Simplified62.4%
Taylor expanded in t around inf 74.4%
sub-neg74.4%
+-commutative74.4%
mul-1-neg74.4%
unsub-neg74.4%
associate-/l*79.1%
mul-1-neg79.1%
remove-double-neg79.1%
associate-/l*89.6%
Simplified89.6%
Final simplification92.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* z (/ y a)))))
(if (<= a -9e-13)
t_1
(if (<= a -1.8e-53)
(- y (/ (* y z) t))
(if (<= a -5.5e-73)
t_1
(if (<= a -3e-190)
(* (/ z t) (- x y))
(if (<= a 1.25e-37) (* y (- 1.0 (/ z t))) t_1)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (z * (y / a));
double tmp;
if (a <= -9e-13) {
tmp = t_1;
} else if (a <= -1.8e-53) {
tmp = y - ((y * z) / t);
} else if (a <= -5.5e-73) {
tmp = t_1;
} else if (a <= -3e-190) {
tmp = (z / t) * (x - y);
} else if (a <= 1.25e-37) {
tmp = y * (1.0 - (z / t));
} 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 + (z * (y / a))
if (a <= (-9d-13)) then
tmp = t_1
else if (a <= (-1.8d-53)) then
tmp = y - ((y * z) / t)
else if (a <= (-5.5d-73)) then
tmp = t_1
else if (a <= (-3d-190)) then
tmp = (z / t) * (x - y)
else if (a <= 1.25d-37) then
tmp = y * (1.0d0 - (z / t))
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 + (z * (y / a));
double tmp;
if (a <= -9e-13) {
tmp = t_1;
} else if (a <= -1.8e-53) {
tmp = y - ((y * z) / t);
} else if (a <= -5.5e-73) {
tmp = t_1;
} else if (a <= -3e-190) {
tmp = (z / t) * (x - y);
} else if (a <= 1.25e-37) {
tmp = y * (1.0 - (z / t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (z * (y / a)) tmp = 0 if a <= -9e-13: tmp = t_1 elif a <= -1.8e-53: tmp = y - ((y * z) / t) elif a <= -5.5e-73: tmp = t_1 elif a <= -3e-190: tmp = (z / t) * (x - y) elif a <= 1.25e-37: tmp = y * (1.0 - (z / t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(z * Float64(y / a))) tmp = 0.0 if (a <= -9e-13) tmp = t_1; elseif (a <= -1.8e-53) tmp = Float64(y - Float64(Float64(y * z) / t)); elseif (a <= -5.5e-73) tmp = t_1; elseif (a <= -3e-190) tmp = Float64(Float64(z / t) * Float64(x - y)); elseif (a <= 1.25e-37) tmp = Float64(y * Float64(1.0 - Float64(z / t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (z * (y / a)); tmp = 0.0; if (a <= -9e-13) tmp = t_1; elseif (a <= -1.8e-53) tmp = y - ((y * z) / t); elseif (a <= -5.5e-73) tmp = t_1; elseif (a <= -3e-190) tmp = (z / t) * (x - y); elseif (a <= 1.25e-37) tmp = y * (1.0 - (z / t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -9e-13], t$95$1, If[LessEqual[a, -1.8e-53], N[(y - N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -5.5e-73], t$95$1, If[LessEqual[a, -3e-190], N[(N[(z / t), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.25e-37], N[(y * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + z \cdot \frac{y}{a}\\
\mathbf{if}\;a \leq -9 \cdot 10^{-13}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq -1.8 \cdot 10^{-53}:\\
\;\;\;\;y - \frac{y \cdot z}{t}\\
\mathbf{elif}\;a \leq -5.5 \cdot 10^{-73}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq -3 \cdot 10^{-190}:\\
\;\;\;\;\frac{z}{t} \cdot \left(x - y\right)\\
\mathbf{elif}\;a \leq 1.25 \cdot 10^{-37}:\\
\;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if a < -9e-13 or -1.7999999999999999e-53 < a < -5.50000000000000006e-73 or 1.2499999999999999e-37 < a Initial program 68.2%
associate-/l*88.6%
Simplified88.6%
Taylor expanded in t around 0 69.6%
Taylor expanded in y around inf 54.5%
associate-/l*59.8%
associate-/r/59.0%
Simplified59.0%
if -9e-13 < a < -1.7999999999999999e-53Initial program 74.3%
associate-/l*79.8%
Simplified79.8%
Taylor expanded in t around inf 74.5%
sub-neg74.5%
+-commutative74.5%
mul-1-neg74.5%
unsub-neg74.5%
associate-/l*74.5%
mul-1-neg74.5%
remove-double-neg74.5%
associate-/l*74.5%
Simplified74.5%
Taylor expanded in a around 0 74.5%
Taylor expanded in y around inf 63.7%
if -5.50000000000000006e-73 < a < -2.9999999999999998e-190Initial program 69.8%
associate-/l*72.1%
Simplified72.1%
Taylor expanded in t around inf 78.5%
sub-neg78.5%
+-commutative78.5%
mul-1-neg78.5%
unsub-neg78.5%
associate-/l*81.7%
mul-1-neg81.7%
remove-double-neg81.7%
associate-/l*81.6%
Simplified81.6%
Taylor expanded in z around -inf 61.6%
mul-1-neg61.6%
associate-*r/64.8%
*-commutative64.8%
distribute-rgt-neg-in64.8%
Simplified64.8%
if -2.9999999999999998e-190 < a < 1.2499999999999999e-37Initial program 73.6%
associate-/l*81.5%
Simplified81.5%
Taylor expanded in t around inf 73.9%
sub-neg73.9%
+-commutative73.9%
mul-1-neg73.9%
unsub-neg73.9%
associate-/l*75.4%
mul-1-neg75.4%
remove-double-neg75.4%
associate-/l*68.4%
Simplified68.4%
Taylor expanded in a around 0 73.7%
Taylor expanded in y around inf 61.3%
Final simplification60.5%
(FPCore (x y z t a)
:precision binary64
(if (<= a -14.5)
(+ x (/ (- y x) (/ a z)))
(if (<= a 1.36e-42)
(+ y (/ (* z (- x y)) t))
(if (<= a 2.2e+167)
(+ x (/ z (/ a (- y x))))
(if (<= a 8.5e+285) (+ x (* (- z t) (/ y a))) (* x (- 1.0 (/ z a))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -14.5) {
tmp = x + ((y - x) / (a / z));
} else if (a <= 1.36e-42) {
tmp = y + ((z * (x - y)) / t);
} else if (a <= 2.2e+167) {
tmp = x + (z / (a / (y - x)));
} else if (a <= 8.5e+285) {
tmp = x + ((z - t) * (y / a));
} else {
tmp = x * (1.0 - (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 (a <= (-14.5d0)) then
tmp = x + ((y - x) / (a / z))
else if (a <= 1.36d-42) then
tmp = y + ((z * (x - y)) / t)
else if (a <= 2.2d+167) then
tmp = x + (z / (a / (y - x)))
else if (a <= 8.5d+285) then
tmp = x + ((z - t) * (y / a))
else
tmp = x * (1.0d0 - (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 (a <= -14.5) {
tmp = x + ((y - x) / (a / z));
} else if (a <= 1.36e-42) {
tmp = y + ((z * (x - y)) / t);
} else if (a <= 2.2e+167) {
tmp = x + (z / (a / (y - x)));
} else if (a <= 8.5e+285) {
tmp = x + ((z - t) * (y / a));
} else {
tmp = x * (1.0 - (z / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -14.5: tmp = x + ((y - x) / (a / z)) elif a <= 1.36e-42: tmp = y + ((z * (x - y)) / t) elif a <= 2.2e+167: tmp = x + (z / (a / (y - x))) elif a <= 8.5e+285: tmp = x + ((z - t) * (y / a)) else: tmp = x * (1.0 - (z / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -14.5) tmp = Float64(x + Float64(Float64(y - x) / Float64(a / z))); elseif (a <= 1.36e-42) tmp = Float64(y + Float64(Float64(z * Float64(x - y)) / t)); elseif (a <= 2.2e+167) tmp = Float64(x + Float64(z / Float64(a / Float64(y - x)))); elseif (a <= 8.5e+285) tmp = Float64(x + Float64(Float64(z - t) * Float64(y / a))); else tmp = Float64(x * Float64(1.0 - Float64(z / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -14.5) tmp = x + ((y - x) / (a / z)); elseif (a <= 1.36e-42) tmp = y + ((z * (x - y)) / t); elseif (a <= 2.2e+167) tmp = x + (z / (a / (y - x))); elseif (a <= 8.5e+285) tmp = x + ((z - t) * (y / a)); else tmp = x * (1.0 - (z / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -14.5], N[(x + N[(N[(y - x), $MachinePrecision] / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.36e-42], N[(y + N[(N[(z * N[(x - y), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.2e+167], N[(x + N[(z / N[(a / N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 8.5e+285], N[(x + N[(N[(z - t), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -14.5:\\
\;\;\;\;x + \frac{y - x}{\frac{a}{z}}\\
\mathbf{elif}\;a \leq 1.36 \cdot 10^{-42}:\\
\;\;\;\;y + \frac{z \cdot \left(x - y\right)}{t}\\
\mathbf{elif}\;a \leq 2.2 \cdot 10^{+167}:\\
\;\;\;\;x + \frac{z}{\frac{a}{y - x}}\\
\mathbf{elif}\;a \leq 8.5 \cdot 10^{+285}:\\
\;\;\;\;x + \left(z - t\right) \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\
\end{array}
\end{array}
if a < -14.5Initial program 68.6%
associate-/l*90.3%
Simplified90.3%
Taylor expanded in t around 0 68.3%
if -14.5 < a < 1.36e-42Initial program 73.8%
associate-/l*80.4%
Simplified80.4%
Taylor expanded in t around inf 73.5%
sub-neg73.5%
+-commutative73.5%
mul-1-neg73.5%
unsub-neg73.5%
associate-/l*75.1%
mul-1-neg75.1%
remove-double-neg75.1%
associate-/l*70.8%
Simplified70.8%
Taylor expanded in a around 0 73.2%
if 1.36e-42 < a < 2.20000000000000003e167Initial program 71.5%
associate-/l*82.2%
Simplified82.2%
Taylor expanded in t around 0 64.0%
+-commutative64.0%
*-commutative64.0%
associate-/l*70.1%
Simplified70.1%
if 2.20000000000000003e167 < a < 8.5e285Initial program 58.9%
associate-/l*89.7%
Simplified89.7%
Taylor expanded in a around inf 82.5%
Taylor expanded in y around inf 59.0%
associate-/l*79.9%
associate-/r/79.7%
Simplified79.7%
if 8.5e285 < a Initial program 57.9%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in x around inf 86.4%
mul-1-neg86.4%
unsub-neg86.4%
Simplified86.4%
Taylor expanded in t around 0 86.4%
Final simplification72.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -9.4e+86) (not (<= t 1.05e+156))) (+ y (/ (- a z) (/ t (- y x)))) (- x (/ (* (- z t) (- x y)) (- a t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -9.4e+86) || !(t <= 1.05e+156)) {
tmp = y + ((a - z) / (t / (y - x)));
} else {
tmp = x - (((z - t) * (x - y)) / (a - 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 <= (-9.4d+86)) .or. (.not. (t <= 1.05d+156))) then
tmp = y + ((a - z) / (t / (y - x)))
else
tmp = x - (((z - t) * (x - y)) / (a - 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 <= -9.4e+86) || !(t <= 1.05e+156)) {
tmp = y + ((a - z) / (t / (y - x)));
} else {
tmp = x - (((z - t) * (x - y)) / (a - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -9.4e+86) or not (t <= 1.05e+156): tmp = y + ((a - z) / (t / (y - x))) else: tmp = x - (((z - t) * (x - y)) / (a - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -9.4e+86) || !(t <= 1.05e+156)) tmp = Float64(y + Float64(Float64(a - z) / Float64(t / Float64(y - x)))); else tmp = Float64(x - Float64(Float64(Float64(z - t) * Float64(x - y)) / Float64(a - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -9.4e+86) || ~((t <= 1.05e+156))) tmp = y + ((a - z) / (t / (y - x))); else tmp = x - (((z - t) * (x - y)) / (a - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -9.4e+86], N[Not[LessEqual[t, 1.05e+156]], $MachinePrecision]], N[(y + N[(N[(a - z), $MachinePrecision] / N[(t / N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(N[(z - t), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -9.4 \cdot 10^{+86} \lor \neg \left(t \leq 1.05 \cdot 10^{+156}\right):\\
\;\;\;\;y + \frac{a - z}{\frac{t}{y - x}}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{\left(z - t\right) \cdot \left(x - y\right)}{a - t}\\
\end{array}
\end{array}
if t < -9.4000000000000004e86 or 1.04999999999999991e156 < t Initial program 32.9%
associate-/l*59.7%
Simplified59.7%
Taylor expanded in t around inf 63.7%
sub-neg63.7%
+-commutative63.7%
mul-1-neg63.7%
unsub-neg63.7%
associate-/l*71.6%
mul-1-neg71.6%
remove-double-neg71.6%
associate-/l*87.8%
Simplified87.8%
associate-+l-87.8%
sub-div87.8%
Applied egg-rr87.8%
if -9.4000000000000004e86 < t < 1.04999999999999991e156Initial program 84.8%
Final simplification85.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -4.6e+93) (not (<= t 8e+158))) (+ y (/ (- a z) (/ t (- y x)))) (- x (/ (- x y) (/ (- a t) (- z t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -4.6e+93) || !(t <= 8e+158)) {
tmp = y + ((a - z) / (t / (y - x)));
} else {
tmp = x - ((x - y) / ((a - t) / (z - 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 <= (-4.6d+93)) .or. (.not. (t <= 8d+158))) then
tmp = y + ((a - z) / (t / (y - x)))
else
tmp = x - ((x - y) / ((a - t) / (z - 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 <= -4.6e+93) || !(t <= 8e+158)) {
tmp = y + ((a - z) / (t / (y - x)));
} else {
tmp = x - ((x - y) / ((a - t) / (z - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -4.6e+93) or not (t <= 8e+158): tmp = y + ((a - z) / (t / (y - x))) else: tmp = x - ((x - y) / ((a - t) / (z - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -4.6e+93) || !(t <= 8e+158)) tmp = Float64(y + Float64(Float64(a - z) / Float64(t / Float64(y - x)))); else tmp = Float64(x - Float64(Float64(x - y) / Float64(Float64(a - t) / Float64(z - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -4.6e+93) || ~((t <= 8e+158))) tmp = y + ((a - z) / (t / (y - x))); else tmp = x - ((x - y) / ((a - t) / (z - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -4.6e+93], N[Not[LessEqual[t, 8e+158]], $MachinePrecision]], N[(y + N[(N[(a - z), $MachinePrecision] / N[(t / N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(x - y), $MachinePrecision] / N[(N[(a - t), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.6 \cdot 10^{+93} \lor \neg \left(t \leq 8 \cdot 10^{+158}\right):\\
\;\;\;\;y + \frac{a - z}{\frac{t}{y - x}}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{x - y}{\frac{a - t}{z - t}}\\
\end{array}
\end{array}
if t < -4.6000000000000003e93 or 7.99999999999999962e158 < t Initial program 32.4%
associate-/l*58.5%
Simplified58.5%
Taylor expanded in t around inf 64.1%
sub-neg64.1%
+-commutative64.1%
mul-1-neg64.1%
unsub-neg64.1%
associate-/l*72.2%
mul-1-neg72.2%
remove-double-neg72.2%
associate-/l*88.8%
Simplified88.8%
associate-+l-88.8%
sub-div88.8%
Applied egg-rr88.8%
if -4.6000000000000003e93 < t < 7.99999999999999962e158Initial program 84.4%
associate-/l*94.2%
Simplified94.2%
Final simplification92.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* x (- 1.0 (/ z a)))))
(if (<= x -7.5e+44)
t_1
(if (<= x 1.4e-22)
(* y (/ (- z t) (- a t)))
(if (<= x 1.9e+261)
t_1
(if (<= x 4.1e+280) (/ (- x) (/ t (- a z))) (+ x (* z (/ y a)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x * (1.0 - (z / a));
double tmp;
if (x <= -7.5e+44) {
tmp = t_1;
} else if (x <= 1.4e-22) {
tmp = y * ((z - t) / (a - t));
} else if (x <= 1.9e+261) {
tmp = t_1;
} else if (x <= 4.1e+280) {
tmp = -x / (t / (a - z));
} else {
tmp = x + (z * (y / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x * (1.0d0 - (z / a))
if (x <= (-7.5d+44)) then
tmp = t_1
else if (x <= 1.4d-22) then
tmp = y * ((z - t) / (a - t))
else if (x <= 1.9d+261) then
tmp = t_1
else if (x <= 4.1d+280) then
tmp = -x / (t / (a - z))
else
tmp = x + (z * (y / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x * (1.0 - (z / a));
double tmp;
if (x <= -7.5e+44) {
tmp = t_1;
} else if (x <= 1.4e-22) {
tmp = y * ((z - t) / (a - t));
} else if (x <= 1.9e+261) {
tmp = t_1;
} else if (x <= 4.1e+280) {
tmp = -x / (t / (a - z));
} else {
tmp = x + (z * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x * (1.0 - (z / a)) tmp = 0 if x <= -7.5e+44: tmp = t_1 elif x <= 1.4e-22: tmp = y * ((z - t) / (a - t)) elif x <= 1.9e+261: tmp = t_1 elif x <= 4.1e+280: tmp = -x / (t / (a - z)) else: tmp = x + (z * (y / a)) return tmp
function code(x, y, z, t, a) t_1 = Float64(x * Float64(1.0 - Float64(z / a))) tmp = 0.0 if (x <= -7.5e+44) tmp = t_1; elseif (x <= 1.4e-22) tmp = Float64(y * Float64(Float64(z - t) / Float64(a - t))); elseif (x <= 1.9e+261) tmp = t_1; elseif (x <= 4.1e+280) tmp = Float64(Float64(-x) / Float64(t / Float64(a - z))); else tmp = Float64(x + Float64(z * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x * (1.0 - (z / a)); tmp = 0.0; if (x <= -7.5e+44) tmp = t_1; elseif (x <= 1.4e-22) tmp = y * ((z - t) / (a - t)); elseif (x <= 1.9e+261) tmp = t_1; elseif (x <= 4.1e+280) tmp = -x / (t / (a - z)); else tmp = x + (z * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -7.5e+44], t$95$1, If[LessEqual[x, 1.4e-22], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.9e+261], t$95$1, If[LessEqual[x, 4.1e+280], N[((-x) / N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{z}{a}\right)\\
\mathbf{if}\;x \leq -7.5 \cdot 10^{+44}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 1.4 \cdot 10^{-22}:\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\
\mathbf{elif}\;x \leq 1.9 \cdot 10^{+261}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 4.1 \cdot 10^{+280}:\\
\;\;\;\;\frac{-x}{\frac{t}{a - z}}\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y}{a}\\
\end{array}
\end{array}
if x < -7.50000000000000027e44 or 1.39999999999999997e-22 < x < 1.9000000000000001e261Initial program 65.6%
associate-/l*80.2%
Simplified80.2%
Taylor expanded in x around inf 67.1%
mul-1-neg67.1%
unsub-neg67.1%
Simplified67.1%
Taylor expanded in t around 0 55.0%
if -7.50000000000000027e44 < x < 1.39999999999999997e-22Initial program 77.8%
associate-/l*91.1%
Simplified91.1%
Taylor expanded in x around 0 62.7%
associate-*r/76.3%
Simplified76.3%
if 1.9000000000000001e261 < x < 4.09999999999999997e280Initial program 40.1%
associate-/l*59.6%
Simplified59.6%
Taylor expanded in x around inf 59.2%
mul-1-neg59.2%
unsub-neg59.2%
Simplified59.2%
Taylor expanded in t around inf 62.6%
mul-1-neg62.6%
*-commutative62.6%
mul-1-neg62.6%
+-commutative62.6%
sub-neg62.6%
associate-/l*99.7%
distribute-neg-frac99.7%
Simplified99.7%
if 4.09999999999999997e280 < x Initial program 46.1%
associate-/l*67.4%
Simplified67.4%
Taylor expanded in t around 0 56.3%
Taylor expanded in y around inf 67.9%
associate-/l*67.9%
associate-/r/67.9%
Simplified67.9%
Final simplification66.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ z a))))
(if (<= t -1.08e+89)
y
(if (<= t -1.12e-274)
x
(if (<= t 1.7e-228)
t_1
(if (<= t 2.7e-176)
x
(if (<= t 3.3e-37) t_1 (if (<= t 1e+96) x y))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (z / a);
double tmp;
if (t <= -1.08e+89) {
tmp = y;
} else if (t <= -1.12e-274) {
tmp = x;
} else if (t <= 1.7e-228) {
tmp = t_1;
} else if (t <= 2.7e-176) {
tmp = x;
} else if (t <= 3.3e-37) {
tmp = t_1;
} else if (t <= 1e+96) {
tmp = x;
} else {
tmp = 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 = y * (z / a)
if (t <= (-1.08d+89)) then
tmp = y
else if (t <= (-1.12d-274)) then
tmp = x
else if (t <= 1.7d-228) then
tmp = t_1
else if (t <= 2.7d-176) then
tmp = x
else if (t <= 3.3d-37) then
tmp = t_1
else if (t <= 1d+96) then
tmp = x
else
tmp = y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y * (z / a);
double tmp;
if (t <= -1.08e+89) {
tmp = y;
} else if (t <= -1.12e-274) {
tmp = x;
} else if (t <= 1.7e-228) {
tmp = t_1;
} else if (t <= 2.7e-176) {
tmp = x;
} else if (t <= 3.3e-37) {
tmp = t_1;
} else if (t <= 1e+96) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (z / a) tmp = 0 if t <= -1.08e+89: tmp = y elif t <= -1.12e-274: tmp = x elif t <= 1.7e-228: tmp = t_1 elif t <= 2.7e-176: tmp = x elif t <= 3.3e-37: tmp = t_1 elif t <= 1e+96: tmp = x else: tmp = y return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(z / a)) tmp = 0.0 if (t <= -1.08e+89) tmp = y; elseif (t <= -1.12e-274) tmp = x; elseif (t <= 1.7e-228) tmp = t_1; elseif (t <= 2.7e-176) tmp = x; elseif (t <= 3.3e-37) tmp = t_1; elseif (t <= 1e+96) tmp = x; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * (z / a); tmp = 0.0; if (t <= -1.08e+89) tmp = y; elseif (t <= -1.12e-274) tmp = x; elseif (t <= 1.7e-228) tmp = t_1; elseif (t <= 2.7e-176) tmp = x; elseif (t <= 3.3e-37) tmp = t_1; elseif (t <= 1e+96) tmp = x; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.08e+89], y, If[LessEqual[t, -1.12e-274], x, If[LessEqual[t, 1.7e-228], t$95$1, If[LessEqual[t, 2.7e-176], x, If[LessEqual[t, 3.3e-37], t$95$1, If[LessEqual[t, 1e+96], x, y]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{z}{a}\\
\mathbf{if}\;t \leq -1.08 \cdot 10^{+89}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq -1.12 \cdot 10^{-274}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 1.7 \cdot 10^{-228}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 2.7 \cdot 10^{-176}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 3.3 \cdot 10^{-37}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 10^{+96}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -1.08000000000000006e89 or 1.00000000000000005e96 < t Initial program 36.9%
associate-/l*61.5%
Simplified61.5%
Taylor expanded in t around inf 46.8%
if -1.08000000000000006e89 < t < -1.11999999999999998e-274 or 1.69999999999999995e-228 < t < 2.6999999999999998e-176 or 3.29999999999999982e-37 < t < 1.00000000000000005e96Initial program 82.9%
associate-/l*93.8%
Simplified93.8%
Taylor expanded in a around inf 36.5%
if -1.11999999999999998e-274 < t < 1.69999999999999995e-228 or 2.6999999999999998e-176 < t < 3.29999999999999982e-37Initial program 89.1%
associate-/l*96.3%
Simplified96.3%
Taylor expanded in x around 0 48.3%
associate-*r/53.7%
Simplified53.7%
Taylor expanded in t around 0 50.1%
Final simplification42.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* z (/ y a)))))
(if (<= a -1.85)
t_1
(if (<= a -4.4e-76)
(+ y (/ (* z x) t))
(if (<= a -5.55e-191)
(* (/ z t) (- x y))
(if (<= a 6.5e-39) (* y (- 1.0 (/ z t))) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (z * (y / a));
double tmp;
if (a <= -1.85) {
tmp = t_1;
} else if (a <= -4.4e-76) {
tmp = y + ((z * x) / t);
} else if (a <= -5.55e-191) {
tmp = (z / t) * (x - y);
} else if (a <= 6.5e-39) {
tmp = y * (1.0 - (z / t));
} 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 + (z * (y / a))
if (a <= (-1.85d0)) then
tmp = t_1
else if (a <= (-4.4d-76)) then
tmp = y + ((z * x) / t)
else if (a <= (-5.55d-191)) then
tmp = (z / t) * (x - y)
else if (a <= 6.5d-39) then
tmp = y * (1.0d0 - (z / t))
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 + (z * (y / a));
double tmp;
if (a <= -1.85) {
tmp = t_1;
} else if (a <= -4.4e-76) {
tmp = y + ((z * x) / t);
} else if (a <= -5.55e-191) {
tmp = (z / t) * (x - y);
} else if (a <= 6.5e-39) {
tmp = y * (1.0 - (z / t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (z * (y / a)) tmp = 0 if a <= -1.85: tmp = t_1 elif a <= -4.4e-76: tmp = y + ((z * x) / t) elif a <= -5.55e-191: tmp = (z / t) * (x - y) elif a <= 6.5e-39: tmp = y * (1.0 - (z / t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(z * Float64(y / a))) tmp = 0.0 if (a <= -1.85) tmp = t_1; elseif (a <= -4.4e-76) tmp = Float64(y + Float64(Float64(z * x) / t)); elseif (a <= -5.55e-191) tmp = Float64(Float64(z / t) * Float64(x - y)); elseif (a <= 6.5e-39) tmp = Float64(y * Float64(1.0 - Float64(z / t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (z * (y / a)); tmp = 0.0; if (a <= -1.85) tmp = t_1; elseif (a <= -4.4e-76) tmp = y + ((z * x) / t); elseif (a <= -5.55e-191) tmp = (z / t) * (x - y); elseif (a <= 6.5e-39) tmp = y * (1.0 - (z / t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.85], t$95$1, If[LessEqual[a, -4.4e-76], N[(y + N[(N[(z * x), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -5.55e-191], N[(N[(z / t), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6.5e-39], N[(y * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + z \cdot \frac{y}{a}\\
\mathbf{if}\;a \leq -1.85:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq -4.4 \cdot 10^{-76}:\\
\;\;\;\;y + \frac{z \cdot x}{t}\\
\mathbf{elif}\;a \leq -5.55 \cdot 10^{-191}:\\
\;\;\;\;\frac{z}{t} \cdot \left(x - y\right)\\
\mathbf{elif}\;a \leq 6.5 \cdot 10^{-39}:\\
\;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if a < -1.8500000000000001 or 6.50000000000000027e-39 < a Initial program 67.3%
associate-/l*88.1%
Simplified88.1%
Taylor expanded in t around 0 69.4%
Taylor expanded in y around inf 53.6%
associate-/l*59.1%
associate-/r/58.3%
Simplified58.3%
if -1.8500000000000001 < a < -4.39999999999999999e-76Initial program 75.3%
associate-/l*83.5%
Simplified83.5%
Taylor expanded in t around inf 64.5%
sub-neg64.5%
+-commutative64.5%
mul-1-neg64.5%
unsub-neg64.5%
associate-/l*64.4%
mul-1-neg64.4%
remove-double-neg64.4%
associate-/l*64.4%
Simplified64.4%
Taylor expanded in a around 0 64.4%
Taylor expanded in y around 0 59.8%
associate-*r/59.8%
associate-*r*59.8%
mul-1-neg59.8%
Simplified59.8%
if -4.39999999999999999e-76 < a < -5.55000000000000017e-191Initial program 72.1%
associate-/l*74.5%
Simplified74.5%
Taylor expanded in t around inf 77.7%
sub-neg77.7%
+-commutative77.7%
mul-1-neg77.7%
unsub-neg77.7%
associate-/l*81.0%
mul-1-neg81.0%
remove-double-neg81.0%
associate-/l*80.9%
Simplified80.9%
Taylor expanded in z around -inf 63.6%
mul-1-neg63.6%
associate-*r/66.9%
*-commutative66.9%
distribute-rgt-neg-in66.9%
Simplified66.9%
if -5.55000000000000017e-191 < a < 6.50000000000000027e-39Initial program 73.6%
associate-/l*81.5%
Simplified81.5%
Taylor expanded in t around inf 73.9%
sub-neg73.9%
+-commutative73.9%
mul-1-neg73.9%
unsub-neg73.9%
associate-/l*75.4%
mul-1-neg75.4%
remove-double-neg75.4%
associate-/l*68.4%
Simplified68.4%
Taylor expanded in a around 0 73.7%
Taylor expanded in y around inf 61.3%
Final simplification60.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* z (/ y a)))))
(if (<= a -3.1)
t_1
(if (<= a -1.85e-76)
(+ y (/ (* z x) t))
(if (<= a -5.6e-191)
(/ (- z) (/ t (- y x)))
(if (<= a 1.3e-40) (* y (- 1.0 (/ z t))) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (z * (y / a));
double tmp;
if (a <= -3.1) {
tmp = t_1;
} else if (a <= -1.85e-76) {
tmp = y + ((z * x) / t);
} else if (a <= -5.6e-191) {
tmp = -z / (t / (y - x));
} else if (a <= 1.3e-40) {
tmp = y * (1.0 - (z / t));
} 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 + (z * (y / a))
if (a <= (-3.1d0)) then
tmp = t_1
else if (a <= (-1.85d-76)) then
tmp = y + ((z * x) / t)
else if (a <= (-5.6d-191)) then
tmp = -z / (t / (y - x))
else if (a <= 1.3d-40) then
tmp = y * (1.0d0 - (z / t))
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 + (z * (y / a));
double tmp;
if (a <= -3.1) {
tmp = t_1;
} else if (a <= -1.85e-76) {
tmp = y + ((z * x) / t);
} else if (a <= -5.6e-191) {
tmp = -z / (t / (y - x));
} else if (a <= 1.3e-40) {
tmp = y * (1.0 - (z / t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (z * (y / a)) tmp = 0 if a <= -3.1: tmp = t_1 elif a <= -1.85e-76: tmp = y + ((z * x) / t) elif a <= -5.6e-191: tmp = -z / (t / (y - x)) elif a <= 1.3e-40: tmp = y * (1.0 - (z / t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(z * Float64(y / a))) tmp = 0.0 if (a <= -3.1) tmp = t_1; elseif (a <= -1.85e-76) tmp = Float64(y + Float64(Float64(z * x) / t)); elseif (a <= -5.6e-191) tmp = Float64(Float64(-z) / Float64(t / Float64(y - x))); elseif (a <= 1.3e-40) tmp = Float64(y * Float64(1.0 - Float64(z / t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (z * (y / a)); tmp = 0.0; if (a <= -3.1) tmp = t_1; elseif (a <= -1.85e-76) tmp = y + ((z * x) / t); elseif (a <= -5.6e-191) tmp = -z / (t / (y - x)); elseif (a <= 1.3e-40) tmp = y * (1.0 - (z / t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -3.1], t$95$1, If[LessEqual[a, -1.85e-76], N[(y + N[(N[(z * x), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -5.6e-191], N[((-z) / N[(t / N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.3e-40], N[(y * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + z \cdot \frac{y}{a}\\
\mathbf{if}\;a \leq -3.1:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq -1.85 \cdot 10^{-76}:\\
\;\;\;\;y + \frac{z \cdot x}{t}\\
\mathbf{elif}\;a \leq -5.6 \cdot 10^{-191}:\\
\;\;\;\;\frac{-z}{\frac{t}{y - x}}\\
\mathbf{elif}\;a \leq 1.3 \cdot 10^{-40}:\\
\;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if a < -3.10000000000000009 or 1.3000000000000001e-40 < a Initial program 67.3%
associate-/l*88.1%
Simplified88.1%
Taylor expanded in t around 0 69.4%
Taylor expanded in y around inf 53.6%
associate-/l*59.1%
associate-/r/58.3%
Simplified58.3%
if -3.10000000000000009 < a < -1.85000000000000006e-76Initial program 75.3%
associate-/l*83.5%
Simplified83.5%
Taylor expanded in t around inf 64.5%
sub-neg64.5%
+-commutative64.5%
mul-1-neg64.5%
unsub-neg64.5%
associate-/l*64.4%
mul-1-neg64.4%
remove-double-neg64.4%
associate-/l*64.4%
Simplified64.4%
Taylor expanded in a around 0 64.4%
Taylor expanded in y around 0 59.8%
associate-*r/59.8%
associate-*r*59.8%
mul-1-neg59.8%
Simplified59.8%
if -1.85000000000000006e-76 < a < -5.60000000000000023e-191Initial program 72.1%
associate-/l*74.5%
Simplified74.5%
Taylor expanded in t around inf 77.7%
sub-neg77.7%
+-commutative77.7%
mul-1-neg77.7%
unsub-neg77.7%
associate-/l*81.0%
mul-1-neg81.0%
remove-double-neg81.0%
associate-/l*80.9%
Simplified80.9%
associate-+l-80.9%
sub-div84.8%
Applied egg-rr84.8%
Taylor expanded in z around -inf 63.6%
mul-1-neg63.6%
associate-*r/66.9%
*-commutative66.9%
associate-/r/67.0%
distribute-neg-frac67.0%
Simplified67.0%
if -5.60000000000000023e-191 < a < 1.3000000000000001e-40Initial program 73.6%
associate-/l*81.5%
Simplified81.5%
Taylor expanded in t around inf 73.9%
sub-neg73.9%
+-commutative73.9%
mul-1-neg73.9%
unsub-neg73.9%
associate-/l*75.4%
mul-1-neg75.4%
remove-double-neg75.4%
associate-/l*68.4%
Simplified68.4%
Taylor expanded in a around 0 73.7%
Taylor expanded in y around inf 61.3%
Final simplification60.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ z (/ a (- y x))))))
(if (<= x -1.45e-6)
t_1
(if (<= x 2.85e-33)
(* y (/ (- z t) (- a t)))
(if (<= x 2e+154) t_1 (* z (/ (- y x) (- a t))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (z / (a / (y - x)));
double tmp;
if (x <= -1.45e-6) {
tmp = t_1;
} else if (x <= 2.85e-33) {
tmp = y * ((z - t) / (a - t));
} else if (x <= 2e+154) {
tmp = t_1;
} else {
tmp = z * ((y - x) / (a - 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) :: t_1
real(8) :: tmp
t_1 = x + (z / (a / (y - x)))
if (x <= (-1.45d-6)) then
tmp = t_1
else if (x <= 2.85d-33) then
tmp = y * ((z - t) / (a - t))
else if (x <= 2d+154) then
tmp = t_1
else
tmp = z * ((y - x) / (a - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (z / (a / (y - x)));
double tmp;
if (x <= -1.45e-6) {
tmp = t_1;
} else if (x <= 2.85e-33) {
tmp = y * ((z - t) / (a - t));
} else if (x <= 2e+154) {
tmp = t_1;
} else {
tmp = z * ((y - x) / (a - t));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (z / (a / (y - x))) tmp = 0 if x <= -1.45e-6: tmp = t_1 elif x <= 2.85e-33: tmp = y * ((z - t) / (a - t)) elif x <= 2e+154: tmp = t_1 else: tmp = z * ((y - x) / (a - t)) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(z / Float64(a / Float64(y - x)))) tmp = 0.0 if (x <= -1.45e-6) tmp = t_1; elseif (x <= 2.85e-33) tmp = Float64(y * Float64(Float64(z - t) / Float64(a - t))); elseif (x <= 2e+154) tmp = t_1; else tmp = Float64(z * Float64(Float64(y - x) / Float64(a - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (z / (a / (y - x))); tmp = 0.0; if (x <= -1.45e-6) tmp = t_1; elseif (x <= 2.85e-33) tmp = y * ((z - t) / (a - t)); elseif (x <= 2e+154) tmp = t_1; else tmp = z * ((y - x) / (a - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(z / N[(a / N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.45e-6], t$95$1, If[LessEqual[x, 2.85e-33], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2e+154], t$95$1, N[(z * N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{z}{\frac{a}{y - x}}\\
\mathbf{if}\;x \leq -1.45 \cdot 10^{-6}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 2.85 \cdot 10^{-33}:\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\
\mathbf{elif}\;x \leq 2 \cdot 10^{+154}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;z \cdot \frac{y - x}{a - t}\\
\end{array}
\end{array}
if x < -1.4500000000000001e-6 or 2.85000000000000013e-33 < x < 2.00000000000000007e154Initial program 67.9%
associate-/l*80.2%
Simplified80.2%
Taylor expanded in t around 0 57.3%
+-commutative57.3%
*-commutative57.3%
associate-/l*63.3%
Simplified63.3%
if -1.4500000000000001e-6 < x < 2.85000000000000013e-33Initial program 78.9%
associate-/l*91.9%
Simplified91.9%
Taylor expanded in x around 0 64.8%
associate-*r/78.2%
Simplified78.2%
if 2.00000000000000007e154 < x Initial program 53.0%
associate-/l*76.0%
Simplified76.0%
Taylor expanded in z around inf 64.2%
div-sub64.2%
Simplified64.2%
Final simplification69.7%
(FPCore (x y z t a)
:precision binary64
(if (<= x -0.00018)
(+ x (/ (- y x) (/ a z)))
(if (<= x 2.8e-33)
(* y (/ (- z t) (- a t)))
(if (<= x 6.4e+153)
(+ x (/ z (/ a (- y x))))
(* z (/ (- y x) (- a t)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -0.00018) {
tmp = x + ((y - x) / (a / z));
} else if (x <= 2.8e-33) {
tmp = y * ((z - t) / (a - t));
} else if (x <= 6.4e+153) {
tmp = x + (z / (a / (y - x)));
} else {
tmp = z * ((y - x) / (a - 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 (x <= (-0.00018d0)) then
tmp = x + ((y - x) / (a / z))
else if (x <= 2.8d-33) then
tmp = y * ((z - t) / (a - t))
else if (x <= 6.4d+153) then
tmp = x + (z / (a / (y - x)))
else
tmp = z * ((y - x) / (a - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -0.00018) {
tmp = x + ((y - x) / (a / z));
} else if (x <= 2.8e-33) {
tmp = y * ((z - t) / (a - t));
} else if (x <= 6.4e+153) {
tmp = x + (z / (a / (y - x)));
} else {
tmp = z * ((y - x) / (a - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -0.00018: tmp = x + ((y - x) / (a / z)) elif x <= 2.8e-33: tmp = y * ((z - t) / (a - t)) elif x <= 6.4e+153: tmp = x + (z / (a / (y - x))) else: tmp = z * ((y - x) / (a - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -0.00018) tmp = Float64(x + Float64(Float64(y - x) / Float64(a / z))); elseif (x <= 2.8e-33) tmp = Float64(y * Float64(Float64(z - t) / Float64(a - t))); elseif (x <= 6.4e+153) tmp = Float64(x + Float64(z / Float64(a / Float64(y - x)))); else tmp = Float64(z * Float64(Float64(y - x) / Float64(a - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -0.00018) tmp = x + ((y - x) / (a / z)); elseif (x <= 2.8e-33) tmp = y * ((z - t) / (a - t)); elseif (x <= 6.4e+153) tmp = x + (z / (a / (y - x))); else tmp = z * ((y - x) / (a - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -0.00018], N[(x + N[(N[(y - x), $MachinePrecision] / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.8e-33], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 6.4e+153], N[(x + N[(z / N[(a / N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z * N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.00018:\\
\;\;\;\;x + \frac{y - x}{\frac{a}{z}}\\
\mathbf{elif}\;x \leq 2.8 \cdot 10^{-33}:\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\
\mathbf{elif}\;x \leq 6.4 \cdot 10^{+153}:\\
\;\;\;\;x + \frac{z}{\frac{a}{y - x}}\\
\mathbf{else}:\\
\;\;\;\;z \cdot \frac{y - x}{a - t}\\
\end{array}
\end{array}
if x < -1.80000000000000011e-4Initial program 65.0%
associate-/l*81.9%
Simplified81.9%
Taylor expanded in t around 0 65.7%
if -1.80000000000000011e-4 < x < 2.8e-33Initial program 78.9%
associate-/l*91.9%
Simplified91.9%
Taylor expanded in x around 0 64.8%
associate-*r/78.2%
Simplified78.2%
if 2.8e-33 < x < 6.4000000000000003e153Initial program 71.8%
associate-/l*77.9%
Simplified77.9%
Taylor expanded in t around 0 60.3%
+-commutative60.3%
*-commutative60.3%
associate-/l*62.4%
Simplified62.4%
if 6.4000000000000003e153 < x Initial program 53.0%
associate-/l*76.0%
Simplified76.0%
Taylor expanded in z around inf 64.2%
div-sub64.2%
Simplified64.2%
Final simplification70.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -2.2e+43) (not (<= x 1.6e-22))) (* x (+ (/ (- t z) (- a t)) 1.0)) (* y (/ (- z t) (- a t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -2.2e+43) || !(x <= 1.6e-22)) {
tmp = x * (((t - z) / (a - t)) + 1.0);
} else {
tmp = y * ((z - t) / (a - 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 ((x <= (-2.2d+43)) .or. (.not. (x <= 1.6d-22))) then
tmp = x * (((t - z) / (a - t)) + 1.0d0)
else
tmp = y * ((z - t) / (a - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -2.2e+43) || !(x <= 1.6e-22)) {
tmp = x * (((t - z) / (a - t)) + 1.0);
} else {
tmp = y * ((z - t) / (a - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -2.2e+43) or not (x <= 1.6e-22): tmp = x * (((t - z) / (a - t)) + 1.0) else: tmp = y * ((z - t) / (a - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -2.2e+43) || !(x <= 1.6e-22)) tmp = Float64(x * Float64(Float64(Float64(t - z) / Float64(a - t)) + 1.0)); else tmp = Float64(y * Float64(Float64(z - t) / Float64(a - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -2.2e+43) || ~((x <= 1.6e-22))) tmp = x * (((t - z) / (a - t)) + 1.0); else tmp = y * ((z - t) / (a - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -2.2e+43], N[Not[LessEqual[x, 1.6e-22]], $MachinePrecision]], N[(x * N[(N[(N[(t - z), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.2 \cdot 10^{+43} \lor \neg \left(x \leq 1.6 \cdot 10^{-22}\right):\\
\;\;\;\;x \cdot \left(\frac{t - z}{a - t} + 1\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\
\end{array}
\end{array}
if x < -2.20000000000000001e43 or 1.59999999999999994e-22 < x Initial program 63.4%
associate-/l*78.6%
Simplified78.6%
Taylor expanded in x around inf 66.8%
mul-1-neg66.8%
unsub-neg66.8%
Simplified66.8%
if -2.20000000000000001e43 < x < 1.59999999999999994e-22Initial program 77.8%
associate-/l*91.1%
Simplified91.1%
Taylor expanded in x around 0 62.7%
associate-*r/76.3%
Simplified76.3%
Final simplification71.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -5.0) (not (<= a 1.4e-42))) (+ x (/ (- y x) (/ a (- z t)))) (+ y (/ (* z (- x y)) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -5.0) || !(a <= 1.4e-42)) {
tmp = x + ((y - x) / (a / (z - t)));
} else {
tmp = y + ((z * (x - 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 ((a <= (-5.0d0)) .or. (.not. (a <= 1.4d-42))) then
tmp = x + ((y - x) / (a / (z - t)))
else
tmp = y + ((z * (x - 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 ((a <= -5.0) || !(a <= 1.4e-42)) {
tmp = x + ((y - x) / (a / (z - t)));
} else {
tmp = y + ((z * (x - y)) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -5.0) or not (a <= 1.4e-42): tmp = x + ((y - x) / (a / (z - t))) else: tmp = y + ((z * (x - y)) / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -5.0) || !(a <= 1.4e-42)) tmp = Float64(x + Float64(Float64(y - x) / Float64(a / Float64(z - t)))); else tmp = Float64(y + Float64(Float64(z * Float64(x - y)) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -5.0) || ~((a <= 1.4e-42))) tmp = x + ((y - x) / (a / (z - t))); else tmp = y + ((z * (x - y)) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -5.0], N[Not[LessEqual[a, 1.4e-42]], $MachinePrecision]], N[(x + N[(N[(y - x), $MachinePrecision] / N[(a / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + N[(N[(z * N[(x - y), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5 \lor \neg \left(a \leq 1.4 \cdot 10^{-42}\right):\\
\;\;\;\;x + \frac{y - x}{\frac{a}{z - t}}\\
\mathbf{else}:\\
\;\;\;\;y + \frac{z \cdot \left(x - y\right)}{t}\\
\end{array}
\end{array}
if a < -5 or 1.39999999999999999e-42 < a Initial program 67.0%
associate-/l*88.0%
Simplified88.0%
Taylor expanded in a around inf 76.0%
if -5 < a < 1.39999999999999999e-42Initial program 73.8%
associate-/l*80.4%
Simplified80.4%
Taylor expanded in t around inf 73.5%
sub-neg73.5%
+-commutative73.5%
mul-1-neg73.5%
unsub-neg73.5%
associate-/l*75.1%
mul-1-neg75.1%
remove-double-neg75.1%
associate-/l*70.8%
Simplified70.8%
Taylor expanded in a around 0 73.2%
Final simplification74.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -3.7) (not (<= a 1.4e-40))) (+ x (/ (- y x) (/ a (- z t)))) (+ y (/ (* (- z a) (- x y)) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -3.7) || !(a <= 1.4e-40)) {
tmp = x + ((y - x) / (a / (z - t)));
} else {
tmp = y + (((z - a) * (x - 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 ((a <= (-3.7d0)) .or. (.not. (a <= 1.4d-40))) then
tmp = x + ((y - x) / (a / (z - t)))
else
tmp = y + (((z - a) * (x - 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 ((a <= -3.7) || !(a <= 1.4e-40)) {
tmp = x + ((y - x) / (a / (z - t)));
} else {
tmp = y + (((z - a) * (x - y)) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -3.7) or not (a <= 1.4e-40): tmp = x + ((y - x) / (a / (z - t))) else: tmp = y + (((z - a) * (x - y)) / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -3.7) || !(a <= 1.4e-40)) tmp = Float64(x + Float64(Float64(y - x) / Float64(a / Float64(z - t)))); else tmp = Float64(y + Float64(Float64(Float64(z - a) * Float64(x - y)) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -3.7) || ~((a <= 1.4e-40))) tmp = x + ((y - x) / (a / (z - t))); else tmp = y + (((z - a) * (x - y)) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -3.7], N[Not[LessEqual[a, 1.4e-40]], $MachinePrecision]], N[(x + N[(N[(y - x), $MachinePrecision] / N[(a / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + N[(N[(N[(z - a), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.7 \lor \neg \left(a \leq 1.4 \cdot 10^{-40}\right):\\
\;\;\;\;x + \frac{y - x}{\frac{a}{z - t}}\\
\mathbf{else}:\\
\;\;\;\;y + \frac{\left(z - a\right) \cdot \left(x - y\right)}{t}\\
\end{array}
\end{array}
if a < -3.7000000000000002 or 1.4e-40 < a Initial program 67.0%
associate-/l*88.0%
Simplified88.0%
Taylor expanded in a around inf 76.0%
if -3.7000000000000002 < a < 1.4e-40Initial program 73.8%
associate-/l*80.4%
Simplified80.4%
Taylor expanded in t around -inf 76.0%
mul-1-neg76.0%
unsub-neg76.0%
div-sub73.5%
*-commutative73.5%
div-sub76.0%
distribute-rgt-out--76.0%
Simplified76.0%
Final simplification76.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -0.76) (not (<= t 4.5e+55))) (+ y (/ (- a z) (/ t (- y x)))) (+ x (/ (- y x) (/ a (- z t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -0.76) || !(t <= 4.5e+55)) {
tmp = y + ((a - z) / (t / (y - x)));
} else {
tmp = x + ((y - x) / (a / (z - 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 <= (-0.76d0)) .or. (.not. (t <= 4.5d+55))) then
tmp = y + ((a - z) / (t / (y - x)))
else
tmp = x + ((y - x) / (a / (z - 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 <= -0.76) || !(t <= 4.5e+55)) {
tmp = y + ((a - z) / (t / (y - x)));
} else {
tmp = x + ((y - x) / (a / (z - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -0.76) or not (t <= 4.5e+55): tmp = y + ((a - z) / (t / (y - x))) else: tmp = x + ((y - x) / (a / (z - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -0.76) || !(t <= 4.5e+55)) tmp = Float64(y + Float64(Float64(a - z) / Float64(t / Float64(y - x)))); else tmp = Float64(x + Float64(Float64(y - x) / Float64(a / Float64(z - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -0.76) || ~((t <= 4.5e+55))) tmp = y + ((a - z) / (t / (y - x))); else tmp = x + ((y - x) / (a / (z - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -0.76], N[Not[LessEqual[t, 4.5e+55]], $MachinePrecision]], N[(y + N[(N[(a - z), $MachinePrecision] / N[(t / N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - x), $MachinePrecision] / N[(a / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -0.76 \lor \neg \left(t \leq 4.5 \cdot 10^{+55}\right):\\
\;\;\;\;y + \frac{a - z}{\frac{t}{y - x}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y - x}{\frac{a}{z - t}}\\
\end{array}
\end{array}
if t < -0.76000000000000001 or 4.49999999999999998e55 < t Initial program 45.3%
associate-/l*68.9%
Simplified68.9%
Taylor expanded in t around inf 60.6%
sub-neg60.6%
+-commutative60.6%
mul-1-neg60.6%
unsub-neg60.6%
associate-/l*66.5%
mul-1-neg66.5%
remove-double-neg66.5%
associate-/l*76.8%
Simplified76.8%
associate-+l-76.8%
sub-div76.9%
Applied egg-rr76.9%
if -0.76000000000000001 < t < 4.49999999999999998e55Initial program 89.8%
associate-/l*96.8%
Simplified96.8%
Taylor expanded in a around inf 81.5%
Final simplification79.5%
(FPCore (x y z t a) :precision binary64 (if (<= x -6e+45) (* x (- 1.0 (/ z a))) (if (<= x 2.9e-33) (* y (/ (- z t) (- a t))) (* z (/ (- y x) (- a t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -6e+45) {
tmp = x * (1.0 - (z / a));
} else if (x <= 2.9e-33) {
tmp = y * ((z - t) / (a - t));
} else {
tmp = z * ((y - x) / (a - 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 (x <= (-6d+45)) then
tmp = x * (1.0d0 - (z / a))
else if (x <= 2.9d-33) then
tmp = y * ((z - t) / (a - t))
else
tmp = z * ((y - x) / (a - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -6e+45) {
tmp = x * (1.0 - (z / a));
} else if (x <= 2.9e-33) {
tmp = y * ((z - t) / (a - t));
} else {
tmp = z * ((y - x) / (a - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -6e+45: tmp = x * (1.0 - (z / a)) elif x <= 2.9e-33: tmp = y * ((z - t) / (a - t)) else: tmp = z * ((y - x) / (a - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -6e+45) tmp = Float64(x * Float64(1.0 - Float64(z / a))); elseif (x <= 2.9e-33) tmp = Float64(y * Float64(Float64(z - t) / Float64(a - t))); else tmp = Float64(z * Float64(Float64(y - x) / Float64(a - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -6e+45) tmp = x * (1.0 - (z / a)); elseif (x <= 2.9e-33) tmp = y * ((z - t) / (a - t)); else tmp = z * ((y - x) / (a - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -6e+45], N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.9e-33], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z * N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6 \cdot 10^{+45}:\\
\;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\
\mathbf{elif}\;x \leq 2.9 \cdot 10^{-33}:\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\
\mathbf{else}:\\
\;\;\;\;z \cdot \frac{y - x}{a - t}\\
\end{array}
\end{array}
if x < -6.00000000000000021e45Initial program 64.5%
associate-/l*82.6%
Simplified82.6%
Taylor expanded in x around inf 71.8%
mul-1-neg71.8%
unsub-neg71.8%
Simplified71.8%
Taylor expanded in t around 0 62.7%
if -6.00000000000000021e45 < x < 2.90000000000000003e-33Initial program 78.0%
associate-/l*90.9%
Simplified90.9%
Taylor expanded in x around 0 63.4%
associate-*r/76.6%
Simplified76.6%
if 2.90000000000000003e-33 < x Initial program 63.0%
associate-/l*77.0%
Simplified77.0%
Taylor expanded in z around inf 55.0%
div-sub55.0%
Simplified55.0%
Final simplification66.4%
(FPCore (x y z t a) :precision binary64 (if (<= z -5.6e+64) (* y (/ z a)) (if (or (<= z -7.5e-54) (not (<= z 4.8e+130))) (* x (/ z t)) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5.6e+64) {
tmp = y * (z / a);
} else if ((z <= -7.5e-54) || !(z <= 4.8e+130)) {
tmp = x * (z / t);
} 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 <= (-5.6d+64)) then
tmp = y * (z / a)
else if ((z <= (-7.5d-54)) .or. (.not. (z <= 4.8d+130))) then
tmp = x * (z / t)
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 <= -5.6e+64) {
tmp = y * (z / a);
} else if ((z <= -7.5e-54) || !(z <= 4.8e+130)) {
tmp = x * (z / t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -5.6e+64: tmp = y * (z / a) elif (z <= -7.5e-54) or not (z <= 4.8e+130): tmp = x * (z / t) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -5.6e+64) tmp = Float64(y * Float64(z / a)); elseif ((z <= -7.5e-54) || !(z <= 4.8e+130)) tmp = Float64(x * Float64(z / t)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -5.6e+64) tmp = y * (z / a); elseif ((z <= -7.5e-54) || ~((z <= 4.8e+130))) tmp = x * (z / t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -5.6e+64], N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -7.5e-54], N[Not[LessEqual[z, 4.8e+130]], $MachinePrecision]], N[(x * N[(z / t), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.6 \cdot 10^{+64}:\\
\;\;\;\;y \cdot \frac{z}{a}\\
\mathbf{elif}\;z \leq -7.5 \cdot 10^{-54} \lor \neg \left(z \leq 4.8 \cdot 10^{+130}\right):\\
\;\;\;\;x \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -5.60000000000000047e64Initial program 81.3%
associate-/l*92.4%
Simplified92.4%
Taylor expanded in x around 0 51.0%
associate-*r/60.2%
Simplified60.2%
Taylor expanded in t around 0 44.0%
if -5.60000000000000047e64 < z < -7.5000000000000005e-54 or 4.80000000000000048e130 < z Initial program 63.8%
associate-/l*84.1%
Simplified84.1%
Taylor expanded in x around inf 47.1%
mul-1-neg47.1%
unsub-neg47.1%
Simplified47.1%
Taylor expanded in a around 0 40.5%
if -7.5000000000000005e-54 < z < 4.80000000000000048e130Initial program 69.1%
associate-/l*81.7%
Simplified81.7%
Taylor expanded in a around inf 35.6%
Final simplification38.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -2e-29) (not (<= y 3.6e+22))) (* y (/ (- z t) a)) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -2e-29) || !(y <= 3.6e+22)) {
tmp = y * ((z - t) / 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 ((y <= (-2d-29)) .or. (.not. (y <= 3.6d+22))) then
tmp = y * ((z - t) / 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 ((y <= -2e-29) || !(y <= 3.6e+22)) {
tmp = y * ((z - t) / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -2e-29) or not (y <= 3.6e+22): tmp = y * ((z - t) / a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -2e-29) || !(y <= 3.6e+22)) tmp = Float64(y * Float64(Float64(z - t) / a)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -2e-29) || ~((y <= 3.6e+22))) tmp = y * ((z - t) / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -2e-29], N[Not[LessEqual[y, 3.6e+22]], $MachinePrecision]], N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2 \cdot 10^{-29} \lor \neg \left(y \leq 3.6 \cdot 10^{+22}\right):\\
\;\;\;\;y \cdot \frac{z - t}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.99999999999999989e-29 or 3.6e22 < y Initial program 69.7%
associate-/l*92.3%
Simplified92.3%
Taylor expanded in x around 0 54.8%
associate-*r/74.1%
Simplified74.1%
Taylor expanded in a around inf 43.2%
if -1.99999999999999989e-29 < y < 3.6e22Initial program 70.7%
associate-/l*76.9%
Simplified76.9%
Taylor expanded in a around inf 36.5%
Final simplification39.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -8.2e+108) (not (<= y 6.2e+31))) (* y (/ (- z t) a)) (* x (- 1.0 (/ z a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -8.2e+108) || !(y <= 6.2e+31)) {
tmp = y * ((z - t) / a);
} else {
tmp = x * (1.0 - (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 ((y <= (-8.2d+108)) .or. (.not. (y <= 6.2d+31))) then
tmp = y * ((z - t) / a)
else
tmp = x * (1.0d0 - (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 ((y <= -8.2e+108) || !(y <= 6.2e+31)) {
tmp = y * ((z - t) / a);
} else {
tmp = x * (1.0 - (z / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -8.2e+108) or not (y <= 6.2e+31): tmp = y * ((z - t) / a) else: tmp = x * (1.0 - (z / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -8.2e+108) || !(y <= 6.2e+31)) tmp = Float64(y * Float64(Float64(z - t) / a)); else tmp = Float64(x * Float64(1.0 - Float64(z / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -8.2e+108) || ~((y <= 6.2e+31))) tmp = y * ((z - t) / a); else tmp = x * (1.0 - (z / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -8.2e+108], N[Not[LessEqual[y, 6.2e+31]], $MachinePrecision]], N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.2 \cdot 10^{+108} \lor \neg \left(y \leq 6.2 \cdot 10^{+31}\right):\\
\;\;\;\;y \cdot \frac{z - t}{a}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\
\end{array}
\end{array}
if y < -8.1999999999999998e108 or 6.2000000000000004e31 < y Initial program 66.9%
associate-/l*93.4%
Simplified93.4%
Taylor expanded in x around 0 52.6%
associate-*r/76.6%
Simplified76.6%
Taylor expanded in a around inf 47.8%
if -8.1999999999999998e108 < y < 6.2000000000000004e31Initial program 72.3%
associate-/l*78.7%
Simplified78.7%
Taylor expanded in x around inf 58.1%
mul-1-neg58.1%
unsub-neg58.1%
Simplified58.1%
Taylor expanded in t around 0 49.1%
Final simplification48.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -300.0) (not (<= a 3e-33))) (* x (- 1.0 (/ z a))) (* y (- 1.0 (/ z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -300.0) || !(a <= 3e-33)) {
tmp = x * (1.0 - (z / a));
} else {
tmp = y * (1.0 - (z / 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 ((a <= (-300.0d0)) .or. (.not. (a <= 3d-33))) then
tmp = x * (1.0d0 - (z / a))
else
tmp = y * (1.0d0 - (z / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -300.0) || !(a <= 3e-33)) {
tmp = x * (1.0 - (z / a));
} else {
tmp = y * (1.0 - (z / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -300.0) or not (a <= 3e-33): tmp = x * (1.0 - (z / a)) else: tmp = y * (1.0 - (z / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -300.0) || !(a <= 3e-33)) tmp = Float64(x * Float64(1.0 - Float64(z / a))); else tmp = Float64(y * Float64(1.0 - Float64(z / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -300.0) || ~((a <= 3e-33))) tmp = x * (1.0 - (z / a)); else tmp = y * (1.0 - (z / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -300.0], N[Not[LessEqual[a, 3e-33]], $MachinePrecision]], N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -300 \lor \neg \left(a \leq 3 \cdot 10^{-33}\right):\\
\;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\
\end{array}
\end{array}
if a < -300 or 3.0000000000000002e-33 < a Initial program 66.8%
associate-/l*87.9%
Simplified87.9%
Taylor expanded in x around inf 54.7%
mul-1-neg54.7%
unsub-neg54.7%
Simplified54.7%
Taylor expanded in t around 0 51.4%
if -300 < a < 3.0000000000000002e-33Initial program 74.0%
associate-/l*80.6%
Simplified80.6%
Taylor expanded in t around inf 72.8%
sub-neg72.8%
+-commutative72.8%
mul-1-neg72.8%
unsub-neg72.8%
associate-/l*74.4%
mul-1-neg74.4%
remove-double-neg74.4%
associate-/l*70.2%
Simplified70.2%
Taylor expanded in a around 0 72.7%
Taylor expanded in y around inf 56.0%
Final simplification53.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -5.6e-13) (not (<= a 3.6e-38))) (+ x (* z (/ y a))) (* y (- 1.0 (/ z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -5.6e-13) || !(a <= 3.6e-38)) {
tmp = x + (z * (y / a));
} else {
tmp = y * (1.0 - (z / 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 ((a <= (-5.6d-13)) .or. (.not. (a <= 3.6d-38))) then
tmp = x + (z * (y / a))
else
tmp = y * (1.0d0 - (z / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -5.6e-13) || !(a <= 3.6e-38)) {
tmp = x + (z * (y / a));
} else {
tmp = y * (1.0 - (z / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -5.6e-13) or not (a <= 3.6e-38): tmp = x + (z * (y / a)) else: tmp = y * (1.0 - (z / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -5.6e-13) || !(a <= 3.6e-38)) tmp = Float64(x + Float64(z * Float64(y / a))); else tmp = Float64(y * Float64(1.0 - Float64(z / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -5.6e-13) || ~((a <= 3.6e-38))) tmp = x + (z * (y / a)); else tmp = y * (1.0 - (z / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -5.6e-13], N[Not[LessEqual[a, 3.6e-38]], $MachinePrecision]], N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.6 \cdot 10^{-13} \lor \neg \left(a \leq 3.6 \cdot 10^{-38}\right):\\
\;\;\;\;x + z \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\
\end{array}
\end{array}
if a < -5.6000000000000004e-13 or 3.6000000000000001e-38 < a Initial program 67.5%
associate-/l*88.2%
Simplified88.2%
Taylor expanded in t around 0 69.0%
Taylor expanded in y around inf 53.3%
associate-/l*58.8%
associate-/r/57.9%
Simplified57.9%
if -5.6000000000000004e-13 < a < 3.6000000000000001e-38Initial program 73.3%
associate-/l*80.1%
Simplified80.1%
Taylor expanded in t around inf 73.0%
sub-neg73.0%
+-commutative73.0%
mul-1-neg73.0%
unsub-neg73.0%
associate-/l*74.6%
mul-1-neg74.6%
remove-double-neg74.6%
associate-/l*70.3%
Simplified70.3%
Taylor expanded in a around 0 72.8%
Taylor expanded in y around inf 56.5%
Final simplification57.3%
(FPCore (x y z t a) :precision binary64 (if (<= t -5.5e+88) y (if (<= t 3.4e+92) x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -5.5e+88) {
tmp = y;
} else if (t <= 3.4e+92) {
tmp = x;
} else {
tmp = 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 <= (-5.5d+88)) then
tmp = y
else if (t <= 3.4d+92) then
tmp = x
else
tmp = 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 <= -5.5e+88) {
tmp = y;
} else if (t <= 3.4e+92) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -5.5e+88: tmp = y elif t <= 3.4e+92: tmp = x else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -5.5e+88) tmp = y; elseif (t <= 3.4e+92) tmp = x; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -5.5e+88) tmp = y; elseif (t <= 3.4e+92) tmp = x; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -5.5e+88], y, If[LessEqual[t, 3.4e+92], x, y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.5 \cdot 10^{+88}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq 3.4 \cdot 10^{+92}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -5.5e88 or 3.3999999999999998e92 < t Initial program 36.9%
associate-/l*61.5%
Simplified61.5%
Taylor expanded in t around inf 46.8%
if -5.5e88 < t < 3.3999999999999998e92Initial program 84.7%
associate-/l*94.5%
Simplified94.5%
Taylor expanded in a around inf 32.2%
Final simplification36.7%
(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 70.2%
associate-/l*84.5%
Simplified84.5%
Taylor expanded in a around inf 25.0%
Final simplification25.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (/ (- y x) 1.0) (/ (- z t) (- a t))))))
(if (< a -1.6153062845442575e-142)
t_1
(if (< a 3.774403170083174e-182) (- y (* (/ z t) (- y x))) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t)));
double tmp;
if (a < -1.6153062845442575e-142) {
tmp = t_1;
} else if (a < 3.774403170083174e-182) {
tmp = y - ((z / t) * (y - x));
} 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 - x) / 1.0d0) * ((z - t) / (a - t)))
if (a < (-1.6153062845442575d-142)) then
tmp = t_1
else if (a < 3.774403170083174d-182) then
tmp = y - ((z / t) * (y - x))
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 - x) / 1.0) * ((z - t) / (a - t)));
double tmp;
if (a < -1.6153062845442575e-142) {
tmp = t_1;
} else if (a < 3.774403170083174e-182) {
tmp = y - ((z / t) * (y - x));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t))) tmp = 0 if a < -1.6153062845442575e-142: tmp = t_1 elif a < 3.774403170083174e-182: tmp = y - ((z / t) * (y - x)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(y - x) / 1.0) * Float64(Float64(z - t) / Float64(a - t)))) tmp = 0.0 if (a < -1.6153062845442575e-142) tmp = t_1; elseif (a < 3.774403170083174e-182) tmp = Float64(y - Float64(Float64(z / t) * Float64(y - x))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t))); tmp = 0.0; if (a < -1.6153062845442575e-142) tmp = t_1; elseif (a < 3.774403170083174e-182) tmp = y - ((z / t) * (y - x)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - x), $MachinePrecision] / 1.0), $MachinePrecision] * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[a, -1.6153062845442575e-142], t$95$1, If[Less[a, 3.774403170083174e-182], N[(y - N[(N[(z / t), $MachinePrecision] * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y - x}{1} \cdot \frac{z - t}{a - t}\\
\mathbf{if}\;a < -1.6153062845442575 \cdot 10^{-142}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a < 3.774403170083174 \cdot 10^{-182}:\\
\;\;\;\;y - \frac{z}{t} \cdot \left(y - x\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
herbie shell --seed 2023257
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.Axis.Types:linMap from Chart-1.5.3"
:precision binary64
:herbie-target
(if (< a -1.6153062845442575e-142) (+ x (* (/ (- y x) 1.0) (/ (- z t) (- a t)))) (if (< a 3.774403170083174e-182) (- y (* (/ z t) (- y x))) (+ x (* (/ (- y x) 1.0) (/ (- z t) (- a t))))))
(+ x (/ (* (- y x) (- z t)) (- a t))))