
(FPCore (x y z t) :precision binary64 (* x (- (/ y z) (/ t (- 1.0 z)))))
double code(double x, double y, double z, double t) {
return x * ((y / z) - (t / (1.0 - z)));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x * ((y / z) - (t / (1.0d0 - z)))
end function
public static double code(double x, double y, double z, double t) {
return x * ((y / z) - (t / (1.0 - z)));
}
def code(x, y, z, t): return x * ((y / z) - (t / (1.0 - z)))
function code(x, y, z, t) return Float64(x * Float64(Float64(y / z) - Float64(t / Float64(1.0 - z)))) end
function tmp = code(x, y, z, t) tmp = x * ((y / z) - (t / (1.0 - z))); end
code[x_, y_, z_, t_] := N[(x * N[(N[(y / z), $MachinePrecision] - N[(t / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right)
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 13 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (* x (- (/ y z) (/ t (- 1.0 z)))))
double code(double x, double y, double z, double t) {
return x * ((y / z) - (t / (1.0 - z)));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x * ((y / z) - (t / (1.0d0 - z)))
end function
public static double code(double x, double y, double z, double t) {
return x * ((y / z) - (t / (1.0 - z)));
}
def code(x, y, z, t): return x * ((y / z) - (t / (1.0 - z)))
function code(x, y, z, t) return Float64(x * Float64(Float64(y / z) - Float64(t / Float64(1.0 - z)))) end
function tmp = code(x, y, z, t) tmp = x * ((y / z) - (t / (1.0 - z))); end
code[x_, y_, z_, t_] := N[(x * N[(N[(y / z), $MachinePrecision] - N[(t / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right)
\end{array}
(FPCore (x y z t) :precision binary64 (if (<= (+ (/ y z) (/ t (+ z -1.0))) (- INFINITY)) (* y (/ x z)) (* x (+ (/ y z) (* t (/ 1.0 (+ z -1.0)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (((y / z) + (t / (z + -1.0))) <= -((double) INFINITY)) {
tmp = y * (x / z);
} else {
tmp = x * ((y / z) + (t * (1.0 / (z + -1.0))));
}
return tmp;
}
public static double code(double x, double y, double z, double t) {
double tmp;
if (((y / z) + (t / (z + -1.0))) <= -Double.POSITIVE_INFINITY) {
tmp = y * (x / z);
} else {
tmp = x * ((y / z) + (t * (1.0 / (z + -1.0))));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if ((y / z) + (t / (z + -1.0))) <= -math.inf: tmp = y * (x / z) else: tmp = x * ((y / z) + (t * (1.0 / (z + -1.0)))) return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(Float64(y / z) + Float64(t / Float64(z + -1.0))) <= Float64(-Inf)) tmp = Float64(y * Float64(x / z)); else tmp = Float64(x * Float64(Float64(y / z) + Float64(t * Float64(1.0 / Float64(z + -1.0))))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (((y / z) + (t / (z + -1.0))) <= -Inf) tmp = y * (x / z); else tmp = x * ((y / z) + (t * (1.0 / (z + -1.0)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(N[(y / z), $MachinePrecision] + N[(t / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], (-Infinity)], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(y / z), $MachinePrecision] + N[(t * N[(1.0 / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{y}{z} + \frac{t}{z + -1} \leq -\infty:\\
\;\;\;\;y \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\frac{y}{z} + t \cdot \frac{1}{z + -1}\right)\\
\end{array}
\end{array}
if (-.f64 (/.f64 y z) (/.f64 t (-.f64 #s(literal 1 binary64) z))) < -inf.0Initial program 71.7%
Taylor expanded in y around inf 99.9%
mul-1-neg99.9%
distribute-neg-frac299.9%
distribute-rgt-neg-in99.9%
neg-sub099.9%
associate--r-99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in t around 0 99.9%
if -inf.0 < (-.f64 (/.f64 y z) (/.f64 t (-.f64 #s(literal 1 binary64) z))) Initial program 97.2%
clear-num97.0%
associate-/r/97.2%
Applied egg-rr97.2%
Final simplification97.3%
(FPCore (x y z t)
:precision binary64
(if (or (<= z -1.0)
(not
(or (<= z -3.8e-282)
(and (not (<= z 4.5e-201)) (<= z 185000000.0)))))
(* t (/ x z))
(* t (- x))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.0) || !((z <= -3.8e-282) || (!(z <= 4.5e-201) && (z <= 185000000.0)))) {
tmp = t * (x / z);
} else {
tmp = t * -x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z <= (-1.0d0)) .or. (.not. (z <= (-3.8d-282)) .or. (.not. (z <= 4.5d-201)) .and. (z <= 185000000.0d0))) then
tmp = t * (x / z)
else
tmp = t * -x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.0) || !((z <= -3.8e-282) || (!(z <= 4.5e-201) && (z <= 185000000.0)))) {
tmp = t * (x / z);
} else {
tmp = t * -x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -1.0) or not ((z <= -3.8e-282) or (not (z <= 4.5e-201) and (z <= 185000000.0))): tmp = t * (x / z) else: tmp = t * -x return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -1.0) || !((z <= -3.8e-282) || (!(z <= 4.5e-201) && (z <= 185000000.0)))) tmp = Float64(t * Float64(x / z)); else tmp = Float64(t * Float64(-x)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -1.0) || ~(((z <= -3.8e-282) || (~((z <= 4.5e-201)) && (z <= 185000000.0))))) tmp = t * (x / z); else tmp = t * -x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -1.0], N[Not[Or[LessEqual[z, -3.8e-282], And[N[Not[LessEqual[z, 4.5e-201]], $MachinePrecision], LessEqual[z, 185000000.0]]]], $MachinePrecision]], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], N[(t * (-x)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \lor \neg \left(z \leq -3.8 \cdot 10^{-282} \lor \neg \left(z \leq 4.5 \cdot 10^{-201}\right) \land z \leq 185000000\right):\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(-x\right)\\
\end{array}
\end{array}
if z < -1 or -3.79999999999999992e-282 < z < 4.5000000000000002e-201 or 1.85e8 < z Initial program 95.0%
clear-num94.8%
associate-/r/95.0%
Applied egg-rr95.0%
Taylor expanded in z around inf 82.1%
associate-/l*88.3%
sub-neg88.3%
neg-mul-188.3%
remove-double-neg88.3%
Simplified88.3%
Taylor expanded in y around 0 49.7%
associate-/l*51.7%
Simplified51.7%
if -1 < z < -3.79999999999999992e-282 or 4.5000000000000002e-201 < z < 1.85e8Initial program 96.4%
Taylor expanded in z around 0 95.6%
Taylor expanded in y around 0 33.6%
neg-mul-133.6%
Simplified33.6%
Final simplification44.5%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (/ t z))) (t_2 (* t (- x))))
(if (<= z -1.0)
t_1
(if (<= z -5.6e-277)
t_2
(if (<= z 7.2e-194) (* t (/ x z)) (if (<= z 185000000.0) t_2 t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (t / z);
double t_2 = t * -x;
double tmp;
if (z <= -1.0) {
tmp = t_1;
} else if (z <= -5.6e-277) {
tmp = t_2;
} else if (z <= 7.2e-194) {
tmp = t * (x / z);
} else if (z <= 185000000.0) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x * (t / z)
t_2 = t * -x
if (z <= (-1.0d0)) then
tmp = t_1
else if (z <= (-5.6d-277)) then
tmp = t_2
else if (z <= 7.2d-194) then
tmp = t * (x / z)
else if (z <= 185000000.0d0) then
tmp = t_2
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x * (t / z);
double t_2 = t * -x;
double tmp;
if (z <= -1.0) {
tmp = t_1;
} else if (z <= -5.6e-277) {
tmp = t_2;
} else if (z <= 7.2e-194) {
tmp = t * (x / z);
} else if (z <= 185000000.0) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (t / z) t_2 = t * -x tmp = 0 if z <= -1.0: tmp = t_1 elif z <= -5.6e-277: tmp = t_2 elif z <= 7.2e-194: tmp = t * (x / z) elif z <= 185000000.0: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(t / z)) t_2 = Float64(t * Float64(-x)) tmp = 0.0 if (z <= -1.0) tmp = t_1; elseif (z <= -5.6e-277) tmp = t_2; elseif (z <= 7.2e-194) tmp = Float64(t * Float64(x / z)); elseif (z <= 185000000.0) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (t / z); t_2 = t * -x; tmp = 0.0; if (z <= -1.0) tmp = t_1; elseif (z <= -5.6e-277) tmp = t_2; elseif (z <= 7.2e-194) tmp = t * (x / z); elseif (z <= 185000000.0) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * (-x)), $MachinePrecision]}, If[LessEqual[z, -1.0], t$95$1, If[LessEqual[z, -5.6e-277], t$95$2, If[LessEqual[z, 7.2e-194], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 185000000.0], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{t}{z}\\
t_2 := t \cdot \left(-x\right)\\
\mathbf{if}\;z \leq -1:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -5.6 \cdot 10^{-277}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 7.2 \cdot 10^{-194}:\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{elif}\;z \leq 185000000:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1 or 1.85e8 < z Initial program 97.7%
clear-num97.4%
associate-/r/97.7%
Applied egg-rr97.7%
Taylor expanded in z around inf 87.3%
associate-/l*96.5%
sub-neg96.5%
neg-mul-196.5%
remove-double-neg96.5%
Simplified96.5%
Taylor expanded in y around 0 58.3%
*-commutative58.3%
associate-/l*63.7%
Simplified63.7%
if -1 < z < -5.59999999999999953e-277 or 7.2e-194 < z < 1.85e8Initial program 96.4%
Taylor expanded in z around 0 95.6%
Taylor expanded in y around 0 33.6%
neg-mul-133.6%
Simplified33.6%
if -5.59999999999999953e-277 < z < 7.2e-194Initial program 82.9%
clear-num82.9%
associate-/r/82.9%
Applied egg-rr82.9%
Taylor expanded in z around inf 58.5%
associate-/l*51.4%
sub-neg51.4%
neg-mul-151.4%
remove-double-neg51.4%
Simplified51.4%
Taylor expanded in y around 0 11.0%
associate-/l*20.9%
Simplified20.9%
Final simplification47.0%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (+ (/ y z) (/ t (+ z -1.0))))) (if (<= t_1 (- INFINITY)) (* y (/ x z)) (* t_1 x))))
double code(double x, double y, double z, double t) {
double t_1 = (y / z) + (t / (z + -1.0));
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = y * (x / z);
} else {
tmp = t_1 * x;
}
return tmp;
}
public static double code(double x, double y, double z, double t) {
double t_1 = (y / z) + (t / (z + -1.0));
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = y * (x / z);
} else {
tmp = t_1 * x;
}
return tmp;
}
def code(x, y, z, t): t_1 = (y / z) + (t / (z + -1.0)) tmp = 0 if t_1 <= -math.inf: tmp = y * (x / z) else: tmp = t_1 * x return tmp
function code(x, y, z, t) t_1 = Float64(Float64(y / z) + Float64(t / Float64(z + -1.0))) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(y * Float64(x / z)); else tmp = Float64(t_1 * x); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (y / z) + (t / (z + -1.0)); tmp = 0.0; if (t_1 <= -Inf) tmp = y * (x / z); else tmp = t_1 * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y / z), $MachinePrecision] + N[(t / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{z} + \frac{t}{z + -1}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;y \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot x\\
\end{array}
\end{array}
if (-.f64 (/.f64 y z) (/.f64 t (-.f64 #s(literal 1 binary64) z))) < -inf.0Initial program 71.7%
Taylor expanded in y around inf 99.9%
mul-1-neg99.9%
distribute-neg-frac299.9%
distribute-rgt-neg-in99.9%
neg-sub099.9%
associate--r-99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in t around 0 99.9%
if -inf.0 < (-.f64 (/.f64 y z) (/.f64 t (-.f64 #s(literal 1 binary64) z))) Initial program 97.2%
Final simplification97.3%
(FPCore (x y z t) :precision binary64 (if (<= z -1.05) (* x (* (+ y t) (/ 1.0 z))) (if (<= z 0.22) (* x (/ (- y (* z t)) z)) (* x (/ (+ y t) z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.05) {
tmp = x * ((y + t) * (1.0 / z));
} else if (z <= 0.22) {
tmp = x * ((y - (z * t)) / z);
} else {
tmp = x * ((y + t) / z);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (z <= (-1.05d0)) then
tmp = x * ((y + t) * (1.0d0 / z))
else if (z <= 0.22d0) then
tmp = x * ((y - (z * t)) / z)
else
tmp = x * ((y + t) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.05) {
tmp = x * ((y + t) * (1.0 / z));
} else if (z <= 0.22) {
tmp = x * ((y - (z * t)) / z);
} else {
tmp = x * ((y + t) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -1.05: tmp = x * ((y + t) * (1.0 / z)) elif z <= 0.22: tmp = x * ((y - (z * t)) / z) else: tmp = x * ((y + t) / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -1.05) tmp = Float64(x * Float64(Float64(y + t) * Float64(1.0 / z))); elseif (z <= 0.22) tmp = Float64(x * Float64(Float64(y - Float64(z * t)) / z)); else tmp = Float64(x * Float64(Float64(y + t) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -1.05) tmp = x * ((y + t) * (1.0 / z)); elseif (z <= 0.22) tmp = x * ((y - (z * t)) / z); else tmp = x * ((y + t) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -1.05], N[(x * N[(N[(y + t), $MachinePrecision] * N[(1.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.22], N[(x * N[(N[(y - N[(z * t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(y + t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.05:\\
\;\;\;\;x \cdot \left(\left(y + t\right) \cdot \frac{1}{z}\right)\\
\mathbf{elif}\;z \leq 0.22:\\
\;\;\;\;x \cdot \frac{y - z \cdot t}{z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y + t}{z}\\
\end{array}
\end{array}
if z < -1.05000000000000004Initial program 98.1%
clear-num98.1%
associate-/r/98.2%
Applied egg-rr98.2%
Taylor expanded in z around inf 88.5%
associate-/l*95.7%
sub-neg95.7%
neg-mul-195.7%
remove-double-neg95.7%
Simplified95.7%
clear-num95.6%
associate-/r/95.8%
Applied egg-rr95.8%
if -1.05000000000000004 < z < 0.220000000000000001Initial program 93.3%
Taylor expanded in z around 0 92.7%
mul-1-neg92.7%
unsub-neg92.7%
Simplified92.7%
if 0.220000000000000001 < z Initial program 97.4%
Taylor expanded in z around inf 86.7%
*-commutative86.7%
remove-double-neg86.7%
cancel-sign-sub-inv86.7%
metadata-eval86.7%
*-lft-identity86.7%
distribute-neg-out86.7%
neg-mul-186.7%
sub-neg86.7%
distribute-lft-neg-in86.7%
*-commutative86.7%
distribute-neg-frac86.7%
associate-/l*97.4%
distribute-rgt-neg-in97.4%
distribute-neg-frac97.4%
Simplified97.4%
Final simplification94.7%
(FPCore (x y z t) :precision binary64 (if (<= z -1.0) (* x (+ (/ y z) (* t (/ 1.0 z)))) (if (<= z 0.22) (* x (/ (- y (* z t)) z)) (* x (/ (+ y t) z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.0) {
tmp = x * ((y / z) + (t * (1.0 / z)));
} else if (z <= 0.22) {
tmp = x * ((y - (z * t)) / z);
} else {
tmp = x * ((y + t) / z);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (z <= (-1.0d0)) then
tmp = x * ((y / z) + (t * (1.0d0 / z)))
else if (z <= 0.22d0) then
tmp = x * ((y - (z * t)) / z)
else
tmp = x * ((y + t) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.0) {
tmp = x * ((y / z) + (t * (1.0 / z)));
} else if (z <= 0.22) {
tmp = x * ((y - (z * t)) / z);
} else {
tmp = x * ((y + t) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -1.0: tmp = x * ((y / z) + (t * (1.0 / z))) elif z <= 0.22: tmp = x * ((y - (z * t)) / z) else: tmp = x * ((y + t) / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -1.0) tmp = Float64(x * Float64(Float64(y / z) + Float64(t * Float64(1.0 / z)))); elseif (z <= 0.22) tmp = Float64(x * Float64(Float64(y - Float64(z * t)) / z)); else tmp = Float64(x * Float64(Float64(y + t) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -1.0) tmp = x * ((y / z) + (t * (1.0 / z))); elseif (z <= 0.22) tmp = x * ((y - (z * t)) / z); else tmp = x * ((y + t) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -1.0], N[(x * N[(N[(y / z), $MachinePrecision] + N[(t * N[(1.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.22], N[(x * N[(N[(y - N[(z * t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(y + t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1:\\
\;\;\;\;x \cdot \left(\frac{y}{z} + t \cdot \frac{1}{z}\right)\\
\mathbf{elif}\;z \leq 0.22:\\
\;\;\;\;x \cdot \frac{y - z \cdot t}{z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y + t}{z}\\
\end{array}
\end{array}
if z < -1Initial program 98.1%
clear-num98.1%
associate-/r/98.2%
Applied egg-rr98.2%
Taylor expanded in z around inf 95.8%
if -1 < z < 0.220000000000000001Initial program 93.3%
Taylor expanded in z around 0 92.7%
mul-1-neg92.7%
unsub-neg92.7%
Simplified92.7%
if 0.220000000000000001 < z Initial program 97.4%
Taylor expanded in z around inf 86.7%
*-commutative86.7%
remove-double-neg86.7%
cancel-sign-sub-inv86.7%
metadata-eval86.7%
*-lft-identity86.7%
distribute-neg-out86.7%
neg-mul-186.7%
sub-neg86.7%
distribute-lft-neg-in86.7%
*-commutative86.7%
distribute-neg-frac86.7%
associate-/l*97.4%
distribute-rgt-neg-in97.4%
distribute-neg-frac97.4%
Simplified97.4%
Final simplification94.7%
(FPCore (x y z t) :precision binary64 (if (or (<= z -1.0) (not (<= z 0.22))) (* x (/ (+ y t) z)) (* x (- (/ y z) t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.0) || !(z <= 0.22)) {
tmp = x * ((y + t) / z);
} else {
tmp = x * ((y / z) - t);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z <= (-1.0d0)) .or. (.not. (z <= 0.22d0))) then
tmp = x * ((y + t) / z)
else
tmp = x * ((y / z) - t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.0) || !(z <= 0.22)) {
tmp = x * ((y + t) / z);
} else {
tmp = x * ((y / z) - t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -1.0) or not (z <= 0.22): tmp = x * ((y + t) / z) else: tmp = x * ((y / z) - t) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -1.0) || !(z <= 0.22)) tmp = Float64(x * Float64(Float64(y + t) / z)); else tmp = Float64(x * Float64(Float64(y / z) - t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -1.0) || ~((z <= 0.22))) tmp = x * ((y + t) / z); else tmp = x * ((y / z) - t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -1.0], N[Not[LessEqual[z, 0.22]], $MachinePrecision]], N[(x * N[(N[(y + t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(y / z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \lor \neg \left(z \leq 0.22\right):\\
\;\;\;\;x \cdot \frac{y + t}{z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\
\end{array}
\end{array}
if z < -1 or 0.220000000000000001 < z Initial program 97.7%
Taylor expanded in z around inf 87.6%
*-commutative87.6%
remove-double-neg87.6%
cancel-sign-sub-inv87.6%
metadata-eval87.6%
*-lft-identity87.6%
distribute-neg-out87.6%
neg-mul-187.6%
sub-neg87.6%
distribute-lft-neg-in87.6%
*-commutative87.6%
distribute-neg-frac87.6%
associate-/l*96.5%
distribute-rgt-neg-in96.5%
distribute-neg-frac96.5%
Simplified96.5%
if -1 < z < 0.220000000000000001Initial program 93.3%
Taylor expanded in z around 0 92.7%
Final simplification94.6%
(FPCore (x y z t) :precision binary64 (if (<= z -0.88) (/ x (/ z (+ y t))) (if (<= z 0.22) (* x (- (/ y z) t)) (* x (/ (+ y t) z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -0.88) {
tmp = x / (z / (y + t));
} else if (z <= 0.22) {
tmp = x * ((y / z) - t);
} else {
tmp = x * ((y + t) / z);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (z <= (-0.88d0)) then
tmp = x / (z / (y + t))
else if (z <= 0.22d0) then
tmp = x * ((y / z) - t)
else
tmp = x * ((y + t) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -0.88) {
tmp = x / (z / (y + t));
} else if (z <= 0.22) {
tmp = x * ((y / z) - t);
} else {
tmp = x * ((y + t) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -0.88: tmp = x / (z / (y + t)) elif z <= 0.22: tmp = x * ((y / z) - t) else: tmp = x * ((y + t) / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -0.88) tmp = Float64(x / Float64(z / Float64(y + t))); elseif (z <= 0.22) tmp = Float64(x * Float64(Float64(y / z) - t)); else tmp = Float64(x * Float64(Float64(y + t) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -0.88) tmp = x / (z / (y + t)); elseif (z <= 0.22) tmp = x * ((y / z) - t); else tmp = x * ((y + t) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -0.88], N[(x / N[(z / N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.22], N[(x * N[(N[(y / z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(y + t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.88:\\
\;\;\;\;\frac{x}{\frac{z}{y + t}}\\
\mathbf{elif}\;z \leq 0.22:\\
\;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y + t}{z}\\
\end{array}
\end{array}
if z < -0.880000000000000004Initial program 98.1%
clear-num98.1%
associate-/r/98.2%
Applied egg-rr98.2%
Taylor expanded in z around inf 88.5%
associate-/l*95.7%
sub-neg95.7%
neg-mul-195.7%
remove-double-neg95.7%
Simplified95.7%
clear-num95.6%
un-div-inv95.7%
Applied egg-rr95.7%
if -0.880000000000000004 < z < 0.220000000000000001Initial program 93.3%
Taylor expanded in z around 0 92.7%
if 0.220000000000000001 < z Initial program 97.4%
Taylor expanded in z around inf 86.7%
*-commutative86.7%
remove-double-neg86.7%
cancel-sign-sub-inv86.7%
metadata-eval86.7%
*-lft-identity86.7%
distribute-neg-out86.7%
neg-mul-186.7%
sub-neg86.7%
distribute-lft-neg-in86.7%
*-commutative86.7%
distribute-neg-frac86.7%
associate-/l*97.4%
distribute-rgt-neg-in97.4%
distribute-neg-frac97.4%
Simplified97.4%
Final simplification94.7%
(FPCore (x y z t) :precision binary64 (if (<= z -1.0) (* x (* (+ y t) (/ 1.0 z))) (if (<= z 0.22) (* x (- (/ y z) t)) (* x (/ (+ y t) z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.0) {
tmp = x * ((y + t) * (1.0 / z));
} else if (z <= 0.22) {
tmp = x * ((y / z) - t);
} else {
tmp = x * ((y + t) / z);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (z <= (-1.0d0)) then
tmp = x * ((y + t) * (1.0d0 / z))
else if (z <= 0.22d0) then
tmp = x * ((y / z) - t)
else
tmp = x * ((y + t) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.0) {
tmp = x * ((y + t) * (1.0 / z));
} else if (z <= 0.22) {
tmp = x * ((y / z) - t);
} else {
tmp = x * ((y + t) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -1.0: tmp = x * ((y + t) * (1.0 / z)) elif z <= 0.22: tmp = x * ((y / z) - t) else: tmp = x * ((y + t) / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -1.0) tmp = Float64(x * Float64(Float64(y + t) * Float64(1.0 / z))); elseif (z <= 0.22) tmp = Float64(x * Float64(Float64(y / z) - t)); else tmp = Float64(x * Float64(Float64(y + t) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -1.0) tmp = x * ((y + t) * (1.0 / z)); elseif (z <= 0.22) tmp = x * ((y / z) - t); else tmp = x * ((y + t) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -1.0], N[(x * N[(N[(y + t), $MachinePrecision] * N[(1.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.22], N[(x * N[(N[(y / z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(y + t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1:\\
\;\;\;\;x \cdot \left(\left(y + t\right) \cdot \frac{1}{z}\right)\\
\mathbf{elif}\;z \leq 0.22:\\
\;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y + t}{z}\\
\end{array}
\end{array}
if z < -1Initial program 98.1%
clear-num98.1%
associate-/r/98.2%
Applied egg-rr98.2%
Taylor expanded in z around inf 88.5%
associate-/l*95.7%
sub-neg95.7%
neg-mul-195.7%
remove-double-neg95.7%
Simplified95.7%
clear-num95.6%
associate-/r/95.8%
Applied egg-rr95.8%
if -1 < z < 0.220000000000000001Initial program 93.3%
Taylor expanded in z around 0 92.7%
if 0.220000000000000001 < z Initial program 97.4%
Taylor expanded in z around inf 86.7%
*-commutative86.7%
remove-double-neg86.7%
cancel-sign-sub-inv86.7%
metadata-eval86.7%
*-lft-identity86.7%
distribute-neg-out86.7%
neg-mul-186.7%
sub-neg86.7%
distribute-lft-neg-in86.7%
*-commutative86.7%
distribute-neg-frac86.7%
associate-/l*97.4%
distribute-rgt-neg-in97.4%
distribute-neg-frac97.4%
Simplified97.4%
Final simplification94.7%
(FPCore (x y z t) :precision binary64 (if (or (<= t -2.05e+86) (not (<= t 4.8e+99))) (* x (/ t z)) (* (/ y z) x)))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -2.05e+86) || !(t <= 4.8e+99)) {
tmp = x * (t / z);
} else {
tmp = (y / z) * x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((t <= (-2.05d+86)) .or. (.not. (t <= 4.8d+99))) then
tmp = x * (t / z)
else
tmp = (y / z) * x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -2.05e+86) || !(t <= 4.8e+99)) {
tmp = x * (t / z);
} else {
tmp = (y / z) * x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -2.05e+86) or not (t <= 4.8e+99): tmp = x * (t / z) else: tmp = (y / z) * x return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -2.05e+86) || !(t <= 4.8e+99)) tmp = Float64(x * Float64(t / z)); else tmp = Float64(Float64(y / z) * x); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -2.05e+86) || ~((t <= 4.8e+99))) tmp = x * (t / z); else tmp = (y / z) * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -2.05e+86], N[Not[LessEqual[t, 4.8e+99]], $MachinePrecision]], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], N[(N[(y / z), $MachinePrecision] * x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.05 \cdot 10^{+86} \lor \neg \left(t \leq 4.8 \cdot 10^{+99}\right):\\
\;\;\;\;x \cdot \frac{t}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{z} \cdot x\\
\end{array}
\end{array}
if t < -2.05e86 or 4.8000000000000002e99 < t Initial program 94.1%
clear-num94.0%
associate-/r/94.1%
Applied egg-rr94.1%
Taylor expanded in z around inf 56.2%
associate-/l*65.8%
sub-neg65.8%
neg-mul-165.8%
remove-double-neg65.8%
Simplified65.8%
Taylor expanded in y around 0 50.0%
*-commutative50.0%
associate-/l*58.6%
Simplified58.6%
if -2.05e86 < t < 4.8000000000000002e99Initial program 96.5%
Taylor expanded in y around inf 81.7%
associate-*r/85.2%
Simplified85.2%
Final simplification75.1%
(FPCore (x y z t) :precision binary64 (if (or (<= t -1.2e+86) (not (<= t 4.7e+99))) (* x (/ t z)) (/ x (/ z y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -1.2e+86) || !(t <= 4.7e+99)) {
tmp = x * (t / z);
} else {
tmp = x / (z / y);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((t <= (-1.2d+86)) .or. (.not. (t <= 4.7d+99))) then
tmp = x * (t / z)
else
tmp = x / (z / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -1.2e+86) || !(t <= 4.7e+99)) {
tmp = x * (t / z);
} else {
tmp = x / (z / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -1.2e+86) or not (t <= 4.7e+99): tmp = x * (t / z) else: tmp = x / (z / y) return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -1.2e+86) || !(t <= 4.7e+99)) tmp = Float64(x * Float64(t / z)); else tmp = Float64(x / Float64(z / y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -1.2e+86) || ~((t <= 4.7e+99))) tmp = x * (t / z); else tmp = x / (z / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -1.2e+86], N[Not[LessEqual[t, 4.7e+99]], $MachinePrecision]], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], N[(x / N[(z / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.2 \cdot 10^{+86} \lor \neg \left(t \leq 4.7 \cdot 10^{+99}\right):\\
\;\;\;\;x \cdot \frac{t}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\
\end{array}
\end{array}
if t < -1.2e86 or 4.69999999999999982e99 < t Initial program 94.1%
clear-num94.0%
associate-/r/94.1%
Applied egg-rr94.1%
Taylor expanded in z around inf 56.2%
associate-/l*65.8%
sub-neg65.8%
neg-mul-165.8%
remove-double-neg65.8%
Simplified65.8%
Taylor expanded in y around 0 50.0%
*-commutative50.0%
associate-/l*58.6%
Simplified58.6%
if -1.2e86 < t < 4.69999999999999982e99Initial program 96.5%
clear-num96.3%
associate-/r/96.5%
Applied egg-rr96.5%
Taylor expanded in z around inf 82.1%
associate-/l*79.9%
sub-neg79.9%
neg-mul-179.9%
remove-double-neg79.9%
Simplified79.9%
clear-num79.6%
un-div-inv79.9%
Applied egg-rr79.9%
Taylor expanded in y around inf 85.3%
Final simplification75.2%
(FPCore (x y z t) :precision binary64 (if (<= t -1.6e+86) (* t (/ x (+ z -1.0))) (if (<= t 1.65e+100) (/ x (/ z y)) (* x (/ t z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -1.6e+86) {
tmp = t * (x / (z + -1.0));
} else if (t <= 1.65e+100) {
tmp = x / (z / y);
} else {
tmp = x * (t / z);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-1.6d+86)) then
tmp = t * (x / (z + (-1.0d0)))
else if (t <= 1.65d+100) then
tmp = x / (z / y)
else
tmp = x * (t / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -1.6e+86) {
tmp = t * (x / (z + -1.0));
} else if (t <= 1.65e+100) {
tmp = x / (z / y);
} else {
tmp = x * (t / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -1.6e+86: tmp = t * (x / (z + -1.0)) elif t <= 1.65e+100: tmp = x / (z / y) else: tmp = x * (t / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -1.6e+86) tmp = Float64(t * Float64(x / Float64(z + -1.0))); elseif (t <= 1.65e+100) tmp = Float64(x / Float64(z / y)); else tmp = Float64(x * Float64(t / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -1.6e+86) tmp = t * (x / (z + -1.0)); elseif (t <= 1.65e+100) tmp = x / (z / y); else tmp = x * (t / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -1.6e+86], N[(t * N[(x / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.65e+100], N[(x / N[(z / y), $MachinePrecision]), $MachinePrecision], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.6 \cdot 10^{+86}:\\
\;\;\;\;t \cdot \frac{x}{z + -1}\\
\mathbf{elif}\;t \leq 1.65 \cdot 10^{+100}:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{t}{z}\\
\end{array}
\end{array}
if t < -1.6e86Initial program 92.9%
Taylor expanded in y around 0 67.4%
mul-1-neg67.4%
associate-/l*71.2%
distribute-rgt-neg-in71.2%
distribute-neg-frac271.2%
neg-sub071.2%
associate--r-71.2%
metadata-eval71.2%
Simplified71.2%
if -1.6e86 < t < 1.6500000000000001e100Initial program 96.5%
clear-num96.3%
associate-/r/96.5%
Applied egg-rr96.5%
Taylor expanded in z around inf 82.1%
associate-/l*79.9%
sub-neg79.9%
neg-mul-179.9%
remove-double-neg79.9%
Simplified79.9%
clear-num79.6%
un-div-inv79.9%
Applied egg-rr79.9%
Taylor expanded in y around inf 85.3%
if 1.6500000000000001e100 < t Initial program 95.5%
clear-num95.5%
associate-/r/95.5%
Applied egg-rr95.5%
Taylor expanded in z around inf 60.8%
associate-/l*69.0%
sub-neg69.0%
neg-mul-169.0%
remove-double-neg69.0%
Simplified69.0%
Taylor expanded in y around 0 56.4%
*-commutative56.4%
associate-/l*64.6%
Simplified64.6%
Final simplification78.8%
(FPCore (x y z t) :precision binary64 (* t (- x)))
double code(double x, double y, double z, double t) {
return t * -x;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = t * -x
end function
public static double code(double x, double y, double z, double t) {
return t * -x;
}
def code(x, y, z, t): return t * -x
function code(x, y, z, t) return Float64(t * Float64(-x)) end
function tmp = code(x, y, z, t) tmp = t * -x; end
code[x_, y_, z_, t_] := N[(t * (-x)), $MachinePrecision]
\begin{array}{l}
\\
t \cdot \left(-x\right)
\end{array}
Initial program 95.6%
Taylor expanded in z around 0 64.2%
Taylor expanded in y around 0 19.7%
neg-mul-119.7%
Simplified19.7%
Final simplification19.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (- (/ y z) (* t (/ 1.0 (- 1.0 z))))))
(t_2 (* x (- (/ y z) (/ t (- 1.0 z))))))
(if (< t_2 -7.623226303312042e-196)
t_1
(if (< t_2 1.4133944927702302e-211)
(+ (/ (* y x) z) (- (/ (* t x) (- 1.0 z))))
t_1))))
double code(double x, double y, double z, double t) {
double t_1 = x * ((y / z) - (t * (1.0 / (1.0 - z))));
double t_2 = x * ((y / z) - (t / (1.0 - z)));
double tmp;
if (t_2 < -7.623226303312042e-196) {
tmp = t_1;
} else if (t_2 < 1.4133944927702302e-211) {
tmp = ((y * x) / z) + -((t * x) / (1.0 - z));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x * ((y / z) - (t * (1.0d0 / (1.0d0 - z))))
t_2 = x * ((y / z) - (t / (1.0d0 - z)))
if (t_2 < (-7.623226303312042d-196)) then
tmp = t_1
else if (t_2 < 1.4133944927702302d-211) then
tmp = ((y * x) / z) + -((t * x) / (1.0d0 - z))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x * ((y / z) - (t * (1.0 / (1.0 - z))));
double t_2 = x * ((y / z) - (t / (1.0 - z)));
double tmp;
if (t_2 < -7.623226303312042e-196) {
tmp = t_1;
} else if (t_2 < 1.4133944927702302e-211) {
tmp = ((y * x) / z) + -((t * x) / (1.0 - z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * ((y / z) - (t * (1.0 / (1.0 - z)))) t_2 = x * ((y / z) - (t / (1.0 - z))) tmp = 0 if t_2 < -7.623226303312042e-196: tmp = t_1 elif t_2 < 1.4133944927702302e-211: tmp = ((y * x) / z) + -((t * x) / (1.0 - z)) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(Float64(y / z) - Float64(t * Float64(1.0 / Float64(1.0 - z))))) t_2 = Float64(x * Float64(Float64(y / z) - Float64(t / Float64(1.0 - z)))) tmp = 0.0 if (t_2 < -7.623226303312042e-196) tmp = t_1; elseif (t_2 < 1.4133944927702302e-211) tmp = Float64(Float64(Float64(y * x) / z) + Float64(-Float64(Float64(t * x) / Float64(1.0 - z)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * ((y / z) - (t * (1.0 / (1.0 - z)))); t_2 = x * ((y / z) - (t / (1.0 - z))); tmp = 0.0; if (t_2 < -7.623226303312042e-196) tmp = t_1; elseif (t_2 < 1.4133944927702302e-211) tmp = ((y * x) / z) + -((t * x) / (1.0 - z)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(N[(y / z), $MachinePrecision] - N[(t * N[(1.0 / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(N[(y / z), $MachinePrecision] - N[(t / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t$95$2, -7.623226303312042e-196], t$95$1, If[Less[t$95$2, 1.4133944927702302e-211], N[(N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision] + (-N[(N[(t * x), $MachinePrecision] / N[(1.0 - z), $MachinePrecision]), $MachinePrecision])), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(\frac{y}{z} - t \cdot \frac{1}{1 - z}\right)\\
t_2 := x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right)\\
\mathbf{if}\;t\_2 < -7.623226303312042 \cdot 10^{-196}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 < 1.4133944927702302 \cdot 10^{-211}:\\
\;\;\;\;\frac{y \cdot x}{z} + \left(-\frac{t \cdot x}{1 - z}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024078
(FPCore (x y z t)
:name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, C"
:precision binary64
:alt
(if (< (* x (- (/ y z) (/ t (- 1.0 z)))) -7.623226303312042e-196) (* x (- (/ y z) (* t (/ 1.0 (- 1.0 z))))) (if (< (* x (- (/ y z) (/ t (- 1.0 z)))) 1.4133944927702302e-211) (+ (/ (* y x) z) (- (/ (* t x) (- 1.0 z)))) (* x (- (/ y z) (* t (/ 1.0 (- 1.0 z)))))))
(* x (- (/ y z) (/ t (- 1.0 z)))))