
(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 12 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 (- (* y z) (* z t))))
(if (<= t_1 -2e+245)
(* (/ x (- y t)) (/ 2.0 z))
(if (<= t_1 5e+176)
(/ (* x 2.0) (* z (- y t)))
(* (/ x z) (/ 2.0 (- y t)))))))
double code(double x, double y, double z, double t) {
double t_1 = (y * z) - (z * t);
double tmp;
if (t_1 <= -2e+245) {
tmp = (x / (y - t)) * (2.0 / z);
} else if (t_1 <= 5e+176) {
tmp = (x * 2.0) / (z * (y - t));
} 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) :: t_1
real(8) :: tmp
t_1 = (y * z) - (z * t)
if (t_1 <= (-2d+245)) then
tmp = (x / (y - t)) * (2.0d0 / z)
else if (t_1 <= 5d+176) then
tmp = (x * 2.0d0) / (z * (y - t))
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 t_1 = (y * z) - (z * t);
double tmp;
if (t_1 <= -2e+245) {
tmp = (x / (y - t)) * (2.0 / z);
} else if (t_1 <= 5e+176) {
tmp = (x * 2.0) / (z * (y - t));
} else {
tmp = (x / z) * (2.0 / (y - t));
}
return tmp;
}
def code(x, y, z, t): t_1 = (y * z) - (z * t) tmp = 0 if t_1 <= -2e+245: tmp = (x / (y - t)) * (2.0 / z) elif t_1 <= 5e+176: tmp = (x * 2.0) / (z * (y - t)) else: tmp = (x / z) * (2.0 / (y - t)) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(y * z) - Float64(z * t)) tmp = 0.0 if (t_1 <= -2e+245) tmp = Float64(Float64(x / Float64(y - t)) * Float64(2.0 / z)); elseif (t_1 <= 5e+176) tmp = Float64(Float64(x * 2.0) / Float64(z * Float64(y - t))); else tmp = Float64(Float64(x / z) * Float64(2.0 / Float64(y - t))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (y * z) - (z * t); tmp = 0.0; if (t_1 <= -2e+245) tmp = (x / (y - t)) * (2.0 / z); elseif (t_1 <= 5e+176) tmp = (x * 2.0) / (z * (y - t)); else tmp = (x / z) * (2.0 / (y - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y * z), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+245], N[(N[(x / N[(y - t), $MachinePrecision]), $MachinePrecision] * N[(2.0 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+176], N[(N[(x * 2.0), $MachinePrecision] / N[(z * N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / z), $MachinePrecision] * N[(2.0 / N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot z - z \cdot t\\
\mathbf{if}\;t_1 \leq -2 \cdot 10^{+245}:\\
\;\;\;\;\frac{x}{y - t} \cdot \frac{2}{z}\\
\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+176}:\\
\;\;\;\;\frac{x \cdot 2}{z \cdot \left(y - t\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z} \cdot \frac{2}{y - t}\\
\end{array}
\end{array}
if (-.f64 (*.f64 y z) (*.f64 t z)) < -2.00000000000000009e245Initial program 75.9%
distribute-rgt-out--75.9%
Simplified75.9%
*-commutative75.9%
times-frac99.9%
Applied egg-rr99.9%
if -2.00000000000000009e245 < (-.f64 (*.f64 y z) (*.f64 t z)) < 5e176Initial program 98.1%
distribute-rgt-out--98.7%
Simplified98.7%
if 5e176 < (-.f64 (*.f64 y z) (*.f64 t z)) Initial program 75.9%
distribute-rgt-out--80.5%
times-frac99.8%
Simplified99.8%
Final simplification99.0%
(FPCore (x y z t) :precision binary64 (if (or (<= z -6.3e+16) (not (<= z 2e+24))) (* 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 <= -6.3e+16) || !(z <= 2e+24)) {
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 <= (-6.3d+16)) .or. (.not. (z <= 2d+24))) 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 <= -6.3e+16) || !(z <= 2e+24)) {
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 <= -6.3e+16) or not (z <= 2e+24): 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 <= -6.3e+16) || !(z <= 2e+24)) 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 <= -6.3e+16) || ~((z <= 2e+24))) 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, -6.3e+16], N[Not[LessEqual[z, 2e+24]], $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 -6.3 \cdot 10^{+16} \lor \neg \left(z \leq 2 \cdot 10^{+24}\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 < -6.3e16 or 2e24 < z Initial program 81.4%
associate-*l/81.4%
*-commutative81.4%
distribute-rgt-out--83.4%
associate-/r*96.1%
Simplified96.1%
if -6.3e16 < z < 2e24Initial program 97.9%
associate-*r/97.1%
distribute-rgt-out--97.7%
associate-/l/97.8%
sub-neg97.8%
+-commutative97.8%
neg-sub097.8%
associate-+l-97.8%
sub0-neg97.8%
neg-mul-197.8%
associate-/r*97.8%
metadata-eval97.8%
Simplified97.8%
Final simplification97.1%
(FPCore (x y z t)
:precision binary64
(if (<= z -2.5e+18)
(* 2.0 (/ (/ x z) (- y t)))
(if (<= z 7.2e+24)
(* 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 <= -2.5e+18) {
tmp = 2.0 * ((x / z) / (y - t));
} else if (z <= 7.2e+24) {
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 <= (-2.5d+18)) then
tmp = 2.0d0 * ((x / z) / (y - t))
else if (z <= 7.2d+24) 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 <= -2.5e+18) {
tmp = 2.0 * ((x / z) / (y - t));
} else if (z <= 7.2e+24) {
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 <= -2.5e+18: tmp = 2.0 * ((x / z) / (y - t)) elif z <= 7.2e+24: 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 <= -2.5e+18) tmp = Float64(2.0 * Float64(Float64(x / z) / Float64(y - t))); elseif (z <= 7.2e+24) 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 <= -2.5e+18) tmp = 2.0 * ((x / z) / (y - t)); elseif (z <= 7.2e+24) 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, -2.5e+18], N[(2.0 * N[(N[(x / z), $MachinePrecision] / N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.2e+24], 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 -2.5 \cdot 10^{+18}:\\
\;\;\;\;2 \cdot \frac{\frac{x}{z}}{y - t}\\
\mathbf{elif}\;z \leq 7.2 \cdot 10^{+24}:\\
\;\;\;\;x \cdot \frac{\frac{-2}{t - y}}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z} \cdot \frac{2}{y - t}\\
\end{array}
\end{array}
if z < -2.5e18Initial program 82.6%
associate-*l/82.6%
*-commutative82.6%
distribute-rgt-out--86.6%
associate-/r*94.9%
Simplified94.9%
if -2.5e18 < z < 7.19999999999999966e24Initial program 97.9%
associate-*r/97.1%
distribute-rgt-out--97.7%
associate-/l/97.8%
sub-neg97.8%
+-commutative97.8%
neg-sub097.8%
associate-+l-97.8%
sub0-neg97.8%
neg-mul-197.8%
associate-/r*97.8%
metadata-eval97.8%
Simplified97.8%
if 7.19999999999999966e24 < z Initial program 80.3%
distribute-rgt-out--80.4%
times-frac97.3%
Simplified97.3%
Final simplification97.1%
(FPCore (x y z t)
:precision binary64
(if (<= z -1.5e-24)
(* (/ x (- y t)) (/ 2.0 z))
(if (<= z 6.2e+23)
(* 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 <= -1.5e-24) {
tmp = (x / (y - t)) * (2.0 / z);
} else if (z <= 6.2e+23) {
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 <= (-1.5d-24)) then
tmp = (x / (y - t)) * (2.0d0 / z)
else if (z <= 6.2d+23) 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 <= -1.5e-24) {
tmp = (x / (y - t)) * (2.0 / z);
} else if (z <= 6.2e+23) {
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 <= -1.5e-24: tmp = (x / (y - t)) * (2.0 / z) elif z <= 6.2e+23: 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 <= -1.5e-24) tmp = Float64(Float64(x / Float64(y - t)) * Float64(2.0 / z)); elseif (z <= 6.2e+23) 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 <= -1.5e-24) tmp = (x / (y - t)) * (2.0 / z); elseif (z <= 6.2e+23) 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, -1.5e-24], N[(N[(x / N[(y - t), $MachinePrecision]), $MachinePrecision] * N[(2.0 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.2e+23], 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 -1.5 \cdot 10^{-24}:\\
\;\;\;\;\frac{x}{y - t} \cdot \frac{2}{z}\\
\mathbf{elif}\;z \leq 6.2 \cdot 10^{+23}:\\
\;\;\;\;x \cdot \frac{\frac{-2}{t - y}}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z} \cdot \frac{2}{y - t}\\
\end{array}
\end{array}
if z < -1.49999999999999998e-24Initial program 85.0%
distribute-rgt-out--88.4%
Simplified88.4%
*-commutative88.4%
times-frac98.2%
Applied egg-rr98.2%
if -1.49999999999999998e-24 < z < 6.19999999999999941e23Initial program 97.8%
associate-*r/96.9%
distribute-rgt-out--97.6%
associate-/l/97.7%
sub-neg97.7%
+-commutative97.7%
neg-sub097.7%
associate-+l-97.7%
sub0-neg97.7%
neg-mul-197.7%
associate-/r*97.7%
metadata-eval97.7%
Simplified97.7%
if 6.19999999999999941e23 < z Initial program 80.3%
distribute-rgt-out--80.4%
times-frac97.3%
Simplified97.3%
Final simplification97.7%
(FPCore (x y z t) :precision binary64 (if (<= z -4.2e-63) (* (/ x (- y t)) (/ 2.0 z)) (if (<= z 1e+24) (/ 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 <= -4.2e-63) {
tmp = (x / (y - t)) * (2.0 / z);
} else if (z <= 1e+24) {
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 <= (-4.2d-63)) then
tmp = (x / (y - t)) * (2.0d0 / z)
else if (z <= 1d+24) 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 <= -4.2e-63) {
tmp = (x / (y - t)) * (2.0 / z);
} else if (z <= 1e+24) {
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 <= -4.2e-63: tmp = (x / (y - t)) * (2.0 / z) elif z <= 1e+24: 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 <= -4.2e-63) tmp = Float64(Float64(x / Float64(y - t)) * Float64(2.0 / z)); elseif (z <= 1e+24) 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 <= -4.2e-63) tmp = (x / (y - t)) * (2.0 / z); elseif (z <= 1e+24) 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, -4.2e-63], N[(N[(x / N[(y - t), $MachinePrecision]), $MachinePrecision] * N[(2.0 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1e+24], 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 -4.2 \cdot 10^{-63}:\\
\;\;\;\;\frac{x}{y - t} \cdot \frac{2}{z}\\
\mathbf{elif}\;z \leq 10^{+24}:\\
\;\;\;\;\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 < -4.2e-63Initial program 86.8%
distribute-rgt-out--89.8%
Simplified89.8%
*-commutative89.8%
times-frac98.4%
Applied egg-rr98.4%
if -4.2e-63 < z < 9.9999999999999998e23Initial program 97.7%
distribute-rgt-out--98.4%
times-frac84.1%
Simplified84.1%
frac-times98.4%
*-commutative98.4%
associate-/l*98.4%
Applied egg-rr98.4%
if 9.9999999999999998e23 < z Initial program 80.3%
distribute-rgt-out--80.4%
times-frac97.3%
Simplified97.3%
Final simplification98.2%
(FPCore (x y z t) :precision binary64 (if (<= y -2.2e+102) (/ 2.0 (/ (* y z) x)) (if (<= y 2.35e-33) (/ 2.0 (/ (- (* z t)) x)) (/ (* x 2.0) (* y z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.2e+102) {
tmp = 2.0 / ((y * z) / x);
} else if (y <= 2.35e-33) {
tmp = 2.0 / (-(z * t) / x);
} 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 <= (-2.2d+102)) then
tmp = 2.0d0 / ((y * z) / x)
else if (y <= 2.35d-33) then
tmp = 2.0d0 / (-(z * t) / x)
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 <= -2.2e+102) {
tmp = 2.0 / ((y * z) / x);
} else if (y <= 2.35e-33) {
tmp = 2.0 / (-(z * t) / x);
} else {
tmp = (x * 2.0) / (y * z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -2.2e+102: tmp = 2.0 / ((y * z) / x) elif y <= 2.35e-33: tmp = 2.0 / (-(z * t) / x) else: tmp = (x * 2.0) / (y * z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -2.2e+102) tmp = Float64(2.0 / Float64(Float64(y * z) / x)); elseif (y <= 2.35e-33) tmp = Float64(2.0 / Float64(Float64(-Float64(z * t)) / x)); 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 <= -2.2e+102) tmp = 2.0 / ((y * z) / x); elseif (y <= 2.35e-33) tmp = 2.0 / (-(z * t) / x); else tmp = (x * 2.0) / (y * z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -2.2e+102], N[(2.0 / N[(N[(y * z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.35e-33], N[(2.0 / N[((-N[(z * t), $MachinePrecision]) / x), $MachinePrecision]), $MachinePrecision], N[(N[(x * 2.0), $MachinePrecision] / N[(y * z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.2 \cdot 10^{+102}:\\
\;\;\;\;\frac{2}{\frac{y \cdot z}{x}}\\
\mathbf{elif}\;y \leq 2.35 \cdot 10^{-33}:\\
\;\;\;\;\frac{2}{\frac{-z \cdot t}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot 2}{y \cdot z}\\
\end{array}
\end{array}
if y < -2.20000000000000007e102Initial program 87.5%
associate-*r/87.5%
distribute-rgt-out--89.4%
associate-/l/89.4%
sub-neg89.4%
+-commutative89.4%
neg-sub089.4%
associate-+l-89.4%
sub0-neg89.4%
neg-mul-189.4%
associate-/r*89.4%
metadata-eval89.4%
Simplified89.4%
Taylor expanded in t around 0 78.5%
associate-*r/78.5%
times-frac77.8%
Simplified77.8%
frac-times78.5%
associate-/l*78.7%
*-commutative78.7%
Applied egg-rr78.7%
if -2.20000000000000007e102 < y < 2.3500000000000001e-33Initial program 94.2%
distribute-rgt-out--94.9%
times-frac90.0%
Simplified90.0%
frac-times94.9%
*-commutative94.9%
associate-/l*94.9%
Applied egg-rr94.9%
Taylor expanded in y around 0 76.9%
mul-1-neg76.9%
distribute-lft-neg-out76.9%
*-commutative76.9%
Simplified76.9%
if 2.3500000000000001e-33 < y Initial program 88.7%
distribute-rgt-out--90.2%
Simplified90.2%
Taylor expanded in y around inf 81.8%
Final simplification78.6%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.6e+102) (not (<= y 4.3e-35))) (* x (/ (/ 2.0 y) z)) (* x (/ (/ -2.0 t) z))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.6e+102) || !(y <= 4.3e-35)) {
tmp = x * ((2.0 / y) / z);
} else {
tmp = x * ((-2.0 / t) / 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 <= (-1.6d+102)) .or. (.not. (y <= 4.3d-35))) then
tmp = x * ((2.0d0 / y) / z)
else
tmp = x * (((-2.0d0) / t) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.6e+102) || !(y <= 4.3e-35)) {
tmp = x * ((2.0 / y) / z);
} else {
tmp = x * ((-2.0 / t) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1.6e+102) or not (y <= 4.3e-35): tmp = x * ((2.0 / y) / z) else: tmp = x * ((-2.0 / t) / z) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1.6e+102) || !(y <= 4.3e-35)) tmp = Float64(x * Float64(Float64(2.0 / y) / z)); else tmp = Float64(x * Float64(Float64(-2.0 / t) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -1.6e+102) || ~((y <= 4.3e-35))) tmp = x * ((2.0 / y) / z); else tmp = x * ((-2.0 / t) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1.6e+102], N[Not[LessEqual[y, 4.3e-35]], $MachinePrecision]], N[(x * N[(N[(2.0 / y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(-2.0 / t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.6 \cdot 10^{+102} \lor \neg \left(y \leq 4.3 \cdot 10^{-35}\right):\\
\;\;\;\;x \cdot \frac{\frac{2}{y}}{z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{\frac{-2}{t}}{z}\\
\end{array}
\end{array}
if y < -1.6e102 or 4.3000000000000002e-35 < y Initial program 88.2%
associate-*r/88.2%
distribute-rgt-out--89.8%
associate-/l/89.8%
sub-neg89.8%
+-commutative89.8%
neg-sub089.8%
associate-+l-89.8%
sub0-neg89.8%
neg-mul-189.8%
associate-/r*89.8%
metadata-eval89.8%
Simplified89.8%
Taylor expanded in t around 0 80.3%
if -1.6e102 < y < 4.3000000000000002e-35Initial program 94.2%
associate-*r/93.2%
distribute-rgt-out--93.9%
associate-/l/94.4%
sub-neg94.4%
+-commutative94.4%
neg-sub094.4%
associate-+l-94.4%
sub0-neg94.4%
neg-mul-194.4%
associate-/r*94.4%
metadata-eval94.4%
Simplified94.4%
Taylor expanded in t around inf 76.3%
Final simplification78.2%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.7e+102) (not (<= y 1.9e-33))) (* 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+102) || !(y <= 1.9e-33)) {
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+102)) .or. (.not. (y <= 1.9d-33))) 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+102) || !(y <= 1.9e-33)) {
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+102) or not (y <= 1.9e-33): 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+102) || !(y <= 1.9e-33)) tmp = Float64(x * Float64(Float64(2.0 / 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+102) || ~((y <= 1.9e-33))) 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+102], N[Not[LessEqual[y, 1.9e-33]], $MachinePrecision]], N[(x * N[(N[(2.0 / y), $MachinePrecision] / z), $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^{+102} \lor \neg \left(y \leq 1.9 \cdot 10^{-33}\right):\\
\;\;\;\;x \cdot \frac{\frac{2}{y}}{z}\\
\mathbf{else}:\\
\;\;\;\;-2 \cdot \frac{x}{z \cdot t}\\
\end{array}
\end{array}
if y < -1.7e102 or 1.89999999999999997e-33 < y Initial program 88.2%
associate-*r/88.2%
distribute-rgt-out--89.8%
associate-/l/89.8%
sub-neg89.8%
+-commutative89.8%
neg-sub089.8%
associate-+l-89.8%
sub0-neg89.8%
neg-mul-189.8%
associate-/r*89.8%
metadata-eval89.8%
Simplified89.8%
Taylor expanded in t around 0 80.3%
if -1.7e102 < y < 1.89999999999999997e-33Initial program 94.2%
associate-*r/93.2%
distribute-rgt-out--93.9%
associate-/l/94.4%
sub-neg94.4%
+-commutative94.4%
neg-sub094.4%
associate-+l-94.4%
sub0-neg94.4%
neg-mul-194.4%
associate-/r*94.4%
metadata-eval94.4%
Simplified94.4%
Taylor expanded in t around inf 76.8%
*-commutative76.8%
Simplified76.8%
Final simplification78.5%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.3e+102) (not (<= y 1.18e-33))) (/ 2.0 (/ (* y z) x)) (* -2.0 (/ x (* z t)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.3e+102) || !(y <= 1.18e-33)) {
tmp = 2.0 / ((y * z) / x);
} 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.3d+102)) .or. (.not. (y <= 1.18d-33))) then
tmp = 2.0d0 / ((y * z) / x)
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.3e+102) || !(y <= 1.18e-33)) {
tmp = 2.0 / ((y * z) / x);
} else {
tmp = -2.0 * (x / (z * t));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1.3e+102) or not (y <= 1.18e-33): tmp = 2.0 / ((y * z) / x) else: tmp = -2.0 * (x / (z * t)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1.3e+102) || !(y <= 1.18e-33)) tmp = Float64(2.0 / Float64(Float64(y * z) / x)); 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.3e+102) || ~((y <= 1.18e-33))) tmp = 2.0 / ((y * z) / x); else tmp = -2.0 * (x / (z * t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1.3e+102], N[Not[LessEqual[y, 1.18e-33]], $MachinePrecision]], N[(2.0 / N[(N[(y * z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(-2.0 * N[(x / N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.3 \cdot 10^{+102} \lor \neg \left(y \leq 1.18 \cdot 10^{-33}\right):\\
\;\;\;\;\frac{2}{\frac{y \cdot z}{x}}\\
\mathbf{else}:\\
\;\;\;\;-2 \cdot \frac{x}{z \cdot t}\\
\end{array}
\end{array}
if y < -1.30000000000000003e102 or 1.18e-33 < y Initial program 88.2%
associate-*r/88.2%
distribute-rgt-out--89.8%
associate-/l/89.8%
sub-neg89.8%
+-commutative89.8%
neg-sub089.8%
associate-+l-89.8%
sub0-neg89.8%
neg-mul-189.8%
associate-/r*89.8%
metadata-eval89.8%
Simplified89.8%
Taylor expanded in t around 0 80.4%
associate-*r/80.4%
times-frac77.8%
Simplified77.8%
frac-times80.4%
associate-/l*80.4%
*-commutative80.4%
Applied egg-rr80.4%
if -1.30000000000000003e102 < y < 1.18e-33Initial program 94.2%
associate-*r/93.2%
distribute-rgt-out--93.9%
associate-/l/94.4%
sub-neg94.4%
+-commutative94.4%
neg-sub094.4%
associate-+l-94.4%
sub0-neg94.4%
neg-mul-194.4%
associate-/r*94.4%
metadata-eval94.4%
Simplified94.4%
Taylor expanded in t around inf 76.8%
*-commutative76.8%
Simplified76.8%
Final simplification78.5%
(FPCore (x y z t) :precision binary64 (if (<= y -1.25e+102) (/ 2.0 (/ (* y z) x)) (if (<= y 2.85e-37) (* -2.0 (/ x (* z t))) (/ (* x 2.0) (* y z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.25e+102) {
tmp = 2.0 / ((y * z) / x);
} else if (y <= 2.85e-37) {
tmp = -2.0 * (x / (z * 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 <= (-1.25d+102)) then
tmp = 2.0d0 / ((y * z) / x)
else if (y <= 2.85d-37) then
tmp = (-2.0d0) * (x / (z * 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 <= -1.25e+102) {
tmp = 2.0 / ((y * z) / x);
} else if (y <= 2.85e-37) {
tmp = -2.0 * (x / (z * t));
} else {
tmp = (x * 2.0) / (y * z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.25e+102: tmp = 2.0 / ((y * z) / x) elif y <= 2.85e-37: tmp = -2.0 * (x / (z * t)) else: tmp = (x * 2.0) / (y * z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.25e+102) tmp = Float64(2.0 / Float64(Float64(y * z) / x)); elseif (y <= 2.85e-37) tmp = Float64(-2.0 * Float64(x / Float64(z * 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 <= -1.25e+102) tmp = 2.0 / ((y * z) / x); elseif (y <= 2.85e-37) tmp = -2.0 * (x / (z * t)); else tmp = (x * 2.0) / (y * z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.25e+102], N[(2.0 / N[(N[(y * z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.85e-37], N[(-2.0 * N[(x / N[(z * 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 -1.25 \cdot 10^{+102}:\\
\;\;\;\;\frac{2}{\frac{y \cdot z}{x}}\\
\mathbf{elif}\;y \leq 2.85 \cdot 10^{-37}:\\
\;\;\;\;-2 \cdot \frac{x}{z \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot 2}{y \cdot z}\\
\end{array}
\end{array}
if y < -1.25e102Initial program 87.5%
associate-*r/87.5%
distribute-rgt-out--89.4%
associate-/l/89.4%
sub-neg89.4%
+-commutative89.4%
neg-sub089.4%
associate-+l-89.4%
sub0-neg89.4%
neg-mul-189.4%
associate-/r*89.4%
metadata-eval89.4%
Simplified89.4%
Taylor expanded in t around 0 78.5%
associate-*r/78.5%
times-frac77.8%
Simplified77.8%
frac-times78.5%
associate-/l*78.7%
*-commutative78.7%
Applied egg-rr78.7%
if -1.25e102 < y < 2.84999999999999987e-37Initial program 94.1%
associate-*r/93.1%
distribute-rgt-out--93.9%
associate-/l/94.3%
sub-neg94.3%
+-commutative94.3%
neg-sub094.3%
associate-+l-94.3%
sub0-neg94.3%
neg-mul-194.3%
associate-/r*94.3%
metadata-eval94.3%
Simplified94.3%
Taylor expanded in t around inf 77.2%
*-commutative77.2%
Simplified77.2%
if 2.84999999999999987e-37 < y Initial program 89.0%
distribute-rgt-out--90.4%
Simplified90.4%
Taylor expanded in y around inf 80.9%
Final simplification78.5%
(FPCore (x y z t) :precision binary64 (* 2.0 (/ (/ x z) (- y t))))
double code(double x, double y, double z, double t) {
return 2.0 * ((x / z) / (y - 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) / (y - t))
end function
public static double code(double x, double y, double z, double t) {
return 2.0 * ((x / z) / (y - t));
}
def code(x, y, z, t): return 2.0 * ((x / z) / (y - t))
function code(x, y, z, t) return Float64(2.0 * Float64(Float64(x / z) / Float64(y - t))) end
function tmp = code(x, y, z, t) tmp = 2.0 * ((x / z) / (y - t)); end
code[x_, y_, z_, t_] := N[(2.0 * N[(N[(x / z), $MachinePrecision] / N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
2 \cdot \frac{\frac{x}{z}}{y - t}
\end{array}
Initial program 91.3%
associate-*l/91.3%
*-commutative91.3%
distribute-rgt-out--92.5%
associate-/r*89.5%
Simplified89.5%
Final simplification89.5%
(FPCore (x y z t) :precision binary64 (* x (/ (/ -2.0 t) z)))
double code(double x, double y, double z, double t) {
return x * ((-2.0 / 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) / t) / z)
end function
public static double code(double x, double y, double z, double t) {
return x * ((-2.0 / t) / z);
}
def code(x, y, z, t): return x * ((-2.0 / t) / z)
function code(x, y, z, t) return Float64(x * Float64(Float64(-2.0 / t) / z)) end
function tmp = code(x, y, z, t) tmp = x * ((-2.0 / t) / z); end
code[x_, y_, z_, t_] := N[(x * N[(N[(-2.0 / t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \frac{\frac{-2}{t}}{z}
\end{array}
Initial program 91.3%
associate-*r/90.8%
distribute-rgt-out--92.0%
associate-/l/92.2%
sub-neg92.2%
+-commutative92.2%
neg-sub092.2%
associate-+l-92.2%
sub0-neg92.2%
neg-mul-192.2%
associate-/r*92.2%
metadata-eval92.2%
Simplified92.2%
Taylor expanded in t around inf 53.6%
Final simplification53.6%
(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 2023257
(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))))