
(FPCore (x y z t) :precision binary64 (/ (* x 2.0) (- (* y z) (* t z))))
double code(double x, double y, double z, double t) {
return (x * 2.0) / ((y * z) - (t * 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 * 2.0d0) / ((y * z) - (t * z))
end function
public static double code(double x, double y, double z, double t) {
return (x * 2.0) / ((y * z) - (t * z));
}
def code(x, y, z, t): return (x * 2.0) / ((y * z) - (t * z))
function code(x, y, z, t) return Float64(Float64(x * 2.0) / Float64(Float64(y * z) - Float64(t * z))) end
function tmp = code(x, y, z, t) tmp = (x * 2.0) / ((y * z) - (t * z)); end
code[x_, y_, z_, t_] := N[(N[(x * 2.0), $MachinePrecision] / N[(N[(y * z), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot 2}{y \cdot z - t \cdot z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (/ (* x 2.0) (- (* y z) (* t z))))
double code(double x, double y, double z, double t) {
return (x * 2.0) / ((y * z) - (t * 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 * 2.0d0) / ((y * z) - (t * z))
end function
public static double code(double x, double y, double z, double t) {
return (x * 2.0) / ((y * z) - (t * z));
}
def code(x, y, z, t): return (x * 2.0) / ((y * z) - (t * z))
function code(x, y, z, t) return Float64(Float64(x * 2.0) / Float64(Float64(y * z) - Float64(t * z))) end
function tmp = code(x, y, z, t) tmp = (x * 2.0) / ((y * z) - (t * z)); end
code[x_, y_, z_, t_] := N[(N[(x * 2.0), $MachinePrecision] / N[(N[(y * z), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot 2}{y \cdot z - t \cdot z}
\end{array}
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ (* x 2.0) (- (* y z) (* z t)))))
(if (or (<= t_1 -2e-268) (not (<= t_1 1e+135)))
(/ (* x 2.0) (* z (- y t)))
(* 2.0 (/ (/ x z) (- y t))))))
double code(double x, double y, double z, double t) {
double t_1 = (x * 2.0) / ((y * z) - (z * t));
double tmp;
if ((t_1 <= -2e-268) || !(t_1 <= 1e+135)) {
tmp = (x * 2.0) / (z * (y - t));
} else {
tmp = 2.0 * ((x / z) / (y - 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 * 2.0d0) / ((y * z) - (z * t))
if ((t_1 <= (-2d-268)) .or. (.not. (t_1 <= 1d+135))) then
tmp = (x * 2.0d0) / (z * (y - t))
else
tmp = 2.0d0 * ((x / z) / (y - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (x * 2.0) / ((y * z) - (z * t));
double tmp;
if ((t_1 <= -2e-268) || !(t_1 <= 1e+135)) {
tmp = (x * 2.0) / (z * (y - t));
} else {
tmp = 2.0 * ((x / z) / (y - t));
}
return tmp;
}
def code(x, y, z, t): t_1 = (x * 2.0) / ((y * z) - (z * t)) tmp = 0 if (t_1 <= -2e-268) or not (t_1 <= 1e+135): tmp = (x * 2.0) / (z * (y - t)) else: tmp = 2.0 * ((x / z) / (y - t)) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x * 2.0) / Float64(Float64(y * z) - Float64(z * t))) tmp = 0.0 if ((t_1 <= -2e-268) || !(t_1 <= 1e+135)) tmp = Float64(Float64(x * 2.0) / Float64(z * Float64(y - t))); else tmp = Float64(2.0 * Float64(Float64(x / z) / Float64(y - t))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x * 2.0) / ((y * z) - (z * t)); tmp = 0.0; if ((t_1 <= -2e-268) || ~((t_1 <= 1e+135))) tmp = (x * 2.0) / (z * (y - t)); else tmp = 2.0 * ((x / z) / (y - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x * 2.0), $MachinePrecision] / N[(N[(y * z), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -2e-268], N[Not[LessEqual[t$95$1, 1e+135]], $MachinePrecision]], N[(N[(x * 2.0), $MachinePrecision] / N[(z * N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(x / z), $MachinePrecision] / N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot 2}{y \cdot z - z \cdot t}\\
\mathbf{if}\;t_1 \leq -2 \cdot 10^{-268} \lor \neg \left(t_1 \leq 10^{+135}\right):\\
\;\;\;\;\frac{x \cdot 2}{z \cdot \left(y - t\right)}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{\frac{x}{z}}{y - t}\\
\end{array}
\end{array}
if (/.f64 (*.f64 x 2) (-.f64 (*.f64 y z) (*.f64 t z))) < -1.99999999999999992e-268 or 9.99999999999999962e134 < (/.f64 (*.f64 x 2) (-.f64 (*.f64 y z) (*.f64 t z))) Initial program 94.1%
distribute-rgt-out--98.9%
Simplified98.9%
if -1.99999999999999992e-268 < (/.f64 (*.f64 x 2) (-.f64 (*.f64 y z) (*.f64 t z))) < 9.99999999999999962e134Initial program 87.2%
associate-*l/87.2%
*-commutative87.2%
distribute-rgt-out--87.2%
associate-/r*99.8%
Simplified99.8%
Final simplification99.4%
(FPCore (x y z t)
:precision binary64
(if (or (<= y -1.7e+76)
(not (or (<= y -0.00033) (and (not (<= y -2.9e-52)) (<= y 8e-78)))))
(* x (/ 2.0 (* y z)))
(* -2.0 (/ x (* z t)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.7e+76) || !((y <= -0.00033) || (!(y <= -2.9e-52) && (y <= 8e-78)))) {
tmp = x * (2.0 / (y * z));
} else {
tmp = -2.0 * (x / (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 ((y <= (-1.7d+76)) .or. (.not. (y <= (-0.00033d0)) .or. (.not. (y <= (-2.9d-52))) .and. (y <= 8d-78))) then
tmp = x * (2.0d0 / (y * z))
else
tmp = (-2.0d0) * (x / (z * t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.7e+76) || !((y <= -0.00033) || (!(y <= -2.9e-52) && (y <= 8e-78)))) {
tmp = x * (2.0 / (y * z));
} else {
tmp = -2.0 * (x / (z * t));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1.7e+76) or not ((y <= -0.00033) or (not (y <= -2.9e-52) and (y <= 8e-78))): tmp = x * (2.0 / (y * z)) else: tmp = -2.0 * (x / (z * t)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1.7e+76) || !((y <= -0.00033) || (!(y <= -2.9e-52) && (y <= 8e-78)))) tmp = Float64(x * Float64(2.0 / Float64(y * z))); else tmp = Float64(-2.0 * Float64(x / Float64(z * t))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -1.7e+76) || ~(((y <= -0.00033) || (~((y <= -2.9e-52)) && (y <= 8e-78))))) tmp = x * (2.0 / (y * z)); else tmp = -2.0 * (x / (z * t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1.7e+76], N[Not[Or[LessEqual[y, -0.00033], And[N[Not[LessEqual[y, -2.9e-52]], $MachinePrecision], LessEqual[y, 8e-78]]]], $MachinePrecision]], N[(x * N[(2.0 / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-2.0 * N[(x / N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.7 \cdot 10^{+76} \lor \neg \left(y \leq -0.00033 \lor \neg \left(y \leq -2.9 \cdot 10^{-52}\right) \land y \leq 8 \cdot 10^{-78}\right):\\
\;\;\;\;x \cdot \frac{2}{y \cdot z}\\
\mathbf{else}:\\
\;\;\;\;-2 \cdot \frac{x}{z \cdot t}\\
\end{array}
\end{array}
if y < -1.6999999999999999e76 or -3.3e-4 < y < -2.9000000000000002e-52 or 7.99999999999999999e-78 < y Initial program 89.4%
associate-*r/89.3%
distribute-rgt-out--92.0%
associate-/l/92.0%
sub-neg92.0%
+-commutative92.0%
neg-sub092.0%
associate-+l-92.0%
sub0-neg92.0%
neg-mul-192.0%
associate-/r*92.0%
metadata-eval92.0%
Simplified92.0%
Taylor expanded in t around 0 80.0%
if -1.6999999999999999e76 < y < -3.3e-4 or -2.9000000000000002e-52 < y < 7.99999999999999999e-78Initial program 92.1%
associate-*r/91.9%
distribute-rgt-out--93.7%
associate-/l/94.2%
sub-neg94.2%
+-commutative94.2%
neg-sub094.2%
associate-+l-94.2%
sub0-neg94.2%
neg-mul-194.2%
associate-/r*94.2%
metadata-eval94.2%
Simplified94.2%
Taylor expanded in t around inf 81.3%
Final simplification80.6%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (/ 2.0 (* y z)))))
(if (<= y -1.55e+76)
t_1
(if (<= y -4.2e-9)
(* x (/ (/ -2.0 t) z))
(if (or (<= y -3.8e-53) (not (<= y 7.2e-78)))
t_1
(* -2.0 (/ x (* z t))))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (2.0 / (y * z));
double tmp;
if (y <= -1.55e+76) {
tmp = t_1;
} else if (y <= -4.2e-9) {
tmp = x * ((-2.0 / t) / z);
} else if ((y <= -3.8e-53) || !(y <= 7.2e-78)) {
tmp = t_1;
} else {
tmp = -2.0 * (x / (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) :: t_1
real(8) :: tmp
t_1 = x * (2.0d0 / (y * z))
if (y <= (-1.55d+76)) then
tmp = t_1
else if (y <= (-4.2d-9)) then
tmp = x * (((-2.0d0) / t) / z)
else if ((y <= (-3.8d-53)) .or. (.not. (y <= 7.2d-78))) then
tmp = t_1
else
tmp = (-2.0d0) * (x / (z * t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x * (2.0 / (y * z));
double tmp;
if (y <= -1.55e+76) {
tmp = t_1;
} else if (y <= -4.2e-9) {
tmp = x * ((-2.0 / t) / z);
} else if ((y <= -3.8e-53) || !(y <= 7.2e-78)) {
tmp = t_1;
} else {
tmp = -2.0 * (x / (z * t));
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (2.0 / (y * z)) tmp = 0 if y <= -1.55e+76: tmp = t_1 elif y <= -4.2e-9: tmp = x * ((-2.0 / t) / z) elif (y <= -3.8e-53) or not (y <= 7.2e-78): tmp = t_1 else: tmp = -2.0 * (x / (z * t)) return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(2.0 / Float64(y * z))) tmp = 0.0 if (y <= -1.55e+76) tmp = t_1; elseif (y <= -4.2e-9) tmp = Float64(x * Float64(Float64(-2.0 / t) / z)); elseif ((y <= -3.8e-53) || !(y <= 7.2e-78)) tmp = t_1; else tmp = Float64(-2.0 * Float64(x / Float64(z * t))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (2.0 / (y * z)); tmp = 0.0; if (y <= -1.55e+76) tmp = t_1; elseif (y <= -4.2e-9) tmp = x * ((-2.0 / t) / z); elseif ((y <= -3.8e-53) || ~((y <= 7.2e-78))) tmp = t_1; else tmp = -2.0 * (x / (z * t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(2.0 / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.55e+76], t$95$1, If[LessEqual[y, -4.2e-9], N[(x * N[(N[(-2.0 / t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -3.8e-53], N[Not[LessEqual[y, 7.2e-78]], $MachinePrecision]], t$95$1, N[(-2.0 * N[(x / N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{2}{y \cdot z}\\
\mathbf{if}\;y \leq -1.55 \cdot 10^{+76}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -4.2 \cdot 10^{-9}:\\
\;\;\;\;x \cdot \frac{\frac{-2}{t}}{z}\\
\mathbf{elif}\;y \leq -3.8 \cdot 10^{-53} \lor \neg \left(y \leq 7.2 \cdot 10^{-78}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;-2 \cdot \frac{x}{z \cdot t}\\
\end{array}
\end{array}
if y < -1.55000000000000006e76 or -4.20000000000000039e-9 < y < -3.7999999999999998e-53 or 7.2000000000000005e-78 < y Initial program 89.4%
associate-*r/89.3%
distribute-rgt-out--92.0%
associate-/l/92.0%
sub-neg92.0%
+-commutative92.0%
neg-sub092.0%
associate-+l-92.0%
sub0-neg92.0%
neg-mul-192.0%
associate-/r*92.0%
metadata-eval92.0%
Simplified92.0%
Taylor expanded in t around 0 80.0%
if -1.55000000000000006e76 < y < -4.20000000000000039e-9Initial program 92.9%
associate-*r/92.2%
distribute-rgt-out--92.2%
associate-/l/96.5%
sub-neg96.5%
+-commutative96.5%
neg-sub096.5%
associate-+l-96.5%
sub0-neg96.5%
neg-mul-196.5%
associate-/r*96.5%
metadata-eval96.5%
Simplified96.5%
Taylor expanded in t around inf 81.6%
if -3.7999999999999998e-53 < y < 7.2000000000000005e-78Initial program 92.0%
associate-*r/91.9%
distribute-rgt-out--93.9%
associate-/l/93.9%
sub-neg93.9%
+-commutative93.9%
neg-sub093.9%
associate-+l-93.9%
sub0-neg93.9%
neg-mul-193.9%
associate-/r*93.9%
metadata-eval93.9%
Simplified93.9%
Taylor expanded in t around inf 81.8%
Final simplification80.8%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.35e+76)
(* x (/ (/ 2.0 y) z))
(if (<= y -7.8e-10)
(* x (/ (/ -2.0 t) z))
(if (or (<= y -1.8e-52) (not (<= y 6e-78)))
(* x (/ 2.0 (* y z)))
(* -2.0 (/ x (* z t)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.35e+76) {
tmp = x * ((2.0 / y) / z);
} else if (y <= -7.8e-10) {
tmp = x * ((-2.0 / t) / z);
} else if ((y <= -1.8e-52) || !(y <= 6e-78)) {
tmp = x * (2.0 / (y * z));
} else {
tmp = -2.0 * (x / (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 (y <= (-1.35d+76)) then
tmp = x * ((2.0d0 / y) / z)
else if (y <= (-7.8d-10)) then
tmp = x * (((-2.0d0) / t) / z)
else if ((y <= (-1.8d-52)) .or. (.not. (y <= 6d-78))) then
tmp = x * (2.0d0 / (y * z))
else
tmp = (-2.0d0) * (x / (z * t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.35e+76) {
tmp = x * ((2.0 / y) / z);
} else if (y <= -7.8e-10) {
tmp = x * ((-2.0 / t) / z);
} else if ((y <= -1.8e-52) || !(y <= 6e-78)) {
tmp = x * (2.0 / (y * z));
} else {
tmp = -2.0 * (x / (z * t));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.35e+76: tmp = x * ((2.0 / y) / z) elif y <= -7.8e-10: tmp = x * ((-2.0 / t) / z) elif (y <= -1.8e-52) or not (y <= 6e-78): tmp = x * (2.0 / (y * z)) else: tmp = -2.0 * (x / (z * t)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.35e+76) tmp = Float64(x * Float64(Float64(2.0 / y) / z)); elseif (y <= -7.8e-10) tmp = Float64(x * Float64(Float64(-2.0 / t) / z)); elseif ((y <= -1.8e-52) || !(y <= 6e-78)) tmp = Float64(x * Float64(2.0 / Float64(y * z))); else tmp = Float64(-2.0 * Float64(x / Float64(z * t))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.35e+76) tmp = x * ((2.0 / y) / z); elseif (y <= -7.8e-10) tmp = x * ((-2.0 / t) / z); elseif ((y <= -1.8e-52) || ~((y <= 6e-78))) tmp = x * (2.0 / (y * z)); else tmp = -2.0 * (x / (z * t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.35e+76], N[(x * N[(N[(2.0 / y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -7.8e-10], N[(x * N[(N[(-2.0 / t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -1.8e-52], N[Not[LessEqual[y, 6e-78]], $MachinePrecision]], N[(x * N[(2.0 / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-2.0 * N[(x / N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.35 \cdot 10^{+76}:\\
\;\;\;\;x \cdot \frac{\frac{2}{y}}{z}\\
\mathbf{elif}\;y \leq -7.8 \cdot 10^{-10}:\\
\;\;\;\;x \cdot \frac{\frac{-2}{t}}{z}\\
\mathbf{elif}\;y \leq -1.8 \cdot 10^{-52} \lor \neg \left(y \leq 6 \cdot 10^{-78}\right):\\
\;\;\;\;x \cdot \frac{2}{y \cdot z}\\
\mathbf{else}:\\
\;\;\;\;-2 \cdot \frac{x}{z \cdot t}\\
\end{array}
\end{array}
if y < -1.34999999999999995e76Initial program 87.5%
associate-*r/87.5%
distribute-rgt-out--91.1%
associate-/l/91.1%
sub-neg91.1%
+-commutative91.1%
neg-sub091.1%
associate-+l-91.1%
sub0-neg91.1%
neg-mul-191.1%
associate-/r*91.1%
metadata-eval91.1%
Simplified91.1%
Taylor expanded in t around 0 84.8%
if -1.34999999999999995e76 < y < -7.7999999999999999e-10Initial program 92.9%
associate-*r/92.2%
distribute-rgt-out--92.2%
associate-/l/96.5%
sub-neg96.5%
+-commutative96.5%
neg-sub096.5%
associate-+l-96.5%
sub0-neg96.5%
neg-mul-196.5%
associate-/r*96.5%
metadata-eval96.5%
Simplified96.5%
Taylor expanded in t around inf 81.6%
if -7.7999999999999999e-10 < y < -1.79999999999999994e-52 or 5.99999999999999975e-78 < y Initial program 90.5%
associate-*r/90.4%
distribute-rgt-out--92.6%
associate-/l/92.5%
sub-neg92.5%
+-commutative92.5%
neg-sub092.5%
associate-+l-92.5%
sub0-neg92.5%
neg-mul-192.5%
associate-/r*92.5%
metadata-eval92.5%
Simplified92.5%
Taylor expanded in t around 0 77.0%
if -1.79999999999999994e-52 < y < 5.99999999999999975e-78Initial program 92.0%
associate-*r/91.9%
distribute-rgt-out--93.9%
associate-/l/93.9%
sub-neg93.9%
+-commutative93.9%
neg-sub093.9%
associate-+l-93.9%
sub0-neg93.9%
neg-mul-193.9%
associate-/r*93.9%
metadata-eval93.9%
Simplified93.9%
Taylor expanded in t around inf 81.8%
Final simplification80.8%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.35e+76)
(* x (/ (/ 2.0 y) z))
(if (<= y -7.2e-10)
(* x (/ (/ -2.0 t) z))
(if (or (<= y -4.8e-54) (not (<= y 1.65e-40)))
(* x (/ 2.0 (* y z)))
(* (/ x z) (/ -2.0 t))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.35e+76) {
tmp = x * ((2.0 / y) / z);
} else if (y <= -7.2e-10) {
tmp = x * ((-2.0 / t) / z);
} else if ((y <= -4.8e-54) || !(y <= 1.65e-40)) {
tmp = x * (2.0 / (y * z));
} else {
tmp = (x / z) * (-2.0 / 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 (y <= (-1.35d+76)) then
tmp = x * ((2.0d0 / y) / z)
else if (y <= (-7.2d-10)) then
tmp = x * (((-2.0d0) / t) / z)
else if ((y <= (-4.8d-54)) .or. (.not. (y <= 1.65d-40))) then
tmp = x * (2.0d0 / (y * z))
else
tmp = (x / z) * ((-2.0d0) / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.35e+76) {
tmp = x * ((2.0 / y) / z);
} else if (y <= -7.2e-10) {
tmp = x * ((-2.0 / t) / z);
} else if ((y <= -4.8e-54) || !(y <= 1.65e-40)) {
tmp = x * (2.0 / (y * z));
} else {
tmp = (x / z) * (-2.0 / t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.35e+76: tmp = x * ((2.0 / y) / z) elif y <= -7.2e-10: tmp = x * ((-2.0 / t) / z) elif (y <= -4.8e-54) or not (y <= 1.65e-40): tmp = x * (2.0 / (y * z)) else: tmp = (x / z) * (-2.0 / t) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.35e+76) tmp = Float64(x * Float64(Float64(2.0 / y) / z)); elseif (y <= -7.2e-10) tmp = Float64(x * Float64(Float64(-2.0 / t) / z)); elseif ((y <= -4.8e-54) || !(y <= 1.65e-40)) tmp = Float64(x * Float64(2.0 / Float64(y * z))); else tmp = Float64(Float64(x / z) * Float64(-2.0 / t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.35e+76) tmp = x * ((2.0 / y) / z); elseif (y <= -7.2e-10) tmp = x * ((-2.0 / t) / z); elseif ((y <= -4.8e-54) || ~((y <= 1.65e-40))) tmp = x * (2.0 / (y * z)); else tmp = (x / z) * (-2.0 / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.35e+76], N[(x * N[(N[(2.0 / y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -7.2e-10], N[(x * N[(N[(-2.0 / t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -4.8e-54], N[Not[LessEqual[y, 1.65e-40]], $MachinePrecision]], N[(x * N[(2.0 / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / z), $MachinePrecision] * N[(-2.0 / t), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.35 \cdot 10^{+76}:\\
\;\;\;\;x \cdot \frac{\frac{2}{y}}{z}\\
\mathbf{elif}\;y \leq -7.2 \cdot 10^{-10}:\\
\;\;\;\;x \cdot \frac{\frac{-2}{t}}{z}\\
\mathbf{elif}\;y \leq -4.8 \cdot 10^{-54} \lor \neg \left(y \leq 1.65 \cdot 10^{-40}\right):\\
\;\;\;\;x \cdot \frac{2}{y \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z} \cdot \frac{-2}{t}\\
\end{array}
\end{array}
if y < -1.34999999999999995e76Initial program 87.5%
associate-*r/87.5%
distribute-rgt-out--91.1%
associate-/l/91.1%
sub-neg91.1%
+-commutative91.1%
neg-sub091.1%
associate-+l-91.1%
sub0-neg91.1%
neg-mul-191.1%
associate-/r*91.1%
metadata-eval91.1%
Simplified91.1%
Taylor expanded in t around 0 84.8%
if -1.34999999999999995e76 < y < -7.2e-10Initial program 92.9%
associate-*r/92.2%
distribute-rgt-out--92.2%
associate-/l/96.5%
sub-neg96.5%
+-commutative96.5%
neg-sub096.5%
associate-+l-96.5%
sub0-neg96.5%
neg-mul-196.5%
associate-/r*96.5%
metadata-eval96.5%
Simplified96.5%
Taylor expanded in t around inf 81.6%
if -7.2e-10 < y < -4.80000000000000026e-54 or 1.64999999999999996e-40 < y Initial program 90.8%
associate-*r/90.6%
distribute-rgt-out--93.0%
associate-/l/93.0%
sub-neg93.0%
+-commutative93.0%
neg-sub093.0%
associate-+l-93.0%
sub0-neg93.0%
neg-mul-193.0%
associate-/r*93.0%
metadata-eval93.0%
Simplified93.0%
Taylor expanded in t around 0 78.7%
if -4.80000000000000026e-54 < y < 1.64999999999999996e-40Initial program 91.6%
associate-*r/91.5%
distribute-rgt-out--93.5%
associate-/l/93.4%
sub-neg93.4%
+-commutative93.4%
neg-sub093.4%
associate-+l-93.4%
sub0-neg93.4%
neg-mul-193.4%
associate-/r*93.4%
metadata-eval93.4%
Simplified93.4%
Taylor expanded in t around inf 79.4%
clear-num78.7%
un-div-inv78.7%
*-commutative78.7%
associate-/l*77.3%
Applied egg-rr77.3%
associate-/r/78.0%
frac-times79.4%
*-commutative79.4%
times-frac80.8%
Applied egg-rr80.8%
Final simplification81.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* (/ x z) (/ 2.0 y))))
(if (<= y -1.25e+81)
t_1
(if (<= y -0.78)
(* x (/ (/ -2.0 t) z))
(if (<= y -8.5e-53)
t_1
(if (<= y 1.76e-40) (* (/ x z) (/ -2.0 t)) (* x (/ 2.0 (* y z)))))))))
double code(double x, double y, double z, double t) {
double t_1 = (x / z) * (2.0 / y);
double tmp;
if (y <= -1.25e+81) {
tmp = t_1;
} else if (y <= -0.78) {
tmp = x * ((-2.0 / t) / z);
} else if (y <= -8.5e-53) {
tmp = t_1;
} else if (y <= 1.76e-40) {
tmp = (x / z) * (-2.0 / t);
} else {
tmp = x * (2.0 / (y * z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (x / z) * (2.0d0 / y)
if (y <= (-1.25d+81)) then
tmp = t_1
else if (y <= (-0.78d0)) then
tmp = x * (((-2.0d0) / t) / z)
else if (y <= (-8.5d-53)) then
tmp = t_1
else if (y <= 1.76d-40) then
tmp = (x / z) * ((-2.0d0) / t)
else
tmp = x * (2.0d0 / (y * z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (x / z) * (2.0 / y);
double tmp;
if (y <= -1.25e+81) {
tmp = t_1;
} else if (y <= -0.78) {
tmp = x * ((-2.0 / t) / z);
} else if (y <= -8.5e-53) {
tmp = t_1;
} else if (y <= 1.76e-40) {
tmp = (x / z) * (-2.0 / t);
} else {
tmp = x * (2.0 / (y * z));
}
return tmp;
}
def code(x, y, z, t): t_1 = (x / z) * (2.0 / y) tmp = 0 if y <= -1.25e+81: tmp = t_1 elif y <= -0.78: tmp = x * ((-2.0 / t) / z) elif y <= -8.5e-53: tmp = t_1 elif y <= 1.76e-40: tmp = (x / z) * (-2.0 / t) else: tmp = x * (2.0 / (y * z)) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x / z) * Float64(2.0 / y)) tmp = 0.0 if (y <= -1.25e+81) tmp = t_1; elseif (y <= -0.78) tmp = Float64(x * Float64(Float64(-2.0 / t) / z)); elseif (y <= -8.5e-53) tmp = t_1; elseif (y <= 1.76e-40) tmp = Float64(Float64(x / z) * Float64(-2.0 / t)); else tmp = Float64(x * Float64(2.0 / Float64(y * z))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x / z) * (2.0 / y); tmp = 0.0; if (y <= -1.25e+81) tmp = t_1; elseif (y <= -0.78) tmp = x * ((-2.0 / t) / z); elseif (y <= -8.5e-53) tmp = t_1; elseif (y <= 1.76e-40) tmp = (x / z) * (-2.0 / t); else tmp = x * (2.0 / (y * z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / z), $MachinePrecision] * N[(2.0 / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.25e+81], t$95$1, If[LessEqual[y, -0.78], N[(x * N[(N[(-2.0 / t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -8.5e-53], t$95$1, If[LessEqual[y, 1.76e-40], N[(N[(x / z), $MachinePrecision] * N[(-2.0 / t), $MachinePrecision]), $MachinePrecision], N[(x * N[(2.0 / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{z} \cdot \frac{2}{y}\\
\mathbf{if}\;y \leq -1.25 \cdot 10^{+81}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -0.78:\\
\;\;\;\;x \cdot \frac{\frac{-2}{t}}{z}\\
\mathbf{elif}\;y \leq -8.5 \cdot 10^{-53}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.76 \cdot 10^{-40}:\\
\;\;\;\;\frac{x}{z} \cdot \frac{-2}{t}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{2}{y \cdot z}\\
\end{array}
\end{array}
if y < -1.25e81 or -0.78000000000000003 < y < -8.50000000000000044e-53Initial program 88.5%
associate-*l/88.5%
*-commutative88.5%
distribute-rgt-out--91.5%
associate-/r*94.2%
Simplified94.2%
associate-/r*91.5%
associate-*r/91.5%
associate-/l*91.5%
Applied egg-rr91.5%
Taylor expanded in y around inf 83.5%
associate-/l*84.8%
associate-/r/84.0%
*-commutative84.0%
Applied egg-rr84.0%
if -1.25e81 < y < -0.78000000000000003Initial program 92.9%
associate-*r/92.2%
distribute-rgt-out--92.2%
associate-/l/96.5%
sub-neg96.5%
+-commutative96.5%
neg-sub096.5%
associate-+l-96.5%
sub0-neg96.5%
neg-mul-196.5%
associate-/r*96.5%
metadata-eval96.5%
Simplified96.5%
Taylor expanded in t around inf 81.6%
if -8.50000000000000044e-53 < y < 1.76e-40Initial program 91.6%
associate-*r/91.5%
distribute-rgt-out--93.5%
associate-/l/93.4%
sub-neg93.4%
+-commutative93.4%
neg-sub093.4%
associate-+l-93.4%
sub0-neg93.4%
neg-mul-193.4%
associate-/r*93.4%
metadata-eval93.4%
Simplified93.4%
Taylor expanded in t around inf 79.4%
clear-num78.7%
un-div-inv78.7%
*-commutative78.7%
associate-/l*77.3%
Applied egg-rr77.3%
associate-/r/78.0%
frac-times79.4%
*-commutative79.4%
times-frac80.8%
Applied egg-rr80.8%
if 1.76e-40 < y Initial program 90.4%
associate-*r/90.3%
distribute-rgt-out--93.1%
associate-/l/93.1%
sub-neg93.1%
+-commutative93.1%
neg-sub093.1%
associate-+l-93.1%
sub0-neg93.1%
neg-mul-193.1%
associate-/r*93.1%
metadata-eval93.1%
Simplified93.1%
Taylor expanded in t around 0 79.6%
Final simplification81.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ 2.0 (/ y (/ x z)))))
(if (<= y -1.75e+77)
t_1
(if (<= y -1.9e-6)
(* x (/ (/ -2.0 t) z))
(if (<= y -2.8e-53)
t_1
(if (<= y 1.75e-40) (* (/ x z) (/ -2.0 t)) (* x (/ 2.0 (* y z)))))))))
double code(double x, double y, double z, double t) {
double t_1 = 2.0 / (y / (x / z));
double tmp;
if (y <= -1.75e+77) {
tmp = t_1;
} else if (y <= -1.9e-6) {
tmp = x * ((-2.0 / t) / z);
} else if (y <= -2.8e-53) {
tmp = t_1;
} else if (y <= 1.75e-40) {
tmp = (x / z) * (-2.0 / t);
} else {
tmp = x * (2.0 / (y * z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = 2.0d0 / (y / (x / z))
if (y <= (-1.75d+77)) then
tmp = t_1
else if (y <= (-1.9d-6)) then
tmp = x * (((-2.0d0) / t) / z)
else if (y <= (-2.8d-53)) then
tmp = t_1
else if (y <= 1.75d-40) then
tmp = (x / z) * ((-2.0d0) / t)
else
tmp = x * (2.0d0 / (y * z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = 2.0 / (y / (x / z));
double tmp;
if (y <= -1.75e+77) {
tmp = t_1;
} else if (y <= -1.9e-6) {
tmp = x * ((-2.0 / t) / z);
} else if (y <= -2.8e-53) {
tmp = t_1;
} else if (y <= 1.75e-40) {
tmp = (x / z) * (-2.0 / t);
} else {
tmp = x * (2.0 / (y * z));
}
return tmp;
}
def code(x, y, z, t): t_1 = 2.0 / (y / (x / z)) tmp = 0 if y <= -1.75e+77: tmp = t_1 elif y <= -1.9e-6: tmp = x * ((-2.0 / t) / z) elif y <= -2.8e-53: tmp = t_1 elif y <= 1.75e-40: tmp = (x / z) * (-2.0 / t) else: tmp = x * (2.0 / (y * z)) return tmp
function code(x, y, z, t) t_1 = Float64(2.0 / Float64(y / Float64(x / z))) tmp = 0.0 if (y <= -1.75e+77) tmp = t_1; elseif (y <= -1.9e-6) tmp = Float64(x * Float64(Float64(-2.0 / t) / z)); elseif (y <= -2.8e-53) tmp = t_1; elseif (y <= 1.75e-40) tmp = Float64(Float64(x / z) * Float64(-2.0 / t)); else tmp = Float64(x * Float64(2.0 / Float64(y * z))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = 2.0 / (y / (x / z)); tmp = 0.0; if (y <= -1.75e+77) tmp = t_1; elseif (y <= -1.9e-6) tmp = x * ((-2.0 / t) / z); elseif (y <= -2.8e-53) tmp = t_1; elseif (y <= 1.75e-40) tmp = (x / z) * (-2.0 / t); else tmp = x * (2.0 / (y * z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(2.0 / N[(y / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.75e+77], t$95$1, If[LessEqual[y, -1.9e-6], N[(x * N[(N[(-2.0 / t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.8e-53], t$95$1, If[LessEqual[y, 1.75e-40], N[(N[(x / z), $MachinePrecision] * N[(-2.0 / t), $MachinePrecision]), $MachinePrecision], N[(x * N[(2.0 / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{2}{\frac{y}{\frac{x}{z}}}\\
\mathbf{if}\;y \leq -1.75 \cdot 10^{+77}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -1.9 \cdot 10^{-6}:\\
\;\;\;\;x \cdot \frac{\frac{-2}{t}}{z}\\
\mathbf{elif}\;y \leq -2.8 \cdot 10^{-53}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.75 \cdot 10^{-40}:\\
\;\;\;\;\frac{x}{z} \cdot \frac{-2}{t}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{2}{y \cdot z}\\
\end{array}
\end{array}
if y < -1.7500000000000001e77 or -1.9e-6 < y < -2.79999999999999985e-53Initial program 88.5%
associate-*l/88.5%
*-commutative88.5%
distribute-rgt-out--91.5%
associate-/r*94.2%
Simplified94.2%
associate-/r*91.5%
associate-*r/91.5%
associate-/l*91.5%
Applied egg-rr91.5%
Taylor expanded in y around inf 83.5%
associate-/l*84.8%
Simplified84.8%
if -1.7500000000000001e77 < y < -1.9e-6Initial program 92.9%
associate-*r/92.2%
distribute-rgt-out--92.2%
associate-/l/96.5%
sub-neg96.5%
+-commutative96.5%
neg-sub096.5%
associate-+l-96.5%
sub0-neg96.5%
neg-mul-196.5%
associate-/r*96.5%
metadata-eval96.5%
Simplified96.5%
Taylor expanded in t around inf 81.6%
if -2.79999999999999985e-53 < y < 1.7500000000000001e-40Initial program 91.6%
associate-*r/91.5%
distribute-rgt-out--93.5%
associate-/l/93.4%
sub-neg93.4%
+-commutative93.4%
neg-sub093.4%
associate-+l-93.4%
sub0-neg93.4%
neg-mul-193.4%
associate-/r*93.4%
metadata-eval93.4%
Simplified93.4%
Taylor expanded in t around inf 79.4%
clear-num78.7%
un-div-inv78.7%
*-commutative78.7%
associate-/l*77.3%
Applied egg-rr77.3%
associate-/r/78.0%
frac-times79.4%
*-commutative79.4%
times-frac80.8%
Applied egg-rr80.8%
if 1.7500000000000001e-40 < y Initial program 90.4%
associate-*r/90.3%
distribute-rgt-out--93.1%
associate-/l/93.1%
sub-neg93.1%
+-commutative93.1%
neg-sub093.1%
associate-+l-93.1%
sub0-neg93.1%
neg-mul-193.1%
associate-/r*93.1%
metadata-eval93.1%
Simplified93.1%
Taylor expanded in t around 0 79.6%
Final simplification81.6%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ 2.0 (/ y (/ x z)))))
(if (<= y -2.55e+76)
t_1
(if (<= y -1.25)
(* x (/ (/ -2.0 t) z))
(if (<= y -8.2e-53)
t_1
(if (<= y 1.2e-40) (* (/ x z) (/ -2.0 t)) (/ 2.0 (/ (* y z) x))))))))
double code(double x, double y, double z, double t) {
double t_1 = 2.0 / (y / (x / z));
double tmp;
if (y <= -2.55e+76) {
tmp = t_1;
} else if (y <= -1.25) {
tmp = x * ((-2.0 / t) / z);
} else if (y <= -8.2e-53) {
tmp = t_1;
} else if (y <= 1.2e-40) {
tmp = (x / z) * (-2.0 / t);
} else {
tmp = 2.0 / ((y * z) / x);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = 2.0d0 / (y / (x / z))
if (y <= (-2.55d+76)) then
tmp = t_1
else if (y <= (-1.25d0)) then
tmp = x * (((-2.0d0) / t) / z)
else if (y <= (-8.2d-53)) then
tmp = t_1
else if (y <= 1.2d-40) then
tmp = (x / z) * ((-2.0d0) / t)
else
tmp = 2.0d0 / ((y * z) / x)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = 2.0 / (y / (x / z));
double tmp;
if (y <= -2.55e+76) {
tmp = t_1;
} else if (y <= -1.25) {
tmp = x * ((-2.0 / t) / z);
} else if (y <= -8.2e-53) {
tmp = t_1;
} else if (y <= 1.2e-40) {
tmp = (x / z) * (-2.0 / t);
} else {
tmp = 2.0 / ((y * z) / x);
}
return tmp;
}
def code(x, y, z, t): t_1 = 2.0 / (y / (x / z)) tmp = 0 if y <= -2.55e+76: tmp = t_1 elif y <= -1.25: tmp = x * ((-2.0 / t) / z) elif y <= -8.2e-53: tmp = t_1 elif y <= 1.2e-40: tmp = (x / z) * (-2.0 / t) else: tmp = 2.0 / ((y * z) / x) return tmp
function code(x, y, z, t) t_1 = Float64(2.0 / Float64(y / Float64(x / z))) tmp = 0.0 if (y <= -2.55e+76) tmp = t_1; elseif (y <= -1.25) tmp = Float64(x * Float64(Float64(-2.0 / t) / z)); elseif (y <= -8.2e-53) tmp = t_1; elseif (y <= 1.2e-40) tmp = Float64(Float64(x / z) * Float64(-2.0 / t)); else tmp = Float64(2.0 / Float64(Float64(y * z) / x)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = 2.0 / (y / (x / z)); tmp = 0.0; if (y <= -2.55e+76) tmp = t_1; elseif (y <= -1.25) tmp = x * ((-2.0 / t) / z); elseif (y <= -8.2e-53) tmp = t_1; elseif (y <= 1.2e-40) tmp = (x / z) * (-2.0 / t); else tmp = 2.0 / ((y * z) / x); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(2.0 / N[(y / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.55e+76], t$95$1, If[LessEqual[y, -1.25], N[(x * N[(N[(-2.0 / t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -8.2e-53], t$95$1, If[LessEqual[y, 1.2e-40], N[(N[(x / z), $MachinePrecision] * N[(-2.0 / t), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(y * z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{2}{\frac{y}{\frac{x}{z}}}\\
\mathbf{if}\;y \leq -2.55 \cdot 10^{+76}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -1.25:\\
\;\;\;\;x \cdot \frac{\frac{-2}{t}}{z}\\
\mathbf{elif}\;y \leq -8.2 \cdot 10^{-53}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.2 \cdot 10^{-40}:\\
\;\;\;\;\frac{x}{z} \cdot \frac{-2}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{y \cdot z}{x}}\\
\end{array}
\end{array}
if y < -2.5500000000000001e76 or -1.25 < y < -8.2000000000000001e-53Initial program 88.5%
associate-*l/88.5%
*-commutative88.5%
distribute-rgt-out--91.5%
associate-/r*94.2%
Simplified94.2%
associate-/r*91.5%
associate-*r/91.5%
associate-/l*91.5%
Applied egg-rr91.5%
Taylor expanded in y around inf 83.5%
associate-/l*84.8%
Simplified84.8%
if -2.5500000000000001e76 < y < -1.25Initial program 92.9%
associate-*r/92.2%
distribute-rgt-out--92.2%
associate-/l/96.5%
sub-neg96.5%
+-commutative96.5%
neg-sub096.5%
associate-+l-96.5%
sub0-neg96.5%
neg-mul-196.5%
associate-/r*96.5%
metadata-eval96.5%
Simplified96.5%
Taylor expanded in t around inf 81.6%
if -8.2000000000000001e-53 < y < 1.19999999999999996e-40Initial program 91.6%
associate-*r/91.5%
distribute-rgt-out--93.5%
associate-/l/93.4%
sub-neg93.4%
+-commutative93.4%
neg-sub093.4%
associate-+l-93.4%
sub0-neg93.4%
neg-mul-193.4%
associate-/r*93.4%
metadata-eval93.4%
Simplified93.4%
Taylor expanded in t around inf 79.4%
clear-num78.7%
un-div-inv78.7%
*-commutative78.7%
associate-/l*77.3%
Applied egg-rr77.3%
associate-/r/78.0%
frac-times79.4%
*-commutative79.4%
times-frac80.8%
Applied egg-rr80.8%
if 1.19999999999999996e-40 < y Initial program 90.4%
associate-*l/90.4%
*-commutative90.4%
distribute-rgt-out--93.2%
associate-/r*86.3%
Simplified86.3%
associate-/r*93.2%
associate-*r/93.2%
associate-/l*93.1%
Applied egg-rr93.1%
Taylor expanded in y around inf 80.5%
Final simplification81.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ 2.0 (/ y (/ x z)))))
(if (<= y -2.7e+76)
t_1
(if (<= y -8e-5)
(* x (/ (/ -2.0 t) z))
(if (<= y -3.8e-53)
t_1
(if (<= y 1.22e-40) (/ (/ (* x -2.0) z) t) (/ 2.0 (/ (* y z) x))))))))
double code(double x, double y, double z, double t) {
double t_1 = 2.0 / (y / (x / z));
double tmp;
if (y <= -2.7e+76) {
tmp = t_1;
} else if (y <= -8e-5) {
tmp = x * ((-2.0 / t) / z);
} else if (y <= -3.8e-53) {
tmp = t_1;
} else if (y <= 1.22e-40) {
tmp = ((x * -2.0) / z) / t;
} else {
tmp = 2.0 / ((y * z) / x);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = 2.0d0 / (y / (x / z))
if (y <= (-2.7d+76)) then
tmp = t_1
else if (y <= (-8d-5)) then
tmp = x * (((-2.0d0) / t) / z)
else if (y <= (-3.8d-53)) then
tmp = t_1
else if (y <= 1.22d-40) then
tmp = ((x * (-2.0d0)) / z) / t
else
tmp = 2.0d0 / ((y * z) / x)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = 2.0 / (y / (x / z));
double tmp;
if (y <= -2.7e+76) {
tmp = t_1;
} else if (y <= -8e-5) {
tmp = x * ((-2.0 / t) / z);
} else if (y <= -3.8e-53) {
tmp = t_1;
} else if (y <= 1.22e-40) {
tmp = ((x * -2.0) / z) / t;
} else {
tmp = 2.0 / ((y * z) / x);
}
return tmp;
}
def code(x, y, z, t): t_1 = 2.0 / (y / (x / z)) tmp = 0 if y <= -2.7e+76: tmp = t_1 elif y <= -8e-5: tmp = x * ((-2.0 / t) / z) elif y <= -3.8e-53: tmp = t_1 elif y <= 1.22e-40: tmp = ((x * -2.0) / z) / t else: tmp = 2.0 / ((y * z) / x) return tmp
function code(x, y, z, t) t_1 = Float64(2.0 / Float64(y / Float64(x / z))) tmp = 0.0 if (y <= -2.7e+76) tmp = t_1; elseif (y <= -8e-5) tmp = Float64(x * Float64(Float64(-2.0 / t) / z)); elseif (y <= -3.8e-53) tmp = t_1; elseif (y <= 1.22e-40) tmp = Float64(Float64(Float64(x * -2.0) / z) / t); else tmp = Float64(2.0 / Float64(Float64(y * z) / x)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = 2.0 / (y / (x / z)); tmp = 0.0; if (y <= -2.7e+76) tmp = t_1; elseif (y <= -8e-5) tmp = x * ((-2.0 / t) / z); elseif (y <= -3.8e-53) tmp = t_1; elseif (y <= 1.22e-40) tmp = ((x * -2.0) / z) / t; else tmp = 2.0 / ((y * z) / x); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(2.0 / N[(y / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.7e+76], t$95$1, If[LessEqual[y, -8e-5], N[(x * N[(N[(-2.0 / t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -3.8e-53], t$95$1, If[LessEqual[y, 1.22e-40], N[(N[(N[(x * -2.0), $MachinePrecision] / z), $MachinePrecision] / t), $MachinePrecision], N[(2.0 / N[(N[(y * z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{2}{\frac{y}{\frac{x}{z}}}\\
\mathbf{if}\;y \leq -2.7 \cdot 10^{+76}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -8 \cdot 10^{-5}:\\
\;\;\;\;x \cdot \frac{\frac{-2}{t}}{z}\\
\mathbf{elif}\;y \leq -3.8 \cdot 10^{-53}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.22 \cdot 10^{-40}:\\
\;\;\;\;\frac{\frac{x \cdot -2}{z}}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{y \cdot z}{x}}\\
\end{array}
\end{array}
if y < -2.6999999999999999e76 or -8.00000000000000065e-5 < y < -3.7999999999999998e-53Initial program 88.5%
associate-*l/88.5%
*-commutative88.5%
distribute-rgt-out--91.5%
associate-/r*94.2%
Simplified94.2%
associate-/r*91.5%
associate-*r/91.5%
associate-/l*91.5%
Applied egg-rr91.5%
Taylor expanded in y around inf 83.5%
associate-/l*84.8%
Simplified84.8%
if -2.6999999999999999e76 < y < -8.00000000000000065e-5Initial program 92.9%
associate-*r/92.2%
distribute-rgt-out--92.2%
associate-/l/96.5%
sub-neg96.5%
+-commutative96.5%
neg-sub096.5%
associate-+l-96.5%
sub0-neg96.5%
neg-mul-196.5%
associate-/r*96.5%
metadata-eval96.5%
Simplified96.5%
Taylor expanded in t around inf 81.6%
if -3.7999999999999998e-53 < y < 1.22e-40Initial program 91.6%
associate-*r/91.5%
distribute-rgt-out--93.5%
associate-/l/93.4%
sub-neg93.4%
+-commutative93.4%
neg-sub093.4%
associate-+l-93.4%
sub0-neg93.4%
neg-mul-193.4%
associate-/r*93.4%
metadata-eval93.4%
Simplified93.4%
Taylor expanded in t around inf 79.4%
associate-*r/79.4%
*-commutative79.4%
associate-/r*80.8%
*-commutative80.8%
Applied egg-rr80.8%
if 1.22e-40 < y Initial program 90.4%
associate-*l/90.4%
*-commutative90.4%
distribute-rgt-out--93.2%
associate-/r*86.3%
Simplified86.3%
associate-/r*93.2%
associate-*r/93.2%
associate-/l*93.1%
Applied egg-rr93.1%
Taylor expanded in y around inf 80.5%
Final simplification81.8%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.35e+76)
(/ 2.0 (/ y (/ x z)))
(if (<= y -8e-9)
(* x (/ (/ -2.0 t) z))
(if (<= y -2.2e-53)
(/ (/ (* x 2.0) y) z)
(if (<= y 1.8e-40) (/ (/ (* x -2.0) z) t) (/ 2.0 (/ (* y z) x)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.35e+76) {
tmp = 2.0 / (y / (x / z));
} else if (y <= -8e-9) {
tmp = x * ((-2.0 / t) / z);
} else if (y <= -2.2e-53) {
tmp = ((x * 2.0) / y) / z;
} else if (y <= 1.8e-40) {
tmp = ((x * -2.0) / z) / t;
} else {
tmp = 2.0 / ((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 (y <= (-1.35d+76)) then
tmp = 2.0d0 / (y / (x / z))
else if (y <= (-8d-9)) then
tmp = x * (((-2.0d0) / t) / z)
else if (y <= (-2.2d-53)) then
tmp = ((x * 2.0d0) / y) / z
else if (y <= 1.8d-40) then
tmp = ((x * (-2.0d0)) / z) / t
else
tmp = 2.0d0 / ((y * z) / x)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.35e+76) {
tmp = 2.0 / (y / (x / z));
} else if (y <= -8e-9) {
tmp = x * ((-2.0 / t) / z);
} else if (y <= -2.2e-53) {
tmp = ((x * 2.0) / y) / z;
} else if (y <= 1.8e-40) {
tmp = ((x * -2.0) / z) / t;
} else {
tmp = 2.0 / ((y * z) / x);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.35e+76: tmp = 2.0 / (y / (x / z)) elif y <= -8e-9: tmp = x * ((-2.0 / t) / z) elif y <= -2.2e-53: tmp = ((x * 2.0) / y) / z elif y <= 1.8e-40: tmp = ((x * -2.0) / z) / t else: tmp = 2.0 / ((y * z) / x) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.35e+76) tmp = Float64(2.0 / Float64(y / Float64(x / z))); elseif (y <= -8e-9) tmp = Float64(x * Float64(Float64(-2.0 / t) / z)); elseif (y <= -2.2e-53) tmp = Float64(Float64(Float64(x * 2.0) / y) / z); elseif (y <= 1.8e-40) tmp = Float64(Float64(Float64(x * -2.0) / z) / t); else tmp = Float64(2.0 / Float64(Float64(y * z) / x)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.35e+76) tmp = 2.0 / (y / (x / z)); elseif (y <= -8e-9) tmp = x * ((-2.0 / t) / z); elseif (y <= -2.2e-53) tmp = ((x * 2.0) / y) / z; elseif (y <= 1.8e-40) tmp = ((x * -2.0) / z) / t; else tmp = 2.0 / ((y * z) / x); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.35e+76], N[(2.0 / N[(y / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -8e-9], N[(x * N[(N[(-2.0 / t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.2e-53], N[(N[(N[(x * 2.0), $MachinePrecision] / y), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, 1.8e-40], N[(N[(N[(x * -2.0), $MachinePrecision] / z), $MachinePrecision] / t), $MachinePrecision], N[(2.0 / N[(N[(y * z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.35 \cdot 10^{+76}:\\
\;\;\;\;\frac{2}{\frac{y}{\frac{x}{z}}}\\
\mathbf{elif}\;y \leq -8 \cdot 10^{-9}:\\
\;\;\;\;x \cdot \frac{\frac{-2}{t}}{z}\\
\mathbf{elif}\;y \leq -2.2 \cdot 10^{-53}:\\
\;\;\;\;\frac{\frac{x \cdot 2}{y}}{z}\\
\mathbf{elif}\;y \leq 1.8 \cdot 10^{-40}:\\
\;\;\;\;\frac{\frac{x \cdot -2}{z}}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{y \cdot z}{x}}\\
\end{array}
\end{array}
if y < -1.34999999999999995e76Initial program 87.5%
associate-*l/87.5%
*-commutative87.5%
distribute-rgt-out--91.2%
associate-/r*92.9%
Simplified92.9%
associate-/r*91.2%
associate-*r/91.2%
associate-/l*91.2%
Applied egg-rr91.2%
Taylor expanded in y around inf 85.7%
associate-/l*87.3%
Simplified87.3%
if -1.34999999999999995e76 < y < -8.0000000000000005e-9Initial program 92.9%
associate-*r/92.2%
distribute-rgt-out--92.2%
associate-/l/96.5%
sub-neg96.5%
+-commutative96.5%
neg-sub096.5%
associate-+l-96.5%
sub0-neg96.5%
neg-mul-196.5%
associate-/r*96.5%
metadata-eval96.5%
Simplified96.5%
Taylor expanded in t around inf 81.6%
if -8.0000000000000005e-9 < y < -2.20000000000000018e-53Initial program 92.8%
associate-*r/92.7%
distribute-rgt-out--92.7%
associate-/l/92.5%
sub-neg92.5%
+-commutative92.5%
neg-sub092.5%
associate-+l-92.5%
sub0-neg92.5%
neg-mul-192.5%
associate-/r*92.5%
metadata-eval92.5%
Simplified92.5%
Taylor expanded in t around 0 73.8%
associate-*r/73.9%
associate-/r*74.4%
Applied egg-rr74.4%
if -2.20000000000000018e-53 < y < 1.8e-40Initial program 91.6%
associate-*r/91.5%
distribute-rgt-out--93.5%
associate-/l/93.4%
sub-neg93.4%
+-commutative93.4%
neg-sub093.4%
associate-+l-93.4%
sub0-neg93.4%
neg-mul-193.4%
associate-/r*93.4%
metadata-eval93.4%
Simplified93.4%
Taylor expanded in t around inf 79.4%
associate-*r/79.4%
*-commutative79.4%
associate-/r*80.8%
*-commutative80.8%
Applied egg-rr80.8%
if 1.8e-40 < y Initial program 90.4%
associate-*l/90.4%
*-commutative90.4%
distribute-rgt-out--93.2%
associate-/r*86.3%
Simplified86.3%
associate-/r*93.2%
associate-*r/93.2%
associate-/l*93.1%
Applied egg-rr93.1%
Taylor expanded in y around inf 80.5%
Final simplification81.8%
(FPCore (x y z t) :precision binary64 (if (or (<= z -1e-16) (not (<= z 5.2e-45))) (* 2.0 (/ (/ x z) (- y t))) (* x (/ 2.0 (* z (- y t))))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1e-16) || !(z <= 5.2e-45)) {
tmp = 2.0 * ((x / z) / (y - t));
} else {
tmp = x * (2.0 / (z * (y - 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 <= (-1d-16)) .or. (.not. (z <= 5.2d-45))) then
tmp = 2.0d0 * ((x / z) / (y - t))
else
tmp = x * (2.0d0 / (z * (y - t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1e-16) || !(z <= 5.2e-45)) {
tmp = 2.0 * ((x / z) / (y - t));
} else {
tmp = x * (2.0 / (z * (y - t)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -1e-16) or not (z <= 5.2e-45): tmp = 2.0 * ((x / z) / (y - t)) else: tmp = x * (2.0 / (z * (y - t))) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -1e-16) || !(z <= 5.2e-45)) tmp = Float64(2.0 * Float64(Float64(x / z) / Float64(y - t))); else tmp = Float64(x * Float64(2.0 / Float64(z * Float64(y - t)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -1e-16) || ~((z <= 5.2e-45))) tmp = 2.0 * ((x / z) / (y - t)); else tmp = x * (2.0 / (z * (y - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -1e-16], N[Not[LessEqual[z, 5.2e-45]], $MachinePrecision]], N[(2.0 * N[(N[(x / z), $MachinePrecision] / N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(2.0 / N[(z * N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \cdot 10^{-16} \lor \neg \left(z \leq 5.2 \cdot 10^{-45}\right):\\
\;\;\;\;2 \cdot \frac{\frac{x}{z}}{y - t}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{2}{z \cdot \left(y - t\right)}\\
\end{array}
\end{array}
if z < -9.9999999999999998e-17 or 5.19999999999999973e-45 < z Initial program 84.6%
associate-*l/84.6%
*-commutative84.6%
distribute-rgt-out--87.5%
associate-/r*97.7%
Simplified97.7%
if -9.9999999999999998e-17 < z < 5.19999999999999973e-45Initial program 97.2%
associate-*r/97.1%
distribute-rgt-out--98.7%
Simplified98.7%
Final simplification98.2%
(FPCore (x y z t) :precision binary64 (if (or (<= z -0.000165) (not (<= z 4.1e-27))) (* 2.0 (/ (/ x z) (- y t))) (* x (/ (/ -2.0 (- t y)) z))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -0.000165) || !(z <= 4.1e-27)) {
tmp = 2.0 * ((x / z) / (y - t));
} else {
tmp = x * ((-2.0 / (t - y)) / z);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z <= (-0.000165d0)) .or. (.not. (z <= 4.1d-27))) then
tmp = 2.0d0 * ((x / z) / (y - t))
else
tmp = x * (((-2.0d0) / (t - y)) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -0.000165) || !(z <= 4.1e-27)) {
tmp = 2.0 * ((x / z) / (y - t));
} else {
tmp = x * ((-2.0 / (t - y)) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -0.000165) or not (z <= 4.1e-27): tmp = 2.0 * ((x / z) / (y - t)) else: tmp = x * ((-2.0 / (t - y)) / z) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -0.000165) || !(z <= 4.1e-27)) tmp = Float64(2.0 * Float64(Float64(x / z) / Float64(y - t))); else tmp = Float64(x * Float64(Float64(-2.0 / Float64(t - y)) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -0.000165) || ~((z <= 4.1e-27))) tmp = 2.0 * ((x / z) / (y - t)); else tmp = x * ((-2.0 / (t - y)) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -0.000165], N[Not[LessEqual[z, 4.1e-27]], $MachinePrecision]], N[(2.0 * N[(N[(x / z), $MachinePrecision] / N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(-2.0 / N[(t - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.000165 \lor \neg \left(z \leq 4.1 \cdot 10^{-27}\right):\\
\;\;\;\;2 \cdot \frac{\frac{x}{z}}{y - t}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{\frac{-2}{t - y}}{z}\\
\end{array}
\end{array}
if z < -1.65e-4 or 4.0999999999999999e-27 < z Initial program 83.7%
associate-*l/83.7%
*-commutative83.7%
distribute-rgt-out--86.8%
associate-/r*97.6%
Simplified97.6%
if -1.65e-4 < z < 4.0999999999999999e-27Initial program 97.4%
associate-*r/97.2%
distribute-rgt-out--98.8%
associate-/l/98.8%
sub-neg98.8%
+-commutative98.8%
neg-sub098.8%
associate-+l-98.8%
sub0-neg98.8%
neg-mul-198.8%
associate-/r*98.8%
metadata-eval98.8%
Simplified98.8%
Final simplification98.2%
(FPCore (x y z t) :precision binary64 (if (<= z -0.00052) (* 2.0 (/ (/ x z) (- y t))) (if (<= z 5e-13) (* x (/ (/ -2.0 (- t y)) z)) (* (/ x z) (/ 2.0 (- y t))))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -0.00052) {
tmp = 2.0 * ((x / z) / (y - t));
} else if (z <= 5e-13) {
tmp = x * ((-2.0 / (t - y)) / z);
} else {
tmp = (x / z) * (2.0 / (y - 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.00052d0)) then
tmp = 2.0d0 * ((x / z) / (y - t))
else if (z <= 5d-13) then
tmp = x * (((-2.0d0) / (t - y)) / z)
else
tmp = (x / z) * (2.0d0 / (y - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -0.00052) {
tmp = 2.0 * ((x / z) / (y - t));
} else if (z <= 5e-13) {
tmp = x * ((-2.0 / (t - y)) / z);
} else {
tmp = (x / z) * (2.0 / (y - t));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -0.00052: tmp = 2.0 * ((x / z) / (y - t)) elif z <= 5e-13: tmp = x * ((-2.0 / (t - y)) / z) else: tmp = (x / z) * (2.0 / (y - t)) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -0.00052) tmp = Float64(2.0 * Float64(Float64(x / z) / Float64(y - t))); elseif (z <= 5e-13) tmp = Float64(x * Float64(Float64(-2.0 / Float64(t - y)) / z)); else tmp = Float64(Float64(x / z) * Float64(2.0 / Float64(y - t))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -0.00052) tmp = 2.0 * ((x / z) / (y - t)); elseif (z <= 5e-13) tmp = x * ((-2.0 / (t - y)) / z); else tmp = (x / z) * (2.0 / (y - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -0.00052], N[(2.0 * N[(N[(x / z), $MachinePrecision] / N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5e-13], N[(x * N[(N[(-2.0 / N[(t - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(N[(x / z), $MachinePrecision] * N[(2.0 / N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.00052:\\
\;\;\;\;2 \cdot \frac{\frac{x}{z}}{y - t}\\
\mathbf{elif}\;z \leq 5 \cdot 10^{-13}:\\
\;\;\;\;x \cdot \frac{\frac{-2}{t - y}}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z} \cdot \frac{2}{y - t}\\
\end{array}
\end{array}
if z < -5.19999999999999954e-4Initial program 77.2%
associate-*l/77.2%
*-commutative77.2%
distribute-rgt-out--81.2%
associate-/r*99.8%
Simplified99.8%
if -5.19999999999999954e-4 < z < 4.9999999999999999e-13Initial program 97.4%
associate-*r/97.2%
distribute-rgt-out--98.8%
associate-/l/98.8%
sub-neg98.8%
+-commutative98.8%
neg-sub098.8%
associate-+l-98.8%
sub0-neg98.8%
neg-mul-198.8%
associate-/r*98.8%
metadata-eval98.8%
Simplified98.8%
if 4.9999999999999999e-13 < z Initial program 87.8%
distribute-rgt-out--90.3%
times-frac96.1%
Simplified96.1%
Final simplification98.2%
(FPCore (x y z t) :precision binary64 (if (<= z -3.5e+80) (* 2.0 (/ (/ x z) (- y t))) (if (<= z 0.55) (/ 2.0 (/ (* z (- y t)) x)) (* (/ x z) (/ 2.0 (- y t))))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -3.5e+80) {
tmp = 2.0 * ((x / z) / (y - t));
} else if (z <= 0.55) {
tmp = 2.0 / ((z * (y - t)) / x);
} else {
tmp = (x / z) * (2.0 / (y - t));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (z <= (-3.5d+80)) then
tmp = 2.0d0 * ((x / z) / (y - t))
else if (z <= 0.55d0) then
tmp = 2.0d0 / ((z * (y - t)) / x)
else
tmp = (x / z) * (2.0d0 / (y - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -3.5e+80) {
tmp = 2.0 * ((x / z) / (y - t));
} else if (z <= 0.55) {
tmp = 2.0 / ((z * (y - t)) / x);
} else {
tmp = (x / z) * (2.0 / (y - t));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -3.5e+80: tmp = 2.0 * ((x / z) / (y - t)) elif z <= 0.55: tmp = 2.0 / ((z * (y - t)) / x) else: tmp = (x / z) * (2.0 / (y - t)) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -3.5e+80) tmp = Float64(2.0 * Float64(Float64(x / z) / Float64(y - t))); elseif (z <= 0.55) tmp = Float64(2.0 / Float64(Float64(z * Float64(y - t)) / x)); else tmp = Float64(Float64(x / z) * Float64(2.0 / Float64(y - t))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -3.5e+80) tmp = 2.0 * ((x / z) / (y - t)); elseif (z <= 0.55) tmp = 2.0 / ((z * (y - t)) / x); else tmp = (x / z) * (2.0 / (y - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -3.5e+80], N[(2.0 * N[(N[(x / z), $MachinePrecision] / N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.55], N[(2.0 / N[(N[(z * N[(y - t), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(x / z), $MachinePrecision] * N[(2.0 / N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.5 \cdot 10^{+80}:\\
\;\;\;\;2 \cdot \frac{\frac{x}{z}}{y - t}\\
\mathbf{elif}\;z \leq 0.55:\\
\;\;\;\;\frac{2}{\frac{z \cdot \left(y - t\right)}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z} \cdot \frac{2}{y - t}\\
\end{array}
\end{array}
if z < -3.49999999999999994e80Initial program 69.3%
associate-*l/69.3%
*-commutative69.3%
distribute-rgt-out--74.7%
associate-/r*99.8%
Simplified99.8%
if -3.49999999999999994e80 < z < 0.55000000000000004Initial program 97.6%
associate-*l/97.6%
*-commutative97.6%
distribute-rgt-out--99.0%
associate-/r*86.6%
Simplified86.6%
associate-/r*99.0%
associate-*r/99.0%
associate-/l*98.9%
Applied egg-rr98.9%
if 0.55000000000000004 < z Initial program 87.6%
distribute-rgt-out--90.2%
times-frac96.1%
Simplified96.1%
Final simplification98.2%
(FPCore (x y z t) :precision binary64 (if (<= y 6e+225) (* 2.0 (/ (/ x z) (- y t))) (/ (* x 2.0) (* y z))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= 6e+225) {
tmp = 2.0 * ((x / z) / (y - t));
} else {
tmp = (x * 2.0) / (y * z);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= 6d+225) then
tmp = 2.0d0 * ((x / z) / (y - t))
else
tmp = (x * 2.0d0) / (y * z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= 6e+225) {
tmp = 2.0 * ((x / z) / (y - t));
} else {
tmp = (x * 2.0) / (y * z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= 6e+225: tmp = 2.0 * ((x / z) / (y - t)) else: tmp = (x * 2.0) / (y * z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= 6e+225) tmp = Float64(2.0 * Float64(Float64(x / z) / Float64(y - t))); else tmp = Float64(Float64(x * 2.0) / Float64(y * z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= 6e+225) tmp = 2.0 * ((x / z) / (y - t)); else tmp = (x * 2.0) / (y * z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, 6e+225], N[(2.0 * N[(N[(x / z), $MachinePrecision] / N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * 2.0), $MachinePrecision] / N[(y * z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 6 \cdot 10^{+225}:\\
\;\;\;\;2 \cdot \frac{\frac{x}{z}}{y - t}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot 2}{y \cdot z}\\
\end{array}
\end{array}
if y < 6.000000000000001e225Initial program 90.1%
associate-*l/90.1%
*-commutative90.1%
distribute-rgt-out--92.2%
associate-/r*93.0%
Simplified93.0%
if 6.000000000000001e225 < y Initial program 95.3%
distribute-rgt-out--99.8%
Simplified99.8%
Taylor expanded in y around inf 99.8%
Final simplification93.6%
(FPCore (x y z t) :precision binary64 (* -2.0 (/ x (* z t))))
double code(double x, double y, double z, double t) {
return -2.0 * (x / (z * 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 = (-2.0d0) * (x / (z * t))
end function
public static double code(double x, double y, double z, double t) {
return -2.0 * (x / (z * t));
}
def code(x, y, z, t): return -2.0 * (x / (z * t))
function code(x, y, z, t) return Float64(-2.0 * Float64(x / Float64(z * t))) end
function tmp = code(x, y, z, t) tmp = -2.0 * (x / (z * t)); end
code[x_, y_, z_, t_] := N[(-2.0 * N[(x / N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
-2 \cdot \frac{x}{z \cdot t}
\end{array}
Initial program 90.5%
associate-*r/90.4%
distribute-rgt-out--92.7%
associate-/l/93.0%
sub-neg93.0%
+-commutative93.0%
neg-sub093.0%
associate-+l-93.0%
sub0-neg93.0%
neg-mul-193.0%
associate-/r*93.0%
metadata-eval93.0%
Simplified93.0%
Taylor expanded in t around inf 52.3%
Final simplification52.3%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* (/ x (* (- y t) z)) 2.0))
(t_2 (/ (* x 2.0) (- (* y z) (* t z)))))
(if (< t_2 -2.559141628295061e-13)
t_1
(if (< t_2 1.045027827330126e-269) (/ (* (/ x z) 2.0) (- y t)) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = (x / ((y - t) * z)) * 2.0;
double t_2 = (x * 2.0) / ((y * z) - (t * z));
double tmp;
if (t_2 < -2.559141628295061e-13) {
tmp = t_1;
} else if (t_2 < 1.045027827330126e-269) {
tmp = ((x / z) * 2.0) / (y - t);
} 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 - t) * z)) * 2.0d0
t_2 = (x * 2.0d0) / ((y * z) - (t * z))
if (t_2 < (-2.559141628295061d-13)) then
tmp = t_1
else if (t_2 < 1.045027827330126d-269) then
tmp = ((x / z) * 2.0d0) / (y - t)
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 - t) * z)) * 2.0;
double t_2 = (x * 2.0) / ((y * z) - (t * z));
double tmp;
if (t_2 < -2.559141628295061e-13) {
tmp = t_1;
} else if (t_2 < 1.045027827330126e-269) {
tmp = ((x / z) * 2.0) / (y - t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = (x / ((y - t) * z)) * 2.0 t_2 = (x * 2.0) / ((y * z) - (t * z)) tmp = 0 if t_2 < -2.559141628295061e-13: tmp = t_1 elif t_2 < 1.045027827330126e-269: tmp = ((x / z) * 2.0) / (y - t) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x / Float64(Float64(y - t) * z)) * 2.0) t_2 = Float64(Float64(x * 2.0) / Float64(Float64(y * z) - Float64(t * z))) tmp = 0.0 if (t_2 < -2.559141628295061e-13) tmp = t_1; elseif (t_2 < 1.045027827330126e-269) tmp = Float64(Float64(Float64(x / z) * 2.0) / Float64(y - t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x / ((y - t) * z)) * 2.0; t_2 = (x * 2.0) / ((y * z) - (t * z)); tmp = 0.0; if (t_2 < -2.559141628295061e-13) tmp = t_1; elseif (t_2 < 1.045027827330126e-269) tmp = ((x / z) * 2.0) / (y - t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / N[(N[(y - t), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * 2.0), $MachinePrecision] / N[(N[(y * z), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t$95$2, -2.559141628295061e-13], t$95$1, If[Less[t$95$2, 1.045027827330126e-269], N[(N[(N[(x / z), $MachinePrecision] * 2.0), $MachinePrecision] / N[(y - t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{\left(y - t\right) \cdot z} \cdot 2\\
t_2 := \frac{x \cdot 2}{y \cdot z - t \cdot z}\\
\mathbf{if}\;t_2 < -2.559141628295061 \cdot 10^{-13}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_2 < 1.045027827330126 \cdot 10^{-269}:\\
\;\;\;\;\frac{\frac{x}{z} \cdot 2}{y - t}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
herbie shell --seed 2023176
(FPCore (x y z t)
:name "Linear.Projection:infinitePerspective from linear-1.19.1.3, A"
:precision binary64
:herbie-target
(if (< (/ (* x 2.0) (- (* y z) (* t z))) -2.559141628295061e-13) (* (/ x (* (- y t) z)) 2.0) (if (< (/ (* x 2.0) (- (* y z) (* t z))) 1.045027827330126e-269) (/ (* (/ x z) 2.0) (- y t)) (* (/ x (* (- y t) z)) 2.0)))
(/ (* x 2.0) (- (* y z) (* t z))))