
(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 (+ z -1.0)))) (t_2 (* t_1 x)))
(if (<= t_1 (- INFINITY))
(* y (/ x z))
(if (<= t_1 -1e-206)
t_2
(if (<= t_1 1e-308)
(/ (+ y t) (/ z x))
(if (<= t_1 1e+280)
t_2
(* y (+ (/ x z) (/ (* t x) (* y (+ z -1.0)))))))))))
double code(double x, double y, double z, double t) {
double t_1 = (y / z) + (t / (z + -1.0));
double t_2 = t_1 * x;
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = y * (x / z);
} else if (t_1 <= -1e-206) {
tmp = t_2;
} else if (t_1 <= 1e-308) {
tmp = (y + t) / (z / x);
} else if (t_1 <= 1e+280) {
tmp = t_2;
} else {
tmp = y * ((x / z) + ((t * x) / (y * (z + -1.0))));
}
return tmp;
}
public static double code(double x, double y, double z, double t) {
double t_1 = (y / z) + (t / (z + -1.0));
double t_2 = t_1 * x;
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = y * (x / z);
} else if (t_1 <= -1e-206) {
tmp = t_2;
} else if (t_1 <= 1e-308) {
tmp = (y + t) / (z / x);
} else if (t_1 <= 1e+280) {
tmp = t_2;
} else {
tmp = y * ((x / z) + ((t * x) / (y * (z + -1.0))));
}
return tmp;
}
def code(x, y, z, t): t_1 = (y / z) + (t / (z + -1.0)) t_2 = t_1 * x tmp = 0 if t_1 <= -math.inf: tmp = y * (x / z) elif t_1 <= -1e-206: tmp = t_2 elif t_1 <= 1e-308: tmp = (y + t) / (z / x) elif t_1 <= 1e+280: tmp = t_2 else: tmp = y * ((x / z) + ((t * x) / (y * (z + -1.0)))) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(y / z) + Float64(t / Float64(z + -1.0))) t_2 = Float64(t_1 * x) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(y * Float64(x / z)); elseif (t_1 <= -1e-206) tmp = t_2; elseif (t_1 <= 1e-308) tmp = Float64(Float64(y + t) / Float64(z / x)); elseif (t_1 <= 1e+280) tmp = t_2; else tmp = Float64(y * Float64(Float64(x / z) + Float64(Float64(t * x) / Float64(y * Float64(z + -1.0))))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (y / z) + (t / (z + -1.0)); t_2 = t_1 * x; tmp = 0.0; if (t_1 <= -Inf) tmp = y * (x / z); elseif (t_1 <= -1e-206) tmp = t_2; elseif (t_1 <= 1e-308) tmp = (y + t) / (z / x); elseif (t_1 <= 1e+280) tmp = t_2; else tmp = y * ((x / z) + ((t * x) / (y * (z + -1.0)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y / z), $MachinePrecision] + N[(t / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * x), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -1e-206], t$95$2, If[LessEqual[t$95$1, 1e-308], N[(N[(y + t), $MachinePrecision] / N[(z / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+280], t$95$2, N[(y * N[(N[(x / z), $MachinePrecision] + N[(N[(t * x), $MachinePrecision] / N[(y * N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{z} + \frac{t}{z + -1}\\
t_2 := t\_1 \cdot x\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;y \cdot \frac{x}{z}\\
\mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-206}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 10^{-308}:\\
\;\;\;\;\frac{y + t}{\frac{z}{x}}\\
\mathbf{elif}\;t\_1 \leq 10^{+280}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(\frac{x}{z} + \frac{t \cdot x}{y \cdot \left(z + -1\right)}\right)\\
\end{array}
\end{array}
if (-.f64 (/.f64 y z) (/.f64 t (-.f64 1 z))) < -inf.0Initial program 42.0%
Taylor expanded in y around inf 91.9%
mul-1-neg91.9%
distribute-neg-frac291.9%
distribute-rgt-neg-in91.9%
neg-sub091.9%
associate--r-91.9%
metadata-eval91.9%
Simplified91.9%
Taylor expanded in t around 0 99.6%
if -inf.0 < (-.f64 (/.f64 y z) (/.f64 t (-.f64 1 z))) < -1.00000000000000003e-206 or 9.9999999999999991e-309 < (-.f64 (/.f64 y z) (/.f64 t (-.f64 1 z))) < 1e280Initial program 99.7%
if -1.00000000000000003e-206 < (-.f64 (/.f64 y z) (/.f64 t (-.f64 1 z))) < 9.9999999999999991e-309Initial program 74.8%
Taylor expanded in z around inf 99.8%
*-commutative99.8%
associate-/l*99.8%
cancel-sign-sub-inv99.8%
metadata-eval99.8%
*-lft-identity99.8%
+-commutative99.8%
Simplified99.8%
clear-num99.6%
un-div-inv99.9%
+-commutative99.9%
Applied egg-rr99.9%
if 1e280 < (-.f64 (/.f64 y z) (/.f64 t (-.f64 1 z))) Initial program 72.0%
Taylor expanded in y around inf 99.9%
mul-1-neg99.9%
distribute-neg-frac299.9%
distribute-rgt-neg-in99.9%
neg-sub099.9%
associate--r-99.9%
metadata-eval99.9%
Simplified99.9%
Final simplification99.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* y (/ x z))) (t_2 (+ (/ y z) (/ t (+ z -1.0)))) (t_3 (* t_2 x)))
(if (<= t_2 (- INFINITY))
t_1
(if (<= t_2 -1e-206)
t_3
(if (<= t_2 1e-308)
(/ (+ y t) (/ z x))
(if (<= t_2 1e+293) t_3 t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = y * (x / z);
double t_2 = (y / z) + (t / (z + -1.0));
double t_3 = t_2 * x;
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = t_1;
} else if (t_2 <= -1e-206) {
tmp = t_3;
} else if (t_2 <= 1e-308) {
tmp = (y + t) / (z / x);
} else if (t_2 <= 1e+293) {
tmp = t_3;
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double x, double y, double z, double t) {
double t_1 = y * (x / z);
double t_2 = (y / z) + (t / (z + -1.0));
double t_3 = t_2 * x;
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = t_1;
} else if (t_2 <= -1e-206) {
tmp = t_3;
} else if (t_2 <= 1e-308) {
tmp = (y + t) / (z / x);
} else if (t_2 <= 1e+293) {
tmp = t_3;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = y * (x / z) t_2 = (y / z) + (t / (z + -1.0)) t_3 = t_2 * x tmp = 0 if t_2 <= -math.inf: tmp = t_1 elif t_2 <= -1e-206: tmp = t_3 elif t_2 <= 1e-308: tmp = (y + t) / (z / x) elif t_2 <= 1e+293: tmp = t_3 else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(y * Float64(x / z)) t_2 = Float64(Float64(y / z) + Float64(t / Float64(z + -1.0))) t_3 = Float64(t_2 * x) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = t_1; elseif (t_2 <= -1e-206) tmp = t_3; elseif (t_2 <= 1e-308) tmp = Float64(Float64(y + t) / Float64(z / x)); elseif (t_2 <= 1e+293) tmp = t_3; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y * (x / z); t_2 = (y / z) + (t / (z + -1.0)); t_3 = t_2 * x; tmp = 0.0; if (t_2 <= -Inf) tmp = t_1; elseif (t_2 <= -1e-206) tmp = t_3; elseif (t_2 <= 1e-308) tmp = (y + t) / (z / x); elseif (t_2 <= 1e+293) tmp = t_3; 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]}, Block[{t$95$2 = N[(N[(y / z), $MachinePrecision] + N[(t / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * x), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$1, If[LessEqual[t$95$2, -1e-206], t$95$3, If[LessEqual[t$95$2, 1e-308], N[(N[(y + t), $MachinePrecision] / N[(z / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+293], t$95$3, t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{x}{z}\\
t_2 := \frac{y}{z} + \frac{t}{z + -1}\\
t_3 := t\_2 \cdot x\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-206}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_2 \leq 10^{-308}:\\
\;\;\;\;\frac{y + t}{\frac{z}{x}}\\
\mathbf{elif}\;t\_2 \leq 10^{+293}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (-.f64 (/.f64 y z) (/.f64 t (-.f64 1 z))) < -inf.0 or 9.9999999999999992e292 < (-.f64 (/.f64 y z) (/.f64 t (-.f64 1 z))) Initial program 56.2%
Taylor expanded in y around inf 96.5%
mul-1-neg96.5%
distribute-neg-frac296.5%
distribute-rgt-neg-in96.5%
neg-sub096.5%
associate--r-96.5%
metadata-eval96.5%
Simplified96.5%
Taylor expanded in t around 0 99.8%
if -inf.0 < (-.f64 (/.f64 y z) (/.f64 t (-.f64 1 z))) < -1.00000000000000003e-206 or 9.9999999999999991e-309 < (-.f64 (/.f64 y z) (/.f64 t (-.f64 1 z))) < 9.9999999999999992e292Initial program 99.7%
if -1.00000000000000003e-206 < (-.f64 (/.f64 y z) (/.f64 t (-.f64 1 z))) < 9.9999999999999991e-309Initial program 74.8%
Taylor expanded in z around inf 99.8%
*-commutative99.8%
associate-/l*99.8%
cancel-sign-sub-inv99.8%
metadata-eval99.8%
*-lft-identity99.8%
+-commutative99.8%
Simplified99.8%
clear-num99.6%
un-div-inv99.9%
+-commutative99.9%
Applied egg-rr99.9%
Final simplification99.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (/ x z))) (t_2 (* (/ y z) x)))
(if (<= z -1.9e+73)
(/ (* y x) z)
(if (<= z 1650.0)
(* x (- (/ y z) t))
(if (<= z 2.1e+41)
t_1
(if (<= z 4.25e+71)
t_2
(if (<= z 3.5e+131)
(* x (/ t z))
(if (<= z 5.2e+260)
t_2
(if (<= z 9e+283) t_1 (/ x (/ z y)))))))))))
double code(double x, double y, double z, double t) {
double t_1 = t * (x / z);
double t_2 = (y / z) * x;
double tmp;
if (z <= -1.9e+73) {
tmp = (y * x) / z;
} else if (z <= 1650.0) {
tmp = x * ((y / z) - t);
} else if (z <= 2.1e+41) {
tmp = t_1;
} else if (z <= 4.25e+71) {
tmp = t_2;
} else if (z <= 3.5e+131) {
tmp = x * (t / z);
} else if (z <= 5.2e+260) {
tmp = t_2;
} else if (z <= 9e+283) {
tmp = t_1;
} else {
tmp = x / (z / y);
}
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 / z)
t_2 = (y / z) * x
if (z <= (-1.9d+73)) then
tmp = (y * x) / z
else if (z <= 1650.0d0) then
tmp = x * ((y / z) - t)
else if (z <= 2.1d+41) then
tmp = t_1
else if (z <= 4.25d+71) then
tmp = t_2
else if (z <= 3.5d+131) then
tmp = x * (t / z)
else if (z <= 5.2d+260) then
tmp = t_2
else if (z <= 9d+283) then
tmp = t_1
else
tmp = x / (z / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = t * (x / z);
double t_2 = (y / z) * x;
double tmp;
if (z <= -1.9e+73) {
tmp = (y * x) / z;
} else if (z <= 1650.0) {
tmp = x * ((y / z) - t);
} else if (z <= 2.1e+41) {
tmp = t_1;
} else if (z <= 4.25e+71) {
tmp = t_2;
} else if (z <= 3.5e+131) {
tmp = x * (t / z);
} else if (z <= 5.2e+260) {
tmp = t_2;
} else if (z <= 9e+283) {
tmp = t_1;
} else {
tmp = x / (z / y);
}
return tmp;
}
def code(x, y, z, t): t_1 = t * (x / z) t_2 = (y / z) * x tmp = 0 if z <= -1.9e+73: tmp = (y * x) / z elif z <= 1650.0: tmp = x * ((y / z) - t) elif z <= 2.1e+41: tmp = t_1 elif z <= 4.25e+71: tmp = t_2 elif z <= 3.5e+131: tmp = x * (t / z) elif z <= 5.2e+260: tmp = t_2 elif z <= 9e+283: tmp = t_1 else: tmp = x / (z / y) return tmp
function code(x, y, z, t) t_1 = Float64(t * Float64(x / z)) t_2 = Float64(Float64(y / z) * x) tmp = 0.0 if (z <= -1.9e+73) tmp = Float64(Float64(y * x) / z); elseif (z <= 1650.0) tmp = Float64(x * Float64(Float64(y / z) - t)); elseif (z <= 2.1e+41) tmp = t_1; elseif (z <= 4.25e+71) tmp = t_2; elseif (z <= 3.5e+131) tmp = Float64(x * Float64(t / z)); elseif (z <= 5.2e+260) tmp = t_2; elseif (z <= 9e+283) tmp = t_1; else tmp = Float64(x / Float64(z / y)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t * (x / z); t_2 = (y / z) * x; tmp = 0.0; if (z <= -1.9e+73) tmp = (y * x) / z; elseif (z <= 1650.0) tmp = x * ((y / z) - t); elseif (z <= 2.1e+41) tmp = t_1; elseif (z <= 4.25e+71) tmp = t_2; elseif (z <= 3.5e+131) tmp = x * (t / z); elseif (z <= 5.2e+260) tmp = t_2; elseif (z <= 9e+283) tmp = t_1; else tmp = x / (z / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y / z), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[z, -1.9e+73], N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 1650.0], N[(x * N[(N[(y / z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.1e+41], t$95$1, If[LessEqual[z, 4.25e+71], t$95$2, If[LessEqual[z, 3.5e+131], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.2e+260], t$95$2, If[LessEqual[z, 9e+283], t$95$1, N[(x / N[(z / y), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{x}{z}\\
t_2 := \frac{y}{z} \cdot x\\
\mathbf{if}\;z \leq -1.9 \cdot 10^{+73}:\\
\;\;\;\;\frac{y \cdot x}{z}\\
\mathbf{elif}\;z \leq 1650:\\
\;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{+41}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 4.25 \cdot 10^{+71}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{+131}:\\
\;\;\;\;x \cdot \frac{t}{z}\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{+260}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 9 \cdot 10^{+283}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\
\end{array}
\end{array}
if z < -1.90000000000000011e73Initial program 95.2%
Taylor expanded in y around inf 65.2%
if -1.90000000000000011e73 < z < 1650Initial program 90.0%
Taylor expanded in z around 0 86.4%
mul-1-neg86.4%
unsub-neg86.4%
div-sub86.4%
associate-/l*86.5%
*-inverses86.5%
*-rgt-identity86.5%
Simplified86.5%
if 1650 < z < 2.1e41 or 5.1999999999999996e260 < z < 9.0000000000000002e283Initial program 89.4%
Taylor expanded in y around 0 67.8%
mul-1-neg67.8%
distribute-neg-frac267.8%
neg-sub067.8%
associate--r-67.8%
metadata-eval67.8%
Simplified67.8%
Taylor expanded in z around inf 66.8%
associate-/l*77.5%
Simplified77.5%
if 2.1e41 < z < 4.2499999999999998e71 or 3.4999999999999999e131 < z < 5.1999999999999996e260Initial program 97.2%
Taylor expanded in y around inf 67.3%
associate-*r/72.3%
Simplified72.3%
if 4.2499999999999998e71 < z < 3.4999999999999999e131Initial program 95.9%
Taylor expanded in y around 0 82.9%
mul-1-neg82.9%
distribute-neg-frac282.9%
neg-sub082.9%
associate--r-82.9%
metadata-eval82.9%
Simplified82.9%
Taylor expanded in z around inf 82.9%
if 9.0000000000000002e283 < z Initial program 99.7%
Taylor expanded in y around inf 81.4%
associate-*r/81.4%
Simplified81.4%
clear-num81.4%
un-div-inv81.7%
Applied egg-rr81.7%
Final simplification79.5%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* y (/ x z))) (t_2 (* x (/ t z))) (t_3 (* (/ y z) x)))
(if (<= t -6.8e+202)
t_2
(if (<= t -3e+145)
t_1
(if (<= t -1.2e+84)
t_2
(if (<= t -2e-284)
t_3
(if (<= t 2.35e-160) t_1 (if (<= t 6.2e+62) t_3 t_2))))))))
double code(double x, double y, double z, double t) {
double t_1 = y * (x / z);
double t_2 = x * (t / z);
double t_3 = (y / z) * x;
double tmp;
if (t <= -6.8e+202) {
tmp = t_2;
} else if (t <= -3e+145) {
tmp = t_1;
} else if (t <= -1.2e+84) {
tmp = t_2;
} else if (t <= -2e-284) {
tmp = t_3;
} else if (t <= 2.35e-160) {
tmp = t_1;
} else if (t <= 6.2e+62) {
tmp = t_3;
} 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) :: t_3
real(8) :: tmp
t_1 = y * (x / z)
t_2 = x * (t / z)
t_3 = (y / z) * x
if (t <= (-6.8d+202)) then
tmp = t_2
else if (t <= (-3d+145)) then
tmp = t_1
else if (t <= (-1.2d+84)) then
tmp = t_2
else if (t <= (-2d-284)) then
tmp = t_3
else if (t <= 2.35d-160) then
tmp = t_1
else if (t <= 6.2d+62) then
tmp = t_3
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 = y * (x / z);
double t_2 = x * (t / z);
double t_3 = (y / z) * x;
double tmp;
if (t <= -6.8e+202) {
tmp = t_2;
} else if (t <= -3e+145) {
tmp = t_1;
} else if (t <= -1.2e+84) {
tmp = t_2;
} else if (t <= -2e-284) {
tmp = t_3;
} else if (t <= 2.35e-160) {
tmp = t_1;
} else if (t <= 6.2e+62) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = y * (x / z) t_2 = x * (t / z) t_3 = (y / z) * x tmp = 0 if t <= -6.8e+202: tmp = t_2 elif t <= -3e+145: tmp = t_1 elif t <= -1.2e+84: tmp = t_2 elif t <= -2e-284: tmp = t_3 elif t <= 2.35e-160: tmp = t_1 elif t <= 6.2e+62: tmp = t_3 else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(y * Float64(x / z)) t_2 = Float64(x * Float64(t / z)) t_3 = Float64(Float64(y / z) * x) tmp = 0.0 if (t <= -6.8e+202) tmp = t_2; elseif (t <= -3e+145) tmp = t_1; elseif (t <= -1.2e+84) tmp = t_2; elseif (t <= -2e-284) tmp = t_3; elseif (t <= 2.35e-160) tmp = t_1; elseif (t <= 6.2e+62) tmp = t_3; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y * (x / z); t_2 = x * (t / z); t_3 = (y / z) * x; tmp = 0.0; if (t <= -6.8e+202) tmp = t_2; elseif (t <= -3e+145) tmp = t_1; elseif (t <= -1.2e+84) tmp = t_2; elseif (t <= -2e-284) tmp = t_3; elseif (t <= 2.35e-160) tmp = t_1; elseif (t <= 6.2e+62) tmp = t_3; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(y / z), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[t, -6.8e+202], t$95$2, If[LessEqual[t, -3e+145], t$95$1, If[LessEqual[t, -1.2e+84], t$95$2, If[LessEqual[t, -2e-284], t$95$3, If[LessEqual[t, 2.35e-160], t$95$1, If[LessEqual[t, 6.2e+62], t$95$3, t$95$2]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{x}{z}\\
t_2 := x \cdot \frac{t}{z}\\
t_3 := \frac{y}{z} \cdot x\\
\mathbf{if}\;t \leq -6.8 \cdot 10^{+202}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -3 \cdot 10^{+145}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.2 \cdot 10^{+84}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -2 \cdot 10^{-284}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t \leq 2.35 \cdot 10^{-160}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 6.2 \cdot 10^{+62}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -6.8e202 or -3.0000000000000002e145 < t < -1.2e84 or 6.20000000000000029e62 < t Initial program 94.6%
Taylor expanded in y around 0 83.0%
mul-1-neg83.0%
distribute-neg-frac283.0%
neg-sub083.0%
associate--r-83.0%
metadata-eval83.0%
Simplified83.0%
Taylor expanded in z around inf 58.3%
if -6.8e202 < t < -3.0000000000000002e145 or -2.00000000000000007e-284 < t < 2.3499999999999999e-160Initial program 82.6%
Taylor expanded in y around inf 91.5%
mul-1-neg91.5%
distribute-neg-frac291.5%
distribute-rgt-neg-in91.5%
neg-sub091.5%
associate--r-91.5%
metadata-eval91.5%
Simplified91.5%
Taylor expanded in t around 0 89.4%
if -1.2e84 < t < -2.00000000000000007e-284 or 2.3499999999999999e-160 < t < 6.20000000000000029e62Initial program 94.8%
Taylor expanded in y around inf 71.8%
associate-*r/72.5%
Simplified72.5%
Final simplification71.6%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (/ t z))) (t_2 (* y (/ x z))))
(if (<= t -5.6e+202)
t_1
(if (<= t -1.2e+146)
t_2
(if (<= t -1.06e+85)
t_1
(if (<= t -8.8e-279)
(/ x (/ z y))
(if (<= t 2.8e-155) t_2 (if (<= t 3.6e+59) (* (/ y z) x) t_1))))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (t / z);
double t_2 = y * (x / z);
double tmp;
if (t <= -5.6e+202) {
tmp = t_1;
} else if (t <= -1.2e+146) {
tmp = t_2;
} else if (t <= -1.06e+85) {
tmp = t_1;
} else if (t <= -8.8e-279) {
tmp = x / (z / y);
} else if (t <= 2.8e-155) {
tmp = t_2;
} else if (t <= 3.6e+59) {
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) :: t_2
real(8) :: tmp
t_1 = x * (t / z)
t_2 = y * (x / z)
if (t <= (-5.6d+202)) then
tmp = t_1
else if (t <= (-1.2d+146)) then
tmp = t_2
else if (t <= (-1.06d+85)) then
tmp = t_1
else if (t <= (-8.8d-279)) then
tmp = x / (z / y)
else if (t <= 2.8d-155) then
tmp = t_2
else if (t <= 3.6d+59) 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 = x * (t / z);
double t_2 = y * (x / z);
double tmp;
if (t <= -5.6e+202) {
tmp = t_1;
} else if (t <= -1.2e+146) {
tmp = t_2;
} else if (t <= -1.06e+85) {
tmp = t_1;
} else if (t <= -8.8e-279) {
tmp = x / (z / y);
} else if (t <= 2.8e-155) {
tmp = t_2;
} else if (t <= 3.6e+59) {
tmp = (y / z) * x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (t / z) t_2 = y * (x / z) tmp = 0 if t <= -5.6e+202: tmp = t_1 elif t <= -1.2e+146: tmp = t_2 elif t <= -1.06e+85: tmp = t_1 elif t <= -8.8e-279: tmp = x / (z / y) elif t <= 2.8e-155: tmp = t_2 elif t <= 3.6e+59: tmp = (y / z) * x else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(t / z)) t_2 = Float64(y * Float64(x / z)) tmp = 0.0 if (t <= -5.6e+202) tmp = t_1; elseif (t <= -1.2e+146) tmp = t_2; elseif (t <= -1.06e+85) tmp = t_1; elseif (t <= -8.8e-279) tmp = Float64(x / Float64(z / y)); elseif (t <= 2.8e-155) tmp = t_2; elseif (t <= 3.6e+59) tmp = Float64(Float64(y / z) * x); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (t / z); t_2 = y * (x / z); tmp = 0.0; if (t <= -5.6e+202) tmp = t_1; elseif (t <= -1.2e+146) tmp = t_2; elseif (t <= -1.06e+85) tmp = t_1; elseif (t <= -8.8e-279) tmp = x / (z / y); elseif (t <= 2.8e-155) tmp = t_2; elseif (t <= 3.6e+59) tmp = (y / z) * x; 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[(y * N[(x / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.6e+202], t$95$1, If[LessEqual[t, -1.2e+146], t$95$2, If[LessEqual[t, -1.06e+85], t$95$1, If[LessEqual[t, -8.8e-279], N[(x / N[(z / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.8e-155], t$95$2, If[LessEqual[t, 3.6e+59], N[(N[(y / z), $MachinePrecision] * x), $MachinePrecision], t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{t}{z}\\
t_2 := y \cdot \frac{x}{z}\\
\mathbf{if}\;t \leq -5.6 \cdot 10^{+202}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.2 \cdot 10^{+146}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -1.06 \cdot 10^{+85}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -8.8 \cdot 10^{-279}:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\
\mathbf{elif}\;t \leq 2.8 \cdot 10^{-155}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 3.6 \cdot 10^{+59}:\\
\;\;\;\;\frac{y}{z} \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -5.60000000000000032e202 or -1.2000000000000001e146 < t < -1.0600000000000001e85 or 3.5999999999999999e59 < t Initial program 94.6%
Taylor expanded in y around 0 83.0%
mul-1-neg83.0%
distribute-neg-frac283.0%
neg-sub083.0%
associate--r-83.0%
metadata-eval83.0%
Simplified83.0%
Taylor expanded in z around inf 58.3%
if -5.60000000000000032e202 < t < -1.2000000000000001e146 or -8.80000000000000002e-279 < t < 2.8e-155Initial program 82.6%
Taylor expanded in y around inf 91.5%
mul-1-neg91.5%
distribute-neg-frac291.5%
distribute-rgt-neg-in91.5%
neg-sub091.5%
associate--r-91.5%
metadata-eval91.5%
Simplified91.5%
Taylor expanded in t around 0 89.4%
if -1.0600000000000001e85 < t < -8.80000000000000002e-279Initial program 94.9%
Taylor expanded in y around inf 73.1%
associate-*r/73.2%
Simplified73.2%
clear-num73.2%
un-div-inv73.3%
Applied egg-rr73.3%
if 2.8e-155 < t < 3.5999999999999999e59Initial program 94.7%
Taylor expanded in y around inf 69.9%
associate-*r/71.5%
Simplified71.5%
Final simplification71.6%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (/ t z))) (t_2 (* y (/ x z))))
(if (<= t -6.8e+202)
t_1
(if (<= t -3.2e+145)
t_2
(if (<= t -7.5e+87)
(/ (* t x) z)
(if (<= t -6.5e-282)
(/ x (/ z y))
(if (<= t 9e-160) t_2 (if (<= t 3e+61) (* (/ y z) x) t_1))))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (t / z);
double t_2 = y * (x / z);
double tmp;
if (t <= -6.8e+202) {
tmp = t_1;
} else if (t <= -3.2e+145) {
tmp = t_2;
} else if (t <= -7.5e+87) {
tmp = (t * x) / z;
} else if (t <= -6.5e-282) {
tmp = x / (z / y);
} else if (t <= 9e-160) {
tmp = t_2;
} else if (t <= 3e+61) {
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) :: t_2
real(8) :: tmp
t_1 = x * (t / z)
t_2 = y * (x / z)
if (t <= (-6.8d+202)) then
tmp = t_1
else if (t <= (-3.2d+145)) then
tmp = t_2
else if (t <= (-7.5d+87)) then
tmp = (t * x) / z
else if (t <= (-6.5d-282)) then
tmp = x / (z / y)
else if (t <= 9d-160) then
tmp = t_2
else if (t <= 3d+61) 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 = x * (t / z);
double t_2 = y * (x / z);
double tmp;
if (t <= -6.8e+202) {
tmp = t_1;
} else if (t <= -3.2e+145) {
tmp = t_2;
} else if (t <= -7.5e+87) {
tmp = (t * x) / z;
} else if (t <= -6.5e-282) {
tmp = x / (z / y);
} else if (t <= 9e-160) {
tmp = t_2;
} else if (t <= 3e+61) {
tmp = (y / z) * x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (t / z) t_2 = y * (x / z) tmp = 0 if t <= -6.8e+202: tmp = t_1 elif t <= -3.2e+145: tmp = t_2 elif t <= -7.5e+87: tmp = (t * x) / z elif t <= -6.5e-282: tmp = x / (z / y) elif t <= 9e-160: tmp = t_2 elif t <= 3e+61: tmp = (y / z) * x else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(t / z)) t_2 = Float64(y * Float64(x / z)) tmp = 0.0 if (t <= -6.8e+202) tmp = t_1; elseif (t <= -3.2e+145) tmp = t_2; elseif (t <= -7.5e+87) tmp = Float64(Float64(t * x) / z); elseif (t <= -6.5e-282) tmp = Float64(x / Float64(z / y)); elseif (t <= 9e-160) tmp = t_2; elseif (t <= 3e+61) tmp = Float64(Float64(y / z) * x); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (t / z); t_2 = y * (x / z); tmp = 0.0; if (t <= -6.8e+202) tmp = t_1; elseif (t <= -3.2e+145) tmp = t_2; elseif (t <= -7.5e+87) tmp = (t * x) / z; elseif (t <= -6.5e-282) tmp = x / (z / y); elseif (t <= 9e-160) tmp = t_2; elseif (t <= 3e+61) tmp = (y / z) * x; 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[(y * N[(x / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.8e+202], t$95$1, If[LessEqual[t, -3.2e+145], t$95$2, If[LessEqual[t, -7.5e+87], N[(N[(t * x), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t, -6.5e-282], N[(x / N[(z / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9e-160], t$95$2, If[LessEqual[t, 3e+61], N[(N[(y / z), $MachinePrecision] * x), $MachinePrecision], t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{t}{z}\\
t_2 := y \cdot \frac{x}{z}\\
\mathbf{if}\;t \leq -6.8 \cdot 10^{+202}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -3.2 \cdot 10^{+145}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -7.5 \cdot 10^{+87}:\\
\;\;\;\;\frac{t \cdot x}{z}\\
\mathbf{elif}\;t \leq -6.5 \cdot 10^{-282}:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\
\mathbf{elif}\;t \leq 9 \cdot 10^{-160}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 3 \cdot 10^{+61}:\\
\;\;\;\;\frac{y}{z} \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -6.8e202 or 3e61 < t Initial program 94.1%
Taylor expanded in y around 0 81.5%
mul-1-neg81.5%
distribute-neg-frac281.5%
neg-sub081.5%
associate--r-81.5%
metadata-eval81.5%
Simplified81.5%
Taylor expanded in z around inf 58.7%
if -6.8e202 < t < -3.20000000000000008e145 or -6.50000000000000012e-282 < t < 9.00000000000000053e-160Initial program 82.6%
Taylor expanded in y around inf 91.5%
mul-1-neg91.5%
distribute-neg-frac291.5%
distribute-rgt-neg-in91.5%
neg-sub091.5%
associate--r-91.5%
metadata-eval91.5%
Simplified91.5%
Taylor expanded in t around 0 89.4%
if -3.20000000000000008e145 < t < -7.50000000000000014e87Initial program 99.7%
Taylor expanded in y around 0 99.7%
mul-1-neg99.7%
distribute-neg-frac299.7%
neg-sub099.7%
associate--r-99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around inf 54.5%
if -7.50000000000000014e87 < t < -6.50000000000000012e-282Initial program 94.9%
Taylor expanded in y around inf 73.1%
associate-*r/73.2%
Simplified73.2%
clear-num73.2%
un-div-inv73.3%
Applied egg-rr73.3%
if 9.00000000000000053e-160 < t < 3e61Initial program 94.7%
Taylor expanded in y around inf 69.9%
associate-*r/71.5%
Simplified71.5%
Final simplification71.6%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (/ t z))))
(if (<= t -5.4e+202)
t_1
(if (<= t -2.05e+142)
(* y (/ x z))
(if (<= t -2.4e+90)
(/ (* t x) z)
(if (<= t 1.55e+64) (/ (* y x) z) t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (t / z);
double tmp;
if (t <= -5.4e+202) {
tmp = t_1;
} else if (t <= -2.05e+142) {
tmp = y * (x / z);
} else if (t <= -2.4e+90) {
tmp = (t * x) / z;
} else if (t <= 1.55e+64) {
tmp = (y * x) / 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 * (t / z)
if (t <= (-5.4d+202)) then
tmp = t_1
else if (t <= (-2.05d+142)) then
tmp = y * (x / z)
else if (t <= (-2.4d+90)) then
tmp = (t * x) / z
else if (t <= 1.55d+64) then
tmp = (y * x) / 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 * (t / z);
double tmp;
if (t <= -5.4e+202) {
tmp = t_1;
} else if (t <= -2.05e+142) {
tmp = y * (x / z);
} else if (t <= -2.4e+90) {
tmp = (t * x) / z;
} else if (t <= 1.55e+64) {
tmp = (y * x) / z;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (t / z) tmp = 0 if t <= -5.4e+202: tmp = t_1 elif t <= -2.05e+142: tmp = y * (x / z) elif t <= -2.4e+90: tmp = (t * x) / z elif t <= 1.55e+64: tmp = (y * x) / z else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(t / z)) tmp = 0.0 if (t <= -5.4e+202) tmp = t_1; elseif (t <= -2.05e+142) tmp = Float64(y * Float64(x / z)); elseif (t <= -2.4e+90) tmp = Float64(Float64(t * x) / z); elseif (t <= 1.55e+64) tmp = Float64(Float64(y * x) / z); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (t / z); tmp = 0.0; if (t <= -5.4e+202) tmp = t_1; elseif (t <= -2.05e+142) tmp = y * (x / z); elseif (t <= -2.4e+90) tmp = (t * x) / z; elseif (t <= 1.55e+64) tmp = (y * x) / z; 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]}, If[LessEqual[t, -5.4e+202], t$95$1, If[LessEqual[t, -2.05e+142], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -2.4e+90], N[(N[(t * x), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t, 1.55e+64], N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{t}{z}\\
\mathbf{if}\;t \leq -5.4 \cdot 10^{+202}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -2.05 \cdot 10^{+142}:\\
\;\;\;\;y \cdot \frac{x}{z}\\
\mathbf{elif}\;t \leq -2.4 \cdot 10^{+90}:\\
\;\;\;\;\frac{t \cdot x}{z}\\
\mathbf{elif}\;t \leq 1.55 \cdot 10^{+64}:\\
\;\;\;\;\frac{y \cdot x}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -5.3999999999999999e202 or 1.55e64 < t Initial program 94.1%
Taylor expanded in y around 0 81.5%
mul-1-neg81.5%
distribute-neg-frac281.5%
neg-sub081.5%
associate--r-81.5%
metadata-eval81.5%
Simplified81.5%
Taylor expanded in z around inf 58.7%
if -5.3999999999999999e202 < t < -2.04999999999999991e142Initial program 92.1%
Taylor expanded in y around inf 75.0%
mul-1-neg75.0%
distribute-neg-frac275.0%
distribute-rgt-neg-in75.0%
neg-sub075.0%
associate--r-75.0%
metadata-eval75.0%
Simplified75.0%
Taylor expanded in t around 0 75.7%
if -2.04999999999999991e142 < t < -2.4000000000000001e90Initial program 99.7%
Taylor expanded in y around 0 99.7%
mul-1-neg99.7%
distribute-neg-frac299.7%
neg-sub099.7%
associate--r-99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around inf 54.5%
if -2.4000000000000001e90 < t < 1.55e64Initial program 91.6%
Taylor expanded in y around inf 75.1%
Final simplification70.4%
(FPCore (x y z t) :precision binary64 (if (or (<= y -2e-96) (not (<= y 1e-30))) (/ (* y x) z) (* x (/ t (+ z -1.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2e-96) || !(y <= 1e-30)) {
tmp = (y * x) / z;
} else {
tmp = x * (t / (z + -1.0));
}
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 <= (-2d-96)) .or. (.not. (y <= 1d-30))) then
tmp = (y * x) / z
else
tmp = x * (t / (z + (-1.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2e-96) || !(y <= 1e-30)) {
tmp = (y * x) / z;
} else {
tmp = x * (t / (z + -1.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -2e-96) or not (y <= 1e-30): tmp = (y * x) / z else: tmp = x * (t / (z + -1.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -2e-96) || !(y <= 1e-30)) tmp = Float64(Float64(y * x) / z); else tmp = Float64(x * Float64(t / Float64(z + -1.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -2e-96) || ~((y <= 1e-30))) tmp = (y * x) / z; else tmp = x * (t / (z + -1.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -2e-96], N[Not[LessEqual[y, 1e-30]], $MachinePrecision]], N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision], N[(x * N[(t / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2 \cdot 10^{-96} \lor \neg \left(y \leq 10^{-30}\right):\\
\;\;\;\;\frac{y \cdot x}{z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{t}{z + -1}\\
\end{array}
\end{array}
if y < -1.9999999999999998e-96 or 1e-30 < y Initial program 89.4%
Taylor expanded in y around inf 81.2%
if -1.9999999999999998e-96 < y < 1e-30Initial program 96.6%
Taylor expanded in y around 0 74.0%
mul-1-neg74.0%
distribute-neg-frac274.0%
neg-sub074.0%
associate--r-74.0%
metadata-eval74.0%
Simplified74.0%
Final simplification78.1%
(FPCore (x y z t) :precision binary64 (if (or (<= z -2.7e+26) (not (<= z 0.048))) (* x (/ (+ y t) z)) (* x (- (/ y z) t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -2.7e+26) || !(z <= 0.048)) {
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 <= (-2.7d+26)) .or. (.not. (z <= 0.048d0))) 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 <= -2.7e+26) || !(z <= 0.048)) {
tmp = x * ((y + t) / z);
} else {
tmp = x * ((y / z) - t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -2.7e+26) or not (z <= 0.048): tmp = x * ((y + t) / z) else: tmp = x * ((y / z) - t) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -2.7e+26) || !(z <= 0.048)) 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 <= -2.7e+26) || ~((z <= 0.048))) 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, -2.7e+26], N[Not[LessEqual[z, 0.048]], $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 -2.7 \cdot 10^{+26} \lor \neg \left(z \leq 0.048\right):\\
\;\;\;\;x \cdot \frac{y + t}{z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\
\end{array}
\end{array}
if z < -2.7e26 or 0.048000000000000001 < z Initial program 95.6%
Taylor expanded in z around inf 90.0%
*-commutative90.0%
remove-double-neg90.0%
cancel-sign-sub-inv90.0%
metadata-eval90.0%
*-lft-identity90.0%
distribute-neg-out90.0%
neg-mul-190.0%
sub-neg90.0%
distribute-lft-neg-in90.0%
*-commutative90.0%
distribute-neg-frac90.0%
associate-/l*95.5%
distribute-rgt-neg-in95.5%
distribute-neg-frac95.5%
Simplified95.5%
if -2.7e26 < z < 0.048000000000000001Initial program 89.2%
Taylor expanded in z around 0 88.4%
mul-1-neg88.4%
unsub-neg88.4%
div-sub88.4%
associate-/l*88.4%
*-inverses88.4%
*-rgt-identity88.4%
Simplified88.4%
Final simplification92.1%
(FPCore (x y z t) :precision binary64 (if (or (<= z -3.8e+23) (not (<= z 0.048))) (* t (/ x z)) (* x (- t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -3.8e+23) || !(z <= 0.048)) {
tmp = t * (x / z);
} else {
tmp = x * -t;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z <= (-3.8d+23)) .or. (.not. (z <= 0.048d0))) then
tmp = t * (x / z)
else
tmp = x * -t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -3.8e+23) || !(z <= 0.048)) {
tmp = t * (x / z);
} else {
tmp = x * -t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -3.8e+23) or not (z <= 0.048): tmp = t * (x / z) else: tmp = x * -t return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -3.8e+23) || !(z <= 0.048)) tmp = Float64(t * Float64(x / z)); else tmp = Float64(x * Float64(-t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -3.8e+23) || ~((z <= 0.048))) tmp = t * (x / z); else tmp = x * -t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -3.8e+23], N[Not[LessEqual[z, 0.048]], $MachinePrecision]], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], N[(x * (-t)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.8 \cdot 10^{+23} \lor \neg \left(z \leq 0.048\right):\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(-t\right)\\
\end{array}
\end{array}
if z < -3.79999999999999975e23 or 0.048000000000000001 < z Initial program 95.6%
Taylor expanded in y around 0 54.1%
mul-1-neg54.1%
distribute-neg-frac254.1%
neg-sub054.1%
associate--r-54.1%
metadata-eval54.1%
Simplified54.1%
Taylor expanded in z around inf 50.0%
associate-/l*51.2%
Simplified51.2%
if -3.79999999999999975e23 < z < 0.048000000000000001Initial program 89.1%
Taylor expanded in y around 0 37.0%
mul-1-neg37.0%
distribute-neg-frac237.0%
neg-sub037.0%
associate--r-37.0%
metadata-eval37.0%
Simplified37.0%
Taylor expanded in z around 0 36.3%
neg-mul-136.3%
Simplified36.3%
Final simplification44.1%
(FPCore (x y z t) :precision binary64 (if (or (<= z -3.8e+23) (not (<= z 0.048))) (* x (/ t z)) (* x (- t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -3.8e+23) || !(z <= 0.048)) {
tmp = x * (t / z);
} else {
tmp = x * -t;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z <= (-3.8d+23)) .or. (.not. (z <= 0.048d0))) then
tmp = x * (t / z)
else
tmp = x * -t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -3.8e+23) || !(z <= 0.048)) {
tmp = x * (t / z);
} else {
tmp = x * -t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -3.8e+23) or not (z <= 0.048): tmp = x * (t / z) else: tmp = x * -t return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -3.8e+23) || !(z <= 0.048)) tmp = Float64(x * Float64(t / z)); else tmp = Float64(x * Float64(-t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -3.8e+23) || ~((z <= 0.048))) tmp = x * (t / z); else tmp = x * -t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -3.8e+23], N[Not[LessEqual[z, 0.048]], $MachinePrecision]], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], N[(x * (-t)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.8 \cdot 10^{+23} \lor \neg \left(z \leq 0.048\right):\\
\;\;\;\;x \cdot \frac{t}{z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(-t\right)\\
\end{array}
\end{array}
if z < -3.79999999999999975e23 or 0.048000000000000001 < z Initial program 95.6%
Taylor expanded in y around 0 54.1%
mul-1-neg54.1%
distribute-neg-frac254.1%
neg-sub054.1%
associate--r-54.1%
metadata-eval54.1%
Simplified54.1%
Taylor expanded in z around inf 54.1%
if -3.79999999999999975e23 < z < 0.048000000000000001Initial program 89.1%
Taylor expanded in y around 0 37.0%
mul-1-neg37.0%
distribute-neg-frac237.0%
neg-sub037.0%
associate--r-37.0%
metadata-eval37.0%
Simplified37.0%
Taylor expanded in z around 0 36.3%
neg-mul-136.3%
Simplified36.3%
Final simplification45.6%
(FPCore (x y z t) :precision binary64 (if (or (<= t -6e+202) (not (<= t 7.2e+61))) (* x (/ t z)) (* (/ y z) x)))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -6e+202) || !(t <= 7.2e+61)) {
tmp = x * (t / z);
} 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) :: tmp
if ((t <= (-6d+202)) .or. (.not. (t <= 7.2d+61))) then
tmp = x * (t / z)
else
tmp = (y / z) * x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -6e+202) || !(t <= 7.2e+61)) {
tmp = x * (t / z);
} else {
tmp = (y / z) * x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -6e+202) or not (t <= 7.2e+61): tmp = x * (t / z) else: tmp = (y / z) * x return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -6e+202) || !(t <= 7.2e+61)) tmp = Float64(x * Float64(t / z)); else tmp = Float64(Float64(y / z) * x); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -6e+202) || ~((t <= 7.2e+61))) tmp = x * (t / z); else tmp = (y / z) * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -6e+202], N[Not[LessEqual[t, 7.2e+61]], $MachinePrecision]], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], N[(N[(y / z), $MachinePrecision] * x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6 \cdot 10^{+202} \lor \neg \left(t \leq 7.2 \cdot 10^{+61}\right):\\
\;\;\;\;x \cdot \frac{t}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{z} \cdot x\\
\end{array}
\end{array}
if t < -6.0000000000000003e202 or 7.20000000000000021e61 < t Initial program 94.1%
Taylor expanded in y around 0 81.5%
mul-1-neg81.5%
distribute-neg-frac281.5%
neg-sub081.5%
associate--r-81.5%
metadata-eval81.5%
Simplified81.5%
Taylor expanded in z around inf 58.7%
if -6.0000000000000003e202 < t < 7.20000000000000021e61Initial program 91.9%
Taylor expanded in y around inf 72.4%
associate-*r/71.3%
Simplified71.3%
Final simplification68.0%
(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 92.5%
Taylor expanded in y around 0 46.0%
mul-1-neg46.0%
distribute-neg-frac246.0%
neg-sub046.0%
associate--r-46.0%
metadata-eval46.0%
Simplified46.0%
Taylor expanded in z around 0 23.3%
neg-mul-123.3%
Simplified23.3%
Final simplification23.3%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (- (/ y z) (* t (/ 1.0 (- 1.0 z))))))
(t_2 (* x (- (/ y z) (/ t (- 1.0 z))))))
(if (< t_2 -7.623226303312042e-196)
t_1
(if (< t_2 1.4133944927702302e-211)
(+ (/ (* y x) z) (- (/ (* t x) (- 1.0 z))))
t_1))))
double code(double x, double y, double z, double t) {
double t_1 = x * ((y / z) - (t * (1.0 / (1.0 - z))));
double t_2 = x * ((y / z) - (t / (1.0 - z)));
double tmp;
if (t_2 < -7.623226303312042e-196) {
tmp = t_1;
} else if (t_2 < 1.4133944927702302e-211) {
tmp = ((y * x) / z) + -((t * x) / (1.0 - z));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x * ((y / z) - (t * (1.0d0 / (1.0d0 - z))))
t_2 = x * ((y / z) - (t / (1.0d0 - z)))
if (t_2 < (-7.623226303312042d-196)) then
tmp = t_1
else if (t_2 < 1.4133944927702302d-211) then
tmp = ((y * x) / z) + -((t * x) / (1.0d0 - z))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x * ((y / z) - (t * (1.0 / (1.0 - z))));
double t_2 = x * ((y / z) - (t / (1.0 - z)));
double tmp;
if (t_2 < -7.623226303312042e-196) {
tmp = t_1;
} else if (t_2 < 1.4133944927702302e-211) {
tmp = ((y * x) / z) + -((t * x) / (1.0 - z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * ((y / z) - (t * (1.0 / (1.0 - z)))) t_2 = x * ((y / z) - (t / (1.0 - z))) tmp = 0 if t_2 < -7.623226303312042e-196: tmp = t_1 elif t_2 < 1.4133944927702302e-211: tmp = ((y * x) / z) + -((t * x) / (1.0 - z)) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(Float64(y / z) - Float64(t * Float64(1.0 / Float64(1.0 - z))))) t_2 = Float64(x * Float64(Float64(y / z) - Float64(t / Float64(1.0 - z)))) tmp = 0.0 if (t_2 < -7.623226303312042e-196) tmp = t_1; elseif (t_2 < 1.4133944927702302e-211) tmp = Float64(Float64(Float64(y * x) / z) + Float64(-Float64(Float64(t * x) / Float64(1.0 - z)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * ((y / z) - (t * (1.0 / (1.0 - z)))); t_2 = x * ((y / z) - (t / (1.0 - z))); tmp = 0.0; if (t_2 < -7.623226303312042e-196) tmp = t_1; elseif (t_2 < 1.4133944927702302e-211) tmp = ((y * x) / z) + -((t * x) / (1.0 - z)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(N[(y / z), $MachinePrecision] - N[(t * N[(1.0 / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(N[(y / z), $MachinePrecision] - N[(t / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t$95$2, -7.623226303312042e-196], t$95$1, If[Less[t$95$2, 1.4133944927702302e-211], N[(N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision] + (-N[(N[(t * x), $MachinePrecision] / N[(1.0 - z), $MachinePrecision]), $MachinePrecision])), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(\frac{y}{z} - t \cdot \frac{1}{1 - z}\right)\\
t_2 := x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right)\\
\mathbf{if}\;t\_2 < -7.623226303312042 \cdot 10^{-196}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 < 1.4133944927702302 \cdot 10^{-211}:\\
\;\;\;\;\frac{y \cdot x}{z} + \left(-\frac{t \cdot x}{1 - z}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024054
(FPCore (x y z t)
:name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, C"
:precision binary64
:alt
(if (< (* x (- (/ y z) (/ t (- 1.0 z)))) -7.623226303312042e-196) (* x (- (/ y z) (* t (/ 1.0 (- 1.0 z))))) (if (< (* x (- (/ y z) (/ t (- 1.0 z)))) 1.4133944927702302e-211) (+ (/ (* y x) z) (- (/ (* t x) (- 1.0 z)))) (* x (- (/ y z) (* t (/ 1.0 (- 1.0 z)))))))
(* x (- (/ y z) (/ t (- 1.0 z)))))