
(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 14 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
(let* ((t_1 (+ (/ y z) (/ t (+ z -1.0)))))
(if (<= t_1 (- INFINITY))
(* y (/ x z))
(if (<= t_1 2e+273)
(* t_1 x)
(/ (* x (- (* z t) (* y (- 1.0 z)))) (* z (+ z -1.0)))))))
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 if (t_1 <= 2e+273) {
tmp = t_1 * x;
} else {
tmp = (x * ((z * t) - (y * (1.0 - z)))) / (z * (z + -1.0));
}
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 if (t_1 <= 2e+273) {
tmp = t_1 * x;
} else {
tmp = (x * ((z * t) - (y * (1.0 - z)))) / (z * (z + -1.0));
}
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) elif t_1 <= 2e+273: tmp = t_1 * x else: tmp = (x * ((z * t) - (y * (1.0 - z)))) / (z * (z + -1.0)) 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)); elseif (t_1 <= 2e+273) tmp = Float64(t_1 * x); else tmp = Float64(Float64(x * Float64(Float64(z * t) - Float64(y * Float64(1.0 - z)))) / Float64(z * Float64(z + -1.0))); 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); elseif (t_1 <= 2e+273) tmp = t_1 * x; else tmp = (x * ((z * t) - (y * (1.0 - z)))) / (z * (z + -1.0)); 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], If[LessEqual[t$95$1, 2e+273], N[(t$95$1 * x), $MachinePrecision], N[(N[(x * N[(N[(z * t), $MachinePrecision] - N[(y * N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $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{elif}\;t\_1 \leq 2 \cdot 10^{+273}:\\
\;\;\;\;t\_1 \cdot x\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot \left(z \cdot t - y \cdot \left(1 - z\right)\right)}{z \cdot \left(z + -1\right)}\\
\end{array}
\end{array}
if (-.f64 (/.f64 y z) (/.f64 t (-.f64 #s(literal 1 binary64) z))) < -inf.0Initial program 58.8%
Taylor expanded in y around inf 99.7%
associate-*r/58.8%
Simplified58.8%
clear-num58.8%
un-div-inv58.8%
Applied egg-rr58.8%
associate-/r/99.9%
Simplified99.9%
if -inf.0 < (-.f64 (/.f64 y z) (/.f64 t (-.f64 #s(literal 1 binary64) z))) < 1.99999999999999989e273Initial program 98.4%
if 1.99999999999999989e273 < (-.f64 (/.f64 y z) (/.f64 t (-.f64 #s(literal 1 binary64) z))) Initial program 72.2%
*-commutative72.2%
frac-sub72.2%
associate-*l/99.9%
Applied egg-rr99.9%
Final simplification98.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (+ (/ y z) (/ t (+ z -1.0)))))
(if (<= t_1 (- INFINITY))
(* y (/ x z))
(if (<= t_1 1e+288) (* t_1 x) (/ (- (* y x) (* t (* z x))) z)))))
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 if (t_1 <= 1e+288) {
tmp = t_1 * x;
} else {
tmp = ((y * x) - (t * (z * x))) / z;
}
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 if (t_1 <= 1e+288) {
tmp = t_1 * x;
} else {
tmp = ((y * x) - (t * (z * x))) / z;
}
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) elif t_1 <= 1e+288: tmp = t_1 * x else: tmp = ((y * x) - (t * (z * x))) / z 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)); elseif (t_1 <= 1e+288) tmp = Float64(t_1 * x); else tmp = Float64(Float64(Float64(y * x) - Float64(t * Float64(z * x))) / z); 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); elseif (t_1 <= 1e+288) tmp = t_1 * x; else tmp = ((y * x) - (t * (z * x))) / z; 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], If[LessEqual[t$95$1, 1e+288], N[(t$95$1 * x), $MachinePrecision], N[(N[(N[(y * x), $MachinePrecision] - N[(t * N[(z * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $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{elif}\;t\_1 \leq 10^{+288}:\\
\;\;\;\;t\_1 \cdot x\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot x - t \cdot \left(z \cdot x\right)}{z}\\
\end{array}
\end{array}
if (-.f64 (/.f64 y z) (/.f64 t (-.f64 #s(literal 1 binary64) z))) < -inf.0Initial program 58.8%
Taylor expanded in y around inf 99.7%
associate-*r/58.8%
Simplified58.8%
clear-num58.8%
un-div-inv58.8%
Applied egg-rr58.8%
associate-/r/99.9%
Simplified99.9%
if -inf.0 < (-.f64 (/.f64 y z) (/.f64 t (-.f64 #s(literal 1 binary64) z))) < 1e288Initial program 98.4%
if 1e288 < (-.f64 (/.f64 y z) (/.f64 t (-.f64 #s(literal 1 binary64) z))) Initial program 67.3%
Taylor expanded in z around 0 99.9%
Final simplification98.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (+ (/ y z) (/ t (+ z -1.0)))))
(if (<= t_1 (- INFINITY))
(* y (/ x z))
(if (<= t_1 4e+292) (* t_1 x) (/ (* y x) z)))))
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 if (t_1 <= 4e+292) {
tmp = t_1 * x;
} else {
tmp = (y * x) / z;
}
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 if (t_1 <= 4e+292) {
tmp = t_1 * x;
} else {
tmp = (y * x) / z;
}
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) elif t_1 <= 4e+292: tmp = t_1 * x else: tmp = (y * x) / z 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)); elseif (t_1 <= 4e+292) tmp = Float64(t_1 * x); else tmp = Float64(Float64(y * x) / z); 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); elseif (t_1 <= 4e+292) tmp = t_1 * x; else tmp = (y * x) / z; 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], If[LessEqual[t$95$1, 4e+292], N[(t$95$1 * x), $MachinePrecision], N[(N[(y * x), $MachinePrecision] / z), $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{elif}\;t\_1 \leq 4 \cdot 10^{+292}:\\
\;\;\;\;t\_1 \cdot x\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot x}{z}\\
\end{array}
\end{array}
if (-.f64 (/.f64 y z) (/.f64 t (-.f64 #s(literal 1 binary64) z))) < -inf.0Initial program 58.8%
Taylor expanded in y around inf 99.7%
associate-*r/58.8%
Simplified58.8%
clear-num58.8%
un-div-inv58.8%
Applied egg-rr58.8%
associate-/r/99.9%
Simplified99.9%
if -inf.0 < (-.f64 (/.f64 y z) (/.f64 t (-.f64 #s(literal 1 binary64) z))) < 4.0000000000000001e292Initial program 98.5%
if 4.0000000000000001e292 < (-.f64 (/.f64 y z) (/.f64 t (-.f64 #s(literal 1 binary64) z))) Initial program 64.2%
Taylor expanded in y around inf 99.9%
Final simplification98.7%
(FPCore (x y z t) :precision binary64 (if (or (<= z -4400000000.0) (not (<= z 1.0))) (* x (/ (+ y t) z)) (* x (+ (/ y z) (/ 1.0 (/ -1.0 t))))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -4400000000.0) || !(z <= 1.0)) {
tmp = x * ((y + t) / z);
} else {
tmp = x * ((y / z) + (1.0 / (-1.0 / 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 <= (-4400000000.0d0)) .or. (.not. (z <= 1.0d0))) then
tmp = x * ((y + t) / z)
else
tmp = x * ((y / z) + (1.0d0 / ((-1.0d0) / t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -4400000000.0) || !(z <= 1.0)) {
tmp = x * ((y + t) / z);
} else {
tmp = x * ((y / z) + (1.0 / (-1.0 / t)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -4400000000.0) or not (z <= 1.0): tmp = x * ((y + t) / z) else: tmp = x * ((y / z) + (1.0 / (-1.0 / t))) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -4400000000.0) || !(z <= 1.0)) tmp = Float64(x * Float64(Float64(y + t) / z)); else tmp = Float64(x * Float64(Float64(y / z) + Float64(1.0 / Float64(-1.0 / t)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -4400000000.0) || ~((z <= 1.0))) tmp = x * ((y + t) / z); else tmp = x * ((y / z) + (1.0 / (-1.0 / t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -4400000000.0], N[Not[LessEqual[z, 1.0]], $MachinePrecision]], N[(x * N[(N[(y + t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(y / z), $MachinePrecision] + N[(1.0 / N[(-1.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4400000000 \lor \neg \left(z \leq 1\right):\\
\;\;\;\;x \cdot \frac{y + t}{z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\frac{y}{z} + \frac{1}{\frac{-1}{t}}\right)\\
\end{array}
\end{array}
if z < -4.4e9 or 1 < z Initial program 97.5%
Taylor expanded in z around inf 97.4%
sub-neg97.4%
neg-mul-197.4%
remove-double-neg97.4%
+-commutative97.4%
Simplified97.4%
if -4.4e9 < z < 1Initial program 89.0%
clear-num89.0%
Applied egg-rr89.0%
Taylor expanded in z around 0 88.4%
Final simplification92.8%
(FPCore (x y z t) :precision binary64 (if (or (<= z -4400000000.0) (not (<= z 1.0))) (* x (/ (+ y t) z)) (* x (- (/ y z) t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -4400000000.0) || !(z <= 1.0)) {
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 <= (-4400000000.0d0)) .or. (.not. (z <= 1.0d0))) 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 <= -4400000000.0) || !(z <= 1.0)) {
tmp = x * ((y + t) / z);
} else {
tmp = x * ((y / z) - t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -4400000000.0) or not (z <= 1.0): tmp = x * ((y + t) / z) else: tmp = x * ((y / z) - t) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -4400000000.0) || !(z <= 1.0)) 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 <= -4400000000.0) || ~((z <= 1.0))) 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, -4400000000.0], N[Not[LessEqual[z, 1.0]], $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 -4400000000 \lor \neg \left(z \leq 1\right):\\
\;\;\;\;x \cdot \frac{y + t}{z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\
\end{array}
\end{array}
if z < -4.4e9 or 1 < z Initial program 97.5%
Taylor expanded in z around inf 97.4%
sub-neg97.4%
neg-mul-197.4%
remove-double-neg97.4%
+-commutative97.4%
Simplified97.4%
if -4.4e9 < z < 1Initial program 89.0%
Taylor expanded in z around 0 88.3%
mul-1-neg88.3%
unsub-neg88.3%
div-sub88.3%
associate-/l*88.4%
*-inverses88.4%
*-rgt-identity88.4%
Simplified88.4%
Final simplification92.8%
(FPCore (x y z t) :precision binary64 (if (or (<= z -1e+71) (not (<= z 7000.0))) (* x (/ t z)) (* x (- (/ y z) t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1e+71) || !(z <= 7000.0)) {
tmp = x * (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 <= (-1d+71)) .or. (.not. (z <= 7000.0d0))) then
tmp = x * (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 <= -1e+71) || !(z <= 7000.0)) {
tmp = x * (t / z);
} else {
tmp = x * ((y / z) - t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -1e+71) or not (z <= 7000.0): tmp = x * (t / z) else: tmp = x * ((y / z) - t) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -1e+71) || !(z <= 7000.0)) tmp = Float64(x * Float64(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 <= -1e+71) || ~((z <= 7000.0))) tmp = x * (t / z); else tmp = x * ((y / z) - t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -1e+71], N[Not[LessEqual[z, 7000.0]], $MachinePrecision]], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(y / z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \cdot 10^{+71} \lor \neg \left(z \leq 7000\right):\\
\;\;\;\;x \cdot \frac{t}{z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\
\end{array}
\end{array}
if z < -1e71 or 7e3 < z Initial program 97.3%
Taylor expanded in y around 0 58.5%
mul-1-neg58.5%
*-commutative58.5%
associate-/l*67.0%
distribute-rgt-neg-out67.0%
distribute-frac-neg267.0%
neg-sub067.0%
associate--r-67.0%
metadata-eval67.0%
Simplified67.0%
Taylor expanded in z around inf 67.0%
if -1e71 < z < 7e3Initial program 90.0%
Taylor expanded in z around 0 86.2%
mul-1-neg86.2%
unsub-neg86.2%
div-sub86.2%
associate-/l*86.3%
*-inverses86.3%
*-rgt-identity86.3%
Simplified86.3%
Final simplification77.8%
(FPCore (x y z t) :precision binary64 (if (<= z -3.1e+72) (* x (/ t z)) (if (<= z 5.6e-17) (* x (- (/ y z) t)) (* x (/ t (+ z -1.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -3.1e+72) {
tmp = x * (t / z);
} else if (z <= 5.6e-17) {
tmp = x * ((y / z) - t);
} else {
tmp = x * (t / (z + -1.0));
}
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 <= (-3.1d+72)) then
tmp = x * (t / z)
else if (z <= 5.6d-17) then
tmp = x * ((y / z) - t)
else
tmp = x * (t / (z + (-1.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -3.1e+72) {
tmp = x * (t / z);
} else if (z <= 5.6e-17) {
tmp = x * ((y / z) - t);
} else {
tmp = x * (t / (z + -1.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -3.1e+72: tmp = x * (t / z) elif z <= 5.6e-17: tmp = x * ((y / z) - t) else: tmp = x * (t / (z + -1.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -3.1e+72) tmp = Float64(x * Float64(t / z)); elseif (z <= 5.6e-17) tmp = Float64(x * Float64(Float64(y / z) - t)); else tmp = Float64(x * Float64(t / Float64(z + -1.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -3.1e+72) tmp = x * (t / z); elseif (z <= 5.6e-17) tmp = x * ((y / z) - t); else tmp = x * (t / (z + -1.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -3.1e+72], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.6e-17], N[(x * N[(N[(y / z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision], N[(x * N[(t / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.1 \cdot 10^{+72}:\\
\;\;\;\;x \cdot \frac{t}{z}\\
\mathbf{elif}\;z \leq 5.6 \cdot 10^{-17}:\\
\;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{t}{z + -1}\\
\end{array}
\end{array}
if z < -3.09999999999999988e72Initial program 95.2%
Taylor expanded in y around 0 50.5%
mul-1-neg50.5%
*-commutative50.5%
associate-/l*66.0%
distribute-rgt-neg-out66.0%
distribute-frac-neg266.0%
neg-sub066.0%
associate--r-66.0%
metadata-eval66.0%
Simplified66.0%
Taylor expanded in z around inf 66.0%
if -3.09999999999999988e72 < z < 5.5999999999999998e-17Initial program 89.8%
Taylor expanded in z around 0 86.2%
mul-1-neg86.2%
unsub-neg86.2%
div-sub86.2%
associate-/l*86.3%
*-inverses86.3%
*-rgt-identity86.3%
Simplified86.3%
if 5.5999999999999998e-17 < z Initial program 99.4%
Taylor expanded in y around 0 67.5%
mul-1-neg67.5%
*-commutative67.5%
associate-/l*68.7%
distribute-rgt-neg-out68.7%
distribute-frac-neg268.7%
neg-sub068.7%
associate--r-68.7%
metadata-eval68.7%
Simplified68.7%
Final simplification77.9%
(FPCore (x y z t) :precision binary64 (if (or (<= t -9.2e+108) (not (<= t 21.0))) (* x (/ t z)) (/ (* y x) z)))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -9.2e+108) || !(t <= 21.0)) {
tmp = x * (t / z);
} else {
tmp = (y * x) / 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 <= (-9.2d+108)) .or. (.not. (t <= 21.0d0))) then
tmp = x * (t / z)
else
tmp = (y * x) / z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -9.2e+108) || !(t <= 21.0)) {
tmp = x * (t / z);
} else {
tmp = (y * x) / z;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -9.2e+108) or not (t <= 21.0): tmp = x * (t / z) else: tmp = (y * x) / z return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -9.2e+108) || !(t <= 21.0)) tmp = Float64(x * Float64(t / z)); else tmp = Float64(Float64(y * x) / z); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -9.2e+108) || ~((t <= 21.0))) tmp = x * (t / z); else tmp = (y * x) / z; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -9.2e+108], N[Not[LessEqual[t, 21.0]], $MachinePrecision]], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -9.2 \cdot 10^{+108} \lor \neg \left(t \leq 21\right):\\
\;\;\;\;x \cdot \frac{t}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot x}{z}\\
\end{array}
\end{array}
if t < -9.1999999999999996e108 or 21 < t Initial program 95.3%
Taylor expanded in y around 0 63.9%
mul-1-neg63.9%
*-commutative63.9%
associate-/l*72.8%
distribute-rgt-neg-out72.8%
distribute-frac-neg272.8%
neg-sub072.8%
associate--r-72.8%
metadata-eval72.8%
Simplified72.8%
Taylor expanded in z around inf 54.3%
if -9.1999999999999996e108 < t < 21Initial program 91.7%
Taylor expanded in y around inf 79.4%
Final simplification69.1%
(FPCore (x y z t) :precision binary64 (if (or (<= z -4.1e+74) (not (<= z 10200000000000.0))) (* x (/ t z)) (/ y (/ z x))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -4.1e+74) || !(z <= 10200000000000.0)) {
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 ((z <= (-4.1d+74)) .or. (.not. (z <= 10200000000000.0d0))) 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 ((z <= -4.1e+74) || !(z <= 10200000000000.0)) {
tmp = x * (t / z);
} else {
tmp = y / (z / x);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -4.1e+74) or not (z <= 10200000000000.0): tmp = x * (t / z) else: tmp = y / (z / x) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -4.1e+74) || !(z <= 10200000000000.0)) tmp = Float64(x * Float64(t / z)); else tmp = Float64(y / Float64(z / x)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -4.1e+74) || ~((z <= 10200000000000.0))) tmp = x * (t / z); else tmp = y / (z / x); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -4.1e+74], N[Not[LessEqual[z, 10200000000000.0]], $MachinePrecision]], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], N[(y / N[(z / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.1 \cdot 10^{+74} \lor \neg \left(z \leq 10200000000000\right):\\
\;\;\;\;x \cdot \frac{t}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{\frac{z}{x}}\\
\end{array}
\end{array}
if z < -4.1e74 or 1.02e13 < z Initial program 97.2%
Taylor expanded in y around 0 58.3%
mul-1-neg58.3%
*-commutative58.3%
associate-/l*67.0%
distribute-rgt-neg-out67.0%
distribute-frac-neg267.0%
neg-sub067.0%
associate--r-67.0%
metadata-eval67.0%
Simplified67.0%
Taylor expanded in z around inf 67.0%
if -4.1e74 < z < 1.02e13Initial program 90.2%
Taylor expanded in y around inf 71.2%
associate-*r/64.2%
Simplified64.2%
clear-num64.2%
un-div-inv64.8%
Applied egg-rr64.8%
associate-/r/70.0%
Simplified70.0%
*-commutative70.0%
clear-num69.9%
un-div-inv70.2%
Applied egg-rr70.2%
Final simplification68.8%
(FPCore (x y z t) :precision binary64 (if (or (<= z -2.2e+75) (not (<= z 420000000000.0))) (* x (/ t z)) (* y (/ x z))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -2.2e+75) || !(z <= 420000000000.0)) {
tmp = x * (t / z);
} else {
tmp = y * (x / 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 <= (-2.2d+75)) .or. (.not. (z <= 420000000000.0d0))) then
tmp = x * (t / z)
else
tmp = y * (x / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -2.2e+75) || !(z <= 420000000000.0)) {
tmp = x * (t / z);
} else {
tmp = y * (x / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -2.2e+75) or not (z <= 420000000000.0): tmp = x * (t / z) else: tmp = y * (x / z) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -2.2e+75) || !(z <= 420000000000.0)) tmp = Float64(x * Float64(t / z)); else tmp = Float64(y * Float64(x / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -2.2e+75) || ~((z <= 420000000000.0))) tmp = x * (t / z); else tmp = y * (x / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -2.2e+75], N[Not[LessEqual[z, 420000000000.0]], $MachinePrecision]], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.2 \cdot 10^{+75} \lor \neg \left(z \leq 420000000000\right):\\
\;\;\;\;x \cdot \frac{t}{z}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{x}{z}\\
\end{array}
\end{array}
if z < -2.20000000000000012e75 or 4.2e11 < z Initial program 97.2%
Taylor expanded in y around 0 58.3%
mul-1-neg58.3%
*-commutative58.3%
associate-/l*67.0%
distribute-rgt-neg-out67.0%
distribute-frac-neg267.0%
neg-sub067.0%
associate--r-67.0%
metadata-eval67.0%
Simplified67.0%
Taylor expanded in z around inf 67.0%
if -2.20000000000000012e75 < z < 4.2e11Initial program 90.2%
Taylor expanded in y around inf 71.2%
associate-*r/64.2%
Simplified64.2%
clear-num64.2%
un-div-inv64.8%
Applied egg-rr64.8%
associate-/r/70.0%
Simplified70.0%
Final simplification68.7%
(FPCore (x y z t) :precision binary64 (if (or (<= t -1.35e+113) (not (<= t 21.0))) (* x (/ t z)) (* (/ y z) x)))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -1.35e+113) || !(t <= 21.0)) {
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 <= (-1.35d+113)) .or. (.not. (t <= 21.0d0))) 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 <= -1.35e+113) || !(t <= 21.0)) {
tmp = x * (t / z);
} else {
tmp = (y / z) * x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -1.35e+113) or not (t <= 21.0): tmp = x * (t / z) else: tmp = (y / z) * x return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -1.35e+113) || !(t <= 21.0)) 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 <= -1.35e+113) || ~((t <= 21.0))) tmp = x * (t / z); else tmp = (y / z) * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -1.35e+113], N[Not[LessEqual[t, 21.0]], $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 -1.35 \cdot 10^{+113} \lor \neg \left(t \leq 21\right):\\
\;\;\;\;x \cdot \frac{t}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{z} \cdot x\\
\end{array}
\end{array}
if t < -1.35000000000000006e113 or 21 < t Initial program 95.3%
Taylor expanded in y around 0 63.9%
mul-1-neg63.9%
*-commutative63.9%
associate-/l*72.8%
distribute-rgt-neg-out72.8%
distribute-frac-neg272.8%
neg-sub072.8%
associate--r-72.8%
metadata-eval72.8%
Simplified72.8%
Taylor expanded in z around inf 54.3%
if -1.35000000000000006e113 < t < 21Initial program 91.7%
Taylor expanded in y around inf 79.4%
associate-*r/77.0%
Simplified77.0%
Final simplification67.7%
(FPCore (x y z t) :precision binary64 (if (or (<= z -4400000000.0) (not (<= z 1.4))) (* x (/ t z)) (* t (- x))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -4400000000.0) || !(z <= 1.4)) {
tmp = x * (t / 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 <= (-4400000000.0d0)) .or. (.not. (z <= 1.4d0))) then
tmp = x * (t / 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 <= -4400000000.0) || !(z <= 1.4)) {
tmp = x * (t / z);
} else {
tmp = t * -x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -4400000000.0) or not (z <= 1.4): tmp = x * (t / z) else: tmp = t * -x return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -4400000000.0) || !(z <= 1.4)) tmp = Float64(x * Float64(t / z)); else tmp = Float64(t * Float64(-x)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -4400000000.0) || ~((z <= 1.4))) tmp = x * (t / z); else tmp = t * -x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -4400000000.0], N[Not[LessEqual[z, 1.4]], $MachinePrecision]], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], N[(t * (-x)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4400000000 \lor \neg \left(z \leq 1.4\right):\\
\;\;\;\;x \cdot \frac{t}{z}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(-x\right)\\
\end{array}
\end{array}
if z < -4.4e9 or 1.3999999999999999 < z Initial program 97.5%
Taylor expanded in y around 0 56.9%
mul-1-neg56.9%
*-commutative56.9%
associate-/l*64.5%
distribute-rgt-neg-out64.5%
distribute-frac-neg264.5%
neg-sub064.5%
associate--r-64.5%
metadata-eval64.5%
Simplified64.5%
Taylor expanded in z around inf 64.4%
if -4.4e9 < z < 1.3999999999999999Initial program 89.0%
Taylor expanded in y around 0 33.0%
mul-1-neg33.0%
*-commutative33.0%
associate-/l*33.0%
distribute-rgt-neg-out33.0%
distribute-frac-neg233.0%
neg-sub033.0%
associate--r-33.0%
metadata-eval33.0%
Simplified33.0%
Taylor expanded in z around 0 32.6%
*-commutative32.6%
neg-mul-132.6%
distribute-rgt-neg-in32.6%
Simplified32.6%
Final simplification48.2%
(FPCore (x y z t) :precision binary64 (if (or (<= z -4400000000.0) (not (<= z 1.0))) (* t (/ x z)) (* t (- x))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -4400000000.0) || !(z <= 1.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 <= (-4400000000.0d0)) .or. (.not. (z <= 1.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 <= -4400000000.0) || !(z <= 1.0)) {
tmp = t * (x / z);
} else {
tmp = t * -x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -4400000000.0) or not (z <= 1.0): tmp = t * (x / z) else: tmp = t * -x return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -4400000000.0) || !(z <= 1.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 <= -4400000000.0) || ~((z <= 1.0))) tmp = t * (x / z); else tmp = t * -x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -4400000000.0], N[Not[LessEqual[z, 1.0]], $MachinePrecision]], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], N[(t * (-x)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4400000000 \lor \neg \left(z \leq 1\right):\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(-x\right)\\
\end{array}
\end{array}
if z < -4.4e9 or 1 < z Initial program 97.5%
Taylor expanded in y around 0 56.9%
mul-1-neg56.9%
*-commutative56.9%
associate-/l*64.5%
distribute-rgt-neg-out64.5%
distribute-frac-neg264.5%
neg-sub064.5%
associate--r-64.5%
metadata-eval64.5%
Simplified64.5%
Taylor expanded in z around inf 56.8%
associate-/l*58.3%
Simplified58.3%
if -4.4e9 < z < 1Initial program 89.0%
Taylor expanded in y around 0 33.0%
mul-1-neg33.0%
*-commutative33.0%
associate-/l*33.0%
distribute-rgt-neg-out33.0%
distribute-frac-neg233.0%
neg-sub033.0%
associate--r-33.0%
metadata-eval33.0%
Simplified33.0%
Taylor expanded in z around 0 32.6%
*-commutative32.6%
neg-mul-132.6%
distribute-rgt-neg-in32.6%
Simplified32.6%
Final simplification45.3%
(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 93.2%
Taylor expanded in y around 0 44.8%
mul-1-neg44.8%
*-commutative44.8%
associate-/l*48.5%
distribute-rgt-neg-out48.5%
distribute-frac-neg248.5%
neg-sub048.5%
associate--r-48.5%
metadata-eval48.5%
Simplified48.5%
Taylor expanded in z around 0 22.2%
*-commutative22.2%
neg-mul-122.2%
distribute-rgt-neg-in22.2%
Simplified22.2%
Final simplification22.2%
(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 2024096
(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)))))