
(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 13 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 -1e+222)
(/ (/ 2.0 (- y t)) (/ z x))
(if (<= t_1 2e+199) (/ (* 2.0 x) t_1) (* 2.0 (/ (/ x z) (- y t)))))))
double code(double x, double y, double z, double t) {
double t_1 = (y * z) - (z * t);
double tmp;
if (t_1 <= -1e+222) {
tmp = (2.0 / (y - t)) / (z / x);
} else if (t_1 <= 2e+199) {
tmp = (2.0 * x) / t_1;
} 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 = (y * z) - (z * t)
if (t_1 <= (-1d+222)) then
tmp = (2.0d0 / (y - t)) / (z / x)
else if (t_1 <= 2d+199) then
tmp = (2.0d0 * x) / t_1
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 = (y * z) - (z * t);
double tmp;
if (t_1 <= -1e+222) {
tmp = (2.0 / (y - t)) / (z / x);
} else if (t_1 <= 2e+199) {
tmp = (2.0 * x) / t_1;
} else {
tmp = 2.0 * ((x / z) / (y - t));
}
return tmp;
}
def code(x, y, z, t): t_1 = (y * z) - (z * t) tmp = 0 if t_1 <= -1e+222: tmp = (2.0 / (y - t)) / (z / x) elif t_1 <= 2e+199: tmp = (2.0 * x) / t_1 else: tmp = 2.0 * ((x / z) / (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 <= -1e+222) tmp = Float64(Float64(2.0 / Float64(y - t)) / Float64(z / x)); elseif (t_1 <= 2e+199) tmp = Float64(Float64(2.0 * x) / t_1); 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 = (y * z) - (z * t); tmp = 0.0; if (t_1 <= -1e+222) tmp = (2.0 / (y - t)) / (z / x); elseif (t_1 <= 2e+199) tmp = (2.0 * x) / t_1; else tmp = 2.0 * ((x / z) / (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, -1e+222], N[(N[(2.0 / N[(y - t), $MachinePrecision]), $MachinePrecision] / N[(z / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+199], N[(N[(2.0 * x), $MachinePrecision] / t$95$1), $MachinePrecision], N[(2.0 * N[(N[(x / z), $MachinePrecision] / 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 -1 \cdot 10^{+222}:\\
\;\;\;\;\frac{\frac{2}{y - t}}{\frac{z}{x}}\\
\mathbf{elif}\;t_1 \leq 2 \cdot 10^{+199}:\\
\;\;\;\;\frac{2 \cdot x}{t_1}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{\frac{x}{z}}{y - t}\\
\end{array}
\end{array}
if (-.f64 (*.f64 y z) (*.f64 t z)) < -1e222Initial program 77.8%
*-commutative77.8%
associate-*r/77.7%
distribute-rgt-out--77.7%
associate-/r*99.7%
Simplified99.7%
associate-*r/99.7%
*-commutative99.7%
associate-*r/99.7%
clear-num99.6%
associate-*l/99.8%
*-un-lft-identity99.8%
Applied egg-rr99.8%
if -1e222 < (-.f64 (*.f64 y z) (*.f64 t z)) < 2.00000000000000019e199Initial program 98.3%
if 2.00000000000000019e199 < (-.f64 (*.f64 y z) (*.f64 t z)) Initial program 70.8%
*-commutative70.8%
associate-*r/70.8%
distribute-rgt-out--79.1%
associate-/r*99.9%
Simplified99.9%
Final simplification98.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* 2.0 (/ (/ x z) y))) (t_2 (* -2.0 (/ x (* z t)))))
(if (<= t -1.68e+44)
(* x (/ (/ -2.0 z) t))
(if (<= t -3.8e-17)
t_1
(if (<= t -2.55e-80)
t_2
(if (<= t 9e-87)
(/ (/ x y) (* z 0.5))
(if (<= t 7.8e-37)
t_2
(if (<= t 7.6e+52) t_1 (/ (* x (/ 2.0 z)) (- t))))))))))
double code(double x, double y, double z, double t) {
double t_1 = 2.0 * ((x / z) / y);
double t_2 = -2.0 * (x / (z * t));
double tmp;
if (t <= -1.68e+44) {
tmp = x * ((-2.0 / z) / t);
} else if (t <= -3.8e-17) {
tmp = t_1;
} else if (t <= -2.55e-80) {
tmp = t_2;
} else if (t <= 9e-87) {
tmp = (x / y) / (z * 0.5);
} else if (t <= 7.8e-37) {
tmp = t_2;
} else if (t <= 7.6e+52) {
tmp = t_1;
} else {
tmp = (x * (2.0 / 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) :: t_2
real(8) :: tmp
t_1 = 2.0d0 * ((x / z) / y)
t_2 = (-2.0d0) * (x / (z * t))
if (t <= (-1.68d+44)) then
tmp = x * (((-2.0d0) / z) / t)
else if (t <= (-3.8d-17)) then
tmp = t_1
else if (t <= (-2.55d-80)) then
tmp = t_2
else if (t <= 9d-87) then
tmp = (x / y) / (z * 0.5d0)
else if (t <= 7.8d-37) then
tmp = t_2
else if (t <= 7.6d+52) then
tmp = t_1
else
tmp = (x * (2.0d0 / z)) / -t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = 2.0 * ((x / z) / y);
double t_2 = -2.0 * (x / (z * t));
double tmp;
if (t <= -1.68e+44) {
tmp = x * ((-2.0 / z) / t);
} else if (t <= -3.8e-17) {
tmp = t_1;
} else if (t <= -2.55e-80) {
tmp = t_2;
} else if (t <= 9e-87) {
tmp = (x / y) / (z * 0.5);
} else if (t <= 7.8e-37) {
tmp = t_2;
} else if (t <= 7.6e+52) {
tmp = t_1;
} else {
tmp = (x * (2.0 / z)) / -t;
}
return tmp;
}
def code(x, y, z, t): t_1 = 2.0 * ((x / z) / y) t_2 = -2.0 * (x / (z * t)) tmp = 0 if t <= -1.68e+44: tmp = x * ((-2.0 / z) / t) elif t <= -3.8e-17: tmp = t_1 elif t <= -2.55e-80: tmp = t_2 elif t <= 9e-87: tmp = (x / y) / (z * 0.5) elif t <= 7.8e-37: tmp = t_2 elif t <= 7.6e+52: tmp = t_1 else: tmp = (x * (2.0 / z)) / -t return tmp
function code(x, y, z, t) t_1 = Float64(2.0 * Float64(Float64(x / z) / y)) t_2 = Float64(-2.0 * Float64(x / Float64(z * t))) tmp = 0.0 if (t <= -1.68e+44) tmp = Float64(x * Float64(Float64(-2.0 / z) / t)); elseif (t <= -3.8e-17) tmp = t_1; elseif (t <= -2.55e-80) tmp = t_2; elseif (t <= 9e-87) tmp = Float64(Float64(x / y) / Float64(z * 0.5)); elseif (t <= 7.8e-37) tmp = t_2; elseif (t <= 7.6e+52) tmp = t_1; else tmp = Float64(Float64(x * Float64(2.0 / z)) / Float64(-t)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = 2.0 * ((x / z) / y); t_2 = -2.0 * (x / (z * t)); tmp = 0.0; if (t <= -1.68e+44) tmp = x * ((-2.0 / z) / t); elseif (t <= -3.8e-17) tmp = t_1; elseif (t <= -2.55e-80) tmp = t_2; elseif (t <= 9e-87) tmp = (x / y) / (z * 0.5); elseif (t <= 7.8e-37) tmp = t_2; elseif (t <= 7.6e+52) tmp = t_1; else tmp = (x * (2.0 / z)) / -t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(2.0 * N[(N[(x / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-2.0 * N[(x / N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.68e+44], N[(x * N[(N[(-2.0 / z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -3.8e-17], t$95$1, If[LessEqual[t, -2.55e-80], t$95$2, If[LessEqual[t, 9e-87], N[(N[(x / y), $MachinePrecision] / N[(z * 0.5), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.8e-37], t$95$2, If[LessEqual[t, 7.6e+52], t$95$1, N[(N[(x * N[(2.0 / z), $MachinePrecision]), $MachinePrecision] / (-t)), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \frac{\frac{x}{z}}{y}\\
t_2 := -2 \cdot \frac{x}{z \cdot t}\\
\mathbf{if}\;t \leq -1.68 \cdot 10^{+44}:\\
\;\;\;\;x \cdot \frac{\frac{-2}{z}}{t}\\
\mathbf{elif}\;t \leq -3.8 \cdot 10^{-17}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -2.55 \cdot 10^{-80}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 9 \cdot 10^{-87}:\\
\;\;\;\;\frac{\frac{x}{y}}{z \cdot 0.5}\\
\mathbf{elif}\;t \leq 7.8 \cdot 10^{-37}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 7.6 \cdot 10^{+52}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot \frac{2}{z}}{-t}\\
\end{array}
\end{array}
if t < -1.68000000000000001e44Initial program 86.2%
*-commutative86.2%
associate-*r/86.1%
distribute-rgt-out--90.3%
associate-/r*92.2%
Simplified92.2%
Taylor expanded in y around 0 88.1%
associate-/r*88.2%
clear-num86.9%
un-div-inv86.9%
div-inv85.8%
clear-num85.9%
Applied egg-rr85.9%
associate-/r*87.1%
associate-/r/88.3%
Applied egg-rr88.3%
if -1.68000000000000001e44 < t < -3.8000000000000001e-17 or 7.79999999999999981e-37 < t < 7.5999999999999999e52Initial program 92.7%
*-commutative92.7%
associate-*r/92.7%
distribute-rgt-out--92.7%
associate-/r*99.7%
Simplified99.7%
associate-*r/99.7%
*-commutative99.7%
associate-*r/99.5%
clear-num99.4%
associate-*l/99.7%
*-un-lft-identity99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 58.7%
*-commutative58.7%
associate-/r*76.1%
Simplified76.1%
if -3.8000000000000001e-17 < t < -2.55000000000000004e-80 or 8.99999999999999915e-87 < t < 7.79999999999999981e-37Initial program 96.4%
*-commutative96.4%
associate-*r/96.3%
distribute-rgt-out--96.3%
associate-/r*89.7%
Simplified89.7%
Taylor expanded in y around 0 73.1%
if -2.55000000000000004e-80 < t < 8.99999999999999915e-87Initial program 92.5%
*-commutative92.5%
associate-*r/92.5%
distribute-rgt-out--92.5%
associate-/r*92.1%
Simplified92.1%
associate-*r/92.1%
*-commutative92.1%
associate-*r/92.0%
clear-num92.0%
associate-*l/92.0%
*-un-lft-identity92.0%
Applied egg-rr92.0%
Taylor expanded in y around inf 85.5%
*-commutative85.5%
associate-/r*83.7%
Simplified83.7%
associate-/r*85.5%
associate-*r/85.5%
frac-times86.2%
clear-num86.2%
associate-*l/87.2%
*-un-lft-identity87.2%
div-inv87.2%
metadata-eval87.2%
Applied egg-rr87.2%
if 7.5999999999999999e52 < t Initial program 84.8%
*-commutative84.8%
associate-*r/84.8%
distribute-rgt-out--88.4%
associate-/r*91.5%
Simplified91.5%
Taylor expanded in y around 0 81.8%
associate-*r/81.8%
metadata-eval81.8%
associate-*r*81.8%
neg-mul-181.8%
*-commutative81.8%
frac-times80.0%
frac-2neg80.0%
remove-double-neg80.0%
associate-*l/83.3%
Applied egg-rr83.3%
Final simplification83.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* 2.0 (/ (/ x z) y))) (t_2 (* -2.0 (/ x (* z t)))))
(if (<= t -1.6e+44)
t_2
(if (<= t -1.06e-18)
t_1
(if (<= t -6.4e-75)
t_2
(if (<= t 8.5e-87)
(* x (/ 2.0 (* y z)))
(if (or (<= t 8.2e-37) (not (<= t 9.6e+50))) t_2 t_1)))))))
double code(double x, double y, double z, double t) {
double t_1 = 2.0 * ((x / z) / y);
double t_2 = -2.0 * (x / (z * t));
double tmp;
if (t <= -1.6e+44) {
tmp = t_2;
} else if (t <= -1.06e-18) {
tmp = t_1;
} else if (t <= -6.4e-75) {
tmp = t_2;
} else if (t <= 8.5e-87) {
tmp = x * (2.0 / (y * z));
} else if ((t <= 8.2e-37) || !(t <= 9.6e+50)) {
tmp = t_2;
} 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 = 2.0d0 * ((x / z) / y)
t_2 = (-2.0d0) * (x / (z * t))
if (t <= (-1.6d+44)) then
tmp = t_2
else if (t <= (-1.06d-18)) then
tmp = t_1
else if (t <= (-6.4d-75)) then
tmp = t_2
else if (t <= 8.5d-87) then
tmp = x * (2.0d0 / (y * z))
else if ((t <= 8.2d-37) .or. (.not. (t <= 9.6d+50))) then
tmp = t_2
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 = 2.0 * ((x / z) / y);
double t_2 = -2.0 * (x / (z * t));
double tmp;
if (t <= -1.6e+44) {
tmp = t_2;
} else if (t <= -1.06e-18) {
tmp = t_1;
} else if (t <= -6.4e-75) {
tmp = t_2;
} else if (t <= 8.5e-87) {
tmp = x * (2.0 / (y * z));
} else if ((t <= 8.2e-37) || !(t <= 9.6e+50)) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = 2.0 * ((x / z) / y) t_2 = -2.0 * (x / (z * t)) tmp = 0 if t <= -1.6e+44: tmp = t_2 elif t <= -1.06e-18: tmp = t_1 elif t <= -6.4e-75: tmp = t_2 elif t <= 8.5e-87: tmp = x * (2.0 / (y * z)) elif (t <= 8.2e-37) or not (t <= 9.6e+50): tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(2.0 * Float64(Float64(x / z) / y)) t_2 = Float64(-2.0 * Float64(x / Float64(z * t))) tmp = 0.0 if (t <= -1.6e+44) tmp = t_2; elseif (t <= -1.06e-18) tmp = t_1; elseif (t <= -6.4e-75) tmp = t_2; elseif (t <= 8.5e-87) tmp = Float64(x * Float64(2.0 / Float64(y * z))); elseif ((t <= 8.2e-37) || !(t <= 9.6e+50)) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = 2.0 * ((x / z) / y); t_2 = -2.0 * (x / (z * t)); tmp = 0.0; if (t <= -1.6e+44) tmp = t_2; elseif (t <= -1.06e-18) tmp = t_1; elseif (t <= -6.4e-75) tmp = t_2; elseif (t <= 8.5e-87) tmp = x * (2.0 / (y * z)); elseif ((t <= 8.2e-37) || ~((t <= 9.6e+50))) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(2.0 * N[(N[(x / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-2.0 * N[(x / N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.6e+44], t$95$2, If[LessEqual[t, -1.06e-18], t$95$1, If[LessEqual[t, -6.4e-75], t$95$2, If[LessEqual[t, 8.5e-87], N[(x * N[(2.0 / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, 8.2e-37], N[Not[LessEqual[t, 9.6e+50]], $MachinePrecision]], t$95$2, t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \frac{\frac{x}{z}}{y}\\
t_2 := -2 \cdot \frac{x}{z \cdot t}\\
\mathbf{if}\;t \leq -1.6 \cdot 10^{+44}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -1.06 \cdot 10^{-18}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -6.4 \cdot 10^{-75}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 8.5 \cdot 10^{-87}:\\
\;\;\;\;x \cdot \frac{2}{y \cdot z}\\
\mathbf{elif}\;t \leq 8.2 \cdot 10^{-37} \lor \neg \left(t \leq 9.6 \cdot 10^{+50}\right):\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -1.60000000000000002e44 or -1.05999999999999994e-18 < t < -6.39999999999999953e-75 or 8.5000000000000001e-87 < t < 8.1999999999999996e-37 or 9.6000000000000007e50 < t Initial program 87.7%
*-commutative87.7%
associate-*r/87.6%
distribute-rgt-out--90.7%
associate-/r*91.4%
Simplified91.4%
Taylor expanded in y around 0 82.3%
if -1.60000000000000002e44 < t < -1.05999999999999994e-18 or 8.1999999999999996e-37 < t < 9.6000000000000007e50Initial program 92.7%
*-commutative92.7%
associate-*r/92.7%
distribute-rgt-out--92.7%
associate-/r*99.7%
Simplified99.7%
associate-*r/99.7%
*-commutative99.7%
associate-*r/99.5%
clear-num99.4%
associate-*l/99.7%
*-un-lft-identity99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 58.7%
*-commutative58.7%
associate-/r*76.1%
Simplified76.1%
if -6.39999999999999953e-75 < t < 8.5000000000000001e-87Initial program 92.5%
*-commutative92.5%
associate-*r/92.5%
distribute-rgt-out--92.5%
associate-/r*92.1%
Simplified92.1%
Taylor expanded in x around 0 92.5%
*-commutative92.5%
associate-/r/92.5%
associate-/l*92.4%
associate-/l*94.7%
associate-*r/91.9%
Simplified91.9%
Taylor expanded in y around inf 85.4%
*-commutative85.4%
Simplified85.4%
Final simplification82.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* 2.0 (/ (/ x z) y))) (t_2 (* -2.0 (/ x (* z t)))))
(if (<= t -1.68e+44)
t_2
(if (<= t -1.22e-17)
t_1
(if (<= t -7.2e-88)
t_2
(if (<= t 6e-89)
(* (/ 2.0 z) (/ x y))
(if (or (<= t 4.5e-38) (not (<= t 1.32e+51))) t_2 t_1)))))))
double code(double x, double y, double z, double t) {
double t_1 = 2.0 * ((x / z) / y);
double t_2 = -2.0 * (x / (z * t));
double tmp;
if (t <= -1.68e+44) {
tmp = t_2;
} else if (t <= -1.22e-17) {
tmp = t_1;
} else if (t <= -7.2e-88) {
tmp = t_2;
} else if (t <= 6e-89) {
tmp = (2.0 / z) * (x / y);
} else if ((t <= 4.5e-38) || !(t <= 1.32e+51)) {
tmp = t_2;
} 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 = 2.0d0 * ((x / z) / y)
t_2 = (-2.0d0) * (x / (z * t))
if (t <= (-1.68d+44)) then
tmp = t_2
else if (t <= (-1.22d-17)) then
tmp = t_1
else if (t <= (-7.2d-88)) then
tmp = t_2
else if (t <= 6d-89) then
tmp = (2.0d0 / z) * (x / y)
else if ((t <= 4.5d-38) .or. (.not. (t <= 1.32d+51))) then
tmp = t_2
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 = 2.0 * ((x / z) / y);
double t_2 = -2.0 * (x / (z * t));
double tmp;
if (t <= -1.68e+44) {
tmp = t_2;
} else if (t <= -1.22e-17) {
tmp = t_1;
} else if (t <= -7.2e-88) {
tmp = t_2;
} else if (t <= 6e-89) {
tmp = (2.0 / z) * (x / y);
} else if ((t <= 4.5e-38) || !(t <= 1.32e+51)) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = 2.0 * ((x / z) / y) t_2 = -2.0 * (x / (z * t)) tmp = 0 if t <= -1.68e+44: tmp = t_2 elif t <= -1.22e-17: tmp = t_1 elif t <= -7.2e-88: tmp = t_2 elif t <= 6e-89: tmp = (2.0 / z) * (x / y) elif (t <= 4.5e-38) or not (t <= 1.32e+51): tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(2.0 * Float64(Float64(x / z) / y)) t_2 = Float64(-2.0 * Float64(x / Float64(z * t))) tmp = 0.0 if (t <= -1.68e+44) tmp = t_2; elseif (t <= -1.22e-17) tmp = t_1; elseif (t <= -7.2e-88) tmp = t_2; elseif (t <= 6e-89) tmp = Float64(Float64(2.0 / z) * Float64(x / y)); elseif ((t <= 4.5e-38) || !(t <= 1.32e+51)) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = 2.0 * ((x / z) / y); t_2 = -2.0 * (x / (z * t)); tmp = 0.0; if (t <= -1.68e+44) tmp = t_2; elseif (t <= -1.22e-17) tmp = t_1; elseif (t <= -7.2e-88) tmp = t_2; elseif (t <= 6e-89) tmp = (2.0 / z) * (x / y); elseif ((t <= 4.5e-38) || ~((t <= 1.32e+51))) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(2.0 * N[(N[(x / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-2.0 * N[(x / N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.68e+44], t$95$2, If[LessEqual[t, -1.22e-17], t$95$1, If[LessEqual[t, -7.2e-88], t$95$2, If[LessEqual[t, 6e-89], N[(N[(2.0 / z), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, 4.5e-38], N[Not[LessEqual[t, 1.32e+51]], $MachinePrecision]], t$95$2, t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \frac{\frac{x}{z}}{y}\\
t_2 := -2 \cdot \frac{x}{z \cdot t}\\
\mathbf{if}\;t \leq -1.68 \cdot 10^{+44}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -1.22 \cdot 10^{-17}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -7.2 \cdot 10^{-88}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 6 \cdot 10^{-89}:\\
\;\;\;\;\frac{2}{z} \cdot \frac{x}{y}\\
\mathbf{elif}\;t \leq 4.5 \cdot 10^{-38} \lor \neg \left(t \leq 1.32 \cdot 10^{+51}\right):\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -1.68000000000000001e44 or -1.22e-17 < t < -7.1999999999999999e-88 or 5.9999999999999999e-89 < t < 4.50000000000000009e-38 or 1.32e51 < t Initial program 87.7%
*-commutative87.7%
associate-*r/87.6%
distribute-rgt-out--90.7%
associate-/r*91.4%
Simplified91.4%
Taylor expanded in y around 0 82.3%
if -1.68000000000000001e44 < t < -1.22e-17 or 4.50000000000000009e-38 < t < 1.32e51Initial program 92.7%
*-commutative92.7%
associate-*r/92.7%
distribute-rgt-out--92.7%
associate-/r*99.7%
Simplified99.7%
associate-*r/99.7%
*-commutative99.7%
associate-*r/99.5%
clear-num99.4%
associate-*l/99.7%
*-un-lft-identity99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 58.7%
*-commutative58.7%
associate-/r*76.1%
Simplified76.1%
if -7.1999999999999999e-88 < t < 5.9999999999999999e-89Initial program 92.5%
*-commutative92.5%
associate-*r/92.5%
distribute-rgt-out--92.5%
associate-/r*92.1%
Simplified92.1%
Taylor expanded in y around inf 85.5%
associate-*r/85.5%
*-commutative85.5%
times-frac86.2%
Simplified86.2%
Final simplification83.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* 2.0 (/ (/ x z) y))) (t_2 (* -2.0 (/ x (* z t)))))
(if (<= t -1.6e+44)
(* x (/ (/ -2.0 z) t))
(if (<= t -2.75e-18)
t_1
(if (<= t -3e-79)
t_2
(if (<= t 2.1e-88)
(* (/ 2.0 z) (/ x y))
(if (or (<= t 4.3e-38) (not (<= t 3.8e+51))) t_2 t_1)))))))
double code(double x, double y, double z, double t) {
double t_1 = 2.0 * ((x / z) / y);
double t_2 = -2.0 * (x / (z * t));
double tmp;
if (t <= -1.6e+44) {
tmp = x * ((-2.0 / z) / t);
} else if (t <= -2.75e-18) {
tmp = t_1;
} else if (t <= -3e-79) {
tmp = t_2;
} else if (t <= 2.1e-88) {
tmp = (2.0 / z) * (x / y);
} else if ((t <= 4.3e-38) || !(t <= 3.8e+51)) {
tmp = t_2;
} 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 = 2.0d0 * ((x / z) / y)
t_2 = (-2.0d0) * (x / (z * t))
if (t <= (-1.6d+44)) then
tmp = x * (((-2.0d0) / z) / t)
else if (t <= (-2.75d-18)) then
tmp = t_1
else if (t <= (-3d-79)) then
tmp = t_2
else if (t <= 2.1d-88) then
tmp = (2.0d0 / z) * (x / y)
else if ((t <= 4.3d-38) .or. (.not. (t <= 3.8d+51))) then
tmp = t_2
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 = 2.0 * ((x / z) / y);
double t_2 = -2.0 * (x / (z * t));
double tmp;
if (t <= -1.6e+44) {
tmp = x * ((-2.0 / z) / t);
} else if (t <= -2.75e-18) {
tmp = t_1;
} else if (t <= -3e-79) {
tmp = t_2;
} else if (t <= 2.1e-88) {
tmp = (2.0 / z) * (x / y);
} else if ((t <= 4.3e-38) || !(t <= 3.8e+51)) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = 2.0 * ((x / z) / y) t_2 = -2.0 * (x / (z * t)) tmp = 0 if t <= -1.6e+44: tmp = x * ((-2.0 / z) / t) elif t <= -2.75e-18: tmp = t_1 elif t <= -3e-79: tmp = t_2 elif t <= 2.1e-88: tmp = (2.0 / z) * (x / y) elif (t <= 4.3e-38) or not (t <= 3.8e+51): tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(2.0 * Float64(Float64(x / z) / y)) t_2 = Float64(-2.0 * Float64(x / Float64(z * t))) tmp = 0.0 if (t <= -1.6e+44) tmp = Float64(x * Float64(Float64(-2.0 / z) / t)); elseif (t <= -2.75e-18) tmp = t_1; elseif (t <= -3e-79) tmp = t_2; elseif (t <= 2.1e-88) tmp = Float64(Float64(2.0 / z) * Float64(x / y)); elseif ((t <= 4.3e-38) || !(t <= 3.8e+51)) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = 2.0 * ((x / z) / y); t_2 = -2.0 * (x / (z * t)); tmp = 0.0; if (t <= -1.6e+44) tmp = x * ((-2.0 / z) / t); elseif (t <= -2.75e-18) tmp = t_1; elseif (t <= -3e-79) tmp = t_2; elseif (t <= 2.1e-88) tmp = (2.0 / z) * (x / y); elseif ((t <= 4.3e-38) || ~((t <= 3.8e+51))) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(2.0 * N[(N[(x / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-2.0 * N[(x / N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.6e+44], N[(x * N[(N[(-2.0 / z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -2.75e-18], t$95$1, If[LessEqual[t, -3e-79], t$95$2, If[LessEqual[t, 2.1e-88], N[(N[(2.0 / z), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, 4.3e-38], N[Not[LessEqual[t, 3.8e+51]], $MachinePrecision]], t$95$2, t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \frac{\frac{x}{z}}{y}\\
t_2 := -2 \cdot \frac{x}{z \cdot t}\\
\mathbf{if}\;t \leq -1.6 \cdot 10^{+44}:\\
\;\;\;\;x \cdot \frac{\frac{-2}{z}}{t}\\
\mathbf{elif}\;t \leq -2.75 \cdot 10^{-18}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -3 \cdot 10^{-79}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 2.1 \cdot 10^{-88}:\\
\;\;\;\;\frac{2}{z} \cdot \frac{x}{y}\\
\mathbf{elif}\;t \leq 4.3 \cdot 10^{-38} \lor \neg \left(t \leq 3.8 \cdot 10^{+51}\right):\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -1.60000000000000002e44Initial program 86.2%
*-commutative86.2%
associate-*r/86.1%
distribute-rgt-out--90.3%
associate-/r*92.2%
Simplified92.2%
Taylor expanded in y around 0 88.1%
associate-/r*88.2%
clear-num86.9%
un-div-inv86.9%
div-inv85.8%
clear-num85.9%
Applied egg-rr85.9%
associate-/r*87.1%
associate-/r/88.3%
Applied egg-rr88.3%
if -1.60000000000000002e44 < t < -2.75e-18 or 4.3000000000000002e-38 < t < 3.7999999999999997e51Initial program 92.7%
*-commutative92.7%
associate-*r/92.7%
distribute-rgt-out--92.7%
associate-/r*99.7%
Simplified99.7%
associate-*r/99.7%
*-commutative99.7%
associate-*r/99.5%
clear-num99.4%
associate-*l/99.7%
*-un-lft-identity99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 58.7%
*-commutative58.7%
associate-/r*76.1%
Simplified76.1%
if -2.75e-18 < t < -3e-79 or 2.1e-88 < t < 4.3000000000000002e-38 or 3.7999999999999997e51 < t Initial program 88.6%
*-commutative88.6%
associate-*r/88.5%
distribute-rgt-out--90.9%
associate-/r*90.9%
Simplified90.9%
Taylor expanded in y around 0 79.0%
if -3e-79 < t < 2.1e-88Initial program 92.5%
*-commutative92.5%
associate-*r/92.5%
distribute-rgt-out--92.5%
associate-/r*92.1%
Simplified92.1%
Taylor expanded in y around inf 85.5%
associate-*r/85.5%
*-commutative85.5%
times-frac86.2%
Simplified86.2%
Final simplification83.2%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* 2.0 (/ (/ x z) y))) (t_2 (* -2.0 (/ x (* z t)))))
(if (<= t -1.7e+44)
(* x (/ (/ -2.0 z) t))
(if (<= t -3.3e-15)
t_1
(if (<= t -2e-76)
t_2
(if (<= t 8e-89)
(* (/ 2.0 z) (/ x y))
(if (<= t 4.6e-38)
t_2
(if (<= t 2.1e+52) t_1 (/ (/ -2.0 (/ z x)) t)))))))))
double code(double x, double y, double z, double t) {
double t_1 = 2.0 * ((x / z) / y);
double t_2 = -2.0 * (x / (z * t));
double tmp;
if (t <= -1.7e+44) {
tmp = x * ((-2.0 / z) / t);
} else if (t <= -3.3e-15) {
tmp = t_1;
} else if (t <= -2e-76) {
tmp = t_2;
} else if (t <= 8e-89) {
tmp = (2.0 / z) * (x / y);
} else if (t <= 4.6e-38) {
tmp = t_2;
} else if (t <= 2.1e+52) {
tmp = t_1;
} else {
tmp = (-2.0 / (z / x)) / t;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 2.0d0 * ((x / z) / y)
t_2 = (-2.0d0) * (x / (z * t))
if (t <= (-1.7d+44)) then
tmp = x * (((-2.0d0) / z) / t)
else if (t <= (-3.3d-15)) then
tmp = t_1
else if (t <= (-2d-76)) then
tmp = t_2
else if (t <= 8d-89) then
tmp = (2.0d0 / z) * (x / y)
else if (t <= 4.6d-38) then
tmp = t_2
else if (t <= 2.1d+52) then
tmp = t_1
else
tmp = ((-2.0d0) / (z / x)) / t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = 2.0 * ((x / z) / y);
double t_2 = -2.0 * (x / (z * t));
double tmp;
if (t <= -1.7e+44) {
tmp = x * ((-2.0 / z) / t);
} else if (t <= -3.3e-15) {
tmp = t_1;
} else if (t <= -2e-76) {
tmp = t_2;
} else if (t <= 8e-89) {
tmp = (2.0 / z) * (x / y);
} else if (t <= 4.6e-38) {
tmp = t_2;
} else if (t <= 2.1e+52) {
tmp = t_1;
} else {
tmp = (-2.0 / (z / x)) / t;
}
return tmp;
}
def code(x, y, z, t): t_1 = 2.0 * ((x / z) / y) t_2 = -2.0 * (x / (z * t)) tmp = 0 if t <= -1.7e+44: tmp = x * ((-2.0 / z) / t) elif t <= -3.3e-15: tmp = t_1 elif t <= -2e-76: tmp = t_2 elif t <= 8e-89: tmp = (2.0 / z) * (x / y) elif t <= 4.6e-38: tmp = t_2 elif t <= 2.1e+52: tmp = t_1 else: tmp = (-2.0 / (z / x)) / t return tmp
function code(x, y, z, t) t_1 = Float64(2.0 * Float64(Float64(x / z) / y)) t_2 = Float64(-2.0 * Float64(x / Float64(z * t))) tmp = 0.0 if (t <= -1.7e+44) tmp = Float64(x * Float64(Float64(-2.0 / z) / t)); elseif (t <= -3.3e-15) tmp = t_1; elseif (t <= -2e-76) tmp = t_2; elseif (t <= 8e-89) tmp = Float64(Float64(2.0 / z) * Float64(x / y)); elseif (t <= 4.6e-38) tmp = t_2; elseif (t <= 2.1e+52) tmp = t_1; else tmp = Float64(Float64(-2.0 / Float64(z / x)) / t); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = 2.0 * ((x / z) / y); t_2 = -2.0 * (x / (z * t)); tmp = 0.0; if (t <= -1.7e+44) tmp = x * ((-2.0 / z) / t); elseif (t <= -3.3e-15) tmp = t_1; elseif (t <= -2e-76) tmp = t_2; elseif (t <= 8e-89) tmp = (2.0 / z) * (x / y); elseif (t <= 4.6e-38) tmp = t_2; elseif (t <= 2.1e+52) tmp = t_1; else tmp = (-2.0 / (z / x)) / t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(2.0 * N[(N[(x / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-2.0 * N[(x / N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.7e+44], N[(x * N[(N[(-2.0 / z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -3.3e-15], t$95$1, If[LessEqual[t, -2e-76], t$95$2, If[LessEqual[t, 8e-89], N[(N[(2.0 / z), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.6e-38], t$95$2, If[LessEqual[t, 2.1e+52], t$95$1, N[(N[(-2.0 / N[(z / x), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \frac{\frac{x}{z}}{y}\\
t_2 := -2 \cdot \frac{x}{z \cdot t}\\
\mathbf{if}\;t \leq -1.7 \cdot 10^{+44}:\\
\;\;\;\;x \cdot \frac{\frac{-2}{z}}{t}\\
\mathbf{elif}\;t \leq -3.3 \cdot 10^{-15}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -2 \cdot 10^{-76}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 8 \cdot 10^{-89}:\\
\;\;\;\;\frac{2}{z} \cdot \frac{x}{y}\\
\mathbf{elif}\;t \leq 4.6 \cdot 10^{-38}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 2.1 \cdot 10^{+52}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{-2}{\frac{z}{x}}}{t}\\
\end{array}
\end{array}
if t < -1.7e44Initial program 86.2%
*-commutative86.2%
associate-*r/86.1%
distribute-rgt-out--90.3%
associate-/r*92.2%
Simplified92.2%
Taylor expanded in y around 0 88.1%
associate-/r*88.2%
clear-num86.9%
un-div-inv86.9%
div-inv85.8%
clear-num85.9%
Applied egg-rr85.9%
associate-/r*87.1%
associate-/r/88.3%
Applied egg-rr88.3%
if -1.7e44 < t < -3.3e-15 or 4.60000000000000003e-38 < t < 2.1e52Initial program 92.7%
*-commutative92.7%
associate-*r/92.7%
distribute-rgt-out--92.7%
associate-/r*99.7%
Simplified99.7%
associate-*r/99.7%
*-commutative99.7%
associate-*r/99.5%
clear-num99.4%
associate-*l/99.7%
*-un-lft-identity99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 58.7%
*-commutative58.7%
associate-/r*76.1%
Simplified76.1%
if -3.3e-15 < t < -1.99999999999999985e-76 or 8.00000000000000031e-89 < t < 4.60000000000000003e-38Initial program 96.4%
*-commutative96.4%
associate-*r/96.3%
distribute-rgt-out--96.3%
associate-/r*89.7%
Simplified89.7%
Taylor expanded in y around 0 73.1%
if -1.99999999999999985e-76 < t < 8.00000000000000031e-89Initial program 92.5%
*-commutative92.5%
associate-*r/92.5%
distribute-rgt-out--92.5%
associate-/r*92.1%
Simplified92.1%
Taylor expanded in y around inf 85.5%
associate-*r/85.5%
*-commutative85.5%
times-frac86.2%
Simplified86.2%
if 2.1e52 < t Initial program 84.8%
*-commutative84.8%
associate-*r/84.8%
distribute-rgt-out--88.4%
associate-/r*91.5%
Simplified91.5%
Taylor expanded in y around 0 81.8%
associate-/r*80.1%
clear-num79.4%
un-div-inv79.4%
div-inv79.3%
clear-num79.4%
Applied egg-rr79.4%
associate-/r*79.4%
associate-/r/81.6%
Applied egg-rr81.6%
associate-/l/81.7%
associate-*l/81.8%
times-frac83.1%
associate-*l/83.3%
metadata-eval83.3%
distribute-lft-neg-in83.3%
clear-num83.2%
div-inv83.2%
distribute-neg-frac83.2%
metadata-eval83.2%
Applied egg-rr83.2%
Final simplification83.5%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* 2.0 (/ (/ x z) y))) (t_2 (* -2.0 (/ x (* z t)))))
(if (<= t -1.65e+44)
(* x (/ (/ -2.0 z) t))
(if (<= t -6e-15)
t_1
(if (<= t -3.1e-80)
t_2
(if (<= t 1.05e-86)
(/ (/ x y) (* z 0.5))
(if (<= t 9.2e-38)
t_2
(if (<= t 9.6e+50) t_1 (/ (/ -2.0 (/ z x)) t)))))))))
double code(double x, double y, double z, double t) {
double t_1 = 2.0 * ((x / z) / y);
double t_2 = -2.0 * (x / (z * t));
double tmp;
if (t <= -1.65e+44) {
tmp = x * ((-2.0 / z) / t);
} else if (t <= -6e-15) {
tmp = t_1;
} else if (t <= -3.1e-80) {
tmp = t_2;
} else if (t <= 1.05e-86) {
tmp = (x / y) / (z * 0.5);
} else if (t <= 9.2e-38) {
tmp = t_2;
} else if (t <= 9.6e+50) {
tmp = t_1;
} else {
tmp = (-2.0 / (z / x)) / t;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 2.0d0 * ((x / z) / y)
t_2 = (-2.0d0) * (x / (z * t))
if (t <= (-1.65d+44)) then
tmp = x * (((-2.0d0) / z) / t)
else if (t <= (-6d-15)) then
tmp = t_1
else if (t <= (-3.1d-80)) then
tmp = t_2
else if (t <= 1.05d-86) then
tmp = (x / y) / (z * 0.5d0)
else if (t <= 9.2d-38) then
tmp = t_2
else if (t <= 9.6d+50) then
tmp = t_1
else
tmp = ((-2.0d0) / (z / x)) / t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = 2.0 * ((x / z) / y);
double t_2 = -2.0 * (x / (z * t));
double tmp;
if (t <= -1.65e+44) {
tmp = x * ((-2.0 / z) / t);
} else if (t <= -6e-15) {
tmp = t_1;
} else if (t <= -3.1e-80) {
tmp = t_2;
} else if (t <= 1.05e-86) {
tmp = (x / y) / (z * 0.5);
} else if (t <= 9.2e-38) {
tmp = t_2;
} else if (t <= 9.6e+50) {
tmp = t_1;
} else {
tmp = (-2.0 / (z / x)) / t;
}
return tmp;
}
def code(x, y, z, t): t_1 = 2.0 * ((x / z) / y) t_2 = -2.0 * (x / (z * t)) tmp = 0 if t <= -1.65e+44: tmp = x * ((-2.0 / z) / t) elif t <= -6e-15: tmp = t_1 elif t <= -3.1e-80: tmp = t_2 elif t <= 1.05e-86: tmp = (x / y) / (z * 0.5) elif t <= 9.2e-38: tmp = t_2 elif t <= 9.6e+50: tmp = t_1 else: tmp = (-2.0 / (z / x)) / t return tmp
function code(x, y, z, t) t_1 = Float64(2.0 * Float64(Float64(x / z) / y)) t_2 = Float64(-2.0 * Float64(x / Float64(z * t))) tmp = 0.0 if (t <= -1.65e+44) tmp = Float64(x * Float64(Float64(-2.0 / z) / t)); elseif (t <= -6e-15) tmp = t_1; elseif (t <= -3.1e-80) tmp = t_2; elseif (t <= 1.05e-86) tmp = Float64(Float64(x / y) / Float64(z * 0.5)); elseif (t <= 9.2e-38) tmp = t_2; elseif (t <= 9.6e+50) tmp = t_1; else tmp = Float64(Float64(-2.0 / Float64(z / x)) / t); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = 2.0 * ((x / z) / y); t_2 = -2.0 * (x / (z * t)); tmp = 0.0; if (t <= -1.65e+44) tmp = x * ((-2.0 / z) / t); elseif (t <= -6e-15) tmp = t_1; elseif (t <= -3.1e-80) tmp = t_2; elseif (t <= 1.05e-86) tmp = (x / y) / (z * 0.5); elseif (t <= 9.2e-38) tmp = t_2; elseif (t <= 9.6e+50) tmp = t_1; else tmp = (-2.0 / (z / x)) / t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(2.0 * N[(N[(x / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-2.0 * N[(x / N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.65e+44], N[(x * N[(N[(-2.0 / z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -6e-15], t$95$1, If[LessEqual[t, -3.1e-80], t$95$2, If[LessEqual[t, 1.05e-86], N[(N[(x / y), $MachinePrecision] / N[(z * 0.5), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9.2e-38], t$95$2, If[LessEqual[t, 9.6e+50], t$95$1, N[(N[(-2.0 / N[(z / x), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \frac{\frac{x}{z}}{y}\\
t_2 := -2 \cdot \frac{x}{z \cdot t}\\
\mathbf{if}\;t \leq -1.65 \cdot 10^{+44}:\\
\;\;\;\;x \cdot \frac{\frac{-2}{z}}{t}\\
\mathbf{elif}\;t \leq -6 \cdot 10^{-15}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -3.1 \cdot 10^{-80}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 1.05 \cdot 10^{-86}:\\
\;\;\;\;\frac{\frac{x}{y}}{z \cdot 0.5}\\
\mathbf{elif}\;t \leq 9.2 \cdot 10^{-38}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 9.6 \cdot 10^{+50}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{-2}{\frac{z}{x}}}{t}\\
\end{array}
\end{array}
if t < -1.65000000000000007e44Initial program 86.2%
*-commutative86.2%
associate-*r/86.1%
distribute-rgt-out--90.3%
associate-/r*92.2%
Simplified92.2%
Taylor expanded in y around 0 88.1%
associate-/r*88.2%
clear-num86.9%
un-div-inv86.9%
div-inv85.8%
clear-num85.9%
Applied egg-rr85.9%
associate-/r*87.1%
associate-/r/88.3%
Applied egg-rr88.3%
if -1.65000000000000007e44 < t < -6e-15 or 9.20000000000000007e-38 < t < 9.6000000000000007e50Initial program 92.7%
*-commutative92.7%
associate-*r/92.7%
distribute-rgt-out--92.7%
associate-/r*99.7%
Simplified99.7%
associate-*r/99.7%
*-commutative99.7%
associate-*r/99.5%
clear-num99.4%
associate-*l/99.7%
*-un-lft-identity99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 58.7%
*-commutative58.7%
associate-/r*76.1%
Simplified76.1%
if -6e-15 < t < -3.10000000000000016e-80 or 1.05e-86 < t < 9.20000000000000007e-38Initial program 96.4%
*-commutative96.4%
associate-*r/96.3%
distribute-rgt-out--96.3%
associate-/r*89.7%
Simplified89.7%
Taylor expanded in y around 0 73.1%
if -3.10000000000000016e-80 < t < 1.05e-86Initial program 92.5%
*-commutative92.5%
associate-*r/92.5%
distribute-rgt-out--92.5%
associate-/r*92.1%
Simplified92.1%
associate-*r/92.1%
*-commutative92.1%
associate-*r/92.0%
clear-num92.0%
associate-*l/92.0%
*-un-lft-identity92.0%
Applied egg-rr92.0%
Taylor expanded in y around inf 85.5%
*-commutative85.5%
associate-/r*83.7%
Simplified83.7%
associate-/r*85.5%
associate-*r/85.5%
frac-times86.2%
clear-num86.2%
associate-*l/87.2%
*-un-lft-identity87.2%
div-inv87.2%
metadata-eval87.2%
Applied egg-rr87.2%
if 9.6000000000000007e50 < t Initial program 84.8%
*-commutative84.8%
associate-*r/84.8%
distribute-rgt-out--88.4%
associate-/r*91.5%
Simplified91.5%
Taylor expanded in y around 0 81.8%
associate-/r*80.1%
clear-num79.4%
un-div-inv79.4%
div-inv79.3%
clear-num79.4%
Applied egg-rr79.4%
associate-/r*79.4%
associate-/r/81.6%
Applied egg-rr81.6%
associate-/l/81.7%
associate-*l/81.8%
times-frac83.1%
associate-*l/83.3%
metadata-eval83.3%
distribute-lft-neg-in83.3%
clear-num83.2%
div-inv83.2%
distribute-neg-frac83.2%
metadata-eval83.2%
Applied egg-rr83.2%
Final simplification83.9%
(FPCore (x y z t)
:precision binary64
(if (or (<= t -1.65e+44)
(and (not (<= t 1.05e-86)) (or (<= t 8.4e-38) (not (<= t 1.3e+52)))))
(* -2.0 (/ x (* z t)))
(* 2.0 (/ (/ x z) y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -1.65e+44) || (!(t <= 1.05e-86) && ((t <= 8.4e-38) || !(t <= 1.3e+52)))) {
tmp = -2.0 * (x / (z * t));
} else {
tmp = 2.0 * ((x / z) / y);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((t <= (-1.65d+44)) .or. (.not. (t <= 1.05d-86)) .and. (t <= 8.4d-38) .or. (.not. (t <= 1.3d+52))) then
tmp = (-2.0d0) * (x / (z * t))
else
tmp = 2.0d0 * ((x / z) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -1.65e+44) || (!(t <= 1.05e-86) && ((t <= 8.4e-38) || !(t <= 1.3e+52)))) {
tmp = -2.0 * (x / (z * t));
} else {
tmp = 2.0 * ((x / z) / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -1.65e+44) or (not (t <= 1.05e-86) and ((t <= 8.4e-38) or not (t <= 1.3e+52))): tmp = -2.0 * (x / (z * t)) else: tmp = 2.0 * ((x / z) / y) return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -1.65e+44) || (!(t <= 1.05e-86) && ((t <= 8.4e-38) || !(t <= 1.3e+52)))) tmp = Float64(-2.0 * Float64(x / Float64(z * t))); else tmp = Float64(2.0 * Float64(Float64(x / z) / y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -1.65e+44) || (~((t <= 1.05e-86)) && ((t <= 8.4e-38) || ~((t <= 1.3e+52))))) tmp = -2.0 * (x / (z * t)); else tmp = 2.0 * ((x / z) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -1.65e+44], And[N[Not[LessEqual[t, 1.05e-86]], $MachinePrecision], Or[LessEqual[t, 8.4e-38], N[Not[LessEqual[t, 1.3e+52]], $MachinePrecision]]]], N[(-2.0 * N[(x / N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(x / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.65 \cdot 10^{+44} \lor \neg \left(t \leq 1.05 \cdot 10^{-86}\right) \land \left(t \leq 8.4 \cdot 10^{-38} \lor \neg \left(t \leq 1.3 \cdot 10^{+52}\right)\right):\\
\;\;\;\;-2 \cdot \frac{x}{z \cdot t}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{\frac{x}{z}}{y}\\
\end{array}
\end{array}
if t < -1.65000000000000007e44 or 1.05e-86 < t < 8.40000000000000052e-38 or 1.3e52 < t Initial program 86.5%
*-commutative86.5%
associate-*r/86.4%
distribute-rgt-out--89.8%
associate-/r*91.3%
Simplified91.3%
Taylor expanded in y around 0 82.9%
if -1.65000000000000007e44 < t < 1.05e-86 or 8.40000000000000052e-38 < t < 1.3e52Initial program 93.2%
*-commutative93.2%
associate-*r/93.2%
distribute-rgt-out--93.2%
associate-/r*93.6%
Simplified93.6%
associate-*r/93.6%
*-commutative93.6%
associate-*r/93.5%
clear-num93.5%
associate-*l/93.6%
*-un-lft-identity93.6%
Applied egg-rr93.6%
Taylor expanded in y around inf 75.9%
*-commutative75.9%
associate-/r*78.9%
Simplified78.9%
Final simplification80.8%
(FPCore (x y z t) :precision binary64 (if (or (<= z -3.8e+81) (not (<= z 2.2e+29))) (* (/ 2.0 z) (/ x (- y t))) (* x (/ (/ 2.0 (- y t)) z))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -3.8e+81) || !(z <= 2.2e+29)) {
tmp = (2.0 / z) * (x / (y - t));
} else {
tmp = x * ((2.0 / (y - 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 ((z <= (-3.8d+81)) .or. (.not. (z <= 2.2d+29))) then
tmp = (2.0d0 / z) * (x / (y - t))
else
tmp = x * ((2.0d0 / (y - t)) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -3.8e+81) || !(z <= 2.2e+29)) {
tmp = (2.0 / z) * (x / (y - t));
} else {
tmp = x * ((2.0 / (y - t)) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -3.8e+81) or not (z <= 2.2e+29): tmp = (2.0 / z) * (x / (y - t)) else: tmp = x * ((2.0 / (y - t)) / z) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -3.8e+81) || !(z <= 2.2e+29)) tmp = Float64(Float64(2.0 / z) * Float64(x / Float64(y - t))); else tmp = Float64(x * Float64(Float64(2.0 / Float64(y - t)) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -3.8e+81) || ~((z <= 2.2e+29))) tmp = (2.0 / z) * (x / (y - t)); else tmp = x * ((2.0 / (y - t)) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -3.8e+81], N[Not[LessEqual[z, 2.2e+29]], $MachinePrecision]], N[(N[(2.0 / z), $MachinePrecision] * N[(x / N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(2.0 / N[(y - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.8 \cdot 10^{+81} \lor \neg \left(z \leq 2.2 \cdot 10^{+29}\right):\\
\;\;\;\;\frac{2}{z} \cdot \frac{x}{y - t}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{\frac{2}{y - t}}{z}\\
\end{array}
\end{array}
if z < -3.8e81 or 2.2000000000000001e29 < z Initial program 80.0%
*-commutative80.0%
distribute-rgt-out--83.5%
times-frac98.1%
Simplified98.1%
if -3.8e81 < z < 2.2000000000000001e29Initial program 98.0%
*-commutative98.0%
associate-*r/98.0%
distribute-rgt-out--98.0%
associate-/r*91.8%
Simplified91.8%
Taylor expanded in x around 0 98.0%
*-commutative98.0%
associate-/r/98.0%
associate-/l*98.0%
associate-/l*87.6%
associate-*r/97.5%
Simplified97.5%
Final simplification97.8%
(FPCore (x y z t) :precision binary64 (if (or (<= z -3e+53) (not (<= z 8.8e+30))) (* (/ 2.0 z) (/ x (- y t))) (/ (* 2.0 x) (* z (- y t)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -3e+53) || !(z <= 8.8e+30)) {
tmp = (2.0 / z) * (x / (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) :: tmp
if ((z <= (-3d+53)) .or. (.not. (z <= 8.8d+30))) then
tmp = (2.0d0 / z) * (x / (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 tmp;
if ((z <= -3e+53) || !(z <= 8.8e+30)) {
tmp = (2.0 / z) * (x / (y - t));
} else {
tmp = (2.0 * x) / (z * (y - t));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -3e+53) or not (z <= 8.8e+30): tmp = (2.0 / z) * (x / (y - t)) else: tmp = (2.0 * x) / (z * (y - t)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -3e+53) || !(z <= 8.8e+30)) tmp = Float64(Float64(2.0 / z) * Float64(x / Float64(y - t))); else tmp = Float64(Float64(2.0 * x) / Float64(z * Float64(y - t))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -3e+53) || ~((z <= 8.8e+30))) tmp = (2.0 / z) * (x / (y - t)); else tmp = (2.0 * x) / (z * (y - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -3e+53], N[Not[LessEqual[z, 8.8e+30]], $MachinePrecision]], N[(N[(2.0 / z), $MachinePrecision] * N[(x / N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * x), $MachinePrecision] / N[(z * N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3 \cdot 10^{+53} \lor \neg \left(z \leq 8.8 \cdot 10^{+30}\right):\\
\;\;\;\;\frac{2}{z} \cdot \frac{x}{y - t}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot x}{z \cdot \left(y - t\right)}\\
\end{array}
\end{array}
if z < -2.99999999999999998e53 or 8.7999999999999999e30 < z Initial program 80.6%
*-commutative80.6%
distribute-rgt-out--84.1%
times-frac98.2%
Simplified98.2%
if -2.99999999999999998e53 < z < 8.7999999999999999e30Initial program 98.0%
distribute-rgt-out--98.0%
Simplified98.0%
Final simplification98.1%
(FPCore (x y z t) :precision binary64 (if (<= y -1.65e-216) (* x (/ (/ 2.0 (- y t)) z)) (* 2.0 (/ (/ x z) (- y t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.65e-216) {
tmp = x * ((2.0 / (y - t)) / z);
} 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) :: tmp
if (y <= (-1.65d-216)) then
tmp = x * ((2.0d0 / (y - t)) / z)
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 tmp;
if (y <= -1.65e-216) {
tmp = x * ((2.0 / (y - t)) / z);
} else {
tmp = 2.0 * ((x / z) / (y - t));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.65e-216: tmp = x * ((2.0 / (y - t)) / z) else: tmp = 2.0 * ((x / z) / (y - t)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.65e-216) tmp = Float64(x * Float64(Float64(2.0 / Float64(y - t)) / z)); else tmp = Float64(2.0 * Float64(Float64(x / z) / Float64(y - t))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.65e-216) tmp = x * ((2.0 / (y - t)) / z); else tmp = 2.0 * ((x / z) / (y - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.65e-216], N[(x * N[(N[(2.0 / N[(y - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(x / z), $MachinePrecision] / N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.65 \cdot 10^{-216}:\\
\;\;\;\;x \cdot \frac{\frac{2}{y - t}}{z}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{\frac{x}{z}}{y - t}\\
\end{array}
\end{array}
if y < -1.64999999999999984e-216Initial program 93.5%
*-commutative93.5%
associate-*r/93.5%
distribute-rgt-out--95.4%
associate-/r*88.9%
Simplified88.9%
Taylor expanded in x around 0 95.4%
*-commutative95.4%
associate-/r/95.4%
associate-/l*95.4%
associate-/l*95.8%
associate-*r/95.7%
Simplified95.7%
if -1.64999999999999984e-216 < y Initial program 87.3%
*-commutative87.3%
associate-*r/87.3%
distribute-rgt-out--88.7%
associate-/r*95.3%
Simplified95.3%
Final simplification95.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 90.0%
*-commutative90.0%
associate-*r/90.0%
distribute-rgt-out--91.6%
associate-/r*92.5%
Simplified92.5%
Final simplification92.5%
(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.0%
*-commutative90.0%
associate-*r/90.0%
distribute-rgt-out--91.6%
associate-/r*92.5%
Simplified92.5%
Taylor expanded in y around 0 54.1%
Final simplification54.1%
(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 2023290
(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))))