
(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 11 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 (* x (- (/ y z) (/ t (- 1.0 z)))))) (if (<= t_1 1e+306) t_1 (* y (/ x z)))))
double code(double x, double y, double z, double t) {
double t_1 = x * ((y / z) - (t / (1.0 - z)));
double tmp;
if (t_1 <= 1e+306) {
tmp = t_1;
} 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 = x * ((y / z) - (t / (1.0d0 - z)))
if (t_1 <= 1d+306) then
tmp = t_1
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 = x * ((y / z) - (t / (1.0 - z)));
double tmp;
if (t_1 <= 1e+306) {
tmp = t_1;
} else {
tmp = y * (x / z);
}
return tmp;
}
def code(x, y, z, t): t_1 = x * ((y / z) - (t / (1.0 - z))) tmp = 0 if t_1 <= 1e+306: tmp = t_1 else: tmp = y * (x / z) return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(Float64(y / z) - Float64(t / Float64(1.0 - z)))) tmp = 0.0 if (t_1 <= 1e+306) tmp = t_1; else tmp = Float64(y * Float64(x / z)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * ((y / z) - (t / (1.0 - z))); tmp = 0.0; if (t_1 <= 1e+306) tmp = t_1; else tmp = y * (x / z); 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 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 1e+306], t$95$1, N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right)\\
\mathbf{if}\;t_1 \leq 10^{+306}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{x}{z}\\
\end{array}
\end{array}
if (*.f64 x (-.f64 (/.f64 y z) (/.f64 t (-.f64 1 z)))) < 1.00000000000000002e306Initial program 96.3%
if 1.00000000000000002e306 < (*.f64 x (-.f64 (/.f64 y z) (/.f64 t (-.f64 1 z)))) Initial program 80.0%
Taylor expanded in z around inf 89.2%
*-commutative89.2%
associate-/l*71.9%
neg-mul-171.9%
Simplified71.9%
Taylor expanded in y around inf 70.0%
associate-/r/91.9%
Applied egg-rr91.9%
Final simplification95.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (/ t z))) (t_2 (* x (- t))))
(if (<= z -1.0)
t_1
(if (<= z -9.8e-185)
t_2
(if (<= z 1.3e-206) (* t (/ x z)) (if (<= z 7000.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 <= -1.0) {
tmp = t_1;
} else if (z <= -9.8e-185) {
tmp = t_2;
} else if (z <= 1.3e-206) {
tmp = t * (x / z);
} else if (z <= 7000.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 <= (-1.0d0)) then
tmp = t_1
else if (z <= (-9.8d-185)) then
tmp = t_2
else if (z <= 1.3d-206) then
tmp = t * (x / z)
else if (z <= 7000.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 <= -1.0) {
tmp = t_1;
} else if (z <= -9.8e-185) {
tmp = t_2;
} else if (z <= 1.3e-206) {
tmp = t * (x / z);
} else if (z <= 7000.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 <= -1.0: tmp = t_1 elif z <= -9.8e-185: tmp = t_2 elif z <= 1.3e-206: tmp = t * (x / z) elif z <= 7000.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 <= -1.0) tmp = t_1; elseif (z <= -9.8e-185) tmp = t_2; elseif (z <= 1.3e-206) tmp = Float64(t * Float64(x / z)); elseif (z <= 7000.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 <= -1.0) tmp = t_1; elseif (z <= -9.8e-185) tmp = t_2; elseif (z <= 1.3e-206) tmp = t * (x / z); elseif (z <= 7000.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, -1.0], t$95$1, If[LessEqual[z, -9.8e-185], t$95$2, If[LessEqual[z, 1.3e-206], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7000.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 -1:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -9.8 \cdot 10^{-185}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{-206}:\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{elif}\;z \leq 7000:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -1 or 7e3 < z Initial program 96.3%
Taylor expanded in y around 0 47.3%
associate-*r/47.3%
associate-*r*47.3%
neg-mul-147.3%
associate-*l/53.9%
*-commutative53.9%
neg-mul-153.9%
*-commutative53.9%
associate-*r/53.8%
metadata-eval53.8%
associate-/r*53.8%
neg-mul-153.8%
associate-*r/53.9%
*-rgt-identity53.9%
neg-sub053.9%
associate--r-53.9%
metadata-eval53.9%
Simplified53.9%
Taylor expanded in z around inf 53.4%
if -1 < z < -9.8000000000000005e-185 or 1.3e-206 < z < 7e3Initial program 94.2%
Taylor expanded in y around 0 43.5%
associate-*r/43.5%
associate-*r*43.5%
neg-mul-143.5%
associate-*l/43.6%
*-commutative43.6%
neg-mul-143.6%
*-commutative43.6%
associate-*r/43.5%
metadata-eval43.5%
associate-/r*43.5%
neg-mul-143.5%
associate-*r/43.6%
*-rgt-identity43.6%
neg-sub043.6%
associate--r-43.6%
metadata-eval43.6%
Simplified43.6%
Taylor expanded in z around 0 40.9%
*-commutative40.9%
neg-mul-140.9%
distribute-lft-neg-in40.9%
Simplified40.9%
if -9.8000000000000005e-185 < z < 1.3e-206Initial program 87.4%
Taylor expanded in z around inf 59.9%
*-commutative59.9%
associate-/l*52.8%
neg-mul-152.8%
Simplified52.8%
Taylor expanded in z around 0 52.8%
Taylor expanded in y around 0 21.8%
associate-*r/29.2%
Simplified29.2%
Final simplification45.2%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (/ t z))))
(if (<= y -3.45e-69)
(* y (/ x z))
(if (<= y -1.8e-203)
t_1
(if (<= y -3.4e-296)
(* x (- t))
(if (<= y 4e-81) t_1 (* x (/ y z))))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (t / z);
double tmp;
if (y <= -3.45e-69) {
tmp = y * (x / z);
} else if (y <= -1.8e-203) {
tmp = t_1;
} else if (y <= -3.4e-296) {
tmp = x * -t;
} else if (y <= 4e-81) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = x * (t / z)
if (y <= (-3.45d-69)) then
tmp = y * (x / z)
else if (y <= (-1.8d-203)) then
tmp = t_1
else if (y <= (-3.4d-296)) then
tmp = x * -t
else if (y <= 4d-81) then
tmp = t_1
else
tmp = x * (y / z)
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 (y <= -3.45e-69) {
tmp = y * (x / z);
} else if (y <= -1.8e-203) {
tmp = t_1;
} else if (y <= -3.4e-296) {
tmp = x * -t;
} else if (y <= 4e-81) {
tmp = t_1;
} else {
tmp = x * (y / z);
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (t / z) tmp = 0 if y <= -3.45e-69: tmp = y * (x / z) elif y <= -1.8e-203: tmp = t_1 elif y <= -3.4e-296: tmp = x * -t elif y <= 4e-81: tmp = t_1 else: tmp = x * (y / z) return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(t / z)) tmp = 0.0 if (y <= -3.45e-69) tmp = Float64(y * Float64(x / z)); elseif (y <= -1.8e-203) tmp = t_1; elseif (y <= -3.4e-296) tmp = Float64(x * Float64(-t)); elseif (y <= 4e-81) tmp = t_1; else tmp = Float64(x * Float64(y / z)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (t / z); tmp = 0.0; if (y <= -3.45e-69) tmp = y * (x / z); elseif (y <= -1.8e-203) tmp = t_1; elseif (y <= -3.4e-296) tmp = x * -t; elseif (y <= 4e-81) tmp = t_1; else tmp = x * (y / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.45e-69], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.8e-203], t$95$1, If[LessEqual[y, -3.4e-296], N[(x * (-t)), $MachinePrecision], If[LessEqual[y, 4e-81], t$95$1, N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{t}{z}\\
\mathbf{if}\;y \leq -3.45 \cdot 10^{-69}:\\
\;\;\;\;y \cdot \frac{x}{z}\\
\mathbf{elif}\;y \leq -1.8 \cdot 10^{-203}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -3.4 \cdot 10^{-296}:\\
\;\;\;\;x \cdot \left(-t\right)\\
\mathbf{elif}\;y \leq 4 \cdot 10^{-81}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\end{array}
\end{array}
if y < -3.44999999999999985e-69Initial program 92.4%
Taylor expanded in z around inf 76.3%
*-commutative76.3%
associate-/l*82.2%
neg-mul-182.2%
Simplified82.2%
Taylor expanded in y around inf 73.6%
associate-/r/77.4%
Applied egg-rr77.4%
if -3.44999999999999985e-69 < y < -1.7999999999999999e-203 or -3.39999999999999997e-296 < y < 3.9999999999999998e-81Initial program 97.2%
Taylor expanded in y around 0 71.6%
associate-*r/71.6%
associate-*r*71.6%
neg-mul-171.6%
associate-*l/76.7%
*-commutative76.7%
neg-mul-176.7%
*-commutative76.7%
associate-*r/76.6%
metadata-eval76.6%
associate-/r*76.6%
neg-mul-176.6%
associate-*r/76.7%
*-rgt-identity76.7%
neg-sub076.7%
associate--r-76.7%
metadata-eval76.7%
Simplified76.7%
Taylor expanded in z around inf 63.1%
if -1.7999999999999999e-203 < y < -3.39999999999999997e-296Initial program 83.6%
Taylor expanded in y around 0 81.0%
associate-*r/81.0%
associate-*r*81.0%
neg-mul-181.0%
associate-*l/77.0%
*-commutative77.0%
neg-mul-177.0%
*-commutative77.0%
associate-*r/77.0%
metadata-eval77.0%
associate-/r*77.0%
neg-mul-177.0%
associate-*r/77.0%
*-rgt-identity77.0%
neg-sub077.0%
associate--r-77.0%
metadata-eval77.0%
Simplified77.0%
Taylor expanded in z around 0 61.4%
*-commutative61.4%
neg-mul-161.4%
distribute-lft-neg-in61.4%
Simplified61.4%
if 3.9999999999999998e-81 < y Initial program 94.5%
Taylor expanded in y around inf 76.0%
associate-*l/75.9%
Simplified75.9%
Final simplification71.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (/ t z))))
(if (<= y -3.2e-69)
(* y (/ x z))
(if (<= y -1.8e-203)
t_1
(if (<= y -4.1e-296)
(* x (- t))
(if (<= y 4e-80) t_1 (/ (* x y) z)))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (t / z);
double tmp;
if (y <= -3.2e-69) {
tmp = y * (x / z);
} else if (y <= -1.8e-203) {
tmp = t_1;
} else if (y <= -4.1e-296) {
tmp = x * -t;
} else if (y <= 4e-80) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = x * (t / z)
if (y <= (-3.2d-69)) then
tmp = y * (x / z)
else if (y <= (-1.8d-203)) then
tmp = t_1
else if (y <= (-4.1d-296)) then
tmp = x * -t
else if (y <= 4d-80) then
tmp = t_1
else
tmp = (x * y) / z
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 (y <= -3.2e-69) {
tmp = y * (x / z);
} else if (y <= -1.8e-203) {
tmp = t_1;
} else if (y <= -4.1e-296) {
tmp = x * -t;
} else if (y <= 4e-80) {
tmp = t_1;
} else {
tmp = (x * y) / z;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (t / z) tmp = 0 if y <= -3.2e-69: tmp = y * (x / z) elif y <= -1.8e-203: tmp = t_1 elif y <= -4.1e-296: tmp = x * -t elif y <= 4e-80: tmp = t_1 else: tmp = (x * y) / z return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(t / z)) tmp = 0.0 if (y <= -3.2e-69) tmp = Float64(y * Float64(x / z)); elseif (y <= -1.8e-203) tmp = t_1; elseif (y <= -4.1e-296) tmp = Float64(x * Float64(-t)); elseif (y <= 4e-80) tmp = t_1; else tmp = Float64(Float64(x * y) / z); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (t / z); tmp = 0.0; if (y <= -3.2e-69) tmp = y * (x / z); elseif (y <= -1.8e-203) tmp = t_1; elseif (y <= -4.1e-296) tmp = x * -t; elseif (y <= 4e-80) tmp = t_1; else tmp = (x * y) / z; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.2e-69], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.8e-203], t$95$1, If[LessEqual[y, -4.1e-296], N[(x * (-t)), $MachinePrecision], If[LessEqual[y, 4e-80], t$95$1, N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{t}{z}\\
\mathbf{if}\;y \leq -3.2 \cdot 10^{-69}:\\
\;\;\;\;y \cdot \frac{x}{z}\\
\mathbf{elif}\;y \leq -1.8 \cdot 10^{-203}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -4.1 \cdot 10^{-296}:\\
\;\;\;\;x \cdot \left(-t\right)\\
\mathbf{elif}\;y \leq 4 \cdot 10^{-80}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\end{array}
\end{array}
if y < -3.19999999999999999e-69Initial program 92.4%
Taylor expanded in z around inf 76.3%
*-commutative76.3%
associate-/l*82.2%
neg-mul-182.2%
Simplified82.2%
Taylor expanded in y around inf 73.6%
associate-/r/77.4%
Applied egg-rr77.4%
if -3.19999999999999999e-69 < y < -1.7999999999999999e-203 or -4.09999999999999994e-296 < y < 3.99999999999999985e-80Initial program 97.2%
Taylor expanded in y around 0 71.6%
associate-*r/71.6%
associate-*r*71.6%
neg-mul-171.6%
associate-*l/76.7%
*-commutative76.7%
neg-mul-176.7%
*-commutative76.7%
associate-*r/76.6%
metadata-eval76.6%
associate-/r*76.6%
neg-mul-176.6%
associate-*r/76.7%
*-rgt-identity76.7%
neg-sub076.7%
associate--r-76.7%
metadata-eval76.7%
Simplified76.7%
Taylor expanded in z around inf 63.1%
if -1.7999999999999999e-203 < y < -4.09999999999999994e-296Initial program 83.6%
Taylor expanded in y around 0 81.0%
associate-*r/81.0%
associate-*r*81.0%
neg-mul-181.0%
associate-*l/77.0%
*-commutative77.0%
neg-mul-177.0%
*-commutative77.0%
associate-*r/77.0%
metadata-eval77.0%
associate-/r*77.0%
neg-mul-177.0%
associate-*r/77.0%
*-rgt-identity77.0%
neg-sub077.0%
associate--r-77.0%
metadata-eval77.0%
Simplified77.0%
Taylor expanded in z around 0 61.4%
*-commutative61.4%
neg-mul-161.4%
distribute-lft-neg-in61.4%
Simplified61.4%
if 3.99999999999999985e-80 < y Initial program 94.5%
Taylor expanded in y around inf 76.0%
Final simplification71.9%
(FPCore (x y z t)
:precision binary64
(if (<= z -1.1e+20)
(* x (/ y z))
(if (<= z 270000.0)
(* x (- (/ y z) t))
(if (<= z 2.9e+66)
(* t (/ x z))
(if (<= z 7e+216) (/ (* x y) z) (* x (/ t z)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.1e+20) {
tmp = x * (y / z);
} else if (z <= 270000.0) {
tmp = x * ((y / z) - t);
} else if (z <= 2.9e+66) {
tmp = t * (x / z);
} else if (z <= 7e+216) {
tmp = (x * y) / z;
} 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.1d+20)) then
tmp = x * (y / z)
else if (z <= 270000.0d0) then
tmp = x * ((y / z) - t)
else if (z <= 2.9d+66) then
tmp = t * (x / z)
else if (z <= 7d+216) then
tmp = (x * y) / z
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.1e+20) {
tmp = x * (y / z);
} else if (z <= 270000.0) {
tmp = x * ((y / z) - t);
} else if (z <= 2.9e+66) {
tmp = t * (x / z);
} else if (z <= 7e+216) {
tmp = (x * y) / z;
} else {
tmp = x * (t / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -1.1e+20: tmp = x * (y / z) elif z <= 270000.0: tmp = x * ((y / z) - t) elif z <= 2.9e+66: tmp = t * (x / z) elif z <= 7e+216: tmp = (x * y) / z else: tmp = x * (t / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -1.1e+20) tmp = Float64(x * Float64(y / z)); elseif (z <= 270000.0) tmp = Float64(x * Float64(Float64(y / z) - t)); elseif (z <= 2.9e+66) tmp = Float64(t * Float64(x / z)); elseif (z <= 7e+216) tmp = Float64(Float64(x * y) / z); 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.1e+20) tmp = x * (y / z); elseif (z <= 270000.0) tmp = x * ((y / z) - t); elseif (z <= 2.9e+66) tmp = t * (x / z); elseif (z <= 7e+216) tmp = (x * y) / z; else tmp = x * (t / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -1.1e+20], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 270000.0], N[(x * N[(N[(y / z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.9e+66], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7e+216], N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.1 \cdot 10^{+20}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{elif}\;z \leq 270000:\\
\;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\
\mathbf{elif}\;z \leq 2.9 \cdot 10^{+66}:\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{elif}\;z \leq 7 \cdot 10^{+216}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{t}{z}\\
\end{array}
\end{array}
if z < -1.1e20Initial program 98.3%
Taylor expanded in y around inf 52.5%
associate-*l/64.1%
Simplified64.1%
if -1.1e20 < z < 2.7e5Initial program 91.3%
Taylor expanded in z around 0 88.0%
associate-*l/81.6%
associate-*r*81.6%
neg-mul-181.6%
distribute-rgt-out89.1%
unsub-neg89.1%
Simplified89.1%
if 2.7e5 < z < 2.89999999999999986e66Initial program 96.1%
Taylor expanded in z around inf 91.5%
*-commutative91.5%
associate-/l*91.0%
neg-mul-191.0%
Simplified91.0%
Taylor expanded in z around 0 91.0%
Taylor expanded in y around 0 73.8%
associate-*r/73.9%
Simplified73.9%
if 2.89999999999999986e66 < z < 6.99999999999999984e216Initial program 90.9%
Taylor expanded in y around inf 65.6%
if 6.99999999999999984e216 < z Initial program 98.1%
Taylor expanded in y around 0 51.8%
associate-*r/51.8%
associate-*r*51.8%
neg-mul-151.8%
associate-*l/75.8%
*-commutative75.8%
neg-mul-175.8%
*-commutative75.8%
associate-*r/75.6%
metadata-eval75.6%
associate-/r*75.6%
neg-mul-175.6%
associate-*r/75.8%
*-rgt-identity75.8%
neg-sub075.8%
associate--r-75.8%
metadata-eval75.8%
Simplified75.8%
Taylor expanded in z around inf 75.8%
Final simplification77.6%
(FPCore (x y z t)
:precision binary64
(if (<= y -2.4e-69)
(* y (/ x z))
(if (<= y 1.36e-80)
(* x (/ t (+ z -1.0)))
(if (<= y 4.8e-12)
(* x (- (/ y z) t))
(if (<= y 5.8e-12) (* t (/ x z)) (/ (* x y) z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.4e-69) {
tmp = y * (x / z);
} else if (y <= 1.36e-80) {
tmp = x * (t / (z + -1.0));
} else if (y <= 4.8e-12) {
tmp = x * ((y / z) - t);
} else if (y <= 5.8e-12) {
tmp = t * (x / z);
} 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 <= (-2.4d-69)) then
tmp = y * (x / z)
else if (y <= 1.36d-80) then
tmp = x * (t / (z + (-1.0d0)))
else if (y <= 4.8d-12) then
tmp = x * ((y / z) - t)
else if (y <= 5.8d-12) then
tmp = t * (x / z)
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 <= -2.4e-69) {
tmp = y * (x / z);
} else if (y <= 1.36e-80) {
tmp = x * (t / (z + -1.0));
} else if (y <= 4.8e-12) {
tmp = x * ((y / z) - t);
} else if (y <= 5.8e-12) {
tmp = t * (x / z);
} else {
tmp = (x * y) / z;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -2.4e-69: tmp = y * (x / z) elif y <= 1.36e-80: tmp = x * (t / (z + -1.0)) elif y <= 4.8e-12: tmp = x * ((y / z) - t) elif y <= 5.8e-12: tmp = t * (x / z) else: tmp = (x * y) / z return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -2.4e-69) tmp = Float64(y * Float64(x / z)); elseif (y <= 1.36e-80) tmp = Float64(x * Float64(t / Float64(z + -1.0))); elseif (y <= 4.8e-12) tmp = Float64(x * Float64(Float64(y / z) - t)); elseif (y <= 5.8e-12) tmp = Float64(t * Float64(x / z)); else tmp = Float64(Float64(x * y) / z); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -2.4e-69) tmp = y * (x / z); elseif (y <= 1.36e-80) tmp = x * (t / (z + -1.0)); elseif (y <= 4.8e-12) tmp = x * ((y / z) - t); elseif (y <= 5.8e-12) tmp = t * (x / z); else tmp = (x * y) / z; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -2.4e-69], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.36e-80], N[(x * N[(t / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.8e-12], N[(x * N[(N[(y / z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.8e-12], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.4 \cdot 10^{-69}:\\
\;\;\;\;y \cdot \frac{x}{z}\\
\mathbf{elif}\;y \leq 1.36 \cdot 10^{-80}:\\
\;\;\;\;x \cdot \frac{t}{z + -1}\\
\mathbf{elif}\;y \leq 4.8 \cdot 10^{-12}:\\
\;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\
\mathbf{elif}\;y \leq 5.8 \cdot 10^{-12}:\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\end{array}
\end{array}
if y < -2.4000000000000001e-69Initial program 92.4%
Taylor expanded in z around inf 76.3%
*-commutative76.3%
associate-/l*82.2%
neg-mul-182.2%
Simplified82.2%
Taylor expanded in y around inf 73.6%
associate-/r/77.4%
Applied egg-rr77.4%
if -2.4000000000000001e-69 < y < 1.3599999999999999e-80Initial program 94.9%
Taylor expanded in y around 0 73.2%
associate-*r/73.2%
associate-*r*73.2%
neg-mul-173.2%
associate-*l/76.8%
*-commutative76.8%
neg-mul-176.8%
*-commutative76.8%
associate-*r/76.7%
metadata-eval76.7%
associate-/r*76.7%
neg-mul-176.7%
associate-*r/76.8%
*-rgt-identity76.8%
neg-sub076.8%
associate--r-76.8%
metadata-eval76.8%
Simplified76.8%
if 1.3599999999999999e-80 < y < 4.79999999999999974e-12Initial program 100.0%
Taylor expanded in z around 0 77.1%
associate-*l/77.1%
associate-*r*77.1%
neg-mul-177.1%
distribute-rgt-out77.2%
unsub-neg77.2%
Simplified77.2%
if 4.79999999999999974e-12 < y < 5.8000000000000003e-12Initial program 100.0%
Taylor expanded in z around inf 100.0%
*-commutative100.0%
associate-/l*100.0%
neg-mul-1100.0%
Simplified100.0%
Taylor expanded in z around 0 100.0%
Taylor expanded in y around 0 100.0%
associate-*r/100.0%
Simplified100.0%
if 5.8000000000000003e-12 < y Initial program 93.4%
Taylor expanded in y around inf 81.1%
Final simplification78.3%
(FPCore (x y z t) :precision binary64 (if (or (<= z -0.9) (not (<= z 6.8e-7))) (* (/ x z) (+ y t)) (* x (- (/ y z) t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -0.9) || !(z <= 6.8e-7)) {
tmp = (x / z) * (y + t);
} 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 <= (-0.9d0)) .or. (.not. (z <= 6.8d-7))) then
tmp = (x / z) * (y + t)
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 <= -0.9) || !(z <= 6.8e-7)) {
tmp = (x / z) * (y + t);
} else {
tmp = x * ((y / z) - t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -0.9) or not (z <= 6.8e-7): tmp = (x / z) * (y + t) else: tmp = x * ((y / z) - t) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -0.9) || !(z <= 6.8e-7)) tmp = Float64(Float64(x / z) * Float64(y + t)); 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 <= -0.9) || ~((z <= 6.8e-7))) tmp = (x / z) * (y + t); else tmp = x * ((y / z) - t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -0.9], N[Not[LessEqual[z, 6.8e-7]], $MachinePrecision]], N[(N[(x / z), $MachinePrecision] * N[(y + t), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(y / z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.9 \lor \neg \left(z \leq 6.8 \cdot 10^{-7}\right):\\
\;\;\;\;\frac{x}{z} \cdot \left(y + t\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\
\end{array}
\end{array}
if z < -0.900000000000000022 or 6.79999999999999948e-7 < z Initial program 96.4%
Taylor expanded in z around inf 81.8%
*-commutative81.8%
associate-/l*95.2%
associate-/r/87.2%
cancel-sign-sub-inv87.2%
metadata-eval87.2%
*-lft-identity87.2%
Simplified87.2%
if -0.900000000000000022 < z < 6.79999999999999948e-7Initial program 91.1%
Taylor expanded in z around 0 88.4%
associate-*l/81.7%
associate-*r*81.7%
neg-mul-181.7%
distribute-rgt-out89.5%
unsub-neg89.5%
Simplified89.5%
Final simplification88.2%
(FPCore (x y z t) :precision binary64 (if (or (<= z -1.0) (not (<= z 6.8e-7))) (* 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 <= 6.8e-7)) {
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 <= 6.8d-7))) 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 <= 6.8e-7)) {
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 <= 6.8e-7): 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 <= 6.8e-7)) 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 <= 6.8e-7))) 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, 6.8e-7]], $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 6.8 \cdot 10^{-7}\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 6.79999999999999948e-7 < z Initial program 96.4%
Taylor expanded in z around inf 81.8%
associate-/l*87.1%
associate-/r/95.8%
cancel-sign-sub-inv95.8%
metadata-eval95.8%
*-lft-identity95.8%
Simplified95.8%
if -1 < z < 6.79999999999999948e-7Initial program 91.1%
Taylor expanded in z around 0 88.4%
associate-*l/81.7%
associate-*r*81.7%
neg-mul-181.7%
distribute-rgt-out89.5%
unsub-neg89.5%
Simplified89.5%
Final simplification93.0%
(FPCore (x y z t) :precision binary64 (if (or (<= t -7.2e+108) (not (<= t 1.88e+146))) (* x (/ t z)) (* y (/ x z))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -7.2e+108) || !(t <= 1.88e+146)) {
tmp = x * (t / z);
} else {
tmp = y * (x / z);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((t <= (-7.2d+108)) .or. (.not. (t <= 1.88d+146))) then
tmp = x * (t / z)
else
tmp = y * (x / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -7.2e+108) || !(t <= 1.88e+146)) {
tmp = x * (t / z);
} else {
tmp = y * (x / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -7.2e+108) or not (t <= 1.88e+146): tmp = x * (t / z) else: tmp = y * (x / z) return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -7.2e+108) || !(t <= 1.88e+146)) tmp = Float64(x * Float64(t / z)); else tmp = Float64(y * Float64(x / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -7.2e+108) || ~((t <= 1.88e+146))) tmp = x * (t / z); else tmp = y * (x / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -7.2e+108], N[Not[LessEqual[t, 1.88e+146]], $MachinePrecision]], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7.2 \cdot 10^{+108} \lor \neg \left(t \leq 1.88 \cdot 10^{+146}\right):\\
\;\;\;\;x \cdot \frac{t}{z}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{x}{z}\\
\end{array}
\end{array}
if t < -7.2e108 or 1.8800000000000001e146 < t Initial program 97.3%
Taylor expanded in y around 0 58.0%
associate-*r/58.0%
associate-*r*58.0%
neg-mul-158.0%
associate-*l/72.9%
*-commutative72.9%
neg-mul-172.9%
*-commutative72.9%
associate-*r/72.8%
metadata-eval72.8%
associate-/r*72.8%
neg-mul-172.8%
associate-*r/72.9%
*-rgt-identity72.9%
neg-sub072.9%
associate--r-72.9%
metadata-eval72.9%
Simplified72.9%
Taylor expanded in z around inf 64.0%
if -7.2e108 < t < 1.8800000000000001e146Initial program 92.5%
Taylor expanded in z around inf 76.4%
*-commutative76.4%
associate-/l*75.7%
neg-mul-175.7%
Simplified75.7%
Taylor expanded in y around inf 72.9%
associate-/r/72.1%
Applied egg-rr72.1%
Final simplification69.7%
(FPCore (x y z t) :precision binary64 (* t (/ x z)))
double code(double x, double y, double z, double t) {
return t * (x / 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 = t * (x / z)
end function
public static double code(double x, double y, double z, double t) {
return t * (x / z);
}
def code(x, y, z, t): return t * (x / z)
function code(x, y, z, t) return Float64(t * Float64(x / z)) end
function tmp = code(x, y, z, t) tmp = t * (x / z); end
code[x_, y_, z_, t_] := N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
t \cdot \frac{x}{z}
\end{array}
Initial program 93.9%
Taylor expanded in z around inf 71.0%
*-commutative71.0%
associate-/l*75.7%
neg-mul-175.7%
Simplified75.7%
Taylor expanded in z around 0 75.7%
Taylor expanded in y around 0 34.3%
associate-*r/38.4%
Simplified38.4%
Final simplification38.4%
(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 93.9%
Taylor expanded in y around 0 40.8%
associate-*r/40.8%
associate-*r*40.8%
neg-mul-140.8%
associate-*l/44.3%
*-commutative44.3%
neg-mul-144.3%
*-commutative44.3%
associate-*r/44.3%
metadata-eval44.3%
associate-/r*44.3%
neg-mul-144.3%
associate-*r/44.3%
*-rgt-identity44.3%
neg-sub044.3%
associate--r-44.3%
metadata-eval44.3%
Simplified44.3%
Taylor expanded in z around 0 19.7%
*-commutative19.7%
neg-mul-119.7%
distribute-lft-neg-in19.7%
Simplified19.7%
Final simplification19.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (- (/ y z) (* t (/ 1.0 (- 1.0 z))))))
(t_2 (* x (- (/ y z) (/ t (- 1.0 z))))))
(if (< t_2 -7.623226303312042e-196)
t_1
(if (< t_2 1.4133944927702302e-211)
(+ (/ (* y x) z) (- (/ (* t x) (- 1.0 z))))
t_1))))
double code(double x, double y, double z, double t) {
double t_1 = x * ((y / z) - (t * (1.0 / (1.0 - z))));
double t_2 = x * ((y / z) - (t / (1.0 - z)));
double tmp;
if (t_2 < -7.623226303312042e-196) {
tmp = t_1;
} else if (t_2 < 1.4133944927702302e-211) {
tmp = ((y * x) / z) + -((t * x) / (1.0 - z));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x * ((y / z) - (t * (1.0d0 / (1.0d0 - z))))
t_2 = x * ((y / z) - (t / (1.0d0 - z)))
if (t_2 < (-7.623226303312042d-196)) then
tmp = t_1
else if (t_2 < 1.4133944927702302d-211) then
tmp = ((y * x) / z) + -((t * x) / (1.0d0 - z))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x * ((y / z) - (t * (1.0 / (1.0 - z))));
double t_2 = x * ((y / z) - (t / (1.0 - z)));
double tmp;
if (t_2 < -7.623226303312042e-196) {
tmp = t_1;
} else if (t_2 < 1.4133944927702302e-211) {
tmp = ((y * x) / z) + -((t * x) / (1.0 - z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * ((y / z) - (t * (1.0 / (1.0 - z)))) t_2 = x * ((y / z) - (t / (1.0 - z))) tmp = 0 if t_2 < -7.623226303312042e-196: tmp = t_1 elif t_2 < 1.4133944927702302e-211: tmp = ((y * x) / z) + -((t * x) / (1.0 - z)) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(Float64(y / z) - Float64(t * Float64(1.0 / Float64(1.0 - z))))) t_2 = Float64(x * Float64(Float64(y / z) - Float64(t / Float64(1.0 - z)))) tmp = 0.0 if (t_2 < -7.623226303312042e-196) tmp = t_1; elseif (t_2 < 1.4133944927702302e-211) tmp = Float64(Float64(Float64(y * x) / z) + Float64(-Float64(Float64(t * x) / Float64(1.0 - z)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * ((y / z) - (t * (1.0 / (1.0 - z)))); t_2 = x * ((y / z) - (t / (1.0 - z))); tmp = 0.0; if (t_2 < -7.623226303312042e-196) tmp = t_1; elseif (t_2 < 1.4133944927702302e-211) tmp = ((y * x) / z) + -((t * x) / (1.0 - z)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(N[(y / z), $MachinePrecision] - N[(t * N[(1.0 / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(N[(y / z), $MachinePrecision] - N[(t / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t$95$2, -7.623226303312042e-196], t$95$1, If[Less[t$95$2, 1.4133944927702302e-211], N[(N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision] + (-N[(N[(t * x), $MachinePrecision] / N[(1.0 - z), $MachinePrecision]), $MachinePrecision])), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(\frac{y}{z} - t \cdot \frac{1}{1 - z}\right)\\
t_2 := x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right)\\
\mathbf{if}\;t_2 < -7.623226303312042 \cdot 10^{-196}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_2 < 1.4133944927702302 \cdot 10^{-211}:\\
\;\;\;\;\frac{y \cdot x}{z} + \left(-\frac{t \cdot x}{1 - z}\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
herbie shell --seed 2023279
(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)))))