
(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)))))
(if (<= t_1 2e+279)
(* t_1 x)
(/ (* x (fma y (- 1.0 z) (* z (- t)))) (* z (- 1.0 z))))))
double code(double x, double y, double z, double t) {
double t_1 = (y / z) - (t / (1.0 - z));
double tmp;
if (t_1 <= 2e+279) {
tmp = t_1 * x;
} else {
tmp = (x * fma(y, (1.0 - z), (z * -t))) / (z * (1.0 - z));
}
return tmp;
}
function code(x, y, z, t) t_1 = Float64(Float64(y / z) - Float64(t / Float64(1.0 - z))) tmp = 0.0 if (t_1 <= 2e+279) tmp = Float64(t_1 * x); else tmp = Float64(Float64(x * fma(y, Float64(1.0 - z), Float64(z * Float64(-t)))) / Float64(z * Float64(1.0 - z))); end return 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]}, If[LessEqual[t$95$1, 2e+279], N[(t$95$1 * x), $MachinePrecision], N[(N[(x * N[(y * N[(1.0 - z), $MachinePrecision] + N[(z * (-t)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{z} - \frac{t}{1 - z}\\
\mathbf{if}\;t_1 \leq 2 \cdot 10^{+279}:\\
\;\;\;\;t_1 \cdot x\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot \mathsf{fma}\left(y, 1 - z, z \cdot \left(-t\right)\right)}{z \cdot \left(1 - z\right)}\\
\end{array}
\end{array}
if (-.f64 (/.f64 y z) (/.f64 t (-.f64 1 z))) < 2.00000000000000012e279Initial program 97.1%
if 2.00000000000000012e279 < (-.f64 (/.f64 y z) (/.f64 t (-.f64 1 z))) Initial program 65.4%
*-commutative65.4%
frac-sub65.4%
associate-*l/99.9%
cancel-sign-sub-inv99.9%
fma-def99.9%
Applied egg-rr99.9%
Final simplification97.3%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (- (/ y z) (/ t (- 1.0 z))))) (if (<= t_1 4e+296) (* t_1 x) (/ (* y x) z))))
double code(double x, double y, double z, double t) {
double t_1 = (y / z) - (t / (1.0 - z));
double tmp;
if (t_1 <= 4e+296) {
tmp = t_1 * x;
} 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) :: t_1
real(8) :: tmp
t_1 = (y / z) - (t / (1.0d0 - z))
if (t_1 <= 4d+296) then
tmp = t_1 * x
else
tmp = (y * x) / z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (y / z) - (t / (1.0 - z));
double tmp;
if (t_1 <= 4e+296) {
tmp = t_1 * x;
} else {
tmp = (y * x) / z;
}
return tmp;
}
def code(x, y, z, t): t_1 = (y / z) - (t / (1.0 - z)) tmp = 0 if t_1 <= 4e+296: 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(1.0 - z))) tmp = 0.0 if (t_1 <= 4e+296) 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 / (1.0 - z)); tmp = 0.0; if (t_1 <= 4e+296) 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[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 4e+296], 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}{1 - z}\\
\mathbf{if}\;t_1 \leq 4 \cdot 10^{+296}:\\
\;\;\;\;t_1 \cdot x\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot x}{z}\\
\end{array}
\end{array}
if (-.f64 (/.f64 y z) (/.f64 t (-.f64 1 z))) < 3.99999999999999993e296Initial program 97.1%
if 3.99999999999999993e296 < (-.f64 (/.f64 y z) (/.f64 t (-.f64 1 z))) Initial program 58.9%
Taylor expanded in y around inf 99.9%
Final simplification97.3%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (/ t z))))
(if (<= t -8.5e+118)
t_1
(if (<= t 3.4e+65)
(* y (/ x z))
(if (or (<= t 5e+171) (not (<= t 2.5e+237))) t_1 (* t (- x)))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (t / z);
double tmp;
if (t <= -8.5e+118) {
tmp = t_1;
} else if (t <= 3.4e+65) {
tmp = y * (x / z);
} else if ((t <= 5e+171) || !(t <= 2.5e+237)) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = x * (t / z)
if (t <= (-8.5d+118)) then
tmp = t_1
else if (t <= 3.4d+65) then
tmp = y * (x / z)
else if ((t <= 5d+171) .or. (.not. (t <= 2.5d+237))) then
tmp = t_1
else
tmp = t * -x
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 tmp;
if (t <= -8.5e+118) {
tmp = t_1;
} else if (t <= 3.4e+65) {
tmp = y * (x / z);
} else if ((t <= 5e+171) || !(t <= 2.5e+237)) {
tmp = t_1;
} else {
tmp = t * -x;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (t / z) tmp = 0 if t <= -8.5e+118: tmp = t_1 elif t <= 3.4e+65: tmp = y * (x / z) elif (t <= 5e+171) or not (t <= 2.5e+237): tmp = t_1 else: tmp = t * -x return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(t / z)) tmp = 0.0 if (t <= -8.5e+118) tmp = t_1; elseif (t <= 3.4e+65) tmp = Float64(y * Float64(x / z)); elseif ((t <= 5e+171) || !(t <= 2.5e+237)) tmp = t_1; else tmp = Float64(t * Float64(-x)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (t / z); tmp = 0.0; if (t <= -8.5e+118) tmp = t_1; elseif (t <= 3.4e+65) tmp = y * (x / z); elseif ((t <= 5e+171) || ~((t <= 2.5e+237))) tmp = t_1; else tmp = t * -x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -8.5e+118], t$95$1, If[LessEqual[t, 3.4e+65], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, 5e+171], N[Not[LessEqual[t, 2.5e+237]], $MachinePrecision]], t$95$1, N[(t * (-x)), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{t}{z}\\
\mathbf{if}\;t \leq -8.5 \cdot 10^{+118}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 3.4 \cdot 10^{+65}:\\
\;\;\;\;y \cdot \frac{x}{z}\\
\mathbf{elif}\;t \leq 5 \cdot 10^{+171} \lor \neg \left(t \leq 2.5 \cdot 10^{+237}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(-x\right)\\
\end{array}
\end{array}
if t < -8.50000000000000033e118 or 3.3999999999999999e65 < t < 5.0000000000000004e171 or 2.5000000000000001e237 < t Initial program 96.5%
Taylor expanded in z around inf 61.8%
sub-neg61.8%
remove-double-neg61.8%
neg-mul-161.8%
distribute-neg-in61.8%
neg-mul-161.8%
sub-neg61.8%
distribute-lft-neg-in61.8%
distribute-neg-frac61.8%
associate-/l*52.1%
associate-/r/67.0%
distribute-lft-neg-in67.0%
Simplified67.0%
Taylor expanded in y around 0 60.1%
if -8.50000000000000033e118 < t < 3.3999999999999999e65Initial program 93.4%
frac-2neg93.4%
div-inv93.4%
fma-neg93.4%
distribute-neg-frac93.4%
Applied egg-rr93.4%
distribute-frac-neg93.4%
fma-neg93.4%
neg-mul-193.4%
associate-/r*93.4%
metadata-eval93.4%
Simplified93.4%
Taylor expanded in y around inf 71.8%
associate-*r/75.5%
Simplified75.5%
if 5.0000000000000004e171 < t < 2.5000000000000001e237Initial program 99.7%
Taylor expanded in y around 0 90.3%
mul-1-neg90.3%
associate-/l*90.5%
associate-/r/90.3%
distribute-rgt-neg-in90.3%
Simplified90.3%
Taylor expanded in z around 0 77.3%
mul-1-neg77.3%
*-commutative77.3%
distribute-rgt-neg-in77.3%
Simplified77.3%
Final simplification70.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (/ t z))))
(if (<= t -1.22e+110)
t_1
(if (<= t 1.75e+33)
(* (/ y z) x)
(if (or (<= t 4.5e+172) (not (<= t 7.5e+233))) t_1 (* t (- x)))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (t / z);
double tmp;
if (t <= -1.22e+110) {
tmp = t_1;
} else if (t <= 1.75e+33) {
tmp = (y / z) * x;
} else if ((t <= 4.5e+172) || !(t <= 7.5e+233)) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = x * (t / z)
if (t <= (-1.22d+110)) then
tmp = t_1
else if (t <= 1.75d+33) then
tmp = (y / z) * x
else if ((t <= 4.5d+172) .or. (.not. (t <= 7.5d+233))) then
tmp = t_1
else
tmp = t * -x
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 tmp;
if (t <= -1.22e+110) {
tmp = t_1;
} else if (t <= 1.75e+33) {
tmp = (y / z) * x;
} else if ((t <= 4.5e+172) || !(t <= 7.5e+233)) {
tmp = t_1;
} else {
tmp = t * -x;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (t / z) tmp = 0 if t <= -1.22e+110: tmp = t_1 elif t <= 1.75e+33: tmp = (y / z) * x elif (t <= 4.5e+172) or not (t <= 7.5e+233): tmp = t_1 else: tmp = t * -x return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(t / z)) tmp = 0.0 if (t <= -1.22e+110) tmp = t_1; elseif (t <= 1.75e+33) tmp = Float64(Float64(y / z) * x); elseif ((t <= 4.5e+172) || !(t <= 7.5e+233)) tmp = t_1; else tmp = Float64(t * Float64(-x)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (t / z); tmp = 0.0; if (t <= -1.22e+110) tmp = t_1; elseif (t <= 1.75e+33) tmp = (y / z) * x; elseif ((t <= 4.5e+172) || ~((t <= 7.5e+233))) tmp = t_1; else tmp = t * -x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.22e+110], t$95$1, If[LessEqual[t, 1.75e+33], N[(N[(y / z), $MachinePrecision] * x), $MachinePrecision], If[Or[LessEqual[t, 4.5e+172], N[Not[LessEqual[t, 7.5e+233]], $MachinePrecision]], t$95$1, N[(t * (-x)), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{t}{z}\\
\mathbf{if}\;t \leq -1.22 \cdot 10^{+110}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.75 \cdot 10^{+33}:\\
\;\;\;\;\frac{y}{z} \cdot x\\
\mathbf{elif}\;t \leq 4.5 \cdot 10^{+172} \lor \neg \left(t \leq 7.5 \cdot 10^{+233}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(-x\right)\\
\end{array}
\end{array}
if t < -1.22000000000000002e110 or 1.75000000000000005e33 < t < 4.5000000000000002e172 or 7.4999999999999997e233 < t Initial program 94.7%
Taylor expanded in z around inf 64.7%
sub-neg64.7%
remove-double-neg64.7%
neg-mul-164.7%
distribute-neg-in64.7%
neg-mul-164.7%
sub-neg64.7%
distribute-lft-neg-in64.7%
distribute-neg-frac64.7%
associate-/l*55.0%
associate-/r/67.4%
distribute-lft-neg-in67.4%
Simplified67.4%
Taylor expanded in y around 0 60.0%
if -1.22000000000000002e110 < t < 1.75000000000000005e33Initial program 94.4%
Taylor expanded in y around inf 72.2%
associate-*l/77.8%
Simplified77.8%
if 4.5000000000000002e172 < t < 7.4999999999999997e233Initial program 99.7%
Taylor expanded in y around 0 90.3%
mul-1-neg90.3%
associate-/l*90.5%
associate-/r/90.3%
distribute-rgt-neg-in90.3%
Simplified90.3%
Taylor expanded in z around 0 77.3%
mul-1-neg77.3%
*-commutative77.3%
distribute-rgt-neg-in77.3%
Simplified77.3%
Final simplification71.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ x (/ z t))))
(if (<= t -1.8e+108)
t_1
(if (<= t 5.8e+25)
(* (/ y z) x)
(if (or (<= t 2.8e+172) (not (<= t 7.5e+233))) t_1 (* t (- x)))))))
double code(double x, double y, double z, double t) {
double t_1 = x / (z / t);
double tmp;
if (t <= -1.8e+108) {
tmp = t_1;
} else if (t <= 5.8e+25) {
tmp = (y / z) * x;
} else if ((t <= 2.8e+172) || !(t <= 7.5e+233)) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = x / (z / t)
if (t <= (-1.8d+108)) then
tmp = t_1
else if (t <= 5.8d+25) then
tmp = (y / z) * x
else if ((t <= 2.8d+172) .or. (.not. (t <= 7.5d+233))) then
tmp = t_1
else
tmp = t * -x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x / (z / t);
double tmp;
if (t <= -1.8e+108) {
tmp = t_1;
} else if (t <= 5.8e+25) {
tmp = (y / z) * x;
} else if ((t <= 2.8e+172) || !(t <= 7.5e+233)) {
tmp = t_1;
} else {
tmp = t * -x;
}
return tmp;
}
def code(x, y, z, t): t_1 = x / (z / t) tmp = 0 if t <= -1.8e+108: tmp = t_1 elif t <= 5.8e+25: tmp = (y / z) * x elif (t <= 2.8e+172) or not (t <= 7.5e+233): tmp = t_1 else: tmp = t * -x return tmp
function code(x, y, z, t) t_1 = Float64(x / Float64(z / t)) tmp = 0.0 if (t <= -1.8e+108) tmp = t_1; elseif (t <= 5.8e+25) tmp = Float64(Float64(y / z) * x); elseif ((t <= 2.8e+172) || !(t <= 7.5e+233)) tmp = t_1; else tmp = Float64(t * Float64(-x)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x / (z / t); tmp = 0.0; if (t <= -1.8e+108) tmp = t_1; elseif (t <= 5.8e+25) tmp = (y / z) * x; elseif ((t <= 2.8e+172) || ~((t <= 7.5e+233))) tmp = t_1; else tmp = t * -x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(z / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.8e+108], t$95$1, If[LessEqual[t, 5.8e+25], N[(N[(y / z), $MachinePrecision] * x), $MachinePrecision], If[Or[LessEqual[t, 2.8e+172], N[Not[LessEqual[t, 7.5e+233]], $MachinePrecision]], t$95$1, N[(t * (-x)), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{\frac{z}{t}}\\
\mathbf{if}\;t \leq -1.8 \cdot 10^{+108}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 5.8 \cdot 10^{+25}:\\
\;\;\;\;\frac{y}{z} \cdot x\\
\mathbf{elif}\;t \leq 2.8 \cdot 10^{+172} \lor \neg \left(t \leq 7.5 \cdot 10^{+233}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(-x\right)\\
\end{array}
\end{array}
if t < -1.8e108 or 5.7999999999999998e25 < t < 2.8e172 or 7.4999999999999997e233 < t Initial program 94.7%
Taylor expanded in z around inf 64.7%
*-commutative64.7%
associate-/l*67.5%
neg-mul-167.5%
Simplified67.5%
Taylor expanded in y around 0 60.1%
if -1.8e108 < t < 5.7999999999999998e25Initial program 94.4%
Taylor expanded in y around inf 72.2%
associate-*l/77.8%
Simplified77.8%
if 2.8e172 < t < 7.4999999999999997e233Initial program 99.7%
Taylor expanded in y around 0 90.3%
mul-1-neg90.3%
associate-/l*90.5%
associate-/r/90.3%
distribute-rgt-neg-in90.3%
Simplified90.3%
Taylor expanded in z around 0 77.3%
mul-1-neg77.3%
*-commutative77.3%
distribute-rgt-neg-in77.3%
Simplified77.3%
Final simplification71.4%
(FPCore (x y z t)
:precision binary64
(if (<= t -9e+109)
(/ (* t x) z)
(if (<= t 3.3e+25)
(* (/ y z) x)
(if (or (<= t 1.55e+172) (not (<= t 9e+233)))
(/ x (/ z t))
(* t (- x))))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -9e+109) {
tmp = (t * x) / z;
} else if (t <= 3.3e+25) {
tmp = (y / z) * x;
} else if ((t <= 1.55e+172) || !(t <= 9e+233)) {
tmp = x / (z / t);
} 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 (t <= (-9d+109)) then
tmp = (t * x) / z
else if (t <= 3.3d+25) then
tmp = (y / z) * x
else if ((t <= 1.55d+172) .or. (.not. (t <= 9d+233))) then
tmp = x / (z / t)
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 (t <= -9e+109) {
tmp = (t * x) / z;
} else if (t <= 3.3e+25) {
tmp = (y / z) * x;
} else if ((t <= 1.55e+172) || !(t <= 9e+233)) {
tmp = x / (z / t);
} else {
tmp = t * -x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -9e+109: tmp = (t * x) / z elif t <= 3.3e+25: tmp = (y / z) * x elif (t <= 1.55e+172) or not (t <= 9e+233): tmp = x / (z / t) else: tmp = t * -x return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -9e+109) tmp = Float64(Float64(t * x) / z); elseif (t <= 3.3e+25) tmp = Float64(Float64(y / z) * x); elseif ((t <= 1.55e+172) || !(t <= 9e+233)) tmp = Float64(x / Float64(z / t)); else tmp = Float64(t * Float64(-x)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -9e+109) tmp = (t * x) / z; elseif (t <= 3.3e+25) tmp = (y / z) * x; elseif ((t <= 1.55e+172) || ~((t <= 9e+233))) tmp = x / (z / t); else tmp = t * -x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -9e+109], N[(N[(t * x), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t, 3.3e+25], N[(N[(y / z), $MachinePrecision] * x), $MachinePrecision], If[Or[LessEqual[t, 1.55e+172], N[Not[LessEqual[t, 9e+233]], $MachinePrecision]], N[(x / N[(z / t), $MachinePrecision]), $MachinePrecision], N[(t * (-x)), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -9 \cdot 10^{+109}:\\
\;\;\;\;\frac{t \cdot x}{z}\\
\mathbf{elif}\;t \leq 3.3 \cdot 10^{+25}:\\
\;\;\;\;\frac{y}{z} \cdot x\\
\mathbf{elif}\;t \leq 1.55 \cdot 10^{+172} \lor \neg \left(t \leq 9 \cdot 10^{+233}\right):\\
\;\;\;\;\frac{x}{\frac{z}{t}}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(-x\right)\\
\end{array}
\end{array}
if t < -8.9999999999999992e109Initial program 93.0%
Taylor expanded in y around 0 79.5%
mul-1-neg79.5%
associate-/l*62.6%
associate-/r/79.4%
distribute-rgt-neg-in79.4%
Simplified79.4%
Taylor expanded in z around inf 62.1%
if -8.9999999999999992e109 < t < 3.3000000000000001e25Initial program 94.4%
Taylor expanded in y around inf 72.2%
associate-*l/77.8%
Simplified77.8%
if 3.3000000000000001e25 < t < 1.54999999999999994e172 or 8.99999999999999998e233 < t Initial program 96.2%
Taylor expanded in z around inf 59.3%
*-commutative59.3%
associate-/l*68.2%
neg-mul-168.2%
Simplified68.2%
Taylor expanded in y around 0 58.5%
if 1.54999999999999994e172 < t < 8.99999999999999998e233Initial program 99.7%
Taylor expanded in y around 0 90.3%
mul-1-neg90.3%
associate-/l*90.5%
associate-/r/90.3%
distribute-rgt-neg-in90.3%
Simplified90.3%
Taylor expanded in z around 0 77.3%
mul-1-neg77.3%
*-commutative77.3%
distribute-rgt-neg-in77.3%
Simplified77.3%
Final simplification71.4%
(FPCore (x y z t)
:precision binary64
(if (<= z -2.6e+43)
(/ x (/ z t))
(if (<= z 1.0)
(* x (- (/ y z) t))
(if (<= z 4.5e+211) (* (/ y z) x) (/ (* t x) z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -2.6e+43) {
tmp = x / (z / t);
} else if (z <= 1.0) {
tmp = x * ((y / z) - t);
} else if (z <= 4.5e+211) {
tmp = (y / z) * x;
} else {
tmp = (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 <= (-2.6d+43)) then
tmp = x / (z / t)
else if (z <= 1.0d0) then
tmp = x * ((y / z) - t)
else if (z <= 4.5d+211) then
tmp = (y / z) * x
else
tmp = (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 <= -2.6e+43) {
tmp = x / (z / t);
} else if (z <= 1.0) {
tmp = x * ((y / z) - t);
} else if (z <= 4.5e+211) {
tmp = (y / z) * x;
} else {
tmp = (t * x) / z;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -2.6e+43: tmp = x / (z / t) elif z <= 1.0: tmp = x * ((y / z) - t) elif z <= 4.5e+211: tmp = (y / z) * x else: tmp = (t * x) / z return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -2.6e+43) tmp = Float64(x / Float64(z / t)); elseif (z <= 1.0) tmp = Float64(x * Float64(Float64(y / z) - t)); elseif (z <= 4.5e+211) tmp = Float64(Float64(y / z) * x); else tmp = Float64(Float64(t * x) / z); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -2.6e+43) tmp = x / (z / t); elseif (z <= 1.0) tmp = x * ((y / z) - t); elseif (z <= 4.5e+211) tmp = (y / z) * x; else tmp = (t * x) / z; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -2.6e+43], N[(x / N[(z / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.0], N[(x * N[(N[(y / z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.5e+211], N[(N[(y / z), $MachinePrecision] * x), $MachinePrecision], N[(N[(t * x), $MachinePrecision] / z), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.6 \cdot 10^{+43}:\\
\;\;\;\;\frac{x}{\frac{z}{t}}\\
\mathbf{elif}\;z \leq 1:\\
\;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\
\mathbf{elif}\;z \leq 4.5 \cdot 10^{+211}:\\
\;\;\;\;\frac{y}{z} \cdot x\\
\mathbf{else}:\\
\;\;\;\;\frac{t \cdot x}{z}\\
\end{array}
\end{array}
if z < -2.60000000000000021e43Initial program 96.2%
Taylor expanded in z around inf 85.6%
*-commutative85.6%
associate-/l*96.3%
neg-mul-196.3%
Simplified96.3%
Taylor expanded in y around 0 74.7%
if -2.60000000000000021e43 < z < 1Initial program 92.7%
Taylor expanded in z around 0 89.3%
associate-*l/88.6%
associate-*r*88.6%
neg-mul-188.6%
distribute-rgt-out89.4%
unsub-neg89.4%
Simplified89.4%
if 1 < z < 4.5e211Initial program 99.9%
Taylor expanded in y around inf 57.8%
associate-*l/65.7%
Simplified65.7%
if 4.5e211 < z Initial program 92.4%
Taylor expanded in y around 0 81.1%
mul-1-neg81.1%
associate-/l*54.9%
associate-/r/77.2%
distribute-rgt-neg-in77.2%
Simplified77.2%
Taylor expanded in z around inf 81.1%
Final simplification81.2%
(FPCore (x y z t) :precision binary64 (if (or (<= z -1.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 <= -1.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 <= (-1.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 <= -1.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 <= -1.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 <= -1.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 <= -1.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, -1.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 -1 \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 < -1 or 1 < z Initial program 97.0%
Taylor expanded in z around inf 87.4%
sub-neg87.4%
remove-double-neg87.4%
neg-mul-187.4%
distribute-neg-in87.4%
neg-mul-187.4%
sub-neg87.4%
distribute-lft-neg-in87.4%
distribute-neg-frac87.4%
associate-/l*83.1%
associate-/r/95.7%
distribute-lft-neg-in95.7%
Simplified95.7%
if -1 < z < 1Initial program 92.1%
Taylor expanded in z around 0 92.1%
associate-*l/90.7%
associate-*r*90.7%
neg-mul-190.7%
distribute-rgt-out91.5%
unsub-neg91.5%
Simplified91.5%
Final simplification93.7%
(FPCore (x y z t) :precision binary64 (if (<= z -1.1) (/ x (/ z (+ y t))) (if (<= z 1.0) (* x (- (/ y z) t)) (* x (/ (+ y t) z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.1) {
tmp = x / (z / (y + t));
} else if (z <= 1.0) {
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.1d0)) then
tmp = x / (z / (y + t))
else if (z <= 1.0d0) 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.1) {
tmp = x / (z / (y + t));
} else if (z <= 1.0) {
tmp = x * ((y / z) - t);
} else {
tmp = x * ((y + t) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -1.1: tmp = x / (z / (y + t)) elif z <= 1.0: 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.1) tmp = Float64(x / Float64(z / Float64(y + t))); elseif (z <= 1.0) 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.1) tmp = x / (z / (y + t)); elseif (z <= 1.0) 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.1], N[(x / N[(z / N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.0], 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.1:\\
\;\;\;\;\frac{x}{\frac{z}{y + t}}\\
\mathbf{elif}\;z \leq 1:\\
\;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y + t}{z}\\
\end{array}
\end{array}
if z < -1.1000000000000001Initial program 96.7%
Taylor expanded in z around inf 85.2%
*-commutative85.2%
associate-/l*95.5%
neg-mul-195.5%
Simplified95.5%
if -1.1000000000000001 < z < 1Initial program 92.1%
Taylor expanded in z around 0 92.1%
associate-*l/90.7%
associate-*r*90.7%
neg-mul-190.7%
distribute-rgt-out91.5%
unsub-neg91.5%
Simplified91.5%
if 1 < z Initial program 97.3%
Taylor expanded in z around inf 89.4%
sub-neg89.4%
remove-double-neg89.4%
neg-mul-189.4%
distribute-neg-in89.4%
neg-mul-189.4%
sub-neg89.4%
distribute-lft-neg-in89.4%
distribute-neg-frac89.4%
associate-/l*82.2%
associate-/r/95.8%
distribute-lft-neg-in95.8%
Simplified95.8%
Final simplification93.7%
(FPCore (x y z t) :precision binary64 (if (or (<= z -1.0) (not (<= z 8.5e+23))) (* t (/ x z)) (* t (- x))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.0) || !(z <= 8.5e+23)) {
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 <= 8.5d+23))) 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 <= 8.5e+23)) {
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 <= 8.5e+23): tmp = t * (x / z) else: tmp = t * -x return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -1.0) || !(z <= 8.5e+23)) 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 <= 8.5e+23))) 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[LessEqual[z, 8.5e+23]], $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 8.5 \cdot 10^{+23}\right):\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(-x\right)\\
\end{array}
\end{array}
if z < -1 or 8.5000000000000001e23 < z Initial program 96.9%
Taylor expanded in y around 0 61.6%
mul-1-neg61.6%
associate-/l*54.0%
associate-/r/64.3%
distribute-rgt-neg-in64.3%
Simplified64.3%
Taylor expanded in z around inf 61.4%
*-lft-identity61.4%
times-frac54.9%
/-rgt-identity54.9%
Simplified54.9%
if -1 < z < 8.5000000000000001e23Initial program 92.4%
Taylor expanded in y around 0 41.0%
mul-1-neg41.0%
associate-/l*40.9%
associate-/r/41.0%
distribute-rgt-neg-in41.0%
Simplified41.0%
Taylor expanded in z around 0 39.6%
mul-1-neg39.6%
*-commutative39.6%
distribute-rgt-neg-in39.6%
Simplified39.6%
Final simplification47.4%
(FPCore (x y z t) :precision binary64 (if (<= t -2.9e+123) (* t (/ x z)) (if (<= t 5e+133) (* y (/ x z)) (* t (- x)))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -2.9e+123) {
tmp = t * (x / z);
} else if (t <= 5e+133) {
tmp = y * (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 (t <= (-2.9d+123)) then
tmp = t * (x / z)
else if (t <= 5d+133) then
tmp = y * (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 (t <= -2.9e+123) {
tmp = t * (x / z);
} else if (t <= 5e+133) {
tmp = y * (x / z);
} else {
tmp = t * -x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -2.9e+123: tmp = t * (x / z) elif t <= 5e+133: tmp = y * (x / z) else: tmp = t * -x return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -2.9e+123) tmp = Float64(t * Float64(x / z)); elseif (t <= 5e+133) tmp = Float64(y * 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 (t <= -2.9e+123) tmp = t * (x / z); elseif (t <= 5e+133) tmp = y * (x / z); else tmp = t * -x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -2.9e+123], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5e+133], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision], N[(t * (-x)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.9 \cdot 10^{+123}:\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{elif}\;t \leq 5 \cdot 10^{+133}:\\
\;\;\;\;y \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(-x\right)\\
\end{array}
\end{array}
if t < -2.9000000000000001e123Initial program 95.0%
Taylor expanded in y around 0 80.4%
mul-1-neg80.4%
associate-/l*62.2%
associate-/r/80.3%
distribute-rgt-neg-in80.3%
Simplified80.3%
Taylor expanded in z around inf 61.7%
*-lft-identity61.7%
times-frac45.6%
/-rgt-identity45.6%
Simplified45.6%
if -2.9000000000000001e123 < t < 4.99999999999999961e133Initial program 93.9%
frac-2neg93.9%
div-inv93.8%
fma-neg93.8%
distribute-neg-frac93.8%
Applied egg-rr93.8%
distribute-frac-neg93.8%
fma-neg93.8%
neg-mul-193.8%
associate-/r*93.8%
metadata-eval93.8%
Simplified93.8%
Taylor expanded in y around inf 69.0%
associate-*r/72.9%
Simplified72.9%
if 4.99999999999999961e133 < t Initial program 97.7%
Taylor expanded in y around 0 71.5%
mul-1-neg71.5%
associate-/l*70.8%
associate-/r/81.9%
distribute-rgt-neg-in81.9%
Simplified81.9%
Taylor expanded in z around 0 51.5%
mul-1-neg51.5%
*-commutative51.5%
distribute-rgt-neg-in51.5%
Simplified51.5%
Final simplification65.1%
(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 94.7%
Taylor expanded in y around 0 51.6%
mul-1-neg51.6%
associate-/l*47.6%
associate-/r/52.9%
distribute-rgt-neg-in52.9%
Simplified52.9%
Taylor expanded in z around 0 26.9%
mul-1-neg26.9%
*-commutative26.9%
distribute-rgt-neg-in26.9%
Simplified26.9%
Final simplification26.9%
(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 2023224
(FPCore (x y z t)
:name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, C"
:precision binary64
:herbie-target
(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)))))