
(FPCore (x y z t) :precision binary64 (* x (- (/ y z) (/ t (- 1.0 z)))))
double code(double x, double y, double z, double t) {
return x * ((y / z) - (t / (1.0 - z)));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x * ((y / z) - (t / (1.0d0 - z)))
end function
public static double code(double x, double y, double z, double t) {
return x * ((y / z) - (t / (1.0 - z)));
}
def code(x, y, z, t): return x * ((y / z) - (t / (1.0 - z)))
function code(x, y, z, t) return Float64(x * Float64(Float64(y / z) - Float64(t / Float64(1.0 - z)))) end
function tmp = code(x, y, z, t) tmp = x * ((y / z) - (t / (1.0 - z))); end
code[x_, y_, z_, t_] := N[(x * N[(N[(y / z), $MachinePrecision] - N[(t / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right)
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 12 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (* x (- (/ y z) (/ t (- 1.0 z)))))
double code(double x, double y, double z, double t) {
return x * ((y / z) - (t / (1.0 - z)));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x * ((y / z) - (t / (1.0d0 - z)))
end function
public static double code(double x, double y, double z, double t) {
return x * ((y / z) - (t / (1.0 - z)));
}
def code(x, y, z, t): return x * ((y / z) - (t / (1.0 - z)))
function code(x, y, z, t) return Float64(x * Float64(Float64(y / z) - Float64(t / Float64(1.0 - z)))) end
function tmp = code(x, y, z, t) tmp = x * ((y / z) - (t / (1.0 - z))); end
code[x_, y_, z_, t_] := N[(x * N[(N[(y / z), $MachinePrecision] - N[(t / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right)
\end{array}
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* y (/ x z))) (t_2 (- (/ y z) (/ t (- 1.0 z)))) (t_3 (* t_2 x)))
(if (<= t_2 (- INFINITY))
t_1
(if (<= t_2 -1e-181)
t_3
(if (<= t_2 2e-307)
(* (/ x z) (+ y t))
(if (<= t_2 1e+306) 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 / (1.0 - z));
double t_3 = t_2 * x;
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = t_1;
} else if (t_2 <= -1e-181) {
tmp = t_3;
} else if (t_2 <= 2e-307) {
tmp = (x / z) * (y + t);
} else if (t_2 <= 1e+306) {
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 / (1.0 - z));
double t_3 = t_2 * x;
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = t_1;
} else if (t_2 <= -1e-181) {
tmp = t_3;
} else if (t_2 <= 2e-307) {
tmp = (x / z) * (y + t);
} else if (t_2 <= 1e+306) {
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 / (1.0 - z)) t_3 = t_2 * x tmp = 0 if t_2 <= -math.inf: tmp = t_1 elif t_2 <= -1e-181: tmp = t_3 elif t_2 <= 2e-307: tmp = (x / z) * (y + t) elif t_2 <= 1e+306: 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(1.0 - z))) t_3 = Float64(t_2 * x) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = t_1; elseif (t_2 <= -1e-181) tmp = t_3; elseif (t_2 <= 2e-307) tmp = Float64(Float64(x / z) * Float64(y + t)); elseif (t_2 <= 1e+306) 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 / (1.0 - z)); t_3 = t_2 * x; tmp = 0.0; if (t_2 <= -Inf) tmp = t_1; elseif (t_2 <= -1e-181) tmp = t_3; elseif (t_2 <= 2e-307) tmp = (x / z) * (y + t); elseif (t_2 <= 1e+306) 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[(1.0 - z), $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-181], t$95$3, If[LessEqual[t$95$2, 2e-307], N[(N[(x / z), $MachinePrecision] * N[(y + t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+306], 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}{1 - z}\\
t_3 := t_2 \cdot x\\
\mathbf{if}\;t_2 \leq -\infty:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_2 \leq -1 \cdot 10^{-181}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t_2 \leq 2 \cdot 10^{-307}:\\
\;\;\;\;\frac{x}{z} \cdot \left(y + t\right)\\
\mathbf{elif}\;t_2 \leq 10^{+306}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if (-.f64 (/.f64 y z) (/.f64 t (-.f64 1 z))) < -inf.0 or 1.00000000000000002e306 < (-.f64 (/.f64 y z) (/.f64 t (-.f64 1 z))) Initial program 66.0%
Taylor expanded in y around inf 99.8%
associate-/l*68.6%
associate-/r/100.0%
Simplified100.0%
if -inf.0 < (-.f64 (/.f64 y z) (/.f64 t (-.f64 1 z))) < -1.00000000000000005e-181 or 1.99999999999999982e-307 < (-.f64 (/.f64 y z) (/.f64 t (-.f64 1 z))) < 1.00000000000000002e306Initial program 99.7%
if -1.00000000000000005e-181 < (-.f64 (/.f64 y z) (/.f64 t (-.f64 1 z))) < 1.99999999999999982e-307Initial program 74.7%
Taylor expanded in z around inf 95.3%
associate-/l*73.5%
associate-/r/99.9%
cancel-sign-sub-inv99.9%
metadata-eval99.9%
*-lft-identity99.9%
+-commutative99.9%
Simplified99.9%
Final simplification99.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (- (/ y z) (+ t (* z t))))) (t_2 (/ x (/ z (+ y t)))))
(if (<= z -0.76)
t_2
(if (<= z -5.6e-163)
t_1
(if (<= z 3.5e-255) (* y (/ x z)) (if (<= z 1.0) t_1 t_2))))))
double code(double x, double y, double z, double t) {
double t_1 = x * ((y / z) - (t + (z * t)));
double t_2 = x / (z / (y + t));
double tmp;
if (z <= -0.76) {
tmp = t_2;
} else if (z <= -5.6e-163) {
tmp = t_1;
} else if (z <= 3.5e-255) {
tmp = y * (x / z);
} else if (z <= 1.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x * ((y / z) - (t + (z * t)))
t_2 = x / (z / (y + t))
if (z <= (-0.76d0)) then
tmp = t_2
else if (z <= (-5.6d-163)) then
tmp = t_1
else if (z <= 3.5d-255) then
tmp = y * (x / z)
else if (z <= 1.0d0) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x * ((y / z) - (t + (z * t)));
double t_2 = x / (z / (y + t));
double tmp;
if (z <= -0.76) {
tmp = t_2;
} else if (z <= -5.6e-163) {
tmp = t_1;
} else if (z <= 3.5e-255) {
tmp = y * (x / z);
} else if (z <= 1.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * ((y / z) - (t + (z * t))) t_2 = x / (z / (y + t)) tmp = 0 if z <= -0.76: tmp = t_2 elif z <= -5.6e-163: tmp = t_1 elif z <= 3.5e-255: tmp = y * (x / z) elif z <= 1.0: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(Float64(y / z) - Float64(t + Float64(z * t)))) t_2 = Float64(x / Float64(z / Float64(y + t))) tmp = 0.0 if (z <= -0.76) tmp = t_2; elseif (z <= -5.6e-163) tmp = t_1; elseif (z <= 3.5e-255) tmp = Float64(y * Float64(x / z)); elseif (z <= 1.0) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * ((y / z) - (t + (z * t))); t_2 = x / (z / (y + t)); tmp = 0.0; if (z <= -0.76) tmp = t_2; elseif (z <= -5.6e-163) tmp = t_1; elseif (z <= 3.5e-255) tmp = y * (x / z); elseif (z <= 1.0) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(N[(y / z), $MachinePrecision] - N[(t + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(z / N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -0.76], t$95$2, If[LessEqual[z, -5.6e-163], t$95$1, If[LessEqual[z, 3.5e-255], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.0], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(\frac{y}{z} - \left(t + z \cdot t\right)\right)\\
t_2 := \frac{x}{\frac{z}{y + t}}\\
\mathbf{if}\;z \leq -0.76:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -5.6 \cdot 10^{-163}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{-255}:\\
\;\;\;\;y \cdot \frac{x}{z}\\
\mathbf{elif}\;z \leq 1:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -0.76000000000000001 or 1 < z Initial program 95.6%
Taylor expanded in z around inf 84.7%
associate-/l*93.5%
cancel-sign-sub-inv93.5%
metadata-eval93.5%
*-lft-identity93.5%
+-commutative93.5%
Simplified93.5%
if -0.76000000000000001 < z < -5.5999999999999999e-163 or 3.49999999999999979e-255 < z < 1Initial program 97.4%
Taylor expanded in z around 0 96.1%
if -5.5999999999999999e-163 < z < 3.49999999999999979e-255Initial program 79.5%
Taylor expanded in y around inf 87.3%
associate-/l*77.0%
associate-/r/93.5%
Simplified93.5%
Final simplification94.3%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (/ t z))) (t_2 (* x (- (/ y z) t))))
(if (<= z -1050.0)
t_1
(if (<= z -9.2e-163)
t_2
(if (<= z 1.25e-256)
(* y (/ x z))
(if (<= z 4.3e+29)
t_2
(if (<= z 2.6e+116)
t_1
(if (<= z 2.5e+212) (* (/ y z) x) (/ t (/ z x))))))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (t / z);
double t_2 = x * ((y / z) - t);
double tmp;
if (z <= -1050.0) {
tmp = t_1;
} else if (z <= -9.2e-163) {
tmp = t_2;
} else if (z <= 1.25e-256) {
tmp = y * (x / z);
} else if (z <= 4.3e+29) {
tmp = t_2;
} else if (z <= 2.6e+116) {
tmp = t_1;
} else if (z <= 2.5e+212) {
tmp = (y / z) * x;
} else {
tmp = t / (z / x);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x * (t / z)
t_2 = x * ((y / z) - t)
if (z <= (-1050.0d0)) then
tmp = t_1
else if (z <= (-9.2d-163)) then
tmp = t_2
else if (z <= 1.25d-256) then
tmp = y * (x / z)
else if (z <= 4.3d+29) then
tmp = t_2
else if (z <= 2.6d+116) then
tmp = t_1
else if (z <= 2.5d+212) then
tmp = (y / z) * x
else
tmp = t / (z / x)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x * (t / z);
double t_2 = x * ((y / z) - t);
double tmp;
if (z <= -1050.0) {
tmp = t_1;
} else if (z <= -9.2e-163) {
tmp = t_2;
} else if (z <= 1.25e-256) {
tmp = y * (x / z);
} else if (z <= 4.3e+29) {
tmp = t_2;
} else if (z <= 2.6e+116) {
tmp = t_1;
} else if (z <= 2.5e+212) {
tmp = (y / z) * x;
} else {
tmp = t / (z / x);
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (t / z) t_2 = x * ((y / z) - t) tmp = 0 if z <= -1050.0: tmp = t_1 elif z <= -9.2e-163: tmp = t_2 elif z <= 1.25e-256: tmp = y * (x / z) elif z <= 4.3e+29: tmp = t_2 elif z <= 2.6e+116: tmp = t_1 elif z <= 2.5e+212: tmp = (y / z) * x else: tmp = t / (z / x) return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(t / z)) t_2 = Float64(x * Float64(Float64(y / z) - t)) tmp = 0.0 if (z <= -1050.0) tmp = t_1; elseif (z <= -9.2e-163) tmp = t_2; elseif (z <= 1.25e-256) tmp = Float64(y * Float64(x / z)); elseif (z <= 4.3e+29) tmp = t_2; elseif (z <= 2.6e+116) tmp = t_1; elseif (z <= 2.5e+212) tmp = Float64(Float64(y / z) * x); else tmp = Float64(t / Float64(z / x)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (t / z); t_2 = x * ((y / z) - t); tmp = 0.0; if (z <= -1050.0) tmp = t_1; elseif (z <= -9.2e-163) tmp = t_2; elseif (z <= 1.25e-256) tmp = y * (x / z); elseif (z <= 4.3e+29) tmp = t_2; elseif (z <= 2.6e+116) tmp = t_1; elseif (z <= 2.5e+212) tmp = (y / z) * x; else tmp = t / (z / x); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(N[(y / z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1050.0], t$95$1, If[LessEqual[z, -9.2e-163], t$95$2, If[LessEqual[z, 1.25e-256], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.3e+29], t$95$2, If[LessEqual[z, 2.6e+116], t$95$1, If[LessEqual[z, 2.5e+212], N[(N[(y / z), $MachinePrecision] * x), $MachinePrecision], N[(t / N[(z / x), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{t}{z}\\
t_2 := x \cdot \left(\frac{y}{z} - t\right)\\
\mathbf{if}\;z \leq -1050:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -9.2 \cdot 10^{-163}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 1.25 \cdot 10^{-256}:\\
\;\;\;\;y \cdot \frac{x}{z}\\
\mathbf{elif}\;z \leq 4.3 \cdot 10^{+29}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{+116}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{+212}:\\
\;\;\;\;\frac{y}{z} \cdot x\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{\frac{z}{x}}\\
\end{array}
\end{array}
if z < -1050 or 4.3000000000000003e29 < z < 2.59999999999999987e116Initial program 97.5%
Taylor expanded in z around inf 86.5%
associate-/l*95.2%
associate-/r/84.2%
cancel-sign-sub-inv84.2%
metadata-eval84.2%
*-lft-identity84.2%
+-commutative84.2%
Simplified84.2%
*-commutative84.2%
clear-num84.1%
un-div-inv84.1%
Applied egg-rr84.1%
Taylor expanded in t around inf 64.5%
associate-*l/68.5%
Simplified68.5%
if -1050 < z < -9.1999999999999997e-163 or 1.25e-256 < z < 4.3000000000000003e29Initial program 97.7%
Taylor expanded in z around 0 84.4%
+-commutative84.4%
associate-*r/88.0%
*-commutative88.0%
associate-*r*88.0%
neg-mul-188.0%
distribute-rgt-out91.3%
unsub-neg91.3%
Simplified91.3%
if -9.1999999999999997e-163 < z < 1.25e-256Initial program 79.5%
Taylor expanded in y around inf 87.3%
associate-/l*77.0%
associate-/r/93.5%
Simplified93.5%
if 2.59999999999999987e116 < z < 2.49999999999999996e212Initial program 99.9%
Taylor expanded in y around inf 61.2%
associate-*r/75.7%
Simplified75.7%
if 2.49999999999999996e212 < z Initial program 88.3%
Taylor expanded in z around inf 79.1%
associate-/l*88.3%
associate-/r/82.1%
cancel-sign-sub-inv82.1%
metadata-eval82.1%
*-lft-identity82.1%
+-commutative82.1%
Simplified82.1%
Taylor expanded in t around inf 70.1%
associate-/l*73.0%
Simplified73.0%
Final simplification82.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (- (/ y z) t))))
(if (<= z -1.3)
(* x (/ t (+ z -1.0)))
(if (<= z -5.6e-163)
t_1
(if (<= z 5.9e-257)
(* y (/ x z))
(if (<= z 5.2e+30)
t_1
(if (<= z 8.3e+127)
(* x (/ t z))
(if (<= z 5.2e+194) (* (/ y z) x) (/ t (/ z x))))))))))
double code(double x, double y, double z, double t) {
double t_1 = x * ((y / z) - t);
double tmp;
if (z <= -1.3) {
tmp = x * (t / (z + -1.0));
} else if (z <= -5.6e-163) {
tmp = t_1;
} else if (z <= 5.9e-257) {
tmp = y * (x / z);
} else if (z <= 5.2e+30) {
tmp = t_1;
} else if (z <= 8.3e+127) {
tmp = x * (t / z);
} else if (z <= 5.2e+194) {
tmp = (y / z) * x;
} else {
tmp = t / (z / x);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = x * ((y / z) - t)
if (z <= (-1.3d0)) then
tmp = x * (t / (z + (-1.0d0)))
else if (z <= (-5.6d-163)) then
tmp = t_1
else if (z <= 5.9d-257) then
tmp = y * (x / z)
else if (z <= 5.2d+30) then
tmp = t_1
else if (z <= 8.3d+127) then
tmp = x * (t / z)
else if (z <= 5.2d+194) then
tmp = (y / z) * x
else
tmp = t / (z / x)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x * ((y / z) - t);
double tmp;
if (z <= -1.3) {
tmp = x * (t / (z + -1.0));
} else if (z <= -5.6e-163) {
tmp = t_1;
} else if (z <= 5.9e-257) {
tmp = y * (x / z);
} else if (z <= 5.2e+30) {
tmp = t_1;
} else if (z <= 8.3e+127) {
tmp = x * (t / z);
} else if (z <= 5.2e+194) {
tmp = (y / z) * x;
} else {
tmp = t / (z / x);
}
return tmp;
}
def code(x, y, z, t): t_1 = x * ((y / z) - t) tmp = 0 if z <= -1.3: tmp = x * (t / (z + -1.0)) elif z <= -5.6e-163: tmp = t_1 elif z <= 5.9e-257: tmp = y * (x / z) elif z <= 5.2e+30: tmp = t_1 elif z <= 8.3e+127: tmp = x * (t / z) elif z <= 5.2e+194: tmp = (y / z) * x else: tmp = t / (z / x) return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(Float64(y / z) - t)) tmp = 0.0 if (z <= -1.3) tmp = Float64(x * Float64(t / Float64(z + -1.0))); elseif (z <= -5.6e-163) tmp = t_1; elseif (z <= 5.9e-257) tmp = Float64(y * Float64(x / z)); elseif (z <= 5.2e+30) tmp = t_1; elseif (z <= 8.3e+127) tmp = Float64(x * Float64(t / z)); elseif (z <= 5.2e+194) tmp = Float64(Float64(y / z) * x); else tmp = Float64(t / Float64(z / x)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * ((y / z) - t); tmp = 0.0; if (z <= -1.3) tmp = x * (t / (z + -1.0)); elseif (z <= -5.6e-163) tmp = t_1; elseif (z <= 5.9e-257) tmp = y * (x / z); elseif (z <= 5.2e+30) tmp = t_1; elseif (z <= 8.3e+127) tmp = x * (t / z); elseif (z <= 5.2e+194) tmp = (y / z) * x; else tmp = t / (z / x); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(N[(y / z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.3], N[(x * N[(t / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -5.6e-163], t$95$1, If[LessEqual[z, 5.9e-257], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.2e+30], t$95$1, If[LessEqual[z, 8.3e+127], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.2e+194], N[(N[(y / z), $MachinePrecision] * x), $MachinePrecision], N[(t / N[(z / x), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(\frac{y}{z} - t\right)\\
\mathbf{if}\;z \leq -1.3:\\
\;\;\;\;x \cdot \frac{t}{z + -1}\\
\mathbf{elif}\;z \leq -5.6 \cdot 10^{-163}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 5.9 \cdot 10^{-257}:\\
\;\;\;\;y \cdot \frac{x}{z}\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{+30}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 8.3 \cdot 10^{+127}:\\
\;\;\;\;x \cdot \frac{t}{z}\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{+194}:\\
\;\;\;\;\frac{y}{z} \cdot x\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{\frac{z}{x}}\\
\end{array}
\end{array}
if z < -1.30000000000000004Initial program 96.7%
Taylor expanded in y around 0 66.2%
associate-*r/66.2%
associate-*r*66.2%
neg-mul-166.2%
associate-*l/69.9%
*-commutative69.9%
neg-mul-169.9%
*-commutative69.9%
associate-*r/69.9%
metadata-eval69.9%
associate-/r*69.9%
neg-mul-169.9%
associate-*r/69.9%
*-rgt-identity69.9%
neg-sub069.9%
associate--r-69.9%
metadata-eval69.9%
Simplified69.9%
if -1.30000000000000004 < z < -5.5999999999999999e-163 or 5.9e-257 < z < 5.19999999999999977e30Initial program 97.7%
Taylor expanded in z around 0 84.4%
+-commutative84.4%
associate-*r/88.0%
*-commutative88.0%
associate-*r*88.0%
neg-mul-188.0%
distribute-rgt-out91.3%
unsub-neg91.3%
Simplified91.3%
if -5.5999999999999999e-163 < z < 5.9e-257Initial program 79.5%
Taylor expanded in y around inf 87.3%
associate-/l*77.0%
associate-/r/93.5%
Simplified93.5%
if 5.19999999999999977e30 < z < 8.2999999999999997e127Initial program 99.8%
Taylor expanded in z around inf 95.2%
associate-/l*99.8%
associate-/r/90.4%
cancel-sign-sub-inv90.4%
metadata-eval90.4%
*-lft-identity90.4%
+-commutative90.4%
Simplified90.4%
*-commutative90.4%
clear-num90.2%
un-div-inv90.3%
Applied egg-rr90.3%
Taylor expanded in t around inf 67.3%
associate-*l/71.9%
Simplified71.9%
if 8.2999999999999997e127 < z < 5.1999999999999998e194Initial program 99.9%
Taylor expanded in y around inf 61.2%
associate-*r/75.7%
Simplified75.7%
if 5.1999999999999998e194 < z Initial program 88.3%
Taylor expanded in z around inf 79.1%
associate-/l*88.3%
associate-/r/82.1%
cancel-sign-sub-inv82.1%
metadata-eval82.1%
*-lft-identity82.1%
+-commutative82.1%
Simplified82.1%
Taylor expanded in t around inf 70.1%
associate-/l*73.0%
Simplified73.0%
Final simplification82.6%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (- (/ y z) t))) (t_2 (* (/ x z) (+ y t))))
(if (<= z -0.165)
t_2
(if (<= z -7.5e-163)
t_1
(if (<= z 1.25e-255) (* y (/ x z)) (if (<= z 1.0) t_1 t_2))))))
double code(double x, double y, double z, double t) {
double t_1 = x * ((y / z) - t);
double t_2 = (x / z) * (y + t);
double tmp;
if (z <= -0.165) {
tmp = t_2;
} else if (z <= -7.5e-163) {
tmp = t_1;
} else if (z <= 1.25e-255) {
tmp = y * (x / z);
} else if (z <= 1.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x * ((y / z) - t)
t_2 = (x / z) * (y + t)
if (z <= (-0.165d0)) then
tmp = t_2
else if (z <= (-7.5d-163)) then
tmp = t_1
else if (z <= 1.25d-255) then
tmp = y * (x / z)
else if (z <= 1.0d0) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x * ((y / z) - t);
double t_2 = (x / z) * (y + t);
double tmp;
if (z <= -0.165) {
tmp = t_2;
} else if (z <= -7.5e-163) {
tmp = t_1;
} else if (z <= 1.25e-255) {
tmp = y * (x / z);
} else if (z <= 1.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * ((y / z) - t) t_2 = (x / z) * (y + t) tmp = 0 if z <= -0.165: tmp = t_2 elif z <= -7.5e-163: tmp = t_1 elif z <= 1.25e-255: tmp = y * (x / z) elif z <= 1.0: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(Float64(y / z) - t)) t_2 = Float64(Float64(x / z) * Float64(y + t)) tmp = 0.0 if (z <= -0.165) tmp = t_2; elseif (z <= -7.5e-163) tmp = t_1; elseif (z <= 1.25e-255) tmp = Float64(y * Float64(x / z)); elseif (z <= 1.0) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * ((y / z) - t); t_2 = (x / z) * (y + t); tmp = 0.0; if (z <= -0.165) tmp = t_2; elseif (z <= -7.5e-163) tmp = t_1; elseif (z <= 1.25e-255) tmp = y * (x / z); elseif (z <= 1.0) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(N[(y / z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x / z), $MachinePrecision] * N[(y + t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -0.165], t$95$2, If[LessEqual[z, -7.5e-163], t$95$1, If[LessEqual[z, 1.25e-255], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.0], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(\frac{y}{z} - t\right)\\
t_2 := \frac{x}{z} \cdot \left(y + t\right)\\
\mathbf{if}\;z \leq -0.165:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -7.5 \cdot 10^{-163}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.25 \cdot 10^{-255}:\\
\;\;\;\;y \cdot \frac{x}{z}\\
\mathbf{elif}\;z \leq 1:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -0.165000000000000008 or 1 < z Initial program 95.7%
Taylor expanded in z around inf 84.8%
associate-/l*93.5%
associate-/r/85.0%
cancel-sign-sub-inv85.0%
metadata-eval85.0%
*-lft-identity85.0%
+-commutative85.0%
Simplified85.0%
if -0.165000000000000008 < z < -7.49999999999999996e-163 or 1.2499999999999999e-255 < z < 1Initial program 97.4%
Taylor expanded in z around 0 87.2%
+-commutative87.2%
associate-*r/91.3%
*-commutative91.3%
associate-*r*91.3%
neg-mul-191.3%
distribute-rgt-out95.1%
unsub-neg95.1%
Simplified95.1%
if -7.49999999999999996e-163 < z < 1.2499999999999999e-255Initial program 79.5%
Taylor expanded in y around inf 87.3%
associate-/l*77.0%
associate-/r/93.5%
Simplified93.5%
Final simplification89.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (- (/ y z) t))) (t_2 (/ x (/ z (+ y t)))))
(if (<= z -0.95)
t_2
(if (<= z -7.5e-163)
t_1
(if (<= z 7.5e-257) (* y (/ x z)) (if (<= z 1.0) t_1 t_2))))))
double code(double x, double y, double z, double t) {
double t_1 = x * ((y / z) - t);
double t_2 = x / (z / (y + t));
double tmp;
if (z <= -0.95) {
tmp = t_2;
} else if (z <= -7.5e-163) {
tmp = t_1;
} else if (z <= 7.5e-257) {
tmp = y * (x / z);
} else if (z <= 1.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x * ((y / z) - t)
t_2 = x / (z / (y + t))
if (z <= (-0.95d0)) then
tmp = t_2
else if (z <= (-7.5d-163)) then
tmp = t_1
else if (z <= 7.5d-257) then
tmp = y * (x / z)
else if (z <= 1.0d0) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x * ((y / z) - t);
double t_2 = x / (z / (y + t));
double tmp;
if (z <= -0.95) {
tmp = t_2;
} else if (z <= -7.5e-163) {
tmp = t_1;
} else if (z <= 7.5e-257) {
tmp = y * (x / z);
} else if (z <= 1.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * ((y / z) - t) t_2 = x / (z / (y + t)) tmp = 0 if z <= -0.95: tmp = t_2 elif z <= -7.5e-163: tmp = t_1 elif z <= 7.5e-257: tmp = y * (x / z) elif z <= 1.0: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(Float64(y / z) - t)) t_2 = Float64(x / Float64(z / Float64(y + t))) tmp = 0.0 if (z <= -0.95) tmp = t_2; elseif (z <= -7.5e-163) tmp = t_1; elseif (z <= 7.5e-257) tmp = Float64(y * Float64(x / z)); elseif (z <= 1.0) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * ((y / z) - t); t_2 = x / (z / (y + t)); tmp = 0.0; if (z <= -0.95) tmp = t_2; elseif (z <= -7.5e-163) tmp = t_1; elseif (z <= 7.5e-257) tmp = y * (x / z); elseif (z <= 1.0) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(N[(y / z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(z / N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -0.95], t$95$2, If[LessEqual[z, -7.5e-163], t$95$1, If[LessEqual[z, 7.5e-257], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.0], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(\frac{y}{z} - t\right)\\
t_2 := \frac{x}{\frac{z}{y + t}}\\
\mathbf{if}\;z \leq -0.95:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -7.5 \cdot 10^{-163}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 7.5 \cdot 10^{-257}:\\
\;\;\;\;y \cdot \frac{x}{z}\\
\mathbf{elif}\;z \leq 1:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -0.94999999999999996 or 1 < z Initial program 95.6%
Taylor expanded in z around inf 84.7%
associate-/l*93.5%
cancel-sign-sub-inv93.5%
metadata-eval93.5%
*-lft-identity93.5%
+-commutative93.5%
Simplified93.5%
if -0.94999999999999996 < z < -7.49999999999999996e-163 or 7.4999999999999995e-257 < z < 1Initial program 97.4%
Taylor expanded in z around 0 87.4%
+-commutative87.4%
associate-*r/91.4%
*-commutative91.4%
associate-*r*91.4%
neg-mul-191.4%
distribute-rgt-out95.1%
unsub-neg95.1%
Simplified95.1%
if -7.49999999999999996e-163 < z < 7.4999999999999995e-257Initial program 79.5%
Taylor expanded in y around inf 87.3%
associate-/l*77.0%
associate-/r/93.5%
Simplified93.5%
Final simplification94.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (/ t z))))
(if (<= t -2.8e+230)
t_1
(if (<= t 2.5e-24)
(* (/ y z) x)
(if (or (<= t 1.9e+266) (not (<= t 1.35e+304))) t_1 (* x (- t)))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (t / z);
double tmp;
if (t <= -2.8e+230) {
tmp = t_1;
} else if (t <= 2.5e-24) {
tmp = (y / z) * x;
} else if ((t <= 1.9e+266) || !(t <= 1.35e+304)) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = x * (t / z)
if (t <= (-2.8d+230)) then
tmp = t_1
else if (t <= 2.5d-24) then
tmp = (y / z) * x
else if ((t <= 1.9d+266) .or. (.not. (t <= 1.35d+304))) then
tmp = t_1
else
tmp = x * -t
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 <= -2.8e+230) {
tmp = t_1;
} else if (t <= 2.5e-24) {
tmp = (y / z) * x;
} else if ((t <= 1.9e+266) || !(t <= 1.35e+304)) {
tmp = t_1;
} else {
tmp = x * -t;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (t / z) tmp = 0 if t <= -2.8e+230: tmp = t_1 elif t <= 2.5e-24: tmp = (y / z) * x elif (t <= 1.9e+266) or not (t <= 1.35e+304): tmp = t_1 else: tmp = x * -t return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(t / z)) tmp = 0.0 if (t <= -2.8e+230) tmp = t_1; elseif (t <= 2.5e-24) tmp = Float64(Float64(y / z) * x); elseif ((t <= 1.9e+266) || !(t <= 1.35e+304)) tmp = t_1; else tmp = Float64(x * Float64(-t)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (t / z); tmp = 0.0; if (t <= -2.8e+230) tmp = t_1; elseif (t <= 2.5e-24) tmp = (y / z) * x; elseif ((t <= 1.9e+266) || ~((t <= 1.35e+304))) tmp = t_1; else tmp = x * -t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.8e+230], t$95$1, If[LessEqual[t, 2.5e-24], N[(N[(y / z), $MachinePrecision] * x), $MachinePrecision], If[Or[LessEqual[t, 1.9e+266], N[Not[LessEqual[t, 1.35e+304]], $MachinePrecision]], t$95$1, N[(x * (-t)), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{t}{z}\\
\mathbf{if}\;t \leq -2.8 \cdot 10^{+230}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 2.5 \cdot 10^{-24}:\\
\;\;\;\;\frac{y}{z} \cdot x\\
\mathbf{elif}\;t \leq 1.9 \cdot 10^{+266} \lor \neg \left(t \leq 1.35 \cdot 10^{+304}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(-t\right)\\
\end{array}
\end{array}
if t < -2.8000000000000002e230 or 2.4999999999999999e-24 < t < 1.8999999999999999e266 or 1.35e304 < t Initial program 95.4%
Taylor expanded in z around inf 67.0%
associate-/l*73.6%
associate-/r/63.6%
cancel-sign-sub-inv63.6%
metadata-eval63.6%
*-lft-identity63.6%
+-commutative63.6%
Simplified63.6%
*-commutative63.6%
clear-num63.6%
un-div-inv63.6%
Applied egg-rr63.6%
Taylor expanded in t around inf 52.7%
associate-*l/59.5%
Simplified59.5%
if -2.8000000000000002e230 < t < 2.4999999999999999e-24Initial program 92.6%
Taylor expanded in y around inf 70.3%
associate-*r/75.4%
Simplified75.4%
if 1.8999999999999999e266 < t < 1.35e304Initial program 81.5%
Taylor expanded in z around 0 100.0%
+-commutative100.0%
associate-*r/81.5%
*-commutative81.5%
associate-*r*81.5%
neg-mul-181.5%
distribute-rgt-out81.5%
unsub-neg81.5%
Simplified81.5%
Taylor expanded in y around 0 80.8%
associate-*r*80.8%
*-commutative80.8%
mul-1-neg80.8%
Simplified80.8%
Final simplification70.3%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (/ t z))))
(if (<= z -370.0)
t_1
(if (<= z 3.2e+29)
(* y (/ x z))
(if (<= z 1.65e+117)
t_1
(if (<= z 3e+205) (* (/ y z) x) (* t (/ x z))))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (t / z);
double tmp;
if (z <= -370.0) {
tmp = t_1;
} else if (z <= 3.2e+29) {
tmp = y * (x / z);
} else if (z <= 1.65e+117) {
tmp = t_1;
} else if (z <= 3e+205) {
tmp = (y / z) * x;
} else {
tmp = t * (x / z);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = x * (t / z)
if (z <= (-370.0d0)) then
tmp = t_1
else if (z <= 3.2d+29) then
tmp = y * (x / z)
else if (z <= 1.65d+117) then
tmp = t_1
else if (z <= 3d+205) then
tmp = (y / z) * x
else
tmp = t * (x / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x * (t / z);
double tmp;
if (z <= -370.0) {
tmp = t_1;
} else if (z <= 3.2e+29) {
tmp = y * (x / z);
} else if (z <= 1.65e+117) {
tmp = t_1;
} else if (z <= 3e+205) {
tmp = (y / z) * x;
} else {
tmp = t * (x / z);
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (t / z) tmp = 0 if z <= -370.0: tmp = t_1 elif z <= 3.2e+29: tmp = y * (x / z) elif z <= 1.65e+117: tmp = t_1 elif z <= 3e+205: tmp = (y / z) * x else: tmp = t * (x / z) return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(t / z)) tmp = 0.0 if (z <= -370.0) tmp = t_1; elseif (z <= 3.2e+29) tmp = Float64(y * Float64(x / z)); elseif (z <= 1.65e+117) tmp = t_1; elseif (z <= 3e+205) tmp = Float64(Float64(y / z) * x); else tmp = Float64(t * Float64(x / z)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (t / z); tmp = 0.0; if (z <= -370.0) tmp = t_1; elseif (z <= 3.2e+29) tmp = y * (x / z); elseif (z <= 1.65e+117) tmp = t_1; elseif (z <= 3e+205) tmp = (y / z) * x; else tmp = t * (x / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -370.0], t$95$1, If[LessEqual[z, 3.2e+29], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.65e+117], t$95$1, If[LessEqual[z, 3e+205], N[(N[(y / z), $MachinePrecision] * x), $MachinePrecision], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{t}{z}\\
\mathbf{if}\;z \leq -370:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 3.2 \cdot 10^{+29}:\\
\;\;\;\;y \cdot \frac{x}{z}\\
\mathbf{elif}\;z \leq 1.65 \cdot 10^{+117}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 3 \cdot 10^{+205}:\\
\;\;\;\;\frac{y}{z} \cdot x\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{x}{z}\\
\end{array}
\end{array}
if z < -370 or 3.19999999999999987e29 < z < 1.6499999999999999e117Initial program 97.5%
Taylor expanded in z around inf 86.5%
associate-/l*95.2%
associate-/r/84.2%
cancel-sign-sub-inv84.2%
metadata-eval84.2%
*-lft-identity84.2%
+-commutative84.2%
Simplified84.2%
*-commutative84.2%
clear-num84.1%
un-div-inv84.1%
Applied egg-rr84.1%
Taylor expanded in t around inf 64.5%
associate-*l/68.5%
Simplified68.5%
if -370 < z < 3.19999999999999987e29Initial program 91.6%
Taylor expanded in y around inf 70.9%
associate-/l*69.2%
associate-/r/76.1%
Simplified76.1%
if 1.6499999999999999e117 < z < 2.9999999999999999e205Initial program 99.9%
Taylor expanded in y around inf 61.2%
associate-*r/75.7%
Simplified75.7%
if 2.9999999999999999e205 < z Initial program 88.3%
Taylor expanded in z around inf 79.1%
associate-/l*88.3%
associate-/r/82.1%
cancel-sign-sub-inv82.1%
metadata-eval82.1%
*-lft-identity82.1%
+-commutative82.1%
Simplified82.1%
Taylor expanded in t around inf 70.1%
associate-*r/72.9%
Simplified72.9%
Final simplification73.5%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (/ t z))))
(if (<= z -7.0)
t_1
(if (<= z 2.7e+31)
(* y (/ x z))
(if (<= z 2.45e+115)
t_1
(if (<= z 1.2e+198) (* (/ y z) x) (/ t (/ z x))))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (t / z);
double tmp;
if (z <= -7.0) {
tmp = t_1;
} else if (z <= 2.7e+31) {
tmp = y * (x / z);
} else if (z <= 2.45e+115) {
tmp = t_1;
} else if (z <= 1.2e+198) {
tmp = (y / z) * x;
} else {
tmp = t / (z / x);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = x * (t / z)
if (z <= (-7.0d0)) then
tmp = t_1
else if (z <= 2.7d+31) then
tmp = y * (x / z)
else if (z <= 2.45d+115) then
tmp = t_1
else if (z <= 1.2d+198) then
tmp = (y / z) * x
else
tmp = t / (z / x)
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 (z <= -7.0) {
tmp = t_1;
} else if (z <= 2.7e+31) {
tmp = y * (x / z);
} else if (z <= 2.45e+115) {
tmp = t_1;
} else if (z <= 1.2e+198) {
tmp = (y / z) * x;
} else {
tmp = t / (z / x);
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (t / z) tmp = 0 if z <= -7.0: tmp = t_1 elif z <= 2.7e+31: tmp = y * (x / z) elif z <= 2.45e+115: tmp = t_1 elif z <= 1.2e+198: tmp = (y / z) * x else: tmp = t / (z / x) return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(t / z)) tmp = 0.0 if (z <= -7.0) tmp = t_1; elseif (z <= 2.7e+31) tmp = Float64(y * Float64(x / z)); elseif (z <= 2.45e+115) tmp = t_1; elseif (z <= 1.2e+198) tmp = Float64(Float64(y / z) * x); else tmp = Float64(t / Float64(z / x)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (t / z); tmp = 0.0; if (z <= -7.0) tmp = t_1; elseif (z <= 2.7e+31) tmp = y * (x / z); elseif (z <= 2.45e+115) tmp = t_1; elseif (z <= 1.2e+198) tmp = (y / z) * x; else tmp = t / (z / x); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7.0], t$95$1, If[LessEqual[z, 2.7e+31], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.45e+115], t$95$1, If[LessEqual[z, 1.2e+198], N[(N[(y / z), $MachinePrecision] * x), $MachinePrecision], N[(t / N[(z / x), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{t}{z}\\
\mathbf{if}\;z \leq -7:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 2.7 \cdot 10^{+31}:\\
\;\;\;\;y \cdot \frac{x}{z}\\
\mathbf{elif}\;z \leq 2.45 \cdot 10^{+115}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.2 \cdot 10^{+198}:\\
\;\;\;\;\frac{y}{z} \cdot x\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{\frac{z}{x}}\\
\end{array}
\end{array}
if z < -7 or 2.69999999999999986e31 < z < 2.44999999999999982e115Initial program 97.5%
Taylor expanded in z around inf 86.5%
associate-/l*95.2%
associate-/r/84.2%
cancel-sign-sub-inv84.2%
metadata-eval84.2%
*-lft-identity84.2%
+-commutative84.2%
Simplified84.2%
*-commutative84.2%
clear-num84.1%
un-div-inv84.1%
Applied egg-rr84.1%
Taylor expanded in t around inf 64.5%
associate-*l/68.5%
Simplified68.5%
if -7 < z < 2.69999999999999986e31Initial program 91.6%
Taylor expanded in y around inf 70.9%
associate-/l*69.2%
associate-/r/76.1%
Simplified76.1%
if 2.44999999999999982e115 < z < 1.2000000000000001e198Initial program 99.9%
Taylor expanded in y around inf 61.2%
associate-*r/75.7%
Simplified75.7%
if 1.2000000000000001e198 < z Initial program 88.3%
Taylor expanded in z around inf 79.1%
associate-/l*88.3%
associate-/r/82.1%
cancel-sign-sub-inv82.1%
metadata-eval82.1%
*-lft-identity82.1%
+-commutative82.1%
Simplified82.1%
Taylor expanded in t around inf 70.1%
associate-/l*73.0%
Simplified73.0%
Final simplification73.5%
(FPCore (x y z t) :precision binary64 (if (or (<= z -1.0) (not (<= z 1.1))) (* t (/ x z)) (* x (- t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.0) || !(z <= 1.1)) {
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 <= (-1.0d0)) .or. (.not. (z <= 1.1d0))) 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 <= -1.0) || !(z <= 1.1)) {
tmp = t * (x / z);
} else {
tmp = x * -t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -1.0) or not (z <= 1.1): tmp = t * (x / z) else: tmp = x * -t return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -1.0) || !(z <= 1.1)) 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 <= -1.0) || ~((z <= 1.1))) tmp = t * (x / z); else tmp = x * -t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -1.0], N[Not[LessEqual[z, 1.1]], $MachinePrecision]], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], N[(x * (-t)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \lor \neg \left(z \leq 1.1\right):\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(-t\right)\\
\end{array}
\end{array}
if z < -1 or 1.1000000000000001 < z Initial program 95.6%
Taylor expanded in z around inf 84.7%
associate-/l*93.5%
associate-/r/84.8%
cancel-sign-sub-inv84.8%
metadata-eval84.8%
*-lft-identity84.8%
+-commutative84.8%
Simplified84.8%
Taylor expanded in t around inf 60.3%
associate-*r/57.6%
Simplified57.6%
if -1 < z < 1.1000000000000001Initial program 90.9%
Taylor expanded in z around 0 88.1%
+-commutative88.1%
associate-*r/86.3%
*-commutative86.3%
associate-*r*86.3%
neg-mul-186.3%
distribute-rgt-out89.4%
unsub-neg89.4%
Simplified89.4%
Taylor expanded in y around 0 26.9%
associate-*r*26.9%
*-commutative26.9%
mul-1-neg26.9%
Simplified26.9%
Final simplification42.4%
(FPCore (x y z t) :precision binary64 (if (or (<= y -3.2e-89) (not (<= y 3.1e-214))) (* (/ y z) x) (* t (/ x z))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -3.2e-89) || !(y <= 3.1e-214)) {
tmp = (y / z) * x;
} else {
tmp = t * (x / z);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-3.2d-89)) .or. (.not. (y <= 3.1d-214))) then
tmp = (y / z) * x
else
tmp = t * (x / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -3.2e-89) || !(y <= 3.1e-214)) {
tmp = (y / z) * x;
} else {
tmp = t * (x / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -3.2e-89) or not (y <= 3.1e-214): tmp = (y / z) * x else: tmp = t * (x / z) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -3.2e-89) || !(y <= 3.1e-214)) tmp = Float64(Float64(y / z) * x); else tmp = Float64(t * Float64(x / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -3.2e-89) || ~((y <= 3.1e-214))) tmp = (y / z) * x; else tmp = t * (x / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -3.2e-89], N[Not[LessEqual[y, 3.1e-214]], $MachinePrecision]], N[(N[(y / z), $MachinePrecision] * x), $MachinePrecision], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.2 \cdot 10^{-89} \lor \neg \left(y \leq 3.1 \cdot 10^{-214}\right):\\
\;\;\;\;\frac{y}{z} \cdot x\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{x}{z}\\
\end{array}
\end{array}
if y < -3.19999999999999998e-89 or 3.10000000000000004e-214 < y Initial program 93.5%
Taylor expanded in y around inf 70.0%
associate-*r/70.0%
Simplified70.0%
if -3.19999999999999998e-89 < y < 3.10000000000000004e-214Initial program 92.7%
Taylor expanded in z around inf 65.5%
associate-/l*63.0%
associate-/r/64.1%
cancel-sign-sub-inv64.1%
metadata-eval64.1%
*-lft-identity64.1%
+-commutative64.1%
Simplified64.1%
Taylor expanded in t around inf 59.4%
associate-*r/56.7%
Simplified56.7%
Final simplification66.1%
(FPCore (x y z t) :precision binary64 (* x (- t)))
double code(double x, double y, double z, double t) {
return x * -t;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x * -t
end function
public static double code(double x, double y, double z, double t) {
return x * -t;
}
def code(x, y, z, t): return x * -t
function code(x, y, z, t) return Float64(x * Float64(-t)) end
function tmp = code(x, y, z, t) tmp = x * -t; end
code[x_, y_, z_, t_] := N[(x * (-t)), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \left(-t\right)
\end{array}
Initial program 93.3%
Taylor expanded in z around 0 60.8%
+-commutative60.8%
associate-*r/62.1%
*-commutative62.1%
associate-*r*62.1%
neg-mul-162.1%
distribute-rgt-out63.7%
unsub-neg63.7%
Simplified63.7%
Taylor expanded in y around 0 21.6%
associate-*r*21.6%
*-commutative21.6%
mul-1-neg21.6%
Simplified21.6%
Final simplification21.6%
(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 2023310
(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)))))