
(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 1e+272) (* 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 <= 1e+272) {
tmp = t_1 * x;
} else {
tmp = y * (x / z);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (y / z) - (t / (1.0d0 - z))
if (t_1 <= 1d+272) then
tmp = t_1 * x
else
tmp = y * (x / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (y / z) - (t / (1.0 - z));
double tmp;
if (t_1 <= 1e+272) {
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 <= 1e+272: 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 <= 1e+272) tmp = Float64(t_1 * x); else tmp = Float64(y * Float64(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 <= 1e+272) 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, 1e+272], N[(t$95$1 * x), $MachinePrecision], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{z} - \frac{t}{1 - z}\\
\mathbf{if}\;t_1 \leq 10^{+272}:\\
\;\;\;\;t_1 \cdot x\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{x}{z}\\
\end{array}
\end{array}
if (-.f64 (/.f64 y z) (/.f64 t (-.f64 1 z))) < 1.0000000000000001e272Initial program 96.6%
if 1.0000000000000001e272 < (-.f64 (/.f64 y z) (/.f64 t (-.f64 1 z))) Initial program 66.6%
Taylor expanded in y around inf 99.8%
associate-/l*70.4%
associate-/r/100.0%
Simplified100.0%
Final simplification96.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* y (/ x z))) (t_2 (* t (/ x z))) (t_3 (* t (- x))))
(if (<= t -7e+258)
t_2
(if (<= t -3.7e+205)
t_3
(if (<= t -2.4e+134)
t_2
(if (<= t -2.15e+85)
t_1
(if (<= t -1.9e+45)
t_2
(if (<= t -2.25e-98)
t_1
(if (<= t 3.6e+71)
(* (/ y z) x)
(if (<= t 1e+241) t_3 t_2))))))))))
double code(double x, double y, double z, double t) {
double t_1 = y * (x / z);
double t_2 = t * (x / z);
double t_3 = t * -x;
double tmp;
if (t <= -7e+258) {
tmp = t_2;
} else if (t <= -3.7e+205) {
tmp = t_3;
} else if (t <= -2.4e+134) {
tmp = t_2;
} else if (t <= -2.15e+85) {
tmp = t_1;
} else if (t <= -1.9e+45) {
tmp = t_2;
} else if (t <= -2.25e-98) {
tmp = t_1;
} else if (t <= 3.6e+71) {
tmp = (y / z) * x;
} else if (t <= 1e+241) {
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 = t * (x / z)
t_3 = t * -x
if (t <= (-7d+258)) then
tmp = t_2
else if (t <= (-3.7d+205)) then
tmp = t_3
else if (t <= (-2.4d+134)) then
tmp = t_2
else if (t <= (-2.15d+85)) then
tmp = t_1
else if (t <= (-1.9d+45)) then
tmp = t_2
else if (t <= (-2.25d-98)) then
tmp = t_1
else if (t <= 3.6d+71) then
tmp = (y / z) * x
else if (t <= 1d+241) 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 = t * (x / z);
double t_3 = t * -x;
double tmp;
if (t <= -7e+258) {
tmp = t_2;
} else if (t <= -3.7e+205) {
tmp = t_3;
} else if (t <= -2.4e+134) {
tmp = t_2;
} else if (t <= -2.15e+85) {
tmp = t_1;
} else if (t <= -1.9e+45) {
tmp = t_2;
} else if (t <= -2.25e-98) {
tmp = t_1;
} else if (t <= 3.6e+71) {
tmp = (y / z) * x;
} else if (t <= 1e+241) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = y * (x / z) t_2 = t * (x / z) t_3 = t * -x tmp = 0 if t <= -7e+258: tmp = t_2 elif t <= -3.7e+205: tmp = t_3 elif t <= -2.4e+134: tmp = t_2 elif t <= -2.15e+85: tmp = t_1 elif t <= -1.9e+45: tmp = t_2 elif t <= -2.25e-98: tmp = t_1 elif t <= 3.6e+71: tmp = (y / z) * x elif t <= 1e+241: 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(t * Float64(x / z)) t_3 = Float64(t * Float64(-x)) tmp = 0.0 if (t <= -7e+258) tmp = t_2; elseif (t <= -3.7e+205) tmp = t_3; elseif (t <= -2.4e+134) tmp = t_2; elseif (t <= -2.15e+85) tmp = t_1; elseif (t <= -1.9e+45) tmp = t_2; elseif (t <= -2.25e-98) tmp = t_1; elseif (t <= 3.6e+71) tmp = Float64(Float64(y / z) * x); elseif (t <= 1e+241) 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 = t * (x / z); t_3 = t * -x; tmp = 0.0; if (t <= -7e+258) tmp = t_2; elseif (t <= -3.7e+205) tmp = t_3; elseif (t <= -2.4e+134) tmp = t_2; elseif (t <= -2.15e+85) tmp = t_1; elseif (t <= -1.9e+45) tmp = t_2; elseif (t <= -2.25e-98) tmp = t_1; elseif (t <= 3.6e+71) tmp = (y / z) * x; elseif (t <= 1e+241) 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[(t * N[(x / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t * (-x)), $MachinePrecision]}, If[LessEqual[t, -7e+258], t$95$2, If[LessEqual[t, -3.7e+205], t$95$3, If[LessEqual[t, -2.4e+134], t$95$2, If[LessEqual[t, -2.15e+85], t$95$1, If[LessEqual[t, -1.9e+45], t$95$2, If[LessEqual[t, -2.25e-98], t$95$1, If[LessEqual[t, 3.6e+71], N[(N[(y / z), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[t, 1e+241], t$95$3, t$95$2]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{x}{z}\\
t_2 := t \cdot \frac{x}{z}\\
t_3 := t \cdot \left(-x\right)\\
\mathbf{if}\;t \leq -7 \cdot 10^{+258}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -3.7 \cdot 10^{+205}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq -2.4 \cdot 10^{+134}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -2.15 \cdot 10^{+85}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -1.9 \cdot 10^{+45}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -2.25 \cdot 10^{-98}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 3.6 \cdot 10^{+71}:\\
\;\;\;\;\frac{y}{z} \cdot x\\
\mathbf{elif}\;t \leq 10^{+241}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -7.0000000000000002e258 or -3.69999999999999981e205 < t < -2.40000000000000005e134 or -2.15e85 < t < -1.9000000000000001e45 or 1.0000000000000001e241 < t Initial program 97.9%
Taylor expanded in z around inf 69.0%
associate-/l*81.8%
cancel-sign-sub-inv81.8%
metadata-eval81.8%
*-lft-identity81.8%
+-commutative81.8%
Simplified81.8%
Taylor expanded in t around inf 64.0%
associate-*r/66.0%
Simplified66.0%
if -7.0000000000000002e258 < t < -3.69999999999999981e205 or 3.6e71 < t < 1.0000000000000001e241Initial program 99.8%
Taylor expanded in z around 0 69.3%
+-commutative69.3%
associate-*r/71.8%
*-commutative71.8%
associate-*r*71.8%
neg-mul-171.8%
distribute-rgt-out71.7%
unsub-neg71.7%
Simplified71.7%
Taylor expanded in y around 0 54.8%
associate-*r*54.8%
mul-1-neg54.8%
Simplified54.8%
if -2.40000000000000005e134 < t < -2.15e85 or -1.9000000000000001e45 < t < -2.24999999999999998e-98Initial program 78.8%
Taylor expanded in y around inf 76.2%
associate-/l*59.8%
associate-/r/82.1%
Simplified82.1%
if -2.24999999999999998e-98 < t < 3.6e71Initial program 95.6%
Taylor expanded in y around inf 83.9%
associate-*r/89.9%
Simplified89.9%
Final simplification79.3%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* y (/ x z)))
(t_2 (/ t (/ z x)))
(t_3 (* t (/ x z)))
(t_4 (* t (- x))))
(if (<= t -5e+258)
t_2
(if (<= t -3.3e+205)
t_4
(if (<= t -2.2e+134)
t_2
(if (<= t -1.8e+85)
t_1
(if (<= t -1.5e+44)
t_3
(if (<= t -8.2e-102)
t_1
(if (<= t 3.6e+71)
(* (/ y z) x)
(if (<= t 1.6e+241) t_4 t_3))))))))))
double code(double x, double y, double z, double t) {
double t_1 = y * (x / z);
double t_2 = t / (z / x);
double t_3 = t * (x / z);
double t_4 = t * -x;
double tmp;
if (t <= -5e+258) {
tmp = t_2;
} else if (t <= -3.3e+205) {
tmp = t_4;
} else if (t <= -2.2e+134) {
tmp = t_2;
} else if (t <= -1.8e+85) {
tmp = t_1;
} else if (t <= -1.5e+44) {
tmp = t_3;
} else if (t <= -8.2e-102) {
tmp = t_1;
} else if (t <= 3.6e+71) {
tmp = (y / z) * x;
} else if (t <= 1.6e+241) {
tmp = t_4;
} else {
tmp = t_3;
}
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) :: t_4
real(8) :: tmp
t_1 = y * (x / z)
t_2 = t / (z / x)
t_3 = t * (x / z)
t_4 = t * -x
if (t <= (-5d+258)) then
tmp = t_2
else if (t <= (-3.3d+205)) then
tmp = t_4
else if (t <= (-2.2d+134)) then
tmp = t_2
else if (t <= (-1.8d+85)) then
tmp = t_1
else if (t <= (-1.5d+44)) then
tmp = t_3
else if (t <= (-8.2d-102)) then
tmp = t_1
else if (t <= 3.6d+71) then
tmp = (y / z) * x
else if (t <= 1.6d+241) then
tmp = t_4
else
tmp = t_3
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 = t / (z / x);
double t_3 = t * (x / z);
double t_4 = t * -x;
double tmp;
if (t <= -5e+258) {
tmp = t_2;
} else if (t <= -3.3e+205) {
tmp = t_4;
} else if (t <= -2.2e+134) {
tmp = t_2;
} else if (t <= -1.8e+85) {
tmp = t_1;
} else if (t <= -1.5e+44) {
tmp = t_3;
} else if (t <= -8.2e-102) {
tmp = t_1;
} else if (t <= 3.6e+71) {
tmp = (y / z) * x;
} else if (t <= 1.6e+241) {
tmp = t_4;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t): t_1 = y * (x / z) t_2 = t / (z / x) t_3 = t * (x / z) t_4 = t * -x tmp = 0 if t <= -5e+258: tmp = t_2 elif t <= -3.3e+205: tmp = t_4 elif t <= -2.2e+134: tmp = t_2 elif t <= -1.8e+85: tmp = t_1 elif t <= -1.5e+44: tmp = t_3 elif t <= -8.2e-102: tmp = t_1 elif t <= 3.6e+71: tmp = (y / z) * x elif t <= 1.6e+241: tmp = t_4 else: tmp = t_3 return tmp
function code(x, y, z, t) t_1 = Float64(y * Float64(x / z)) t_2 = Float64(t / Float64(z / x)) t_3 = Float64(t * Float64(x / z)) t_4 = Float64(t * Float64(-x)) tmp = 0.0 if (t <= -5e+258) tmp = t_2; elseif (t <= -3.3e+205) tmp = t_4; elseif (t <= -2.2e+134) tmp = t_2; elseif (t <= -1.8e+85) tmp = t_1; elseif (t <= -1.5e+44) tmp = t_3; elseif (t <= -8.2e-102) tmp = t_1; elseif (t <= 3.6e+71) tmp = Float64(Float64(y / z) * x); elseif (t <= 1.6e+241) tmp = t_4; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y * (x / z); t_2 = t / (z / x); t_3 = t * (x / z); t_4 = t * -x; tmp = 0.0; if (t <= -5e+258) tmp = t_2; elseif (t <= -3.3e+205) tmp = t_4; elseif (t <= -2.2e+134) tmp = t_2; elseif (t <= -1.8e+85) tmp = t_1; elseif (t <= -1.5e+44) tmp = t_3; elseif (t <= -8.2e-102) tmp = t_1; elseif (t <= 3.6e+71) tmp = (y / z) * x; elseif (t <= 1.6e+241) tmp = t_4; else tmp = t_3; 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[(t / N[(z / x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t * (-x)), $MachinePrecision]}, If[LessEqual[t, -5e+258], t$95$2, If[LessEqual[t, -3.3e+205], t$95$4, If[LessEqual[t, -2.2e+134], t$95$2, If[LessEqual[t, -1.8e+85], t$95$1, If[LessEqual[t, -1.5e+44], t$95$3, If[LessEqual[t, -8.2e-102], t$95$1, If[LessEqual[t, 3.6e+71], N[(N[(y / z), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[t, 1.6e+241], t$95$4, t$95$3]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{x}{z}\\
t_2 := \frac{t}{\frac{z}{x}}\\
t_3 := t \cdot \frac{x}{z}\\
t_4 := t \cdot \left(-x\right)\\
\mathbf{if}\;t \leq -5 \cdot 10^{+258}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -3.3 \cdot 10^{+205}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;t \leq -2.2 \cdot 10^{+134}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -1.8 \cdot 10^{+85}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -1.5 \cdot 10^{+44}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq -8.2 \cdot 10^{-102}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 3.6 \cdot 10^{+71}:\\
\;\;\;\;\frac{y}{z} \cdot x\\
\mathbf{elif}\;t \leq 1.6 \cdot 10^{+241}:\\
\;\;\;\;t_4\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if t < -5e258 or -3.3000000000000002e205 < t < -2.2e134Initial program 99.7%
Taylor expanded in z around inf 58.3%
associate-/l*80.7%
cancel-sign-sub-inv80.7%
metadata-eval80.7%
*-lft-identity80.7%
+-commutative80.7%
Simplified80.7%
Taylor expanded in t around inf 54.0%
associate-*r/65.4%
Simplified65.4%
associate-*r/54.0%
associate-/l*65.7%
Applied egg-rr65.7%
if -5e258 < t < -3.3000000000000002e205 or 3.6e71 < t < 1.60000000000000002e241Initial program 99.8%
Taylor expanded in z around 0 69.3%
+-commutative69.3%
associate-*r/71.8%
*-commutative71.8%
associate-*r*71.8%
neg-mul-171.8%
distribute-rgt-out71.7%
unsub-neg71.7%
Simplified71.7%
Taylor expanded in y around 0 54.8%
associate-*r*54.8%
mul-1-neg54.8%
Simplified54.8%
if -2.2e134 < t < -1.7999999999999999e85 or -1.49999999999999993e44 < t < -8.2000000000000005e-102Initial program 78.8%
Taylor expanded in y around inf 76.2%
associate-/l*59.8%
associate-/r/82.1%
Simplified82.1%
if -1.7999999999999999e85 < t < -1.49999999999999993e44 or 1.60000000000000002e241 < t Initial program 96.2%
Taylor expanded in z around inf 79.3%
associate-/l*82.9%
cancel-sign-sub-inv82.9%
metadata-eval82.9%
*-lft-identity82.9%
+-commutative82.9%
Simplified82.9%
Taylor expanded in t around inf 73.7%
associate-*r/66.6%
Simplified66.6%
if -8.2000000000000005e-102 < t < 3.6e71Initial program 95.6%
Taylor expanded in y around inf 83.9%
associate-*r/89.9%
Simplified89.9%
Final simplification79.3%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* (/ y z) x)) (t_2 (* t (/ x z))) (t_3 (* t (- x))))
(if (<= t -9.8e+256)
t_2
(if (<= t -6.8e+203)
t_3
(if (<= t -9e+133)
t_2
(if (<= t -6.3e+84)
t_1
(if (<= t -4.4e+27)
t_2
(if (<= t 3.6e+71) t_1 (if (<= t 1.25e+241) t_3 t_2)))))))))
double code(double x, double y, double z, double t) {
double t_1 = (y / z) * x;
double t_2 = t * (x / z);
double t_3 = t * -x;
double tmp;
if (t <= -9.8e+256) {
tmp = t_2;
} else if (t <= -6.8e+203) {
tmp = t_3;
} else if (t <= -9e+133) {
tmp = t_2;
} else if (t <= -6.3e+84) {
tmp = t_1;
} else if (t <= -4.4e+27) {
tmp = t_2;
} else if (t <= 3.6e+71) {
tmp = t_1;
} else if (t <= 1.25e+241) {
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 / z) * x
t_2 = t * (x / z)
t_3 = t * -x
if (t <= (-9.8d+256)) then
tmp = t_2
else if (t <= (-6.8d+203)) then
tmp = t_3
else if (t <= (-9d+133)) then
tmp = t_2
else if (t <= (-6.3d+84)) then
tmp = t_1
else if (t <= (-4.4d+27)) then
tmp = t_2
else if (t <= 3.6d+71) then
tmp = t_1
else if (t <= 1.25d+241) 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 / z) * x;
double t_2 = t * (x / z);
double t_3 = t * -x;
double tmp;
if (t <= -9.8e+256) {
tmp = t_2;
} else if (t <= -6.8e+203) {
tmp = t_3;
} else if (t <= -9e+133) {
tmp = t_2;
} else if (t <= -6.3e+84) {
tmp = t_1;
} else if (t <= -4.4e+27) {
tmp = t_2;
} else if (t <= 3.6e+71) {
tmp = t_1;
} else if (t <= 1.25e+241) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = (y / z) * x t_2 = t * (x / z) t_3 = t * -x tmp = 0 if t <= -9.8e+256: tmp = t_2 elif t <= -6.8e+203: tmp = t_3 elif t <= -9e+133: tmp = t_2 elif t <= -6.3e+84: tmp = t_1 elif t <= -4.4e+27: tmp = t_2 elif t <= 3.6e+71: tmp = t_1 elif t <= 1.25e+241: tmp = t_3 else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(y / z) * x) t_2 = Float64(t * Float64(x / z)) t_3 = Float64(t * Float64(-x)) tmp = 0.0 if (t <= -9.8e+256) tmp = t_2; elseif (t <= -6.8e+203) tmp = t_3; elseif (t <= -9e+133) tmp = t_2; elseif (t <= -6.3e+84) tmp = t_1; elseif (t <= -4.4e+27) tmp = t_2; elseif (t <= 3.6e+71) tmp = t_1; elseif (t <= 1.25e+241) tmp = t_3; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (y / z) * x; t_2 = t * (x / z); t_3 = t * -x; tmp = 0.0; if (t <= -9.8e+256) tmp = t_2; elseif (t <= -6.8e+203) tmp = t_3; elseif (t <= -9e+133) tmp = t_2; elseif (t <= -6.3e+84) tmp = t_1; elseif (t <= -4.4e+27) tmp = t_2; elseif (t <= 3.6e+71) tmp = t_1; elseif (t <= 1.25e+241) tmp = t_3; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y / z), $MachinePrecision] * x), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t * (-x)), $MachinePrecision]}, If[LessEqual[t, -9.8e+256], t$95$2, If[LessEqual[t, -6.8e+203], t$95$3, If[LessEqual[t, -9e+133], t$95$2, If[LessEqual[t, -6.3e+84], t$95$1, If[LessEqual[t, -4.4e+27], t$95$2, If[LessEqual[t, 3.6e+71], t$95$1, If[LessEqual[t, 1.25e+241], t$95$3, t$95$2]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{z} \cdot x\\
t_2 := t \cdot \frac{x}{z}\\
t_3 := t \cdot \left(-x\right)\\
\mathbf{if}\;t \leq -9.8 \cdot 10^{+256}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -6.8 \cdot 10^{+203}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq -9 \cdot 10^{+133}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -6.3 \cdot 10^{+84}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -4.4 \cdot 10^{+27}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 3.6 \cdot 10^{+71}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.25 \cdot 10^{+241}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -9.8000000000000004e256 or -6.8000000000000002e203 < t < -8.9999999999999997e133 or -6.30000000000000013e84 < t < -4.3999999999999997e27 or 1.25000000000000006e241 < t Initial program 98.0%
Taylor expanded in z around inf 69.6%
associate-/l*82.2%
cancel-sign-sub-inv82.2%
metadata-eval82.2%
*-lft-identity82.2%
+-commutative82.2%
Simplified82.2%
Taylor expanded in t around inf 64.7%
associate-*r/66.7%
Simplified66.7%
if -9.8000000000000004e256 < t < -6.8000000000000002e203 or 3.6e71 < t < 1.25000000000000006e241Initial program 99.8%
Taylor expanded in z around 0 69.3%
+-commutative69.3%
associate-*r/71.8%
*-commutative71.8%
associate-*r*71.8%
neg-mul-171.8%
distribute-rgt-out71.7%
unsub-neg71.7%
Simplified71.7%
Taylor expanded in y around 0 54.8%
associate-*r*54.8%
mul-1-neg54.8%
Simplified54.8%
if -8.9999999999999997e133 < t < -6.30000000000000013e84 or -4.3999999999999997e27 < t < 3.6e71Initial program 92.9%
Taylor expanded in y around inf 83.1%
associate-*r/85.2%
Simplified85.2%
Final simplification77.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* y (/ x z))) (t_2 (/ x (/ z t))))
(if (<= t -2.65e+244)
t_2
(if (<= t -1.16e+206)
(* t (- x))
(if (<= t -2.3e+133)
t_2
(if (<= t -6.1e+85)
t_1
(if (<= t -1.9e+45)
(* t (/ x z))
(if (<= t -5.5e-103)
t_1
(if (<= t 3.4e+71) (* (/ y z) x) t_2)))))))))
double code(double x, double y, double z, double t) {
double t_1 = y * (x / z);
double t_2 = x / (z / t);
double tmp;
if (t <= -2.65e+244) {
tmp = t_2;
} else if (t <= -1.16e+206) {
tmp = t * -x;
} else if (t <= -2.3e+133) {
tmp = t_2;
} else if (t <= -6.1e+85) {
tmp = t_1;
} else if (t <= -1.9e+45) {
tmp = t * (x / z);
} else if (t <= -5.5e-103) {
tmp = t_1;
} else if (t <= 3.4e+71) {
tmp = (y / z) * x;
} 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 = y * (x / z)
t_2 = x / (z / t)
if (t <= (-2.65d+244)) then
tmp = t_2
else if (t <= (-1.16d+206)) then
tmp = t * -x
else if (t <= (-2.3d+133)) then
tmp = t_2
else if (t <= (-6.1d+85)) then
tmp = t_1
else if (t <= (-1.9d+45)) then
tmp = t * (x / z)
else if (t <= (-5.5d-103)) then
tmp = t_1
else if (t <= 3.4d+71) then
tmp = (y / z) * x
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 / (z / t);
double tmp;
if (t <= -2.65e+244) {
tmp = t_2;
} else if (t <= -1.16e+206) {
tmp = t * -x;
} else if (t <= -2.3e+133) {
tmp = t_2;
} else if (t <= -6.1e+85) {
tmp = t_1;
} else if (t <= -1.9e+45) {
tmp = t * (x / z);
} else if (t <= -5.5e-103) {
tmp = t_1;
} else if (t <= 3.4e+71) {
tmp = (y / z) * x;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = y * (x / z) t_2 = x / (z / t) tmp = 0 if t <= -2.65e+244: tmp = t_2 elif t <= -1.16e+206: tmp = t * -x elif t <= -2.3e+133: tmp = t_2 elif t <= -6.1e+85: tmp = t_1 elif t <= -1.9e+45: tmp = t * (x / z) elif t <= -5.5e-103: tmp = t_1 elif t <= 3.4e+71: tmp = (y / z) * x else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(y * Float64(x / z)) t_2 = Float64(x / Float64(z / t)) tmp = 0.0 if (t <= -2.65e+244) tmp = t_2; elseif (t <= -1.16e+206) tmp = Float64(t * Float64(-x)); elseif (t <= -2.3e+133) tmp = t_2; elseif (t <= -6.1e+85) tmp = t_1; elseif (t <= -1.9e+45) tmp = Float64(t * Float64(x / z)); elseif (t <= -5.5e-103) tmp = t_1; elseif (t <= 3.4e+71) tmp = Float64(Float64(y / z) * x); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y * (x / z); t_2 = x / (z / t); tmp = 0.0; if (t <= -2.65e+244) tmp = t_2; elseif (t <= -1.16e+206) tmp = t * -x; elseif (t <= -2.3e+133) tmp = t_2; elseif (t <= -6.1e+85) tmp = t_1; elseif (t <= -1.9e+45) tmp = t * (x / z); elseif (t <= -5.5e-103) tmp = t_1; elseif (t <= 3.4e+71) tmp = (y / z) * x; 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[(z / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.65e+244], t$95$2, If[LessEqual[t, -1.16e+206], N[(t * (-x)), $MachinePrecision], If[LessEqual[t, -2.3e+133], t$95$2, If[LessEqual[t, -6.1e+85], t$95$1, If[LessEqual[t, -1.9e+45], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -5.5e-103], t$95$1, If[LessEqual[t, 3.4e+71], N[(N[(y / z), $MachinePrecision] * x), $MachinePrecision], t$95$2]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{x}{z}\\
t_2 := \frac{x}{\frac{z}{t}}\\
\mathbf{if}\;t \leq -2.65 \cdot 10^{+244}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -1.16 \cdot 10^{+206}:\\
\;\;\;\;t \cdot \left(-x\right)\\
\mathbf{elif}\;t \leq -2.3 \cdot 10^{+133}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -6.1 \cdot 10^{+85}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -1.9 \cdot 10^{+45}:\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{elif}\;t \leq -5.5 \cdot 10^{-103}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 3.4 \cdot 10^{+71}:\\
\;\;\;\;\frac{y}{z} \cdot x\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -2.6499999999999999e244 or -1.1600000000000001e206 < t < -2.2999999999999999e133 or 3.3999999999999998e71 < t Initial program 98.4%
Taylor expanded in z around inf 55.3%
associate-/l*68.7%
cancel-sign-sub-inv68.7%
metadata-eval68.7%
*-lft-identity68.7%
+-commutative68.7%
Simplified68.7%
Taylor expanded in t around inf 51.6%
*-commutative51.6%
associate-/l*62.6%
Simplified62.6%
if -2.6499999999999999e244 < t < -1.1600000000000001e206Initial program 99.8%
Taylor expanded in z around 0 90.5%
+-commutative90.5%
associate-*r/90.5%
*-commutative90.5%
associate-*r*90.5%
neg-mul-190.5%
distribute-rgt-out90.4%
unsub-neg90.4%
Simplified90.4%
Taylor expanded in y around 0 62.9%
associate-*r*62.9%
mul-1-neg62.9%
Simplified62.9%
if -2.2999999999999999e133 < t < -6.09999999999999981e85 or -1.9000000000000001e45 < t < -5.50000000000000032e-103Initial program 78.8%
Taylor expanded in y around inf 76.2%
associate-/l*59.8%
associate-/r/82.1%
Simplified82.1%
if -6.09999999999999981e85 < t < -1.9000000000000001e45Initial program 99.6%
Taylor expanded in z around inf 87.6%
associate-/l*87.6%
cancel-sign-sub-inv87.6%
metadata-eval87.6%
*-lft-identity87.6%
+-commutative87.6%
Simplified87.6%
Taylor expanded in t around inf 75.5%
associate-*r/75.8%
Simplified75.8%
if -5.50000000000000032e-103 < t < 3.3999999999999998e71Initial program 95.6%
Taylor expanded in y around inf 83.9%
associate-*r/89.9%
Simplified89.9%
Final simplification80.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ x (/ z t))))
(if (<= t -7e+241)
t_1
(if (<= t -5.2e+208)
(* t (- x))
(if (<= t -2e+136)
t_1
(if (<= t -6.6e+84)
(/ y (/ z x))
(if (<= t -1.5e+44)
(* t (/ x z))
(if (<= t -4.2e-99)
(* y (/ x z))
(if (<= t 1.95e+71) (* (/ y z) x) t_1)))))))))
double code(double x, double y, double z, double t) {
double t_1 = x / (z / t);
double tmp;
if (t <= -7e+241) {
tmp = t_1;
} else if (t <= -5.2e+208) {
tmp = t * -x;
} else if (t <= -2e+136) {
tmp = t_1;
} else if (t <= -6.6e+84) {
tmp = y / (z / x);
} else if (t <= -1.5e+44) {
tmp = t * (x / z);
} else if (t <= -4.2e-99) {
tmp = y * (x / z);
} else if (t <= 1.95e+71) {
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 = x / (z / t)
if (t <= (-7d+241)) then
tmp = t_1
else if (t <= (-5.2d+208)) then
tmp = t * -x
else if (t <= (-2d+136)) then
tmp = t_1
else if (t <= (-6.6d+84)) then
tmp = y / (z / x)
else if (t <= (-1.5d+44)) then
tmp = t * (x / z)
else if (t <= (-4.2d-99)) then
tmp = y * (x / z)
else if (t <= 1.95d+71) 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 / (z / t);
double tmp;
if (t <= -7e+241) {
tmp = t_1;
} else if (t <= -5.2e+208) {
tmp = t * -x;
} else if (t <= -2e+136) {
tmp = t_1;
} else if (t <= -6.6e+84) {
tmp = y / (z / x);
} else if (t <= -1.5e+44) {
tmp = t * (x / z);
} else if (t <= -4.2e-99) {
tmp = y * (x / z);
} else if (t <= 1.95e+71) {
tmp = (y / z) * x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x / (z / t) tmp = 0 if t <= -7e+241: tmp = t_1 elif t <= -5.2e+208: tmp = t * -x elif t <= -2e+136: tmp = t_1 elif t <= -6.6e+84: tmp = y / (z / x) elif t <= -1.5e+44: tmp = t * (x / z) elif t <= -4.2e-99: tmp = y * (x / z) elif t <= 1.95e+71: tmp = (y / z) * x else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x / Float64(z / t)) tmp = 0.0 if (t <= -7e+241) tmp = t_1; elseif (t <= -5.2e+208) tmp = Float64(t * Float64(-x)); elseif (t <= -2e+136) tmp = t_1; elseif (t <= -6.6e+84) tmp = Float64(y / Float64(z / x)); elseif (t <= -1.5e+44) tmp = Float64(t * Float64(x / z)); elseif (t <= -4.2e-99) tmp = Float64(y * Float64(x / z)); elseif (t <= 1.95e+71) 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 / (z / t); tmp = 0.0; if (t <= -7e+241) tmp = t_1; elseif (t <= -5.2e+208) tmp = t * -x; elseif (t <= -2e+136) tmp = t_1; elseif (t <= -6.6e+84) tmp = y / (z / x); elseif (t <= -1.5e+44) tmp = t * (x / z); elseif (t <= -4.2e-99) tmp = y * (x / z); elseif (t <= 1.95e+71) 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[(z / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -7e+241], t$95$1, If[LessEqual[t, -5.2e+208], N[(t * (-x)), $MachinePrecision], If[LessEqual[t, -2e+136], t$95$1, If[LessEqual[t, -6.6e+84], N[(y / N[(z / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.5e+44], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -4.2e-99], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.95e+71], N[(N[(y / z), $MachinePrecision] * x), $MachinePrecision], t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{\frac{z}{t}}\\
\mathbf{if}\;t \leq -7 \cdot 10^{+241}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -5.2 \cdot 10^{+208}:\\
\;\;\;\;t \cdot \left(-x\right)\\
\mathbf{elif}\;t \leq -2 \cdot 10^{+136}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -6.6 \cdot 10^{+84}:\\
\;\;\;\;\frac{y}{\frac{z}{x}}\\
\mathbf{elif}\;t \leq -1.5 \cdot 10^{+44}:\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{elif}\;t \leq -4.2 \cdot 10^{-99}:\\
\;\;\;\;y \cdot \frac{x}{z}\\
\mathbf{elif}\;t \leq 1.95 \cdot 10^{+71}:\\
\;\;\;\;\frac{y}{z} \cdot x\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -7e241 or -5.2000000000000001e208 < t < -2.00000000000000012e136 or 1.9500000000000001e71 < t Initial program 98.4%
Taylor expanded in z around inf 55.3%
associate-/l*68.7%
cancel-sign-sub-inv68.7%
metadata-eval68.7%
*-lft-identity68.7%
+-commutative68.7%
Simplified68.7%
Taylor expanded in t around inf 51.6%
*-commutative51.6%
associate-/l*62.6%
Simplified62.6%
if -7e241 < t < -5.2000000000000001e208Initial program 99.8%
Taylor expanded in z around 0 90.5%
+-commutative90.5%
associate-*r/90.5%
*-commutative90.5%
associate-*r*90.5%
neg-mul-190.5%
distribute-rgt-out90.4%
unsub-neg90.4%
Simplified90.4%
Taylor expanded in y around 0 62.9%
associate-*r*62.9%
mul-1-neg62.9%
Simplified62.9%
if -2.00000000000000012e136 < t < -6.60000000000000034e84Initial program 100.0%
Taylor expanded in y around inf 81.8%
associate-*r/81.8%
Simplified81.8%
associate-*r/81.8%
*-commutative81.8%
associate-/l*100.0%
Applied egg-rr100.0%
if -6.60000000000000034e84 < t < -1.49999999999999993e44Initial program 99.6%
Taylor expanded in z around inf 87.6%
associate-/l*87.6%
cancel-sign-sub-inv87.6%
metadata-eval87.6%
*-lft-identity87.6%
+-commutative87.6%
Simplified87.6%
Taylor expanded in t around inf 75.5%
associate-*r/75.8%
Simplified75.8%
if -1.49999999999999993e44 < t < -4.19999999999999968e-99Initial program 74.0%
Taylor expanded in y around inf 75.0%
associate-/l*54.8%
associate-/r/78.1%
Simplified78.1%
if -4.19999999999999968e-99 < t < 1.9500000000000001e71Initial program 95.6%
Taylor expanded in y around inf 83.9%
associate-*r/89.9%
Simplified89.9%
Final simplification80.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ x (/ z t))))
(if (<= t -2e+243)
t_1
(if (<= t -7.3e+208)
(* t (- x))
(if (<= t -1.3e+136)
t_1
(if (<= t -6.3e+84)
(/ y (/ z x))
(if (<= t -4.4e+27)
(* t (/ x z))
(if (<= t -3.5e-99)
(/ (* y x) z)
(if (<= t 2.6e+71) (* (/ y z) x) t_1)))))))))
double code(double x, double y, double z, double t) {
double t_1 = x / (z / t);
double tmp;
if (t <= -2e+243) {
tmp = t_1;
} else if (t <= -7.3e+208) {
tmp = t * -x;
} else if (t <= -1.3e+136) {
tmp = t_1;
} else if (t <= -6.3e+84) {
tmp = y / (z / x);
} else if (t <= -4.4e+27) {
tmp = t * (x / z);
} else if (t <= -3.5e-99) {
tmp = (y * x) / z;
} else if (t <= 2.6e+71) {
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 = x / (z / t)
if (t <= (-2d+243)) then
tmp = t_1
else if (t <= (-7.3d+208)) then
tmp = t * -x
else if (t <= (-1.3d+136)) then
tmp = t_1
else if (t <= (-6.3d+84)) then
tmp = y / (z / x)
else if (t <= (-4.4d+27)) then
tmp = t * (x / z)
else if (t <= (-3.5d-99)) then
tmp = (y * x) / z
else if (t <= 2.6d+71) 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 / (z / t);
double tmp;
if (t <= -2e+243) {
tmp = t_1;
} else if (t <= -7.3e+208) {
tmp = t * -x;
} else if (t <= -1.3e+136) {
tmp = t_1;
} else if (t <= -6.3e+84) {
tmp = y / (z / x);
} else if (t <= -4.4e+27) {
tmp = t * (x / z);
} else if (t <= -3.5e-99) {
tmp = (y * x) / z;
} else if (t <= 2.6e+71) {
tmp = (y / z) * x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x / (z / t) tmp = 0 if t <= -2e+243: tmp = t_1 elif t <= -7.3e+208: tmp = t * -x elif t <= -1.3e+136: tmp = t_1 elif t <= -6.3e+84: tmp = y / (z / x) elif t <= -4.4e+27: tmp = t * (x / z) elif t <= -3.5e-99: tmp = (y * x) / z elif t <= 2.6e+71: tmp = (y / z) * x else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x / Float64(z / t)) tmp = 0.0 if (t <= -2e+243) tmp = t_1; elseif (t <= -7.3e+208) tmp = Float64(t * Float64(-x)); elseif (t <= -1.3e+136) tmp = t_1; elseif (t <= -6.3e+84) tmp = Float64(y / Float64(z / x)); elseif (t <= -4.4e+27) tmp = Float64(t * Float64(x / z)); elseif (t <= -3.5e-99) tmp = Float64(Float64(y * x) / z); elseif (t <= 2.6e+71) 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 / (z / t); tmp = 0.0; if (t <= -2e+243) tmp = t_1; elseif (t <= -7.3e+208) tmp = t * -x; elseif (t <= -1.3e+136) tmp = t_1; elseif (t <= -6.3e+84) tmp = y / (z / x); elseif (t <= -4.4e+27) tmp = t * (x / z); elseif (t <= -3.5e-99) tmp = (y * x) / z; elseif (t <= 2.6e+71) 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[(z / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2e+243], t$95$1, If[LessEqual[t, -7.3e+208], N[(t * (-x)), $MachinePrecision], If[LessEqual[t, -1.3e+136], t$95$1, If[LessEqual[t, -6.3e+84], N[(y / N[(z / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -4.4e+27], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -3.5e-99], N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t, 2.6e+71], N[(N[(y / z), $MachinePrecision] * x), $MachinePrecision], t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{\frac{z}{t}}\\
\mathbf{if}\;t \leq -2 \cdot 10^{+243}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -7.3 \cdot 10^{+208}:\\
\;\;\;\;t \cdot \left(-x\right)\\
\mathbf{elif}\;t \leq -1.3 \cdot 10^{+136}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -6.3 \cdot 10^{+84}:\\
\;\;\;\;\frac{y}{\frac{z}{x}}\\
\mathbf{elif}\;t \leq -4.4 \cdot 10^{+27}:\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{elif}\;t \leq -3.5 \cdot 10^{-99}:\\
\;\;\;\;\frac{y \cdot x}{z}\\
\mathbf{elif}\;t \leq 2.6 \cdot 10^{+71}:\\
\;\;\;\;\frac{y}{z} \cdot x\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -2.0000000000000001e243 or -7.29999999999999991e208 < t < -1.3000000000000001e136 or 2.59999999999999991e71 < t Initial program 98.4%
Taylor expanded in z around inf 55.3%
associate-/l*68.7%
cancel-sign-sub-inv68.7%
metadata-eval68.7%
*-lft-identity68.7%
+-commutative68.7%
Simplified68.7%
Taylor expanded in t around inf 51.6%
*-commutative51.6%
associate-/l*62.6%
Simplified62.6%
if -2.0000000000000001e243 < t < -7.29999999999999991e208Initial program 99.8%
Taylor expanded in z around 0 90.5%
+-commutative90.5%
associate-*r/90.5%
*-commutative90.5%
associate-*r*90.5%
neg-mul-190.5%
distribute-rgt-out90.4%
unsub-neg90.4%
Simplified90.4%
Taylor expanded in y around 0 62.9%
associate-*r*62.9%
mul-1-neg62.9%
Simplified62.9%
if -1.3000000000000001e136 < t < -6.30000000000000013e84Initial program 100.0%
Taylor expanded in y around inf 81.8%
associate-*r/81.8%
Simplified81.8%
associate-*r/81.8%
*-commutative81.8%
associate-/l*100.0%
Applied egg-rr100.0%
if -6.30000000000000013e84 < t < -4.3999999999999997e27Initial program 99.7%
Taylor expanded in z around inf 88.9%
associate-/l*88.9%
cancel-sign-sub-inv88.9%
metadata-eval88.9%
*-lft-identity88.9%
+-commutative88.9%
Simplified88.9%
Taylor expanded in t around inf 78.2%
associate-*r/78.5%
Simplified78.5%
if -4.3999999999999997e27 < t < -3.4999999999999999e-99Initial program 72.8%
Taylor expanded in y around inf 78.2%
if -3.4999999999999999e-99 < t < 2.59999999999999991e71Initial program 95.6%
Taylor expanded in y around inf 83.9%
associate-*r/89.9%
Simplified89.9%
Final simplification80.2%
(FPCore (x y z t)
:precision binary64
(if (<= z -3.3e+142)
(/ x (/ z t))
(if (<= z -4.6e+92)
(/ (* y x) z)
(if (<= z -8.2e+78)
(/ (* t x) z)
(if (<= z 4.6e+33)
(* x (- (/ y z) t))
(if (<= z 4.7e+143) (* t (/ x z)) (* (/ y z) x)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -3.3e+142) {
tmp = x / (z / t);
} else if (z <= -4.6e+92) {
tmp = (y * x) / z;
} else if (z <= -8.2e+78) {
tmp = (t * x) / z;
} else if (z <= 4.6e+33) {
tmp = x * ((y / z) - t);
} else if (z <= 4.7e+143) {
tmp = t * (x / 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 (z <= (-3.3d+142)) then
tmp = x / (z / t)
else if (z <= (-4.6d+92)) then
tmp = (y * x) / z
else if (z <= (-8.2d+78)) then
tmp = (t * x) / z
else if (z <= 4.6d+33) then
tmp = x * ((y / z) - t)
else if (z <= 4.7d+143) then
tmp = t * (x / 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 (z <= -3.3e+142) {
tmp = x / (z / t);
} else if (z <= -4.6e+92) {
tmp = (y * x) / z;
} else if (z <= -8.2e+78) {
tmp = (t * x) / z;
} else if (z <= 4.6e+33) {
tmp = x * ((y / z) - t);
} else if (z <= 4.7e+143) {
tmp = t * (x / z);
} else {
tmp = (y / z) * x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -3.3e+142: tmp = x / (z / t) elif z <= -4.6e+92: tmp = (y * x) / z elif z <= -8.2e+78: tmp = (t * x) / z elif z <= 4.6e+33: tmp = x * ((y / z) - t) elif z <= 4.7e+143: tmp = t * (x / z) else: tmp = (y / z) * x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -3.3e+142) tmp = Float64(x / Float64(z / t)); elseif (z <= -4.6e+92) tmp = Float64(Float64(y * x) / z); elseif (z <= -8.2e+78) tmp = Float64(Float64(t * x) / z); elseif (z <= 4.6e+33) tmp = Float64(x * Float64(Float64(y / z) - t)); elseif (z <= 4.7e+143) tmp = Float64(t * Float64(x / z)); else tmp = Float64(Float64(y / z) * x); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -3.3e+142) tmp = x / (z / t); elseif (z <= -4.6e+92) tmp = (y * x) / z; elseif (z <= -8.2e+78) tmp = (t * x) / z; elseif (z <= 4.6e+33) tmp = x * ((y / z) - t); elseif (z <= 4.7e+143) tmp = t * (x / z); else tmp = (y / z) * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -3.3e+142], N[(x / N[(z / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4.6e+92], N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, -8.2e+78], N[(N[(t * x), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 4.6e+33], N[(x * N[(N[(y / z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.7e+143], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], N[(N[(y / z), $MachinePrecision] * x), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.3 \cdot 10^{+142}:\\
\;\;\;\;\frac{x}{\frac{z}{t}}\\
\mathbf{elif}\;z \leq -4.6 \cdot 10^{+92}:\\
\;\;\;\;\frac{y \cdot x}{z}\\
\mathbf{elif}\;z \leq -8.2 \cdot 10^{+78}:\\
\;\;\;\;\frac{t \cdot x}{z}\\
\mathbf{elif}\;z \leq 4.6 \cdot 10^{+33}:\\
\;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\
\mathbf{elif}\;z \leq 4.7 \cdot 10^{+143}:\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{z} \cdot x\\
\end{array}
\end{array}
if z < -3.3000000000000002e142Initial program 93.6%
Taylor expanded in z around inf 82.1%
associate-/l*93.8%
cancel-sign-sub-inv93.8%
metadata-eval93.8%
*-lft-identity93.8%
+-commutative93.8%
Simplified93.8%
Taylor expanded in t around inf 64.2%
*-commutative64.2%
associate-/l*72.9%
Simplified72.9%
if -3.3000000000000002e142 < z < -4.59999999999999997e92Initial program 99.3%
Taylor expanded in y around inf 83.6%
if -4.59999999999999997e92 < z < -8.1999999999999994e78Initial program 99.6%
Taylor expanded in z around inf 99.2%
associate-/l*100.0%
cancel-sign-sub-inv100.0%
metadata-eval100.0%
*-lft-identity100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in t around inf 99.2%
if -8.1999999999999994e78 < z < 4.60000000000000021e33Initial program 93.8%
Taylor expanded in z around 0 91.8%
+-commutative91.8%
associate-*r/89.0%
*-commutative89.0%
associate-*r*89.0%
neg-mul-189.0%
distribute-rgt-out90.4%
unsub-neg90.4%
Simplified90.4%
if 4.60000000000000021e33 < z < 4.7e143Initial program 96.2%
Taylor expanded in z around inf 89.4%
associate-/l*96.5%
cancel-sign-sub-inv96.5%
metadata-eval96.5%
*-lft-identity96.5%
+-commutative96.5%
Simplified96.5%
Taylor expanded in t around inf 67.0%
associate-*r/73.9%
Simplified73.9%
if 4.7e143 < z Initial program 97.1%
Taylor expanded in y around inf 53.8%
associate-*r/67.7%
Simplified67.7%
Final simplification82.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (/ t (+ z -1.0)))))
(if (<= t -1.06e+14)
t_1
(if (<= t -3.8e-99)
(/ (* y x) z)
(if (<= t 2.15e+71) (* (/ y z) x) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = x * (t / (z + -1.0));
double tmp;
if (t <= -1.06e+14) {
tmp = t_1;
} else if (t <= -3.8e-99) {
tmp = (y * x) / z;
} else if (t <= 2.15e+71) {
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 = x * (t / (z + (-1.0d0)))
if (t <= (-1.06d+14)) then
tmp = t_1
else if (t <= (-3.8d-99)) then
tmp = (y * x) / z
else if (t <= 2.15d+71) 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 + -1.0));
double tmp;
if (t <= -1.06e+14) {
tmp = t_1;
} else if (t <= -3.8e-99) {
tmp = (y * x) / z;
} else if (t <= 2.15e+71) {
tmp = (y / z) * x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (t / (z + -1.0)) tmp = 0 if t <= -1.06e+14: tmp = t_1 elif t <= -3.8e-99: tmp = (y * x) / z elif t <= 2.15e+71: tmp = (y / z) * x else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(t / Float64(z + -1.0))) tmp = 0.0 if (t <= -1.06e+14) tmp = t_1; elseif (t <= -3.8e-99) tmp = Float64(Float64(y * x) / z); elseif (t <= 2.15e+71) 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 + -1.0)); tmp = 0.0; if (t <= -1.06e+14) tmp = t_1; elseif (t <= -3.8e-99) tmp = (y * x) / z; elseif (t <= 2.15e+71) 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 / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.06e+14], t$95$1, If[LessEqual[t, -3.8e-99], N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t, 2.15e+71], N[(N[(y / z), $MachinePrecision] * x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{t}{z + -1}\\
\mathbf{if}\;t \leq -1.06 \cdot 10^{+14}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -3.8 \cdot 10^{-99}:\\
\;\;\;\;\frac{y \cdot x}{z}\\
\mathbf{elif}\;t \leq 2.15 \cdot 10^{+71}:\\
\;\;\;\;\frac{y}{z} \cdot x\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -1.06e14 or 2.14999999999999992e71 < t Initial program 97.9%
Taylor expanded in y around 0 72.1%
associate-*r/72.1%
associate-*r*72.1%
neg-mul-172.1%
associate-*l/80.0%
*-commutative80.0%
distribute-frac-neg80.0%
mul-1-neg80.0%
associate-*r/80.0%
*-commutative80.0%
associate-*r/79.9%
metadata-eval79.9%
associate-/r*79.9%
neg-mul-179.9%
associate-*r/80.0%
*-rgt-identity80.0%
neg-sub080.0%
associate--r-80.0%
metadata-eval80.0%
Simplified80.0%
if -1.06e14 < t < -3.7999999999999997e-99Initial program 73.2%
Taylor expanded in y around inf 80.2%
if -3.7999999999999997e-99 < t < 2.14999999999999992e71Initial program 95.6%
Taylor expanded in y around inf 83.9%
associate-*r/89.9%
Simplified89.9%
Final simplification85.5%
(FPCore (x y z t) :precision binary64 (if (or (<= z -0.86) (not (<= z 1.1e-11))) (* (/ x z) (+ y t)) (* x (- (/ y z) t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -0.86) || !(z <= 1.1e-11)) {
tmp = (x / z) * (y + t);
} else {
tmp = x * ((y / z) - t);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z <= (-0.86d0)) .or. (.not. (z <= 1.1d-11))) then
tmp = (x / z) * (y + t)
else
tmp = x * ((y / z) - t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -0.86) || !(z <= 1.1e-11)) {
tmp = (x / z) * (y + t);
} else {
tmp = x * ((y / z) - t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -0.86) or not (z <= 1.1e-11): tmp = (x / z) * (y + t) else: tmp = x * ((y / z) - t) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -0.86) || !(z <= 1.1e-11)) tmp = Float64(Float64(x / z) * Float64(y + t)); else tmp = Float64(x * Float64(Float64(y / z) - t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -0.86) || ~((z <= 1.1e-11))) tmp = (x / z) * (y + t); else tmp = x * ((y / z) - t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -0.86], N[Not[LessEqual[z, 1.1e-11]], $MachinePrecision]], N[(N[(x / z), $MachinePrecision] * N[(y + t), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(y / z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.86 \lor \neg \left(z \leq 1.1 \cdot 10^{-11}\right):\\
\;\;\;\;\frac{x}{z} \cdot \left(y + t\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\
\end{array}
\end{array}
if z < -0.859999999999999987 or 1.1000000000000001e-11 < z Initial program 96.6%
Taylor expanded in z around inf 86.2%
associate-/l*96.4%
associate-/r/88.8%
cancel-sign-sub-inv88.8%
metadata-eval88.8%
*-lft-identity88.8%
+-commutative88.8%
Simplified88.8%
if -0.859999999999999987 < z < 1.1000000000000001e-11Initial program 93.2%
Taylor expanded in z around 0 94.6%
+-commutative94.6%
associate-*r/91.5%
*-commutative91.5%
associate-*r*91.5%
neg-mul-191.5%
distribute-rgt-out92.2%
unsub-neg92.2%
Simplified92.2%
Final simplification90.5%
(FPCore (x y z t) :precision binary64 (if (or (<= z -1.1) (not (<= z 1.1e-11))) (/ x (/ z (+ y t))) (* x (- (/ y z) t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.1) || !(z <= 1.1e-11)) {
tmp = x / (z / (y + t));
} else {
tmp = x * ((y / z) - t);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z <= (-1.1d0)) .or. (.not. (z <= 1.1d-11))) then
tmp = x / (z / (y + t))
else
tmp = x * ((y / z) - t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.1) || !(z <= 1.1e-11)) {
tmp = x / (z / (y + t));
} else {
tmp = x * ((y / z) - t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -1.1) or not (z <= 1.1e-11): tmp = x / (z / (y + t)) else: tmp = x * ((y / z) - t) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -1.1) || !(z <= 1.1e-11)) tmp = Float64(x / Float64(z / Float64(y + t))); else tmp = Float64(x * Float64(Float64(y / z) - t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -1.1) || ~((z <= 1.1e-11))) tmp = x / (z / (y + t)); else tmp = x * ((y / z) - t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -1.1], N[Not[LessEqual[z, 1.1e-11]], $MachinePrecision]], N[(x / N[(z / N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(y / z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.1 \lor \neg \left(z \leq 1.1 \cdot 10^{-11}\right):\\
\;\;\;\;\frac{x}{\frac{z}{y + t}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\
\end{array}
\end{array}
if z < -1.1000000000000001 or 1.1000000000000001e-11 < z Initial program 96.6%
Taylor expanded in z around inf 86.2%
associate-/l*96.4%
cancel-sign-sub-inv96.4%
metadata-eval96.4%
*-lft-identity96.4%
+-commutative96.4%
Simplified96.4%
if -1.1000000000000001 < z < 1.1000000000000001e-11Initial program 93.2%
Taylor expanded in z around 0 94.6%
+-commutative94.6%
associate-*r/91.5%
*-commutative91.5%
associate-*r*91.5%
neg-mul-191.5%
distribute-rgt-out92.2%
unsub-neg92.2%
Simplified92.2%
Final simplification94.3%
(FPCore (x y z t) :precision binary64 (if (or (<= z -1.0) (not (<= z 500000000000.0))) (* t (/ x z)) (* t (- x))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.0) || !(z <= 500000000000.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 <= (-1.0d0)) .or. (.not. (z <= 500000000000.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 <= -1.0) || !(z <= 500000000000.0)) {
tmp = t * (x / z);
} else {
tmp = t * -x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -1.0) or not (z <= 500000000000.0): tmp = t * (x / z) else: tmp = t * -x return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -1.0) || !(z <= 500000000000.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 <= -1.0) || ~((z <= 500000000000.0))) tmp = t * (x / z); else tmp = t * -x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -1.0], N[Not[LessEqual[z, 500000000000.0]], $MachinePrecision]], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], N[(t * (-x)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \lor \neg \left(z \leq 500000000000\right):\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(-x\right)\\
\end{array}
\end{array}
if z < -1 or 5e11 < z Initial program 96.6%
Taylor expanded in z around inf 86.0%
associate-/l*96.3%
cancel-sign-sub-inv96.3%
metadata-eval96.3%
*-lft-identity96.3%
+-commutative96.3%
Simplified96.3%
Taylor expanded in t around inf 55.3%
associate-*r/54.6%
Simplified54.6%
if -1 < z < 5e11Initial program 93.3%
Taylor expanded in z around 0 94.4%
+-commutative94.4%
associate-*r/91.3%
*-commutative91.3%
associate-*r*91.3%
neg-mul-191.3%
distribute-rgt-out92.1%
unsub-neg92.1%
Simplified92.1%
Taylor expanded in y around 0 34.6%
associate-*r*34.6%
mul-1-neg34.6%
Simplified34.6%
Final simplification44.5%
(FPCore (x y z t) :precision binary64 (* t (- x)))
double code(double x, double y, double z, double t) {
return t * -x;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = t * -x
end function
public static double code(double x, double y, double z, double t) {
return t * -x;
}
def code(x, y, z, t): return t * -x
function code(x, y, z, t) return Float64(t * Float64(-x)) end
function tmp = code(x, y, z, t) tmp = t * -x; end
code[x_, y_, z_, t_] := N[(t * (-x)), $MachinePrecision]
\begin{array}{l}
\\
t \cdot \left(-x\right)
\end{array}
Initial program 94.9%
Taylor expanded in z around 0 64.0%
+-commutative64.0%
associate-*r/65.7%
*-commutative65.7%
associate-*r*65.7%
neg-mul-165.7%
distribute-rgt-out66.9%
unsub-neg66.9%
Simplified66.9%
Taylor expanded in y around 0 26.2%
associate-*r*26.2%
mul-1-neg26.2%
Simplified26.2%
Final simplification26.2%
(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 2024018
(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)))))