
(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 (if (<= z 4e+258) (* x (- (/ y z) (/ t (- 1.0 z)))) (/ 1.0 (/ z (* x (+ y t))))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= 4e+258) {
tmp = x * ((y / z) - (t / (1.0 - z)));
} else {
tmp = 1.0 / (z / (x * (y + 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 <= 4d+258) then
tmp = x * ((y / z) - (t / (1.0d0 - z)))
else
tmp = 1.0d0 / (z / (x * (y + t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= 4e+258) {
tmp = x * ((y / z) - (t / (1.0 - z)));
} else {
tmp = 1.0 / (z / (x * (y + t)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= 4e+258: tmp = x * ((y / z) - (t / (1.0 - z))) else: tmp = 1.0 / (z / (x * (y + t))) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= 4e+258) tmp = Float64(x * Float64(Float64(y / z) - Float64(t / Float64(1.0 - z)))); else tmp = Float64(1.0 / Float64(z / Float64(x * Float64(y + t)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= 4e+258) tmp = x * ((y / z) - (t / (1.0 - z))); else tmp = 1.0 / (z / (x * (y + t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, 4e+258], N[(x * N[(N[(y / z), $MachinePrecision] - N[(t / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(z / N[(x * N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq 4 \cdot 10^{+258}:\\
\;\;\;\;x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{z}{x \cdot \left(y + t\right)}}\\
\end{array}
\end{array}
if z < 4.00000000000000023e258Initial program 96.0%
if 4.00000000000000023e258 < z Initial program 64.9%
Taylor expanded in z around inf 100.0%
associate-/l*60.5%
neg-mul-160.5%
Simplified60.5%
clear-num60.5%
associate-/r/60.5%
clear-num64.9%
sub-neg64.9%
remove-double-neg64.9%
Applied egg-rr64.9%
associate-*l/100.0%
clear-num99.7%
Applied egg-rr99.7%
Final simplification96.2%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (/ (+ y t) z))))
(if (<= z -61000.0)
t_1
(if (<= z 0.000142)
(* x (- (/ y z) t))
(if (<= z 3.1e+259) t_1 (/ 1.0 (/ z (* x (+ y t)))))))))
double code(double x, double y, double z, double t) {
double t_1 = x * ((y + t) / z);
double tmp;
if (z <= -61000.0) {
tmp = t_1;
} else if (z <= 0.000142) {
tmp = x * ((y / z) - t);
} else if (z <= 3.1e+259) {
tmp = t_1;
} else {
tmp = 1.0 / (z / (x * (y + 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) :: t_1
real(8) :: tmp
t_1 = x * ((y + t) / z)
if (z <= (-61000.0d0)) then
tmp = t_1
else if (z <= 0.000142d0) then
tmp = x * ((y / z) - t)
else if (z <= 3.1d+259) then
tmp = t_1
else
tmp = 1.0d0 / (z / (x * (y + t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x * ((y + t) / z);
double tmp;
if (z <= -61000.0) {
tmp = t_1;
} else if (z <= 0.000142) {
tmp = x * ((y / z) - t);
} else if (z <= 3.1e+259) {
tmp = t_1;
} else {
tmp = 1.0 / (z / (x * (y + t)));
}
return tmp;
}
def code(x, y, z, t): t_1 = x * ((y + t) / z) tmp = 0 if z <= -61000.0: tmp = t_1 elif z <= 0.000142: tmp = x * ((y / z) - t) elif z <= 3.1e+259: tmp = t_1 else: tmp = 1.0 / (z / (x * (y + t))) return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(Float64(y + t) / z)) tmp = 0.0 if (z <= -61000.0) tmp = t_1; elseif (z <= 0.000142) tmp = Float64(x * Float64(Float64(y / z) - t)); elseif (z <= 3.1e+259) tmp = t_1; else tmp = Float64(1.0 / Float64(z / Float64(x * Float64(y + t)))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * ((y + t) / z); tmp = 0.0; if (z <= -61000.0) tmp = t_1; elseif (z <= 0.000142) tmp = x * ((y / z) - t); elseif (z <= 3.1e+259) tmp = t_1; else tmp = 1.0 / (z / (x * (y + t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(N[(y + t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -61000.0], t$95$1, If[LessEqual[z, 0.000142], N[(x * N[(N[(y / z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.1e+259], t$95$1, N[(1.0 / N[(z / N[(x * N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{y + t}{z}\\
\mathbf{if}\;z \leq -61000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 0.000142:\\
\;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\
\mathbf{elif}\;z \leq 3.1 \cdot 10^{+259}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{z}{x \cdot \left(y + t\right)}}\\
\end{array}
\end{array}
if z < -61000 or 1.42000000000000009e-4 < z < 3.1000000000000003e259Initial program 99.7%
Taylor expanded in z around inf 90.3%
associate-/l*99.6%
neg-mul-199.6%
Simplified99.6%
clear-num99.0%
associate-/r/99.7%
clear-num99.7%
sub-neg99.7%
remove-double-neg99.7%
Applied egg-rr99.7%
if -61000 < z < 1.42000000000000009e-4Initial program 93.0%
Taylor expanded in z around 0 86.7%
+-commutative86.7%
mul-1-neg86.7%
unsub-neg86.7%
*-commutative86.7%
associate-*r/84.6%
distribute-lft-out--90.6%
Simplified90.6%
if 3.1000000000000003e259 < z Initial program 64.9%
Taylor expanded in z around inf 100.0%
associate-/l*60.5%
neg-mul-160.5%
Simplified60.5%
clear-num60.5%
associate-/r/60.5%
clear-num64.9%
sub-neg64.9%
remove-double-neg64.9%
Applied egg-rr64.9%
associate-*l/100.0%
clear-num99.7%
Applied egg-rr99.7%
Final simplification94.9%
(FPCore (x y z t)
:precision binary64
(if (<= z -61000.0)
(* x (/ (+ y t) z))
(if (<= z 0.000142)
(* x (- (/ y z) t))
(if (<= z 4e+258)
(* x (+ (/ y z) (/ t z)))
(/ 1.0 (/ z (* x (+ y t))))))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -61000.0) {
tmp = x * ((y + t) / z);
} else if (z <= 0.000142) {
tmp = x * ((y / z) - t);
} else if (z <= 4e+258) {
tmp = x * ((y / z) + (t / z));
} else {
tmp = 1.0 / (z / (x * (y + 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 <= (-61000.0d0)) then
tmp = x * ((y + t) / z)
else if (z <= 0.000142d0) then
tmp = x * ((y / z) - t)
else if (z <= 4d+258) then
tmp = x * ((y / z) + (t / z))
else
tmp = 1.0d0 / (z / (x * (y + t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -61000.0) {
tmp = x * ((y + t) / z);
} else if (z <= 0.000142) {
tmp = x * ((y / z) - t);
} else if (z <= 4e+258) {
tmp = x * ((y / z) + (t / z));
} else {
tmp = 1.0 / (z / (x * (y + t)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -61000.0: tmp = x * ((y + t) / z) elif z <= 0.000142: tmp = x * ((y / z) - t) elif z <= 4e+258: tmp = x * ((y / z) + (t / z)) else: tmp = 1.0 / (z / (x * (y + t))) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -61000.0) tmp = Float64(x * Float64(Float64(y + t) / z)); elseif (z <= 0.000142) tmp = Float64(x * Float64(Float64(y / z) - t)); elseif (z <= 4e+258) tmp = Float64(x * Float64(Float64(y / z) + Float64(t / z))); else tmp = Float64(1.0 / Float64(z / Float64(x * Float64(y + t)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -61000.0) tmp = x * ((y + t) / z); elseif (z <= 0.000142) tmp = x * ((y / z) - t); elseif (z <= 4e+258) tmp = x * ((y / z) + (t / z)); else tmp = 1.0 / (z / (x * (y + t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -61000.0], N[(x * N[(N[(y + t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.000142], N[(x * N[(N[(y / z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4e+258], N[(x * N[(N[(y / z), $MachinePrecision] + N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(z / N[(x * N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -61000:\\
\;\;\;\;x \cdot \frac{y + t}{z}\\
\mathbf{elif}\;z \leq 0.000142:\\
\;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\
\mathbf{elif}\;z \leq 4 \cdot 10^{+258}:\\
\;\;\;\;x \cdot \left(\frac{y}{z} + \frac{t}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{z}{x \cdot \left(y + t\right)}}\\
\end{array}
\end{array}
if z < -61000Initial program 99.7%
Taylor expanded in z around inf 92.2%
associate-/l*99.6%
neg-mul-199.6%
Simplified99.6%
clear-num98.9%
associate-/r/99.7%
clear-num99.7%
sub-neg99.7%
remove-double-neg99.7%
Applied egg-rr99.7%
if -61000 < z < 1.42000000000000009e-4Initial program 93.0%
Taylor expanded in z around 0 86.7%
+-commutative86.7%
mul-1-neg86.7%
unsub-neg86.7%
*-commutative86.7%
associate-*r/84.6%
distribute-lft-out--90.6%
Simplified90.6%
if 1.42000000000000009e-4 < z < 4.00000000000000023e258Initial program 99.7%
Taylor expanded in z around inf 99.7%
associate-*r/99.7%
neg-mul-199.7%
Simplified99.7%
if 4.00000000000000023e258 < z Initial program 64.9%
Taylor expanded in z around inf 100.0%
associate-/l*60.5%
neg-mul-160.5%
Simplified60.5%
clear-num60.5%
associate-/r/60.5%
clear-num64.9%
sub-neg64.9%
remove-double-neg64.9%
Applied egg-rr64.9%
associate-*l/100.0%
clear-num99.7%
Applied egg-rr99.7%
Final simplification94.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (/ (+ y t) z))))
(if (<= z -61000.0)
t_1
(if (<= z 0.000142)
(* x (- (/ y z) t))
(if (<= z 1.09e+276) t_1 (* (+ y t) (/ x z)))))))
double code(double x, double y, double z, double t) {
double t_1 = x * ((y + t) / z);
double tmp;
if (z <= -61000.0) {
tmp = t_1;
} else if (z <= 0.000142) {
tmp = x * ((y / z) - t);
} else if (z <= 1.09e+276) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = x * ((y + t) / z)
if (z <= (-61000.0d0)) then
tmp = t_1
else if (z <= 0.000142d0) then
tmp = x * ((y / z) - t)
else if (z <= 1.09d+276) then
tmp = t_1
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 t_1 = x * ((y + t) / z);
double tmp;
if (z <= -61000.0) {
tmp = t_1;
} else if (z <= 0.000142) {
tmp = x * ((y / z) - t);
} else if (z <= 1.09e+276) {
tmp = t_1;
} else {
tmp = (y + t) * (x / z);
}
return tmp;
}
def code(x, y, z, t): t_1 = x * ((y + t) / z) tmp = 0 if z <= -61000.0: tmp = t_1 elif z <= 0.000142: tmp = x * ((y / z) - t) elif z <= 1.09e+276: tmp = t_1 else: tmp = (y + t) * (x / z) return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(Float64(y + t) / z)) tmp = 0.0 if (z <= -61000.0) tmp = t_1; elseif (z <= 0.000142) tmp = Float64(x * Float64(Float64(y / z) - t)); elseif (z <= 1.09e+276) tmp = t_1; else tmp = Float64(Float64(y + t) * Float64(x / z)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * ((y + t) / z); tmp = 0.0; if (z <= -61000.0) tmp = t_1; elseif (z <= 0.000142) tmp = x * ((y / z) - t); elseif (z <= 1.09e+276) tmp = t_1; else tmp = (y + t) * (x / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(N[(y + t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -61000.0], t$95$1, If[LessEqual[z, 0.000142], N[(x * N[(N[(y / z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.09e+276], t$95$1, N[(N[(y + t), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{y + t}{z}\\
\mathbf{if}\;z \leq -61000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 0.000142:\\
\;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\
\mathbf{elif}\;z \leq 1.09 \cdot 10^{+276}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\left(y + t\right) \cdot \frac{x}{z}\\
\end{array}
\end{array}
if z < -61000 or 1.42000000000000009e-4 < z < 1.09e276Initial program 99.7%
Taylor expanded in z around inf 90.6%
associate-/l*99.6%
neg-mul-199.6%
Simplified99.6%
clear-num99.0%
associate-/r/99.7%
clear-num99.7%
sub-neg99.7%
remove-double-neg99.7%
Applied egg-rr99.7%
if -61000 < z < 1.42000000000000009e-4Initial program 93.0%
Taylor expanded in z around 0 86.7%
+-commutative86.7%
mul-1-neg86.7%
unsub-neg86.7%
*-commutative86.7%
associate-*r/84.6%
distribute-lft-out--90.6%
Simplified90.6%
if 1.09e276 < z Initial program 53.1%
Taylor expanded in z around inf 100.0%
associate-/l*47.3%
associate-/r/99.7%
cancel-sign-sub-inv99.7%
metadata-eval99.7%
*-lft-identity99.7%
+-commutative99.7%
Simplified99.7%
Final simplification94.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ t (/ z x))))
(if (<= t -1.9e+33)
t_1
(if (<= t -7.7e-268)
(* y (/ x z))
(if (<= t 1.4e+175) (* x (/ y z)) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = t / (z / x);
double tmp;
if (t <= -1.9e+33) {
tmp = t_1;
} else if (t <= -7.7e-268) {
tmp = y * (x / z);
} else if (t <= 1.4e+175) {
tmp = x * (y / 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) :: tmp
t_1 = t / (z / x)
if (t <= (-1.9d+33)) then
tmp = t_1
else if (t <= (-7.7d-268)) then
tmp = y * (x / z)
else if (t <= 1.4d+175) then
tmp = x * (y / 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 = t / (z / x);
double tmp;
if (t <= -1.9e+33) {
tmp = t_1;
} else if (t <= -7.7e-268) {
tmp = y * (x / z);
} else if (t <= 1.4e+175) {
tmp = x * (y / z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = t / (z / x) tmp = 0 if t <= -1.9e+33: tmp = t_1 elif t <= -7.7e-268: tmp = y * (x / z) elif t <= 1.4e+175: tmp = x * (y / z) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(t / Float64(z / x)) tmp = 0.0 if (t <= -1.9e+33) tmp = t_1; elseif (t <= -7.7e-268) tmp = Float64(y * Float64(x / z)); elseif (t <= 1.4e+175) tmp = Float64(x * Float64(y / z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t / (z / x); tmp = 0.0; if (t <= -1.9e+33) tmp = t_1; elseif (t <= -7.7e-268) tmp = y * (x / z); elseif (t <= 1.4e+175) tmp = x * (y / z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t / N[(z / x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.9e+33], t$95$1, If[LessEqual[t, -7.7e-268], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.4e+175], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{\frac{z}{x}}\\
\mathbf{if}\;t \leq -1.9 \cdot 10^{+33}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -7.7 \cdot 10^{-268}:\\
\;\;\;\;y \cdot \frac{x}{z}\\
\mathbf{elif}\;t \leq 1.4 \cdot 10^{+175}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -1.90000000000000001e33 or 1.4000000000000001e175 < t Initial program 95.3%
Taylor expanded in z around inf 68.8%
associate-/l*70.9%
neg-mul-170.9%
Simplified70.9%
Taylor expanded in y around 0 55.6%
associate-/l*53.3%
Simplified53.3%
if -1.90000000000000001e33 < t < -7.70000000000000001e-268Initial program 89.5%
Taylor expanded in y around inf 77.8%
associate-/l*79.0%
associate-/r/87.1%
Applied egg-rr87.1%
if -7.70000000000000001e-268 < t < 1.4000000000000001e175Initial program 97.2%
Taylor expanded in y around inf 74.3%
associate-*r/77.7%
Simplified77.7%
Final simplification72.6%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ x (/ z t))))
(if (<= t -1e+33)
t_1
(if (<= t -8.2e-268)
(* y (/ x z))
(if (<= t 2.8e+173) (* x (/ y z)) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = x / (z / t);
double tmp;
if (t <= -1e+33) {
tmp = t_1;
} else if (t <= -8.2e-268) {
tmp = y * (x / z);
} else if (t <= 2.8e+173) {
tmp = x * (y / 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) :: tmp
t_1 = x / (z / t)
if (t <= (-1d+33)) then
tmp = t_1
else if (t <= (-8.2d-268)) then
tmp = y * (x / z)
else if (t <= 2.8d+173) then
tmp = x * (y / 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 / (z / t);
double tmp;
if (t <= -1e+33) {
tmp = t_1;
} else if (t <= -8.2e-268) {
tmp = y * (x / z);
} else if (t <= 2.8e+173) {
tmp = x * (y / z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x / (z / t) tmp = 0 if t <= -1e+33: tmp = t_1 elif t <= -8.2e-268: tmp = y * (x / z) elif t <= 2.8e+173: tmp = x * (y / z) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x / Float64(z / t)) tmp = 0.0 if (t <= -1e+33) tmp = t_1; elseif (t <= -8.2e-268) tmp = Float64(y * Float64(x / z)); elseif (t <= 2.8e+173) tmp = Float64(x * Float64(y / z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x / (z / t); tmp = 0.0; if (t <= -1e+33) tmp = t_1; elseif (t <= -8.2e-268) tmp = y * (x / z); elseif (t <= 2.8e+173) tmp = x * (y / z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(z / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1e+33], t$95$1, If[LessEqual[t, -8.2e-268], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.8e+173], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{\frac{z}{t}}\\
\mathbf{if}\;t \leq -1 \cdot 10^{+33}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -8.2 \cdot 10^{-268}:\\
\;\;\;\;y \cdot \frac{x}{z}\\
\mathbf{elif}\;t \leq 2.8 \cdot 10^{+173}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -9.9999999999999995e32 or 2.79999999999999982e173 < t Initial program 95.3%
Taylor expanded in z around inf 68.8%
associate-/l*70.9%
neg-mul-170.9%
Simplified70.9%
Taylor expanded in y around 0 60.3%
if -9.9999999999999995e32 < t < -8.1999999999999998e-268Initial program 89.5%
Taylor expanded in y around inf 77.8%
associate-/l*79.0%
associate-/r/87.1%
Applied egg-rr87.1%
if -8.1999999999999998e-268 < t < 2.79999999999999982e173Initial program 97.2%
Taylor expanded in y around inf 74.3%
associate-*r/77.7%
Simplified77.7%
Final simplification74.8%
(FPCore (x y z t)
:precision binary64
(if (<= z -9e+23)
(* x (/ y z))
(if (<= z 4.3e+92)
(* x (- (/ y z) t))
(if (<= z 6.8e+244) (/ x (/ z t)) (* y (/ x z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -9e+23) {
tmp = x * (y / z);
} else if (z <= 4.3e+92) {
tmp = x * ((y / z) - t);
} else if (z <= 6.8e+244) {
tmp = x / (z / t);
} 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 <= (-9d+23)) then
tmp = x * (y / z)
else if (z <= 4.3d+92) then
tmp = x * ((y / z) - t)
else if (z <= 6.8d+244) then
tmp = x / (z / t)
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 <= -9e+23) {
tmp = x * (y / z);
} else if (z <= 4.3e+92) {
tmp = x * ((y / z) - t);
} else if (z <= 6.8e+244) {
tmp = x / (z / t);
} else {
tmp = y * (x / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -9e+23: tmp = x * (y / z) elif z <= 4.3e+92: tmp = x * ((y / z) - t) elif z <= 6.8e+244: tmp = x / (z / t) else: tmp = y * (x / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -9e+23) tmp = Float64(x * Float64(y / z)); elseif (z <= 4.3e+92) tmp = Float64(x * Float64(Float64(y / z) - t)); elseif (z <= 6.8e+244) tmp = Float64(x / Float64(z / t)); else tmp = Float64(y * Float64(x / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -9e+23) tmp = x * (y / z); elseif (z <= 4.3e+92) tmp = x * ((y / z) - t); elseif (z <= 6.8e+244) tmp = x / (z / t); else tmp = y * (x / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -9e+23], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.3e+92], N[(x * N[(N[(y / z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.8e+244], N[(x / N[(z / t), $MachinePrecision]), $MachinePrecision], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9 \cdot 10^{+23}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{elif}\;z \leq 4.3 \cdot 10^{+92}:\\
\;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\
\mathbf{elif}\;z \leq 6.8 \cdot 10^{+244}:\\
\;\;\;\;\frac{x}{\frac{z}{t}}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{x}{z}\\
\end{array}
\end{array}
if z < -8.99999999999999958e23Initial program 99.7%
Taylor expanded in y around inf 62.0%
associate-*r/65.9%
Simplified65.9%
if -8.99999999999999958e23 < z < 4.2999999999999998e92Initial program 94.0%
Taylor expanded in z around 0 81.4%
+-commutative81.4%
mul-1-neg81.4%
unsub-neg81.4%
*-commutative81.4%
associate-*r/80.7%
distribute-lft-out--85.8%
Simplified85.8%
if 4.2999999999999998e92 < z < 6.8000000000000002e244Initial program 99.9%
Taylor expanded in z around inf 88.7%
associate-/l*99.7%
neg-mul-199.7%
Simplified99.7%
Taylor expanded in y around 0 78.3%
if 6.8000000000000002e244 < z Initial program 69.9%
Taylor expanded in y around inf 79.7%
associate-/l*66.1%
associate-/r/83.1%
Applied egg-rr83.1%
Final simplification80.9%
(FPCore (x y z t) :precision binary64 (if (or (<= z -61000.0) (not (<= z 1.0))) (* (+ y t) (/ x z)) (* x (- (/ y z) t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -61000.0) || !(z <= 1.0)) {
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 <= (-61000.0d0)) .or. (.not. (z <= 1.0d0))) 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 <= -61000.0) || !(z <= 1.0)) {
tmp = (y + t) * (x / z);
} else {
tmp = x * ((y / z) - t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -61000.0) or not (z <= 1.0): tmp = (y + t) * (x / z) else: tmp = x * ((y / z) - t) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -61000.0) || !(z <= 1.0)) 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 <= -61000.0) || ~((z <= 1.0))) 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, -61000.0], N[Not[LessEqual[z, 1.0]], $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 -61000 \lor \neg \left(z \leq 1\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 < -61000 or 1 < z Initial program 96.2%
Taylor expanded in z around inf 91.2%
associate-/l*95.7%
associate-/r/89.3%
cancel-sign-sub-inv89.3%
metadata-eval89.3%
*-lft-identity89.3%
+-commutative89.3%
Simplified89.3%
if -61000 < z < 1Initial program 93.1%
Taylor expanded in z around 0 86.9%
+-commutative86.9%
mul-1-neg86.9%
unsub-neg86.9%
*-commutative86.9%
associate-*r/84.9%
distribute-lft-out--90.7%
Simplified90.7%
Final simplification90.1%
(FPCore (x y z t) :precision binary64 (if (<= y -4.1e-74) (* y (/ x z)) (if (<= y 6.4e-190) (* x (/ t (+ z -1.0))) (/ (* x y) z))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4.1e-74) {
tmp = y * (x / z);
} else if (y <= 6.4e-190) {
tmp = x * (t / (z + -1.0));
} else {
tmp = (x * y) / 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 (y <= (-4.1d-74)) then
tmp = y * (x / z)
else if (y <= 6.4d-190) then
tmp = x * (t / (z + (-1.0d0)))
else
tmp = (x * y) / z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4.1e-74) {
tmp = y * (x / z);
} else if (y <= 6.4e-190) {
tmp = x * (t / (z + -1.0));
} else {
tmp = (x * y) / z;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -4.1e-74: tmp = y * (x / z) elif y <= 6.4e-190: tmp = x * (t / (z + -1.0)) else: tmp = (x * y) / z return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -4.1e-74) tmp = Float64(y * Float64(x / z)); elseif (y <= 6.4e-190) tmp = Float64(x * Float64(t / Float64(z + -1.0))); else tmp = Float64(Float64(x * y) / z); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -4.1e-74) tmp = y * (x / z); elseif (y <= 6.4e-190) tmp = x * (t / (z + -1.0)); else tmp = (x * y) / z; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -4.1e-74], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.4e-190], N[(x * N[(t / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.1 \cdot 10^{-74}:\\
\;\;\;\;y \cdot \frac{x}{z}\\
\mathbf{elif}\;y \leq 6.4 \cdot 10^{-190}:\\
\;\;\;\;x \cdot \frac{t}{z + -1}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\end{array}
\end{array}
if y < -4.10000000000000032e-74Initial program 93.7%
Taylor expanded in y around inf 79.5%
associate-/l*80.4%
associate-/r/82.1%
Applied egg-rr82.1%
if -4.10000000000000032e-74 < y < 6.4000000000000001e-190Initial program 98.2%
Taylor expanded in y around 0 78.8%
associate-*r/78.8%
associate-*r*78.8%
neg-mul-178.8%
associate-*l/80.4%
*-commutative80.4%
distribute-frac-neg80.4%
neg-mul-180.4%
metadata-eval80.4%
times-frac80.4%
*-lft-identity80.4%
neg-mul-180.4%
neg-sub080.4%
associate--r-80.4%
metadata-eval80.4%
Simplified80.4%
if 6.4000000000000001e-190 < y Initial program 91.6%
Taylor expanded in y around inf 80.8%
Final simplification81.1%
(FPCore (x y z t) :precision binary64 (if (or (<= t -2.8e+152) (not (<= t 2.05e+165))) (* x (- t)) (* x (/ y z))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -2.8e+152) || !(t <= 2.05e+165)) {
tmp = x * -t;
} else {
tmp = x * (y / 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 <= (-2.8d+152)) .or. (.not. (t <= 2.05d+165))) then
tmp = x * -t
else
tmp = x * (y / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -2.8e+152) || !(t <= 2.05e+165)) {
tmp = x * -t;
} else {
tmp = x * (y / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -2.8e+152) or not (t <= 2.05e+165): tmp = x * -t else: tmp = x * (y / z) return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -2.8e+152) || !(t <= 2.05e+165)) tmp = Float64(x * Float64(-t)); else tmp = Float64(x * Float64(y / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -2.8e+152) || ~((t <= 2.05e+165))) tmp = x * -t; else tmp = x * (y / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -2.8e+152], N[Not[LessEqual[t, 2.05e+165]], $MachinePrecision]], N[(x * (-t)), $MachinePrecision], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.8 \cdot 10^{+152} \lor \neg \left(t \leq 2.05 \cdot 10^{+165}\right):\\
\;\;\;\;x \cdot \left(-t\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\end{array}
\end{array}
if t < -2.8000000000000002e152 or 2.0500000000000001e165 < t Initial program 95.1%
Taylor expanded in y around 0 72.6%
associate-*r/72.6%
associate-*r*72.6%
neg-mul-172.6%
associate-*l/78.8%
*-commutative78.8%
distribute-frac-neg78.8%
neg-mul-178.8%
metadata-eval78.8%
times-frac78.8%
*-lft-identity78.8%
neg-mul-178.8%
neg-sub078.8%
associate--r-78.8%
metadata-eval78.8%
Simplified78.8%
Taylor expanded in z around 0 42.2%
mul-1-neg42.2%
*-commutative42.2%
distribute-rgt-neg-in42.2%
Simplified42.2%
if -2.8000000000000002e152 < t < 2.0500000000000001e165Initial program 94.4%
Taylor expanded in y around inf 73.8%
associate-*r/75.7%
Simplified75.7%
Final simplification67.9%
(FPCore (x y z t) :precision binary64 (if (<= t -4.8e-268) (* y (/ x z)) (if (<= t 9.5e+163) (* x (/ y z)) (* x (- t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -4.8e-268) {
tmp = y * (x / z);
} else if (t <= 9.5e+163) {
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 <= (-4.8d-268)) then
tmp = y * (x / z)
else if (t <= 9.5d+163) 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 <= -4.8e-268) {
tmp = y * (x / z);
} else if (t <= 9.5e+163) {
tmp = x * (y / z);
} else {
tmp = x * -t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -4.8e-268: tmp = y * (x / z) elif t <= 9.5e+163: tmp = x * (y / z) else: tmp = x * -t return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -4.8e-268) tmp = Float64(y * Float64(x / z)); elseif (t <= 9.5e+163) 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 <= -4.8e-268) tmp = y * (x / z); elseif (t <= 9.5e+163) tmp = x * (y / z); else tmp = x * -t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -4.8e-268], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9.5e+163], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], N[(x * (-t)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.8 \cdot 10^{-268}:\\
\;\;\;\;y \cdot \frac{x}{z}\\
\mathbf{elif}\;t \leq 9.5 \cdot 10^{+163}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(-t\right)\\
\end{array}
\end{array}
if t < -4.7999999999999998e-268Initial program 91.4%
Taylor expanded in y around inf 61.6%
associate-/l*60.0%
associate-/r/66.7%
Applied egg-rr66.7%
if -4.7999999999999998e-268 < t < 9.50000000000000053e163Initial program 97.1%
Taylor expanded in y around inf 75.5%
associate-*r/78.9%
Simplified78.9%
if 9.50000000000000053e163 < t Initial program 99.8%
Taylor expanded in y around 0 76.7%
associate-*r/76.7%
associate-*r*76.7%
neg-mul-176.7%
associate-*l/84.1%
*-commutative84.1%
distribute-frac-neg84.1%
neg-mul-184.1%
metadata-eval84.1%
times-frac84.1%
*-lft-identity84.1%
neg-mul-184.1%
neg-sub084.1%
associate--r-84.1%
metadata-eval84.1%
Simplified84.1%
Taylor expanded in z around 0 47.1%
mul-1-neg47.1%
*-commutative47.1%
distribute-rgt-neg-in47.1%
Simplified47.1%
Final simplification69.8%
(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 94.5%
Taylor expanded in y around 0 44.9%
associate-*r/44.9%
associate-*r*44.9%
neg-mul-144.9%
associate-*l/45.8%
*-commutative45.8%
distribute-frac-neg45.8%
neg-mul-145.8%
metadata-eval45.8%
times-frac45.8%
*-lft-identity45.8%
neg-mul-145.8%
neg-sub045.8%
associate--r-45.8%
metadata-eval45.8%
Simplified45.8%
Taylor expanded in z around 0 25.3%
mul-1-neg25.3%
*-commutative25.3%
distribute-rgt-neg-in25.3%
Simplified25.3%
Final simplification25.3%
(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 2023293
(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)))))