
(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 13 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 (- INFINITY))
(* y (/ x z))
(if (<= t_1 5e+289) (* 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 <= -((double) INFINITY)) {
tmp = y * (x / z);
} else if (t_1 <= 5e+289) {
tmp = t_1 * x;
} else {
tmp = (y * x) / z;
}
return tmp;
}
public static double code(double x, double y, double z, double t) {
double t_1 = (y / z) - (t / (1.0 - z));
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = y * (x / z);
} else if (t_1 <= 5e+289) {
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 <= -math.inf: tmp = y * (x / z) elif t_1 <= 5e+289: 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 <= Float64(-Inf)) tmp = Float64(y * Float64(x / z)); elseif (t_1 <= 5e+289) 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 <= -Inf) tmp = y * (x / z); elseif (t_1 <= 5e+289) 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, (-Infinity)], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+289], 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 -\infty:\\
\;\;\;\;y \cdot \frac{x}{z}\\
\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+289}:\\
\;\;\;\;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))) < -inf.0Initial program 55.4%
frac-2neg55.4%
div-inv55.4%
fma-neg55.4%
distribute-neg-frac55.4%
Applied egg-rr55.4%
fma-udef55.4%
+-commutative55.4%
distribute-lft-neg-out55.4%
unsub-neg55.4%
neg-mul-155.4%
*-commutative55.4%
associate-*r/55.4%
metadata-eval55.4%
associate-/r*55.4%
neg-mul-155.4%
associate-*r/55.4%
*-rgt-identity55.4%
neg-sub055.4%
associate--r-55.4%
metadata-eval55.4%
neg-mul-155.4%
associate-/r*55.4%
metadata-eval55.4%
Simplified55.4%
Taylor expanded in t around 0 99.7%
associate-*r/99.9%
Simplified99.9%
if -inf.0 < (-.f64 (/.f64 y z) (/.f64 t (-.f64 1 z))) < 5.00000000000000031e289Initial program 98.8%
if 5.00000000000000031e289 < (-.f64 (/.f64 y z) (/.f64 t (-.f64 1 z))) Initial program 73.8%
Taylor expanded in y around inf 100.0%
Final simplification99.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ x (/ z (+ y t)))))
(if (<= z -1.05)
t_1
(if (<= z 1.05e-297)
(* x (- (/ y z) t))
(if (<= z 2.45e-197)
(/ y (/ z x))
(if (<= z 1.0) (* x (- (- t) (* y (/ -1.0 z)))) t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = x / (z / (y + t));
double tmp;
if (z <= -1.05) {
tmp = t_1;
} else if (z <= 1.05e-297) {
tmp = x * ((y / z) - t);
} else if (z <= 2.45e-197) {
tmp = y / (z / x);
} else if (z <= 1.0) {
tmp = x * (-t - (y * (-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) :: tmp
t_1 = x / (z / (y + t))
if (z <= (-1.05d0)) then
tmp = t_1
else if (z <= 1.05d-297) then
tmp = x * ((y / z) - t)
else if (z <= 2.45d-197) then
tmp = y / (z / x)
else if (z <= 1.0d0) then
tmp = x * (-t - (y * ((-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 / (z / (y + t));
double tmp;
if (z <= -1.05) {
tmp = t_1;
} else if (z <= 1.05e-297) {
tmp = x * ((y / z) - t);
} else if (z <= 2.45e-197) {
tmp = y / (z / x);
} else if (z <= 1.0) {
tmp = x * (-t - (y * (-1.0 / z)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x / (z / (y + t)) tmp = 0 if z <= -1.05: tmp = t_1 elif z <= 1.05e-297: tmp = x * ((y / z) - t) elif z <= 2.45e-197: tmp = y / (z / x) elif z <= 1.0: tmp = x * (-t - (y * (-1.0 / z))) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x / Float64(z / Float64(y + t))) tmp = 0.0 if (z <= -1.05) tmp = t_1; elseif (z <= 1.05e-297) tmp = Float64(x * Float64(Float64(y / z) - t)); elseif (z <= 2.45e-197) tmp = Float64(y / Float64(z / x)); elseif (z <= 1.0) tmp = Float64(x * Float64(Float64(-t) - Float64(y * Float64(-1.0 / z)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x / (z / (y + t)); tmp = 0.0; if (z <= -1.05) tmp = t_1; elseif (z <= 1.05e-297) tmp = x * ((y / z) - t); elseif (z <= 2.45e-197) tmp = y / (z / x); elseif (z <= 1.0) tmp = x * (-t - (y * (-1.0 / z))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(z / N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.05], t$95$1, If[LessEqual[z, 1.05e-297], N[(x * N[(N[(y / z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.45e-197], N[(y / N[(z / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.0], N[(x * N[((-t) - N[(y * N[(-1.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{\frac{z}{y + t}}\\
\mathbf{if}\;z \leq -1.05:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{-297}:\\
\;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\
\mathbf{elif}\;z \leq 2.45 \cdot 10^{-197}:\\
\;\;\;\;\frac{y}{\frac{z}{x}}\\
\mathbf{elif}\;z \leq 1:\\
\;\;\;\;x \cdot \left(\left(-t\right) - y \cdot \frac{-1}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -1.05000000000000004 or 1 < z Initial program 98.0%
Taylor expanded in z around inf 84.7%
*-commutative84.7%
associate-/l*97.0%
neg-mul-197.0%
Simplified97.0%
if -1.05000000000000004 < z < 1.05000000000000007e-297Initial program 93.3%
Taylor expanded in z around 0 91.4%
associate-*l/89.0%
associate-*r*89.0%
neg-mul-189.0%
distribute-rgt-out93.3%
unsub-neg93.3%
Simplified93.3%
if 1.05000000000000007e-297 < z < 2.4500000000000001e-197Initial program 74.3%
frac-2neg74.3%
div-inv74.3%
fma-neg74.3%
distribute-neg-frac74.3%
Applied egg-rr74.3%
fma-udef74.3%
+-commutative74.3%
distribute-lft-neg-out74.3%
unsub-neg74.3%
neg-mul-174.3%
*-commutative74.3%
associate-*r/74.3%
metadata-eval74.3%
associate-/r*74.3%
neg-mul-174.3%
associate-*r/74.3%
*-rgt-identity74.3%
neg-sub074.3%
associate--r-74.3%
metadata-eval74.3%
neg-mul-174.3%
associate-/r*74.3%
metadata-eval74.3%
Simplified74.3%
Taylor expanded in t around 0 91.1%
associate-/l*99.8%
Simplified99.8%
if 2.4500000000000001e-197 < z < 1Initial program 90.3%
frac-2neg90.3%
div-inv90.3%
fma-neg90.3%
distribute-neg-frac90.3%
Applied egg-rr90.3%
fma-udef90.3%
+-commutative90.3%
distribute-lft-neg-out90.3%
unsub-neg90.3%
neg-mul-190.3%
*-commutative90.3%
associate-*r/90.3%
metadata-eval90.3%
associate-/r*90.3%
neg-mul-190.3%
associate-*r/90.3%
*-rgt-identity90.3%
neg-sub090.3%
associate--r-90.3%
metadata-eval90.3%
neg-mul-190.3%
associate-/r*90.3%
metadata-eval90.3%
Simplified90.3%
Taylor expanded in z around 0 89.7%
neg-mul-189.7%
Simplified89.7%
Final simplification94.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (- x))) (t_2 (* y (/ x z))) (t_3 (* t (/ x z))))
(if (<= y -2.8e-81)
t_2
(if (<= y -7e-242)
t_3
(if (<= y 7.5e-224)
t_1
(if (<= y 3.7e-206)
t_3
(if (or (<= y 8e-161) (not (<= y 1.26e-140))) t_2 t_1)))))))
double code(double x, double y, double z, double t) {
double t_1 = t * -x;
double t_2 = y * (x / z);
double t_3 = t * (x / z);
double tmp;
if (y <= -2.8e-81) {
tmp = t_2;
} else if (y <= -7e-242) {
tmp = t_3;
} else if (y <= 7.5e-224) {
tmp = t_1;
} else if (y <= 3.7e-206) {
tmp = t_3;
} else if ((y <= 8e-161) || !(y <= 1.26e-140)) {
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) :: t_3
real(8) :: tmp
t_1 = t * -x
t_2 = y * (x / z)
t_3 = t * (x / z)
if (y <= (-2.8d-81)) then
tmp = t_2
else if (y <= (-7d-242)) then
tmp = t_3
else if (y <= 7.5d-224) then
tmp = t_1
else if (y <= 3.7d-206) then
tmp = t_3
else if ((y <= 8d-161) .or. (.not. (y <= 1.26d-140))) 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 = t * -x;
double t_2 = y * (x / z);
double t_3 = t * (x / z);
double tmp;
if (y <= -2.8e-81) {
tmp = t_2;
} else if (y <= -7e-242) {
tmp = t_3;
} else if (y <= 7.5e-224) {
tmp = t_1;
} else if (y <= 3.7e-206) {
tmp = t_3;
} else if ((y <= 8e-161) || !(y <= 1.26e-140)) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = t * -x t_2 = y * (x / z) t_3 = t * (x / z) tmp = 0 if y <= -2.8e-81: tmp = t_2 elif y <= -7e-242: tmp = t_3 elif y <= 7.5e-224: tmp = t_1 elif y <= 3.7e-206: tmp = t_3 elif (y <= 8e-161) or not (y <= 1.26e-140): tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(t * Float64(-x)) t_2 = Float64(y * Float64(x / z)) t_3 = Float64(t * Float64(x / z)) tmp = 0.0 if (y <= -2.8e-81) tmp = t_2; elseif (y <= -7e-242) tmp = t_3; elseif (y <= 7.5e-224) tmp = t_1; elseif (y <= 3.7e-206) tmp = t_3; elseif ((y <= 8e-161) || !(y <= 1.26e-140)) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t * -x; t_2 = y * (x / z); t_3 = t * (x / z); tmp = 0.0; if (y <= -2.8e-81) tmp = t_2; elseif (y <= -7e-242) tmp = t_3; elseif (y <= 7.5e-224) tmp = t_1; elseif (y <= 3.7e-206) tmp = t_3; elseif ((y <= 8e-161) || ~((y <= 1.26e-140))) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * (-x)), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.8e-81], t$95$2, If[LessEqual[y, -7e-242], t$95$3, If[LessEqual[y, 7.5e-224], t$95$1, If[LessEqual[y, 3.7e-206], t$95$3, If[Or[LessEqual[y, 8e-161], N[Not[LessEqual[y, 1.26e-140]], $MachinePrecision]], t$95$2, t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(-x\right)\\
t_2 := y \cdot \frac{x}{z}\\
t_3 := t \cdot \frac{x}{z}\\
\mathbf{if}\;y \leq -2.8 \cdot 10^{-81}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -7 \cdot 10^{-242}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y \leq 7.5 \cdot 10^{-224}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 3.7 \cdot 10^{-206}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y \leq 8 \cdot 10^{-161} \lor \neg \left(y \leq 1.26 \cdot 10^{-140}\right):\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -2.7999999999999999e-81 or 3.69999999999999998e-206 < y < 8.00000000000000022e-161 or 1.25999999999999996e-140 < y Initial program 91.1%
frac-2neg91.1%
div-inv91.1%
fma-neg91.1%
distribute-neg-frac91.1%
Applied egg-rr91.1%
fma-udef91.1%
+-commutative91.1%
distribute-lft-neg-out91.1%
unsub-neg91.1%
neg-mul-191.1%
*-commutative91.1%
associate-*r/91.1%
metadata-eval91.1%
associate-/r*91.1%
neg-mul-191.1%
associate-*r/91.1%
*-rgt-identity91.1%
neg-sub091.1%
associate--r-91.1%
metadata-eval91.1%
neg-mul-191.1%
associate-/r*91.1%
metadata-eval91.1%
Simplified91.1%
Taylor expanded in t around 0 75.9%
associate-*r/79.5%
Simplified79.5%
if -2.7999999999999999e-81 < y < -6.9999999999999998e-242 or 7.49999999999999978e-224 < y < 3.69999999999999998e-206Initial program 96.6%
Taylor expanded in z around inf 84.0%
*-commutative84.0%
associate-/l*80.8%
associate-/r/77.5%
cancel-sign-sub-inv77.5%
metadata-eval77.5%
*-lft-identity77.5%
Simplified77.5%
Taylor expanded in y around 0 74.4%
associate-*r/71.0%
Simplified71.0%
if -6.9999999999999998e-242 < y < 7.49999999999999978e-224 or 8.00000000000000022e-161 < y < 1.25999999999999996e-140Initial program 99.8%
Taylor expanded in z around 0 61.3%
associate-*l/65.8%
associate-*r*65.8%
neg-mul-165.8%
distribute-rgt-out65.8%
unsub-neg65.8%
Simplified65.8%
Taylor expanded in y around 0 59.0%
mul-1-neg59.0%
Simplified59.0%
Final simplification75.2%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (- (/ y z) t))) (t_2 (/ y (/ z x))))
(if (<= z -7.8e+203)
t_2
(if (<= z -8.7e+151)
(/ t (/ z x))
(if (<= z 3.4e-298)
t_1
(if (<= z 2.4e-197)
t_2
(if (<= z 92.0)
t_1
(if (<= z 7.2e+248) (/ x (/ z t)) (* (/ y z) x)))))))))
double code(double x, double y, double z, double t) {
double t_1 = x * ((y / z) - t);
double t_2 = y / (z / x);
double tmp;
if (z <= -7.8e+203) {
tmp = t_2;
} else if (z <= -8.7e+151) {
tmp = t / (z / x);
} else if (z <= 3.4e-298) {
tmp = t_1;
} else if (z <= 2.4e-197) {
tmp = t_2;
} else if (z <= 92.0) {
tmp = t_1;
} else if (z <= 7.2e+248) {
tmp = x / (z / t);
} else {
tmp = (y / z) * x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x * ((y / z) - t)
t_2 = y / (z / x)
if (z <= (-7.8d+203)) then
tmp = t_2
else if (z <= (-8.7d+151)) then
tmp = t / (z / x)
else if (z <= 3.4d-298) then
tmp = t_1
else if (z <= 2.4d-197) then
tmp = t_2
else if (z <= 92.0d0) then
tmp = t_1
else if (z <= 7.2d+248) then
tmp = x / (z / t)
else
tmp = (y / z) * x
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);
double t_2 = y / (z / x);
double tmp;
if (z <= -7.8e+203) {
tmp = t_2;
} else if (z <= -8.7e+151) {
tmp = t / (z / x);
} else if (z <= 3.4e-298) {
tmp = t_1;
} else if (z <= 2.4e-197) {
tmp = t_2;
} else if (z <= 92.0) {
tmp = t_1;
} else if (z <= 7.2e+248) {
tmp = x / (z / t);
} else {
tmp = (y / z) * x;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * ((y / z) - t) t_2 = y / (z / x) tmp = 0 if z <= -7.8e+203: tmp = t_2 elif z <= -8.7e+151: tmp = t / (z / x) elif z <= 3.4e-298: tmp = t_1 elif z <= 2.4e-197: tmp = t_2 elif z <= 92.0: tmp = t_1 elif z <= 7.2e+248: tmp = x / (z / t) else: tmp = (y / z) * x return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(Float64(y / z) - t)) t_2 = Float64(y / Float64(z / x)) tmp = 0.0 if (z <= -7.8e+203) tmp = t_2; elseif (z <= -8.7e+151) tmp = Float64(t / Float64(z / x)); elseif (z <= 3.4e-298) tmp = t_1; elseif (z <= 2.4e-197) tmp = t_2; elseif (z <= 92.0) tmp = t_1; elseif (z <= 7.2e+248) tmp = Float64(x / Float64(z / t)); else tmp = Float64(Float64(y / z) * x); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * ((y / z) - t); t_2 = y / (z / x); tmp = 0.0; if (z <= -7.8e+203) tmp = t_2; elseif (z <= -8.7e+151) tmp = t / (z / x); elseif (z <= 3.4e-298) tmp = t_1; elseif (z <= 2.4e-197) tmp = t_2; elseif (z <= 92.0) tmp = t_1; elseif (z <= 7.2e+248) tmp = x / (z / t); else tmp = (y / z) * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(N[(y / z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y / N[(z / x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7.8e+203], t$95$2, If[LessEqual[z, -8.7e+151], N[(t / N[(z / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.4e-298], t$95$1, If[LessEqual[z, 2.4e-197], t$95$2, If[LessEqual[z, 92.0], t$95$1, If[LessEqual[z, 7.2e+248], N[(x / N[(z / t), $MachinePrecision]), $MachinePrecision], N[(N[(y / z), $MachinePrecision] * x), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(\frac{y}{z} - t\right)\\
t_2 := \frac{y}{\frac{z}{x}}\\
\mathbf{if}\;z \leq -7.8 \cdot 10^{+203}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -8.7 \cdot 10^{+151}:\\
\;\;\;\;\frac{t}{\frac{z}{x}}\\
\mathbf{elif}\;z \leq 3.4 \cdot 10^{-298}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 2.4 \cdot 10^{-197}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 92:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 7.2 \cdot 10^{+248}:\\
\;\;\;\;\frac{x}{\frac{z}{t}}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{z} \cdot x\\
\end{array}
\end{array}
if z < -7.79999999999999949e203 or 3.4e-298 < z < 2.4000000000000001e-197Initial program 81.5%
frac-2neg81.5%
div-inv81.6%
fma-neg81.6%
distribute-neg-frac81.6%
Applied egg-rr81.6%
fma-udef81.6%
+-commutative81.6%
distribute-lft-neg-out81.6%
unsub-neg81.6%
neg-mul-181.6%
*-commutative81.6%
associate-*r/81.6%
metadata-eval81.6%
associate-/r*81.6%
neg-mul-181.6%
associate-*r/81.6%
*-rgt-identity81.6%
neg-sub081.6%
associate--r-81.6%
metadata-eval81.6%
neg-mul-181.6%
associate-/r*81.6%
metadata-eval81.6%
Simplified81.6%
Taylor expanded in t around 0 72.8%
associate-/l*88.9%
Simplified88.9%
if -7.79999999999999949e203 < z < -8.7e151Initial program 99.4%
Taylor expanded in z around inf 88.1%
*-commutative88.1%
associate-/l*99.8%
associate-/r/99.8%
cancel-sign-sub-inv99.8%
metadata-eval99.8%
*-lft-identity99.8%
Simplified99.8%
*-commutative99.8%
clear-num99.4%
un-div-inv100.0%
+-commutative100.0%
Applied egg-rr100.0%
Taylor expanded in t around inf 88.1%
associate-/l*100.0%
Simplified100.0%
if -8.7e151 < z < 3.4e-298 or 2.4000000000000001e-197 < z < 92Initial program 93.6%
Taylor expanded in z around 0 86.9%
associate-*l/83.2%
associate-*r*83.2%
neg-mul-183.2%
distribute-rgt-out86.5%
unsub-neg86.5%
Simplified86.5%
if 92 < z < 7.20000000000000003e248Initial program 99.7%
Taylor expanded in z around inf 83.7%
*-commutative83.7%
associate-/l*96.9%
associate-/r/85.6%
cancel-sign-sub-inv85.6%
metadata-eval85.6%
*-lft-identity85.6%
Simplified85.6%
Taylor expanded in y around 0 60.4%
associate-*r/60.2%
Simplified60.2%
associate-*r/60.4%
*-commutative60.4%
associate-/l*71.4%
Applied egg-rr71.4%
if 7.20000000000000003e248 < z Initial program 99.8%
Taylor expanded in y around inf 67.9%
associate-*l/87.3%
Simplified87.3%
Final simplification84.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (- x))) (t_2 (* y (/ x z))))
(if (<= y -6e-83)
t_2
(if (<= y -6e-242)
(* t (/ x z))
(if (<= y 3.8e-218)
t_1
(if (<= y 1.55e-162) (* (/ y z) x) (if (<= y 5.2e-138) t_1 t_2)))))))
double code(double x, double y, double z, double t) {
double t_1 = t * -x;
double t_2 = y * (x / z);
double tmp;
if (y <= -6e-83) {
tmp = t_2;
} else if (y <= -6e-242) {
tmp = t * (x / z);
} else if (y <= 3.8e-218) {
tmp = t_1;
} else if (y <= 1.55e-162) {
tmp = (y / z) * x;
} else if (y <= 5.2e-138) {
tmp = t_1;
} else {
tmp = t_2;
}
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 = t * -x
t_2 = y * (x / z)
if (y <= (-6d-83)) then
tmp = t_2
else if (y <= (-6d-242)) then
tmp = t * (x / z)
else if (y <= 3.8d-218) then
tmp = t_1
else if (y <= 1.55d-162) then
tmp = (y / z) * x
else if (y <= 5.2d-138) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = t * -x;
double t_2 = y * (x / z);
double tmp;
if (y <= -6e-83) {
tmp = t_2;
} else if (y <= -6e-242) {
tmp = t * (x / z);
} else if (y <= 3.8e-218) {
tmp = t_1;
} else if (y <= 1.55e-162) {
tmp = (y / z) * x;
} else if (y <= 5.2e-138) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = t * -x t_2 = y * (x / z) tmp = 0 if y <= -6e-83: tmp = t_2 elif y <= -6e-242: tmp = t * (x / z) elif y <= 3.8e-218: tmp = t_1 elif y <= 1.55e-162: tmp = (y / z) * x elif y <= 5.2e-138: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(t * Float64(-x)) t_2 = Float64(y * Float64(x / z)) tmp = 0.0 if (y <= -6e-83) tmp = t_2; elseif (y <= -6e-242) tmp = Float64(t * Float64(x / z)); elseif (y <= 3.8e-218) tmp = t_1; elseif (y <= 1.55e-162) tmp = Float64(Float64(y / z) * x); elseif (y <= 5.2e-138) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t * -x; t_2 = y * (x / z); tmp = 0.0; if (y <= -6e-83) tmp = t_2; elseif (y <= -6e-242) tmp = t * (x / z); elseif (y <= 3.8e-218) tmp = t_1; elseif (y <= 1.55e-162) tmp = (y / z) * x; elseif (y <= 5.2e-138) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * (-x)), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -6e-83], t$95$2, If[LessEqual[y, -6e-242], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.8e-218], t$95$1, If[LessEqual[y, 1.55e-162], N[(N[(y / z), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[y, 5.2e-138], t$95$1, t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(-x\right)\\
t_2 := y \cdot \frac{x}{z}\\
\mathbf{if}\;y \leq -6 \cdot 10^{-83}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -6 \cdot 10^{-242}:\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{elif}\;y \leq 3.8 \cdot 10^{-218}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.55 \cdot 10^{-162}:\\
\;\;\;\;\frac{y}{z} \cdot x\\
\mathbf{elif}\;y \leq 5.2 \cdot 10^{-138}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -6.00000000000000021e-83 or 5.2e-138 < y Initial program 90.7%
frac-2neg90.7%
div-inv90.6%
fma-neg90.6%
distribute-neg-frac90.6%
Applied egg-rr90.6%
fma-udef90.6%
+-commutative90.6%
distribute-lft-neg-out90.6%
unsub-neg90.6%
neg-mul-190.6%
*-commutative90.6%
associate-*r/90.6%
metadata-eval90.6%
associate-/r*90.6%
neg-mul-190.6%
associate-*r/90.6%
*-rgt-identity90.6%
neg-sub090.6%
associate--r-90.6%
metadata-eval90.6%
neg-mul-190.6%
associate-/r*90.6%
metadata-eval90.6%
Simplified90.6%
Taylor expanded in t around 0 77.1%
associate-*r/80.9%
Simplified80.9%
if -6.00000000000000021e-83 < y < -6e-242Initial program 96.2%
Taylor expanded in z around inf 84.8%
*-commutative84.8%
associate-/l*81.1%
associate-/r/77.5%
cancel-sign-sub-inv77.5%
metadata-eval77.5%
*-lft-identity77.5%
Simplified77.5%
Taylor expanded in y around 0 74.1%
associate-*r/70.3%
Simplified70.3%
if -6e-242 < y < 3.7999999999999999e-218 or 1.5499999999999999e-162 < y < 5.2e-138Initial program 99.8%
Taylor expanded in z around 0 60.0%
associate-*l/64.4%
associate-*r*64.4%
neg-mul-164.4%
distribute-rgt-out64.4%
unsub-neg64.4%
Simplified64.4%
Taylor expanded in y around 0 57.8%
mul-1-neg57.8%
Simplified57.8%
if 3.7999999999999999e-218 < y < 1.5499999999999999e-162Initial program 99.6%
Taylor expanded in y around inf 56.6%
associate-*l/72.4%
Simplified72.4%
Final simplification75.5%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (- (/ y z) t))) (t_2 (* (/ x z) (+ y t))))
(if (<= z -4.3e-38)
t_2
(if (<= z 3.5e-298)
t_1
(if (<= z 2.35e-197) (/ y (/ z x)) (if (<= z 1.0) t_1 t_2))))))
double code(double x, double y, double z, double t) {
double t_1 = x * ((y / z) - t);
double t_2 = (x / z) * (y + t);
double tmp;
if (z <= -4.3e-38) {
tmp = t_2;
} else if (z <= 3.5e-298) {
tmp = t_1;
} else if (z <= 2.35e-197) {
tmp = y / (z / x);
} else if (z <= 1.0) {
tmp = t_1;
} else {
tmp = t_2;
}
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)
t_2 = (x / z) * (y + t)
if (z <= (-4.3d-38)) then
tmp = t_2
else if (z <= 3.5d-298) then
tmp = t_1
else if (z <= 2.35d-197) then
tmp = y / (z / x)
else if (z <= 1.0d0) then
tmp = t_1
else
tmp = t_2
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);
double t_2 = (x / z) * (y + t);
double tmp;
if (z <= -4.3e-38) {
tmp = t_2;
} else if (z <= 3.5e-298) {
tmp = t_1;
} else if (z <= 2.35e-197) {
tmp = y / (z / x);
} else if (z <= 1.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * ((y / z) - t) t_2 = (x / z) * (y + t) tmp = 0 if z <= -4.3e-38: tmp = t_2 elif z <= 3.5e-298: tmp = t_1 elif z <= 2.35e-197: tmp = y / (z / x) elif z <= 1.0: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(Float64(y / z) - t)) t_2 = Float64(Float64(x / z) * Float64(y + t)) tmp = 0.0 if (z <= -4.3e-38) tmp = t_2; elseif (z <= 3.5e-298) tmp = t_1; elseif (z <= 2.35e-197) tmp = Float64(y / Float64(z / x)); elseif (z <= 1.0) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * ((y / z) - t); t_2 = (x / z) * (y + t); tmp = 0.0; if (z <= -4.3e-38) tmp = t_2; elseif (z <= 3.5e-298) tmp = t_1; elseif (z <= 2.35e-197) tmp = y / (z / x); elseif (z <= 1.0) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(N[(y / z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x / z), $MachinePrecision] * N[(y + t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.3e-38], t$95$2, If[LessEqual[z, 3.5e-298], t$95$1, If[LessEqual[z, 2.35e-197], N[(y / N[(z / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.0], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(\frac{y}{z} - t\right)\\
t_2 := \frac{x}{z} \cdot \left(y + t\right)\\
\mathbf{if}\;z \leq -4.3 \cdot 10^{-38}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{-298}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 2.35 \cdot 10^{-197}:\\
\;\;\;\;\frac{y}{\frac{z}{x}}\\
\mathbf{elif}\;z \leq 1:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -4.3000000000000002e-38 or 1 < z Initial program 97.4%
Taylor expanded in z around inf 85.1%
*-commutative85.1%
associate-/l*96.0%
associate-/r/89.6%
cancel-sign-sub-inv89.6%
metadata-eval89.6%
*-lft-identity89.6%
Simplified89.6%
if -4.3000000000000002e-38 < z < 3.4999999999999998e-298 or 2.3500000000000001e-197 < z < 1Initial program 92.2%
Taylor expanded in z around 0 96.1%
associate-*l/91.0%
associate-*r*91.0%
neg-mul-191.0%
distribute-rgt-out92.0%
unsub-neg92.0%
Simplified92.0%
if 3.4999999999999998e-298 < z < 2.3500000000000001e-197Initial program 74.3%
frac-2neg74.3%
div-inv74.3%
fma-neg74.3%
distribute-neg-frac74.3%
Applied egg-rr74.3%
fma-udef74.3%
+-commutative74.3%
distribute-lft-neg-out74.3%
unsub-neg74.3%
neg-mul-174.3%
*-commutative74.3%
associate-*r/74.3%
metadata-eval74.3%
associate-/r*74.3%
neg-mul-174.3%
associate-*r/74.3%
*-rgt-identity74.3%
neg-sub074.3%
associate--r-74.3%
metadata-eval74.3%
neg-mul-174.3%
associate-/r*74.3%
metadata-eval74.3%
Simplified74.3%
Taylor expanded in t around 0 91.1%
associate-/l*99.8%
Simplified99.8%
Final simplification91.5%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (- (/ y z) t))) (t_2 (/ x (/ z (+ y t)))))
(if (<= z -1.0)
t_2
(if (<= z 2.8e-297)
t_1
(if (<= z 2.55e-197) (/ y (/ z x)) (if (<= z 1.0) t_1 t_2))))))
double code(double x, double y, double z, double t) {
double t_1 = x * ((y / z) - t);
double t_2 = x / (z / (y + t));
double tmp;
if (z <= -1.0) {
tmp = t_2;
} else if (z <= 2.8e-297) {
tmp = t_1;
} else if (z <= 2.55e-197) {
tmp = y / (z / x);
} else if (z <= 1.0) {
tmp = t_1;
} else {
tmp = t_2;
}
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)
t_2 = x / (z / (y + t))
if (z <= (-1.0d0)) then
tmp = t_2
else if (z <= 2.8d-297) then
tmp = t_1
else if (z <= 2.55d-197) then
tmp = y / (z / x)
else if (z <= 1.0d0) then
tmp = t_1
else
tmp = t_2
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);
double t_2 = x / (z / (y + t));
double tmp;
if (z <= -1.0) {
tmp = t_2;
} else if (z <= 2.8e-297) {
tmp = t_1;
} else if (z <= 2.55e-197) {
tmp = y / (z / x);
} else if (z <= 1.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * ((y / z) - t) t_2 = x / (z / (y + t)) tmp = 0 if z <= -1.0: tmp = t_2 elif z <= 2.8e-297: tmp = t_1 elif z <= 2.55e-197: tmp = y / (z / x) elif z <= 1.0: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(Float64(y / z) - t)) t_2 = Float64(x / Float64(z / Float64(y + t))) tmp = 0.0 if (z <= -1.0) tmp = t_2; elseif (z <= 2.8e-297) tmp = t_1; elseif (z <= 2.55e-197) tmp = Float64(y / Float64(z / x)); elseif (z <= 1.0) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * ((y / z) - t); t_2 = x / (z / (y + t)); tmp = 0.0; if (z <= -1.0) tmp = t_2; elseif (z <= 2.8e-297) tmp = t_1; elseif (z <= 2.55e-197) tmp = y / (z / x); elseif (z <= 1.0) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(N[(y / z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(z / N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.0], t$95$2, If[LessEqual[z, 2.8e-297], t$95$1, If[LessEqual[z, 2.55e-197], N[(y / N[(z / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.0], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(\frac{y}{z} - t\right)\\
t_2 := \frac{x}{\frac{z}{y + t}}\\
\mathbf{if}\;z \leq -1:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{-297}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 2.55 \cdot 10^{-197}:\\
\;\;\;\;\frac{y}{\frac{z}{x}}\\
\mathbf{elif}\;z \leq 1:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -1 or 1 < z Initial program 98.0%
Taylor expanded in z around inf 84.7%
*-commutative84.7%
associate-/l*97.0%
neg-mul-197.0%
Simplified97.0%
if -1 < z < 2.79999999999999984e-297 or 2.5500000000000001e-197 < z < 1Initial program 92.0%
Taylor expanded in z around 0 94.7%
associate-*l/89.3%
associate-*r*89.3%
neg-mul-189.3%
distribute-rgt-out91.8%
unsub-neg91.8%
Simplified91.8%
if 2.79999999999999984e-297 < z < 2.5500000000000001e-197Initial program 74.3%
frac-2neg74.3%
div-inv74.3%
fma-neg74.3%
distribute-neg-frac74.3%
Applied egg-rr74.3%
fma-udef74.3%
+-commutative74.3%
distribute-lft-neg-out74.3%
unsub-neg74.3%
neg-mul-174.3%
*-commutative74.3%
associate-*r/74.3%
metadata-eval74.3%
associate-/r*74.3%
neg-mul-174.3%
associate-*r/74.3%
*-rgt-identity74.3%
neg-sub074.3%
associate--r-74.3%
metadata-eval74.3%
neg-mul-174.3%
associate-/r*74.3%
metadata-eval74.3%
Simplified74.3%
Taylor expanded in t around 0 91.1%
associate-/l*99.8%
Simplified99.8%
Final simplification94.8%
(FPCore (x y z t)
:precision binary64
(if (or (<= z -8.9e-131)
(not (or (<= z -6.2e-240) (and (not (<= z 1.16e-213)) (<= z 1.0)))))
(* t (/ x z))
(* t (- x))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -8.9e-131) || !((z <= -6.2e-240) || (!(z <= 1.16e-213) && (z <= 1.0)))) {
tmp = t * (x / z);
} else {
tmp = t * -x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z <= (-8.9d-131)) .or. (.not. (z <= (-6.2d-240)) .or. (.not. (z <= 1.16d-213)) .and. (z <= 1.0d0))) then
tmp = t * (x / z)
else
tmp = t * -x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -8.9e-131) || !((z <= -6.2e-240) || (!(z <= 1.16e-213) && (z <= 1.0)))) {
tmp = t * (x / z);
} else {
tmp = t * -x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -8.9e-131) or not ((z <= -6.2e-240) or (not (z <= 1.16e-213) and (z <= 1.0))): tmp = t * (x / z) else: tmp = t * -x return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -8.9e-131) || !((z <= -6.2e-240) || (!(z <= 1.16e-213) && (z <= 1.0)))) tmp = Float64(t * Float64(x / z)); else tmp = Float64(t * Float64(-x)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -8.9e-131) || ~(((z <= -6.2e-240) || (~((z <= 1.16e-213)) && (z <= 1.0))))) tmp = t * (x / z); else tmp = t * -x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -8.9e-131], N[Not[Or[LessEqual[z, -6.2e-240], And[N[Not[LessEqual[z, 1.16e-213]], $MachinePrecision], LessEqual[z, 1.0]]]], $MachinePrecision]], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], N[(t * (-x)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.9 \cdot 10^{-131} \lor \neg \left(z \leq -6.2 \cdot 10^{-240} \lor \neg \left(z \leq 1.16 \cdot 10^{-213}\right) \land z \leq 1\right):\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(-x\right)\\
\end{array}
\end{array}
if z < -8.9000000000000001e-131 or -6.20000000000000034e-240 < z < 1.15999999999999994e-213 or 1 < z Initial program 94.6%
Taylor expanded in z around inf 80.2%
*-commutative80.2%
associate-/l*85.0%
associate-/r/81.7%
cancel-sign-sub-inv81.7%
metadata-eval81.7%
*-lft-identity81.7%
Simplified81.7%
Taylor expanded in y around 0 41.7%
associate-*r/43.7%
Simplified43.7%
if -8.9000000000000001e-131 < z < -6.20000000000000034e-240 or 1.15999999999999994e-213 < z < 1Initial program 89.7%
Taylor expanded in z around 0 96.9%
associate-*l/89.2%
associate-*r*89.2%
neg-mul-189.2%
distribute-rgt-out89.3%
unsub-neg89.3%
Simplified89.3%
Taylor expanded in y around 0 41.8%
mul-1-neg41.8%
Simplified41.8%
Final simplification43.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* y (/ x z))))
(if (<= y -1.12e-82)
t_1
(if (<= y 4e-284)
(/ x (/ z t))
(if (<= y 1.1e-222)
(* t (- x))
(if (<= y 2.15e-193) (* (/ y z) x) t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = y * (x / z);
double tmp;
if (y <= -1.12e-82) {
tmp = t_1;
} else if (y <= 4e-284) {
tmp = x / (z / t);
} else if (y <= 1.1e-222) {
tmp = t * -x;
} else if (y <= 2.15e-193) {
tmp = (y / z) * x;
} 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 = y * (x / z)
if (y <= (-1.12d-82)) then
tmp = t_1
else if (y <= 4d-284) then
tmp = x / (z / t)
else if (y <= 1.1d-222) then
tmp = t * -x
else if (y <= 2.15d-193) then
tmp = (y / z) * x
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 = y * (x / z);
double tmp;
if (y <= -1.12e-82) {
tmp = t_1;
} else if (y <= 4e-284) {
tmp = x / (z / t);
} else if (y <= 1.1e-222) {
tmp = t * -x;
} else if (y <= 2.15e-193) {
tmp = (y / z) * x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = y * (x / z) tmp = 0 if y <= -1.12e-82: tmp = t_1 elif y <= 4e-284: tmp = x / (z / t) elif y <= 1.1e-222: tmp = t * -x elif y <= 2.15e-193: tmp = (y / z) * x else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(y * Float64(x / z)) tmp = 0.0 if (y <= -1.12e-82) tmp = t_1; elseif (y <= 4e-284) tmp = Float64(x / Float64(z / t)); elseif (y <= 1.1e-222) tmp = Float64(t * Float64(-x)); elseif (y <= 2.15e-193) tmp = Float64(Float64(y / z) * x); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y * (x / z); tmp = 0.0; if (y <= -1.12e-82) tmp = t_1; elseif (y <= 4e-284) tmp = x / (z / t); elseif (y <= 1.1e-222) tmp = t * -x; elseif (y <= 2.15e-193) tmp = (y / z) * x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.12e-82], t$95$1, If[LessEqual[y, 4e-284], N[(x / N[(z / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.1e-222], N[(t * (-x)), $MachinePrecision], If[LessEqual[y, 2.15e-193], N[(N[(y / z), $MachinePrecision] * x), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{x}{z}\\
\mathbf{if}\;y \leq -1.12 \cdot 10^{-82}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 4 \cdot 10^{-284}:\\
\;\;\;\;\frac{x}{\frac{z}{t}}\\
\mathbf{elif}\;y \leq 1.1 \cdot 10^{-222}:\\
\;\;\;\;t \cdot \left(-x\right)\\
\mathbf{elif}\;y \leq 2.15 \cdot 10^{-193}:\\
\;\;\;\;\frac{y}{z} \cdot x\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -1.12e-82 or 2.1500000000000001e-193 < y Initial program 91.3%
frac-2neg91.3%
div-inv91.3%
fma-neg91.3%
distribute-neg-frac91.3%
Applied egg-rr91.3%
fma-udef91.3%
+-commutative91.3%
distribute-lft-neg-out91.3%
unsub-neg91.3%
neg-mul-191.3%
*-commutative91.3%
associate-*r/91.3%
metadata-eval91.3%
associate-/r*91.3%
neg-mul-191.3%
associate-*r/91.3%
*-rgt-identity91.3%
neg-sub091.3%
associate--r-91.3%
metadata-eval91.3%
neg-mul-191.3%
associate-/r*91.3%
metadata-eval91.3%
Simplified91.3%
Taylor expanded in t around 0 73.7%
associate-*r/78.2%
Simplified78.2%
if -1.12e-82 < y < 4.00000000000000015e-284Initial program 97.7%
Taylor expanded in z around inf 71.2%
*-commutative71.2%
associate-/l*73.3%
associate-/r/62.6%
cancel-sign-sub-inv62.6%
metadata-eval62.6%
*-lft-identity62.6%
Simplified62.6%
Taylor expanded in y around 0 64.9%
associate-*r/58.4%
Simplified58.4%
associate-*r/64.9%
*-commutative64.9%
associate-/l*69.2%
Applied egg-rr69.2%
if 4.00000000000000015e-284 < y < 1.1e-222Initial program 99.8%
Taylor expanded in z around 0 75.1%
associate-*l/80.1%
associate-*r*80.1%
neg-mul-180.1%
distribute-rgt-out80.1%
unsub-neg80.1%
Simplified80.1%
Taylor expanded in y around 0 70.0%
mul-1-neg70.0%
Simplified70.0%
if 1.1e-222 < y < 2.1500000000000001e-193Initial program 99.7%
Taylor expanded in y around inf 64.6%
associate-*l/64.6%
Simplified64.6%
Final simplification75.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* y (/ x z))))
(if (<= y -1.3e-82)
t_1
(if (<= y 3e-284)
(/ x (/ z t))
(if (<= y 1e-221)
(* t (- x))
(if (<= y 1.2e-192) (/ x (/ z y)) t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = y * (x / z);
double tmp;
if (y <= -1.3e-82) {
tmp = t_1;
} else if (y <= 3e-284) {
tmp = x / (z / t);
} else if (y <= 1e-221) {
tmp = t * -x;
} else if (y <= 1.2e-192) {
tmp = x / (z / y);
} 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 = y * (x / z)
if (y <= (-1.3d-82)) then
tmp = t_1
else if (y <= 3d-284) then
tmp = x / (z / t)
else if (y <= 1d-221) then
tmp = t * -x
else if (y <= 1.2d-192) then
tmp = x / (z / y)
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 = y * (x / z);
double tmp;
if (y <= -1.3e-82) {
tmp = t_1;
} else if (y <= 3e-284) {
tmp = x / (z / t);
} else if (y <= 1e-221) {
tmp = t * -x;
} else if (y <= 1.2e-192) {
tmp = x / (z / y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = y * (x / z) tmp = 0 if y <= -1.3e-82: tmp = t_1 elif y <= 3e-284: tmp = x / (z / t) elif y <= 1e-221: tmp = t * -x elif y <= 1.2e-192: tmp = x / (z / y) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(y * Float64(x / z)) tmp = 0.0 if (y <= -1.3e-82) tmp = t_1; elseif (y <= 3e-284) tmp = Float64(x / Float64(z / t)); elseif (y <= 1e-221) tmp = Float64(t * Float64(-x)); elseif (y <= 1.2e-192) tmp = Float64(x / Float64(z / y)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y * (x / z); tmp = 0.0; if (y <= -1.3e-82) tmp = t_1; elseif (y <= 3e-284) tmp = x / (z / t); elseif (y <= 1e-221) tmp = t * -x; elseif (y <= 1.2e-192) tmp = x / (z / y); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.3e-82], t$95$1, If[LessEqual[y, 3e-284], N[(x / N[(z / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1e-221], N[(t * (-x)), $MachinePrecision], If[LessEqual[y, 1.2e-192], N[(x / N[(z / y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{x}{z}\\
\mathbf{if}\;y \leq -1.3 \cdot 10^{-82}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 3 \cdot 10^{-284}:\\
\;\;\;\;\frac{x}{\frac{z}{t}}\\
\mathbf{elif}\;y \leq 10^{-221}:\\
\;\;\;\;t \cdot \left(-x\right)\\
\mathbf{elif}\;y \leq 1.2 \cdot 10^{-192}:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -1.3e-82 or 1.2e-192 < y Initial program 91.2%
frac-2neg91.2%
div-inv91.2%
fma-neg91.2%
distribute-neg-frac91.2%
Applied egg-rr91.2%
fma-udef91.2%
+-commutative91.2%
distribute-lft-neg-out91.2%
unsub-neg91.2%
neg-mul-191.2%
*-commutative91.2%
associate-*r/91.2%
metadata-eval91.2%
associate-/r*91.2%
neg-mul-191.2%
associate-*r/91.2%
*-rgt-identity91.2%
neg-sub091.2%
associate--r-91.2%
metadata-eval91.2%
neg-mul-191.2%
associate-/r*91.2%
metadata-eval91.2%
Simplified91.2%
Taylor expanded in t around 0 73.9%
associate-*r/78.4%
Simplified78.4%
if -1.3e-82 < y < 3e-284Initial program 97.7%
Taylor expanded in z around inf 71.2%
*-commutative71.2%
associate-/l*73.3%
associate-/r/62.6%
cancel-sign-sub-inv62.6%
metadata-eval62.6%
*-lft-identity62.6%
Simplified62.6%
Taylor expanded in y around 0 64.9%
associate-*r/58.4%
Simplified58.4%
associate-*r/64.9%
*-commutative64.9%
associate-/l*69.2%
Applied egg-rr69.2%
if 3e-284 < y < 1.00000000000000002e-221Initial program 99.8%
Taylor expanded in z around 0 75.1%
associate-*l/80.1%
associate-*r*80.1%
neg-mul-180.1%
distribute-rgt-out80.1%
unsub-neg80.1%
Simplified80.1%
Taylor expanded in y around 0 70.0%
mul-1-neg70.0%
Simplified70.0%
if 1.00000000000000002e-221 < y < 1.2e-192Initial program 99.5%
Taylor expanded in y around inf 60.7%
associate-*l/60.7%
Simplified60.7%
*-commutative60.7%
clear-num60.8%
un-div-inv61.1%
Applied egg-rr61.1%
Final simplification75.8%
(FPCore (x y z t)
:precision binary64
(if (<= y -8.2e-81)
(/ y (/ z x))
(if (<= y 5.2e-284)
(/ x (/ z t))
(if (<= y 1.25e-221)
(* t (- x))
(if (<= y 9.5e-193) (/ x (/ z y)) (* y (/ x z)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -8.2e-81) {
tmp = y / (z / x);
} else if (y <= 5.2e-284) {
tmp = x / (z / t);
} else if (y <= 1.25e-221) {
tmp = t * -x;
} else if (y <= 9.5e-193) {
tmp = x / (z / y);
} 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 (y <= (-8.2d-81)) then
tmp = y / (z / x)
else if (y <= 5.2d-284) then
tmp = x / (z / t)
else if (y <= 1.25d-221) then
tmp = t * -x
else if (y <= 9.5d-193) then
tmp = x / (z / y)
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 (y <= -8.2e-81) {
tmp = y / (z / x);
} else if (y <= 5.2e-284) {
tmp = x / (z / t);
} else if (y <= 1.25e-221) {
tmp = t * -x;
} else if (y <= 9.5e-193) {
tmp = x / (z / y);
} else {
tmp = y * (x / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -8.2e-81: tmp = y / (z / x) elif y <= 5.2e-284: tmp = x / (z / t) elif y <= 1.25e-221: tmp = t * -x elif y <= 9.5e-193: tmp = x / (z / y) else: tmp = y * (x / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -8.2e-81) tmp = Float64(y / Float64(z / x)); elseif (y <= 5.2e-284) tmp = Float64(x / Float64(z / t)); elseif (y <= 1.25e-221) tmp = Float64(t * Float64(-x)); elseif (y <= 9.5e-193) tmp = Float64(x / Float64(z / y)); else tmp = Float64(y * Float64(x / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -8.2e-81) tmp = y / (z / x); elseif (y <= 5.2e-284) tmp = x / (z / t); elseif (y <= 1.25e-221) tmp = t * -x; elseif (y <= 9.5e-193) tmp = x / (z / y); else tmp = y * (x / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -8.2e-81], N[(y / N[(z / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.2e-284], N[(x / N[(z / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.25e-221], N[(t * (-x)), $MachinePrecision], If[LessEqual[y, 9.5e-193], N[(x / N[(z / y), $MachinePrecision]), $MachinePrecision], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.2 \cdot 10^{-81}:\\
\;\;\;\;\frac{y}{\frac{z}{x}}\\
\mathbf{elif}\;y \leq 5.2 \cdot 10^{-284}:\\
\;\;\;\;\frac{x}{\frac{z}{t}}\\
\mathbf{elif}\;y \leq 1.25 \cdot 10^{-221}:\\
\;\;\;\;t \cdot \left(-x\right)\\
\mathbf{elif}\;y \leq 9.5 \cdot 10^{-193}:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{x}{z}\\
\end{array}
\end{array}
if y < -8.19999999999999968e-81Initial program 89.8%
frac-2neg89.8%
div-inv89.7%
fma-neg89.7%
distribute-neg-frac89.7%
Applied egg-rr89.7%
fma-udef89.7%
+-commutative89.7%
distribute-lft-neg-out89.7%
unsub-neg89.7%
neg-mul-189.7%
*-commutative89.7%
associate-*r/89.7%
metadata-eval89.7%
associate-/r*89.7%
neg-mul-189.7%
associate-*r/89.7%
*-rgt-identity89.7%
neg-sub089.7%
associate--r-89.7%
metadata-eval89.7%
neg-mul-189.7%
associate-/r*89.7%
metadata-eval89.7%
Simplified89.7%
Taylor expanded in t around 0 77.0%
associate-/l*83.0%
Simplified83.0%
if -8.19999999999999968e-81 < y < 5.2e-284Initial program 97.7%
Taylor expanded in z around inf 71.2%
*-commutative71.2%
associate-/l*73.3%
associate-/r/62.6%
cancel-sign-sub-inv62.6%
metadata-eval62.6%
*-lft-identity62.6%
Simplified62.6%
Taylor expanded in y around 0 64.9%
associate-*r/58.4%
Simplified58.4%
associate-*r/64.9%
*-commutative64.9%
associate-/l*69.2%
Applied egg-rr69.2%
if 5.2e-284 < y < 1.24999999999999999e-221Initial program 99.8%
Taylor expanded in z around 0 75.1%
associate-*l/80.1%
associate-*r*80.1%
neg-mul-180.1%
distribute-rgt-out80.1%
unsub-neg80.1%
Simplified80.1%
Taylor expanded in y around 0 70.0%
mul-1-neg70.0%
Simplified70.0%
if 1.24999999999999999e-221 < y < 9.5000000000000003e-193Initial program 99.5%
Taylor expanded in y around inf 60.7%
associate-*l/60.7%
Simplified60.7%
*-commutative60.7%
clear-num60.8%
un-div-inv61.1%
Applied egg-rr61.1%
if 9.5000000000000003e-193 < y Initial program 92.7%
frac-2neg92.7%
div-inv92.7%
fma-neg92.7%
distribute-neg-frac92.7%
Applied egg-rr92.7%
fma-udef92.7%
+-commutative92.7%
distribute-lft-neg-out92.7%
unsub-neg92.7%
neg-mul-192.7%
*-commutative92.7%
associate-*r/92.7%
metadata-eval92.7%
associate-/r*92.7%
neg-mul-192.7%
associate-*r/92.7%
*-rgt-identity92.7%
neg-sub092.7%
associate--r-92.7%
metadata-eval92.7%
neg-mul-192.7%
associate-/r*92.7%
metadata-eval92.7%
Simplified92.7%
Taylor expanded in t around 0 70.8%
associate-*r/74.8%
Simplified74.8%
Final simplification76.1%
(FPCore (x y z t)
:precision binary64
(if (<= y -7.2e-68)
(/ y (/ z x))
(if (<= y 1.55e-205)
(* x (/ t (+ z -1.0)))
(if (<= y 1.22e+73) (* x (- (/ y z) t)) (* y (/ x z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -7.2e-68) {
tmp = y / (z / x);
} else if (y <= 1.55e-205) {
tmp = x * (t / (z + -1.0));
} else if (y <= 1.22e+73) {
tmp = x * ((y / 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 (y <= (-7.2d-68)) then
tmp = y / (z / x)
else if (y <= 1.55d-205) then
tmp = x * (t / (z + (-1.0d0)))
else if (y <= 1.22d+73) then
tmp = x * ((y / 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 (y <= -7.2e-68) {
tmp = y / (z / x);
} else if (y <= 1.55e-205) {
tmp = x * (t / (z + -1.0));
} else if (y <= 1.22e+73) {
tmp = x * ((y / z) - t);
} else {
tmp = y * (x / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -7.2e-68: tmp = y / (z / x) elif y <= 1.55e-205: tmp = x * (t / (z + -1.0)) elif y <= 1.22e+73: tmp = x * ((y / z) - t) else: tmp = y * (x / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -7.2e-68) tmp = Float64(y / Float64(z / x)); elseif (y <= 1.55e-205) tmp = Float64(x * Float64(t / Float64(z + -1.0))); elseif (y <= 1.22e+73) tmp = Float64(x * Float64(Float64(y / 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 (y <= -7.2e-68) tmp = y / (z / x); elseif (y <= 1.55e-205) tmp = x * (t / (z + -1.0)); elseif (y <= 1.22e+73) tmp = x * ((y / z) - t); else tmp = y * (x / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -7.2e-68], N[(y / N[(z / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.55e-205], N[(x * N[(t / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.22e+73], N[(x * N[(N[(y / z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.2 \cdot 10^{-68}:\\
\;\;\;\;\frac{y}{\frac{z}{x}}\\
\mathbf{elif}\;y \leq 1.55 \cdot 10^{-205}:\\
\;\;\;\;x \cdot \frac{t}{z + -1}\\
\mathbf{elif}\;y \leq 1.22 \cdot 10^{+73}:\\
\;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{x}{z}\\
\end{array}
\end{array}
if y < -7.20000000000000015e-68Initial program 89.6%
frac-2neg89.6%
div-inv89.5%
fma-neg89.5%
distribute-neg-frac89.5%
Applied egg-rr89.5%
fma-udef89.5%
+-commutative89.5%
distribute-lft-neg-out89.5%
unsub-neg89.5%
neg-mul-189.5%
*-commutative89.5%
associate-*r/89.5%
metadata-eval89.5%
associate-/r*89.5%
neg-mul-189.5%
associate-*r/89.5%
*-rgt-identity89.5%
neg-sub089.5%
associate--r-89.5%
metadata-eval89.5%
neg-mul-189.5%
associate-/r*89.5%
metadata-eval89.5%
Simplified89.5%
Taylor expanded in t around 0 77.6%
associate-/l*83.7%
Simplified83.7%
if -7.20000000000000015e-68 < y < 1.54999999999999991e-205Initial program 98.5%
Taylor expanded in y around 0 84.6%
associate-*r/84.6%
associate-*r*84.6%
neg-mul-184.6%
associate-*l/88.7%
*-commutative88.7%
neg-mul-188.7%
*-commutative88.7%
associate-*r/88.6%
metadata-eval88.6%
associate-/r*88.6%
neg-mul-188.6%
associate-*r/88.7%
*-rgt-identity88.7%
neg-sub088.7%
associate--r-88.7%
metadata-eval88.7%
Simplified88.7%
if 1.54999999999999991e-205 < y < 1.21999999999999998e73Initial program 97.6%
Taylor expanded in z around 0 69.0%
associate-*l/74.9%
associate-*r*74.9%
neg-mul-174.9%
distribute-rgt-out74.9%
unsub-neg74.9%
Simplified74.9%
if 1.21999999999999998e73 < y Initial program 88.3%
frac-2neg88.3%
div-inv88.3%
fma-neg88.3%
distribute-neg-frac88.3%
Applied egg-rr88.3%
fma-udef88.3%
+-commutative88.3%
distribute-lft-neg-out88.3%
unsub-neg88.3%
neg-mul-188.3%
*-commutative88.3%
associate-*r/88.3%
metadata-eval88.3%
associate-/r*88.3%
neg-mul-188.3%
associate-*r/88.3%
*-rgt-identity88.3%
neg-sub088.3%
associate--r-88.3%
metadata-eval88.3%
neg-mul-188.3%
associate-/r*88.3%
metadata-eval88.3%
Simplified88.3%
Taylor expanded in t around 0 90.1%
associate-*r/92.0%
Simplified92.0%
Final simplification85.0%
(FPCore (x y z t) :precision binary64 (* t (- x)))
double code(double x, double y, double z, double t) {
return t * -x;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = t * -x
end function
public static double code(double x, double y, double z, double t) {
return t * -x;
}
def code(x, y, z, t): return t * -x
function code(x, y, z, t) return Float64(t * Float64(-x)) end
function tmp = code(x, y, z, t) tmp = t * -x; end
code[x_, y_, z_, t_] := N[(t * (-x)), $MachinePrecision]
\begin{array}{l}
\\
t \cdot \left(-x\right)
\end{array}
Initial program 93.2%
Taylor expanded in z around 0 68.2%
associate-*l/66.8%
associate-*r*66.8%
neg-mul-166.8%
distribute-rgt-out68.7%
unsub-neg68.7%
Simplified68.7%
Taylor expanded in y around 0 23.9%
mul-1-neg23.9%
Simplified23.9%
Final simplification23.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 2023200
(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)))))