
(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 12 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 (- 1.0 z)))) (t_2 (* x t_1)))
(if (<= t_1 (- INFINITY))
(/ (* x y) z)
(if (<= t_1 -1e-300)
t_2
(if (<= t_1 2e-239)
(/ (+ y t) (/ z x))
(if (<= t_1 2e+283) t_2 (/ (* x (- y (* z t))) z)))))))
double code(double x, double y, double z, double t) {
double t_1 = (y / z) - (t / (1.0 - z));
double t_2 = x * t_1;
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = (x * y) / z;
} else if (t_1 <= -1e-300) {
tmp = t_2;
} else if (t_1 <= 2e-239) {
tmp = (y + t) / (z / x);
} else if (t_1 <= 2e+283) {
tmp = t_2;
} else {
tmp = (x * (y - (z * t))) / z;
}
return tmp;
}
public static double code(double x, double y, double z, double t) {
double t_1 = (y / z) - (t / (1.0 - z));
double t_2 = x * t_1;
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = (x * y) / z;
} else if (t_1 <= -1e-300) {
tmp = t_2;
} else if (t_1 <= 2e-239) {
tmp = (y + t) / (z / x);
} else if (t_1 <= 2e+283) {
tmp = t_2;
} else {
tmp = (x * (y - (z * t))) / z;
}
return tmp;
}
def code(x, y, z, t): t_1 = (y / z) - (t / (1.0 - z)) t_2 = x * t_1 tmp = 0 if t_1 <= -math.inf: tmp = (x * y) / z elif t_1 <= -1e-300: tmp = t_2 elif t_1 <= 2e-239: tmp = (y + t) / (z / x) elif t_1 <= 2e+283: tmp = t_2 else: tmp = (x * (y - (z * t))) / z return tmp
function code(x, y, z, t) t_1 = Float64(Float64(y / z) - Float64(t / Float64(1.0 - z))) t_2 = Float64(x * t_1) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(Float64(x * y) / z); elseif (t_1 <= -1e-300) tmp = t_2; elseif (t_1 <= 2e-239) tmp = Float64(Float64(y + t) / Float64(z / x)); elseif (t_1 <= 2e+283) tmp = t_2; else tmp = Float64(Float64(x * Float64(y - Float64(z * t))) / z); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (y / z) - (t / (1.0 - z)); t_2 = x * t_1; tmp = 0.0; if (t_1 <= -Inf) tmp = (x * y) / z; elseif (t_1 <= -1e-300) tmp = t_2; elseif (t_1 <= 2e-239) tmp = (y + t) / (z / x); elseif (t_1 <= 2e+283) tmp = t_2; else tmp = (x * (y - (z * t))) / z; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y / z), $MachinePrecision] - N[(t / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * t$95$1), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$1, -1e-300], t$95$2, If[LessEqual[t$95$1, 2e-239], N[(N[(y + t), $MachinePrecision] / N[(z / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+283], t$95$2, N[(N[(x * N[(y - N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{z} - \frac{t}{1 - z}\\
t_2 := x \cdot t\_1\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-300}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{-239}:\\
\;\;\;\;\frac{y + t}{\frac{z}{x}}\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+283}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot \left(y - z \cdot t\right)}{z}\\
\end{array}
\end{array}
if (-.f64 (/.f64 y z) (/.f64 t (-.f64 #s(literal 1 binary64) z))) < -inf.0Initial program 52.7%
Taylor expanded in y around inf 99.8%
if -inf.0 < (-.f64 (/.f64 y z) (/.f64 t (-.f64 #s(literal 1 binary64) z))) < -1.00000000000000003e-300 or 2.0000000000000002e-239 < (-.f64 (/.f64 y z) (/.f64 t (-.f64 #s(literal 1 binary64) z))) < 1.99999999999999991e283Initial program 99.8%
if -1.00000000000000003e-300 < (-.f64 (/.f64 y z) (/.f64 t (-.f64 #s(literal 1 binary64) z))) < 2.0000000000000002e-239Initial program 77.6%
Taylor expanded in z around inf 99.5%
*-commutative99.5%
associate-/l*99.8%
cancel-sign-sub-inv99.8%
metadata-eval99.8%
*-lft-identity99.8%
+-commutative99.8%
Simplified99.8%
clear-num99.7%
un-div-inv99.9%
+-commutative99.9%
Applied egg-rr99.9%
if 1.99999999999999991e283 < (-.f64 (/.f64 y z) (/.f64 t (-.f64 #s(literal 1 binary64) z))) Initial program 62.6%
Taylor expanded in z around 0 62.6%
mul-1-neg62.6%
unsub-neg62.6%
Simplified62.6%
associate-*r/99.9%
*-commutative99.9%
Applied egg-rr99.9%
Final simplification99.8%
(FPCore (x y z t)
:precision binary64
(if (or (<= z -240000.0)
(and (not (<= z -2.1e-297)) (or (<= z 1.35e-199) (not (<= z 75.0)))))
(* t (/ x z))
(* x (- t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -240000.0) || (!(z <= -2.1e-297) && ((z <= 1.35e-199) || !(z <= 75.0)))) {
tmp = t * (x / z);
} else {
tmp = x * -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 <= (-240000.0d0)) .or. (.not. (z <= (-2.1d-297))) .and. (z <= 1.35d-199) .or. (.not. (z <= 75.0d0))) then
tmp = t * (x / z)
else
tmp = x * -t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -240000.0) || (!(z <= -2.1e-297) && ((z <= 1.35e-199) || !(z <= 75.0)))) {
tmp = t * (x / z);
} else {
tmp = x * -t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -240000.0) or (not (z <= -2.1e-297) and ((z <= 1.35e-199) or not (z <= 75.0))): tmp = t * (x / z) else: tmp = x * -t return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -240000.0) || (!(z <= -2.1e-297) && ((z <= 1.35e-199) || !(z <= 75.0)))) tmp = Float64(t * Float64(x / z)); else tmp = Float64(x * Float64(-t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -240000.0) || (~((z <= -2.1e-297)) && ((z <= 1.35e-199) || ~((z <= 75.0))))) tmp = t * (x / z); else tmp = x * -t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -240000.0], And[N[Not[LessEqual[z, -2.1e-297]], $MachinePrecision], Or[LessEqual[z, 1.35e-199], N[Not[LessEqual[z, 75.0]], $MachinePrecision]]]], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], N[(x * (-t)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -240000 \lor \neg \left(z \leq -2.1 \cdot 10^{-297}\right) \land \left(z \leq 1.35 \cdot 10^{-199} \lor \neg \left(z \leq 75\right)\right):\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(-t\right)\\
\end{array}
\end{array}
if z < -2.4e5 or -2.10000000000000013e-297 < z < 1.34999999999999995e-199 or 75 < z Initial program 92.9%
Taylor expanded in y around 0 44.8%
mul-1-neg44.8%
distribute-neg-frac244.8%
neg-sub044.8%
associate--r-44.8%
metadata-eval44.8%
Simplified44.8%
Taylor expanded in z around inf 45.3%
associate-/l*45.9%
Simplified45.9%
if -2.4e5 < z < -2.10000000000000013e-297 or 1.34999999999999995e-199 < z < 75Initial program 89.9%
Taylor expanded in y around 0 37.8%
mul-1-neg37.8%
distribute-neg-frac237.8%
neg-sub037.8%
associate--r-37.8%
metadata-eval37.8%
Simplified37.8%
Taylor expanded in z around 0 37.4%
mul-1-neg37.4%
Simplified37.4%
Final simplification41.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (/ t z))) (t_2 (* x (- t))))
(if (<= z -240000.0)
t_1
(if (<= z -5e-297)
t_2
(if (<= z 4.4e-200) (* t (/ x z)) (if (<= z 75.0) t_2 t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (t / z);
double t_2 = x * -t;
double tmp;
if (z <= -240000.0) {
tmp = t_1;
} else if (z <= -5e-297) {
tmp = t_2;
} else if (z <= 4.4e-200) {
tmp = t * (x / z);
} else if (z <= 75.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 = x * -t
if (z <= (-240000.0d0)) then
tmp = t_1
else if (z <= (-5d-297)) then
tmp = t_2
else if (z <= 4.4d-200) then
tmp = t * (x / z)
else if (z <= 75.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 = x * -t;
double tmp;
if (z <= -240000.0) {
tmp = t_1;
} else if (z <= -5e-297) {
tmp = t_2;
} else if (z <= 4.4e-200) {
tmp = t * (x / z);
} else if (z <= 75.0) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (t / z) t_2 = x * -t tmp = 0 if z <= -240000.0: tmp = t_1 elif z <= -5e-297: tmp = t_2 elif z <= 4.4e-200: tmp = t * (x / z) elif z <= 75.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(x * Float64(-t)) tmp = 0.0 if (z <= -240000.0) tmp = t_1; elseif (z <= -5e-297) tmp = t_2; elseif (z <= 4.4e-200) tmp = Float64(t * Float64(x / z)); elseif (z <= 75.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 = x * -t; tmp = 0.0; if (z <= -240000.0) tmp = t_1; elseif (z <= -5e-297) tmp = t_2; elseif (z <= 4.4e-200) tmp = t * (x / z); elseif (z <= 75.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[(x * (-t)), $MachinePrecision]}, If[LessEqual[z, -240000.0], t$95$1, If[LessEqual[z, -5e-297], t$95$2, If[LessEqual[z, 4.4e-200], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 75.0], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{t}{z}\\
t_2 := x \cdot \left(-t\right)\\
\mathbf{if}\;z \leq -240000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -5 \cdot 10^{-297}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 4.4 \cdot 10^{-200}:\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{elif}\;z \leq 75:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.4e5 or 75 < z Initial program 95.5%
Taylor expanded in y around 0 52.7%
mul-1-neg52.7%
distribute-neg-frac252.7%
neg-sub052.7%
associate--r-52.7%
metadata-eval52.7%
Simplified52.7%
Taylor expanded in z around inf 52.0%
if -2.4e5 < z < -5e-297 or 4.40000000000000027e-200 < z < 75Initial program 89.9%
Taylor expanded in y around 0 37.8%
mul-1-neg37.8%
distribute-neg-frac237.8%
neg-sub037.8%
associate--r-37.8%
metadata-eval37.8%
Simplified37.8%
Taylor expanded in z around 0 37.4%
mul-1-neg37.4%
Simplified37.4%
if -5e-297 < z < 4.40000000000000027e-200Initial program 82.4%
Taylor expanded in y around 0 12.6%
mul-1-neg12.6%
distribute-neg-frac212.6%
neg-sub012.6%
associate--r-12.6%
metadata-eval12.6%
Simplified12.6%
Taylor expanded in z around inf 25.2%
associate-/l*32.2%
Simplified32.2%
Final simplification43.1%
(FPCore (x y z t) :precision binary64 (if (or (<= z -240000.0) (not (<= z 1.0))) (* x (+ (/ y z) (/ t z))) (/ (* x (- y (* z t))) z)))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -240000.0) || !(z <= 1.0)) {
tmp = x * ((y / z) + (t / z));
} else {
tmp = (x * (y - (z * 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 <= (-240000.0d0)) .or. (.not. (z <= 1.0d0))) then
tmp = x * ((y / z) + (t / z))
else
tmp = (x * (y - (z * t))) / z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -240000.0) || !(z <= 1.0)) {
tmp = x * ((y / z) + (t / z));
} else {
tmp = (x * (y - (z * t))) / z;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -240000.0) or not (z <= 1.0): tmp = x * ((y / z) + (t / z)) else: tmp = (x * (y - (z * t))) / z return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -240000.0) || !(z <= 1.0)) tmp = Float64(x * Float64(Float64(y / z) + Float64(t / z))); else tmp = Float64(Float64(x * Float64(y - Float64(z * t))) / z); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -240000.0) || ~((z <= 1.0))) tmp = x * ((y / z) + (t / z)); else tmp = (x * (y - (z * t))) / z; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -240000.0], N[Not[LessEqual[z, 1.0]], $MachinePrecision]], N[(x * N[(N[(y / z), $MachinePrecision] + N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(y - N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -240000 \lor \neg \left(z \leq 1\right):\\
\;\;\;\;x \cdot \left(\frac{y}{z} + \frac{t}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot \left(y - z \cdot t\right)}{z}\\
\end{array}
\end{array}
if z < -2.4e5 or 1 < z Initial program 95.5%
Taylor expanded in z around inf 94.8%
associate-*r/94.8%
neg-mul-194.8%
Simplified94.8%
if -2.4e5 < z < 1Initial program 88.5%
Taylor expanded in z around 0 87.9%
mul-1-neg87.9%
unsub-neg87.9%
Simplified87.9%
associate-*r/94.5%
*-commutative94.5%
Applied egg-rr94.5%
Final simplification94.6%
(FPCore (x y z t) :precision binary64 (if (<= z -240000.0) (/ (+ y t) (/ z x)) (if (<= z 1.0) (/ (* x (- y (* z t))) z) (* (+ y t) (/ x z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -240000.0) {
tmp = (y + t) / (z / x);
} else if (z <= 1.0) {
tmp = (x * (y - (z * t))) / z;
} else {
tmp = (y + t) * (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 <= (-240000.0d0)) then
tmp = (y + t) / (z / x)
else if (z <= 1.0d0) then
tmp = (x * (y - (z * t))) / z
else
tmp = (y + t) * (x / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -240000.0) {
tmp = (y + t) / (z / x);
} else if (z <= 1.0) {
tmp = (x * (y - (z * t))) / z;
} else {
tmp = (y + t) * (x / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -240000.0: tmp = (y + t) / (z / x) elif z <= 1.0: tmp = (x * (y - (z * t))) / z else: tmp = (y + t) * (x / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -240000.0) tmp = Float64(Float64(y + t) / Float64(z / x)); elseif (z <= 1.0) tmp = Float64(Float64(x * Float64(y - Float64(z * t))) / z); else tmp = Float64(Float64(y + t) * Float64(x / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -240000.0) tmp = (y + t) / (z / x); elseif (z <= 1.0) tmp = (x * (y - (z * t))) / z; else tmp = (y + t) * (x / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -240000.0], N[(N[(y + t), $MachinePrecision] / N[(z / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.0], N[(N[(x * N[(y - N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], N[(N[(y + t), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -240000:\\
\;\;\;\;\frac{y + t}{\frac{z}{x}}\\
\mathbf{elif}\;z \leq 1:\\
\;\;\;\;\frac{x \cdot \left(y - z \cdot t\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;\left(y + t\right) \cdot \frac{x}{z}\\
\end{array}
\end{array}
if z < -2.4e5Initial program 96.0%
Taylor expanded in z around inf 81.2%
*-commutative81.2%
associate-/l*85.0%
cancel-sign-sub-inv85.0%
metadata-eval85.0%
*-lft-identity85.0%
+-commutative85.0%
Simplified85.0%
clear-num85.0%
un-div-inv85.1%
+-commutative85.1%
Applied egg-rr85.1%
if -2.4e5 < z < 1Initial program 88.5%
Taylor expanded in z around 0 87.9%
mul-1-neg87.9%
unsub-neg87.9%
Simplified87.9%
associate-*r/94.5%
*-commutative94.5%
Applied egg-rr94.5%
if 1 < z Initial program 95.1%
Taylor expanded in z around inf 87.2%
*-commutative87.2%
associate-/l*90.0%
cancel-sign-sub-inv90.0%
metadata-eval90.0%
*-lft-identity90.0%
+-commutative90.0%
Simplified90.0%
Final simplification91.6%
(FPCore (x y z t) :precision binary64 (if (<= x 3.2e+69) (- (/ (* x y) z) (/ (* x t) (- 1.0 z))) (* x (- (/ y z) (/ t (- 1.0 z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= 3.2e+69) {
tmp = ((x * y) / z) - ((x * t) / (1.0 - z));
} else {
tmp = x * ((y / z) - (t / (1.0 - 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 (x <= 3.2d+69) then
tmp = ((x * y) / z) - ((x * t) / (1.0d0 - z))
else
tmp = x * ((y / z) - (t / (1.0d0 - z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= 3.2e+69) {
tmp = ((x * y) / z) - ((x * t) / (1.0 - z));
} else {
tmp = x * ((y / z) - (t / (1.0 - z)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= 3.2e+69: tmp = ((x * y) / z) - ((x * t) / (1.0 - z)) else: tmp = x * ((y / z) - (t / (1.0 - z))) return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= 3.2e+69) tmp = Float64(Float64(Float64(x * y) / z) - Float64(Float64(x * t) / Float64(1.0 - z))); else tmp = Float64(x * Float64(Float64(y / z) - Float64(t / Float64(1.0 - z)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= 3.2e+69) tmp = ((x * y) / z) - ((x * t) / (1.0 - z)); else tmp = x * ((y / z) - (t / (1.0 - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, 3.2e+69], N[(N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision] - N[(N[(x * t), $MachinePrecision] / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(y / z), $MachinePrecision] - N[(t / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 3.2 \cdot 10^{+69}:\\
\;\;\;\;\frac{x \cdot y}{z} - \frac{x \cdot t}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right)\\
\end{array}
\end{array}
if x < 3.19999999999999985e69Initial program 89.9%
clear-num89.8%
frac-sub66.4%
*-un-lft-identity66.4%
Applied egg-rr66.4%
div-sub61.0%
times-frac66.7%
*-inverses85.4%
*-lft-identity85.4%
remove-double-neg85.4%
distribute-frac-neg85.4%
*-rgt-identity85.4%
distribute-lft-neg-in85.4%
cancel-sign-sub85.4%
*-commutative85.4%
associate-/r*89.8%
*-inverses89.8%
*-rgt-identity89.8%
distribute-frac-neg89.8%
distribute-neg-frac289.8%
neg-sub089.8%
associate--r-89.8%
metadata-eval89.8%
Simplified89.8%
clear-num89.9%
distribute-lft-in88.4%
associate-*r/90.4%
associate-*r/90.8%
+-commutative90.8%
Applied egg-rr90.8%
if 3.19999999999999985e69 < x Initial program 98.1%
Final simplification92.2%
(FPCore (x y z t) :precision binary64 (if (or (<= z -240000.0) (not (<= z 5.7e+15))) (* (+ y t) (/ x z)) (* x (- (/ y z) t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -240000.0) || !(z <= 5.7e+15)) {
tmp = (y + t) * (x / 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 <= (-240000.0d0)) .or. (.not. (z <= 5.7d+15))) then
tmp = (y + t) * (x / 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 <= -240000.0) || !(z <= 5.7e+15)) {
tmp = (y + t) * (x / z);
} else {
tmp = x * ((y / z) - t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -240000.0) or not (z <= 5.7e+15): tmp = (y + t) * (x / z) else: tmp = x * ((y / z) - t) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -240000.0) || !(z <= 5.7e+15)) tmp = Float64(Float64(y + t) * Float64(x / 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 <= -240000.0) || ~((z <= 5.7e+15))) tmp = (y + t) * (x / z); else tmp = x * ((y / z) - t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -240000.0], N[Not[LessEqual[z, 5.7e+15]], $MachinePrecision]], N[(N[(y + t), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(y / z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -240000 \lor \neg \left(z \leq 5.7 \cdot 10^{+15}\right):\\
\;\;\;\;\left(y + t\right) \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\
\end{array}
\end{array}
if z < -2.4e5 or 5.7e15 < z Initial program 95.3%
Taylor expanded in z around inf 83.8%
*-commutative83.8%
associate-/l*87.2%
cancel-sign-sub-inv87.2%
metadata-eval87.2%
*-lft-identity87.2%
+-commutative87.2%
Simplified87.2%
if -2.4e5 < z < 5.7e15Initial program 88.8%
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 simplification87.9%
(FPCore (x y z t) :precision binary64 (if (<= z -1.25e+60) (* x (/ y z)) (if (<= z 2.75e+35) (* x (- (/ y z) t)) (* x (/ t z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.25e+60) {
tmp = x * (y / z);
} else if (z <= 2.75e+35) {
tmp = x * ((y / z) - t);
} 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 (z <= (-1.25d+60)) then
tmp = x * (y / z)
else if (z <= 2.75d+35) then
tmp = x * ((y / z) - t)
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 (z <= -1.25e+60) {
tmp = x * (y / z);
} else if (z <= 2.75e+35) {
tmp = x * ((y / z) - t);
} else {
tmp = x * (t / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -1.25e+60: tmp = x * (y / z) elif z <= 2.75e+35: tmp = x * ((y / z) - t) else: tmp = x * (t / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -1.25e+60) tmp = Float64(x * Float64(y / z)); elseif (z <= 2.75e+35) tmp = Float64(x * Float64(Float64(y / z) - t)); else tmp = Float64(x * Float64(t / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -1.25e+60) tmp = x * (y / z); elseif (z <= 2.75e+35) tmp = x * ((y / z) - t); else tmp = x * (t / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -1.25e+60], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.75e+35], N[(x * N[(N[(y / z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.25 \cdot 10^{+60}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{elif}\;z \leq 2.75 \cdot 10^{+35}:\\
\;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{t}{z}\\
\end{array}
\end{array}
if z < -1.24999999999999994e60Initial program 94.6%
Taylor expanded in y around inf 63.2%
associate-*r/77.2%
Simplified77.2%
if -1.24999999999999994e60 < z < 2.75000000000000001e35Initial program 89.9%
Taylor expanded in z around 0 85.6%
mul-1-neg85.6%
unsub-neg85.6%
div-sub85.6%
associate-/l*85.7%
*-inverses85.7%
*-rgt-identity85.7%
Simplified85.7%
if 2.75000000000000001e35 < z Initial program 94.3%
Taylor expanded in y around 0 70.5%
mul-1-neg70.5%
distribute-neg-frac270.5%
neg-sub070.5%
associate--r-70.5%
metadata-eval70.5%
Simplified70.5%
Taylor expanded in z around inf 70.5%
Final simplification81.4%
(FPCore (x y z t) :precision binary64 (if (<= z -240000.0) (/ (+ y t) (/ z x)) (if (<= z 5.7e+15) (* x (- (/ y z) t)) (* (+ y t) (/ x z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -240000.0) {
tmp = (y + t) / (z / x);
} else if (z <= 5.7e+15) {
tmp = x * ((y / z) - t);
} else {
tmp = (y + t) * (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 <= (-240000.0d0)) then
tmp = (y + t) / (z / x)
else if (z <= 5.7d+15) then
tmp = x * ((y / z) - t)
else
tmp = (y + t) * (x / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -240000.0) {
tmp = (y + t) / (z / x);
} else if (z <= 5.7e+15) {
tmp = x * ((y / z) - t);
} else {
tmp = (y + t) * (x / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -240000.0: tmp = (y + t) / (z / x) elif z <= 5.7e+15: tmp = x * ((y / z) - t) else: tmp = (y + t) * (x / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -240000.0) tmp = Float64(Float64(y + t) / Float64(z / x)); elseif (z <= 5.7e+15) tmp = Float64(x * Float64(Float64(y / z) - t)); else tmp = Float64(Float64(y + t) * Float64(x / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -240000.0) tmp = (y + t) / (z / x); elseif (z <= 5.7e+15) tmp = x * ((y / z) - t); else tmp = (y + t) * (x / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -240000.0], N[(N[(y + t), $MachinePrecision] / N[(z / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.7e+15], N[(x * N[(N[(y / z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision], N[(N[(y + t), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -240000:\\
\;\;\;\;\frac{y + t}{\frac{z}{x}}\\
\mathbf{elif}\;z \leq 5.7 \cdot 10^{+15}:\\
\;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\
\mathbf{else}:\\
\;\;\;\;\left(y + t\right) \cdot \frac{x}{z}\\
\end{array}
\end{array}
if z < -2.4e5Initial program 96.0%
Taylor expanded in z around inf 81.2%
*-commutative81.2%
associate-/l*85.0%
cancel-sign-sub-inv85.0%
metadata-eval85.0%
*-lft-identity85.0%
+-commutative85.0%
Simplified85.0%
clear-num85.0%
un-div-inv85.1%
+-commutative85.1%
Applied egg-rr85.1%
if -2.4e5 < z < 5.7e15Initial program 88.8%
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%
if 5.7e15 < z Initial program 94.6%
Taylor expanded in z around inf 86.1%
*-commutative86.1%
associate-/l*89.2%
cancel-sign-sub-inv89.2%
metadata-eval89.2%
*-lft-identity89.2%
+-commutative89.2%
Simplified89.2%
Final simplification87.9%
(FPCore (x y z t) :precision binary64 (if (<= t -6.2e+123) (* x (/ t z)) (if (<= t 1.15e+114) (* x (/ y z)) (* x (- t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -6.2e+123) {
tmp = x * (t / z);
} else if (t <= 1.15e+114) {
tmp = x * (y / z);
} else {
tmp = x * -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 (t <= (-6.2d+123)) then
tmp = x * (t / z)
else if (t <= 1.15d+114) then
tmp = x * (y / z)
else
tmp = x * -t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -6.2e+123) {
tmp = x * (t / z);
} else if (t <= 1.15e+114) {
tmp = x * (y / z);
} else {
tmp = x * -t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -6.2e+123: tmp = x * (t / z) elif t <= 1.15e+114: tmp = x * (y / z) else: tmp = x * -t return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -6.2e+123) tmp = Float64(x * Float64(t / z)); elseif (t <= 1.15e+114) tmp = Float64(x * Float64(y / z)); else tmp = Float64(x * Float64(-t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -6.2e+123) tmp = x * (t / z); elseif (t <= 1.15e+114) tmp = x * (y / z); else tmp = x * -t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -6.2e+123], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.15e+114], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], N[(x * (-t)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.2 \cdot 10^{+123}:\\
\;\;\;\;x \cdot \frac{t}{z}\\
\mathbf{elif}\;t \leq 1.15 \cdot 10^{+114}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(-t\right)\\
\end{array}
\end{array}
if t < -6.20000000000000013e123Initial program 89.5%
Taylor expanded in y around 0 67.9%
mul-1-neg67.9%
distribute-neg-frac267.9%
neg-sub067.9%
associate--r-67.9%
metadata-eval67.9%
Simplified67.9%
Taylor expanded in z around inf 59.2%
if -6.20000000000000013e123 < t < 1.15e114Initial program 91.2%
Taylor expanded in y around inf 75.3%
associate-*r/77.3%
Simplified77.3%
if 1.15e114 < t Initial program 93.9%
Taylor expanded in y around 0 72.2%
mul-1-neg72.2%
distribute-neg-frac272.2%
neg-sub072.2%
associate--r-72.2%
metadata-eval72.2%
Simplified72.2%
Taylor expanded in z around 0 48.1%
mul-1-neg48.1%
Simplified48.1%
Final simplification69.3%
(FPCore (x y z t) :precision binary64 (if (<= t -1e+126) (* x (/ t z)) (if (<= t 9.5e+112) (/ x (/ z y)) (* x (- t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -1e+126) {
tmp = x * (t / z);
} else if (t <= 9.5e+112) {
tmp = x / (z / y);
} else {
tmp = x * -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 (t <= (-1d+126)) then
tmp = x * (t / z)
else if (t <= 9.5d+112) then
tmp = x / (z / y)
else
tmp = x * -t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -1e+126) {
tmp = x * (t / z);
} else if (t <= 9.5e+112) {
tmp = x / (z / y);
} else {
tmp = x * -t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -1e+126: tmp = x * (t / z) elif t <= 9.5e+112: tmp = x / (z / y) else: tmp = x * -t return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -1e+126) tmp = Float64(x * Float64(t / z)); elseif (t <= 9.5e+112) tmp = Float64(x / Float64(z / y)); else tmp = Float64(x * Float64(-t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -1e+126) tmp = x * (t / z); elseif (t <= 9.5e+112) tmp = x / (z / y); else tmp = x * -t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -1e+126], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9.5e+112], N[(x / N[(z / y), $MachinePrecision]), $MachinePrecision], N[(x * (-t)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1 \cdot 10^{+126}:\\
\;\;\;\;x \cdot \frac{t}{z}\\
\mathbf{elif}\;t \leq 9.5 \cdot 10^{+112}:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(-t\right)\\
\end{array}
\end{array}
if t < -9.99999999999999925e125Initial program 89.5%
Taylor expanded in y around 0 67.9%
mul-1-neg67.9%
distribute-neg-frac267.9%
neg-sub067.9%
associate--r-67.9%
metadata-eval67.9%
Simplified67.9%
Taylor expanded in z around inf 59.2%
if -9.99999999999999925e125 < t < 9.5000000000000008e112Initial program 91.2%
Taylor expanded in y around inf 75.3%
associate-*r/77.3%
Simplified77.3%
clear-num77.2%
un-div-inv77.7%
Applied egg-rr77.7%
if 9.5000000000000008e112 < t Initial program 93.9%
Taylor expanded in y around 0 72.2%
mul-1-neg72.2%
distribute-neg-frac272.2%
neg-sub072.2%
associate--r-72.2%
metadata-eval72.2%
Simplified72.2%
Taylor expanded in z around 0 48.1%
mul-1-neg48.1%
Simplified48.1%
Final simplification69.6%
(FPCore (x y z t) :precision binary64 (* x (- t)))
double code(double x, double y, double z, double t) {
return x * -t;
}
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 * -t
end function
public static double code(double x, double y, double z, double t) {
return x * -t;
}
def code(x, y, z, t): return x * -t
function code(x, y, z, t) return Float64(x * Float64(-t)) end
function tmp = code(x, y, z, t) tmp = x * -t; end
code[x_, y_, z_, t_] := N[(x * (-t)), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \left(-t\right)
\end{array}
Initial program 91.5%
Taylor expanded in y around 0 41.5%
mul-1-neg41.5%
distribute-neg-frac241.5%
neg-sub041.5%
associate--r-41.5%
metadata-eval41.5%
Simplified41.5%
Taylor expanded in z around 0 23.0%
mul-1-neg23.0%
Simplified23.0%
Final simplification23.0%
(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 2024059
(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)))))