
(FPCore (x y z t a) :precision binary64 (- x (/ (* y (- z t)) a)))
double code(double x, double y, double z, double t, double a) {
return x - ((y * (z - t)) / a);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x - ((y * (z - t)) / a)
end function
public static double code(double x, double y, double z, double t, double a) {
return x - ((y * (z - t)) / a);
}
def code(x, y, z, t, a): return x - ((y * (z - t)) / a)
function code(x, y, z, t, a) return Float64(x - Float64(Float64(y * Float64(z - t)) / a)) end
function tmp = code(x, y, z, t, a) tmp = x - ((y * (z - t)) / a); end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{y \cdot \left(z - t\right)}{a}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 12 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (- x (/ (* y (- z t)) a)))
double code(double x, double y, double z, double t, double a) {
return x - ((y * (z - t)) / a);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x - ((y * (z - t)) / a)
end function
public static double code(double x, double y, double z, double t, double a) {
return x - ((y * (z - t)) / a);
}
def code(x, y, z, t, a): return x - ((y * (z - t)) / a)
function code(x, y, z, t, a) return Float64(x - Float64(Float64(y * Float64(z - t)) / a)) end
function tmp = code(x, y, z, t, a) tmp = x - ((y * (z - t)) / a); end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{y \cdot \left(z - t\right)}{a}
\end{array}
(FPCore (x y z t a) :precision binary64 (+ x (* (/ y a) (- t z))))
double code(double x, double y, double z, double t, double a) {
return x + ((y / a) * (t - z));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + ((y / a) * (t - z))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y / a) * (t - z));
}
def code(x, y, z, t, a): return x + ((y / a) * (t - z))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y / a) * Float64(t - z))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y / a) * (t - z)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y}{a} \cdot \left(t - z\right)
\end{array}
Initial program 95.2%
associate-*l/97.5%
Simplified97.5%
Final simplification97.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ (- z) a))) (t_2 (* (/ y a) t)))
(if (<= t -3.6e+37)
t_2
(if (<= t -6.6e-31)
t_1
(if (<= t 1.02e-76) x (if (<= t 2.1e+39) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (-z / a);
double t_2 = (y / a) * t;
double tmp;
if (t <= -3.6e+37) {
tmp = t_2;
} else if (t <= -6.6e-31) {
tmp = t_1;
} else if (t <= 1.02e-76) {
tmp = x;
} else if (t <= 2.1e+39) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = y * (-z / a)
t_2 = (y / a) * t
if (t <= (-3.6d+37)) then
tmp = t_2
else if (t <= (-6.6d-31)) then
tmp = t_1
else if (t <= 1.02d-76) then
tmp = x
else if (t <= 2.1d+39) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y * (-z / a);
double t_2 = (y / a) * t;
double tmp;
if (t <= -3.6e+37) {
tmp = t_2;
} else if (t <= -6.6e-31) {
tmp = t_1;
} else if (t <= 1.02e-76) {
tmp = x;
} else if (t <= 2.1e+39) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (-z / a) t_2 = (y / a) * t tmp = 0 if t <= -3.6e+37: tmp = t_2 elif t <= -6.6e-31: tmp = t_1 elif t <= 1.02e-76: tmp = x elif t <= 2.1e+39: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(Float64(-z) / a)) t_2 = Float64(Float64(y / a) * t) tmp = 0.0 if (t <= -3.6e+37) tmp = t_2; elseif (t <= -6.6e-31) tmp = t_1; elseif (t <= 1.02e-76) tmp = x; elseif (t <= 2.1e+39) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * (-z / a); t_2 = (y / a) * t; tmp = 0.0; if (t <= -3.6e+37) tmp = t_2; elseif (t <= -6.6e-31) tmp = t_1; elseif (t <= 1.02e-76) tmp = x; elseif (t <= 2.1e+39) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[((-z) / a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y / a), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -3.6e+37], t$95$2, If[LessEqual[t, -6.6e-31], t$95$1, If[LessEqual[t, 1.02e-76], x, If[LessEqual[t, 2.1e+39], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{-z}{a}\\
t_2 := \frac{y}{a} \cdot t\\
\mathbf{if}\;t \leq -3.6 \cdot 10^{+37}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -6.6 \cdot 10^{-31}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.02 \cdot 10^{-76}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 2.1 \cdot 10^{+39}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -3.59999999999999998e37 or 2.0999999999999999e39 < t Initial program 92.9%
associate-*l/98.7%
Simplified98.7%
Taylor expanded in t around inf 56.9%
associate-/l*61.3%
Simplified61.3%
clear-num61.3%
associate-/r/61.2%
clear-num61.4%
Applied egg-rr61.4%
if -3.59999999999999998e37 < t < -6.5999999999999998e-31 or 1.02000000000000006e-76 < t < 2.0999999999999999e39Initial program 97.5%
associate-*l/99.8%
Simplified99.8%
Taylor expanded in z around inf 61.7%
mul-1-neg61.7%
associate-*l/68.6%
*-commutative68.6%
distribute-rgt-neg-in68.6%
*-lft-identity68.6%
associate-*l/68.5%
remove-double-neg68.5%
neg-mul-168.5%
associate-*r*68.5%
*-commutative68.5%
neg-mul-168.5%
*-commutative68.5%
distribute-neg-frac68.5%
metadata-eval68.5%
metadata-eval68.5%
associate-/r*68.5%
neg-mul-168.5%
associate-*r/68.6%
*-rgt-identity68.6%
distribute-frac-neg68.6%
remove-double-neg68.6%
Simplified68.6%
associate-*r/61.7%
frac-2neg61.7%
remove-double-neg61.7%
distribute-neg-frac61.7%
associate-*l/64.1%
*-commutative64.1%
Applied egg-rr64.1%
if -6.5999999999999998e-31 < t < 1.02000000000000006e-76Initial program 97.0%
associate-*l/95.2%
Simplified95.2%
Taylor expanded in x around inf 62.2%
Final simplification62.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (/ y a) t)))
(if (<= t -4e+37)
t_1
(if (<= t -1.26e-28)
(/ (- y) (/ a z))
(if (<= t 1.4e-76) x (if (<= t 3.4e+39) (* y (/ (- z) a)) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y / a) * t;
double tmp;
if (t <= -4e+37) {
tmp = t_1;
} else if (t <= -1.26e-28) {
tmp = -y / (a / z);
} else if (t <= 1.4e-76) {
tmp = x;
} else if (t <= 3.4e+39) {
tmp = y * (-z / a);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (y / a) * t
if (t <= (-4d+37)) then
tmp = t_1
else if (t <= (-1.26d-28)) then
tmp = -y / (a / z)
else if (t <= 1.4d-76) then
tmp = x
else if (t <= 3.4d+39) then
tmp = y * (-z / a)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (y / a) * t;
double tmp;
if (t <= -4e+37) {
tmp = t_1;
} else if (t <= -1.26e-28) {
tmp = -y / (a / z);
} else if (t <= 1.4e-76) {
tmp = x;
} else if (t <= 3.4e+39) {
tmp = y * (-z / a);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y / a) * t tmp = 0 if t <= -4e+37: tmp = t_1 elif t <= -1.26e-28: tmp = -y / (a / z) elif t <= 1.4e-76: tmp = x elif t <= 3.4e+39: tmp = y * (-z / a) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y / a) * t) tmp = 0.0 if (t <= -4e+37) tmp = t_1; elseif (t <= -1.26e-28) tmp = Float64(Float64(-y) / Float64(a / z)); elseif (t <= 1.4e-76) tmp = x; elseif (t <= 3.4e+39) tmp = Float64(y * Float64(Float64(-z) / a)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y / a) * t; tmp = 0.0; if (t <= -4e+37) tmp = t_1; elseif (t <= -1.26e-28) tmp = -y / (a / z); elseif (t <= 1.4e-76) tmp = x; elseif (t <= 3.4e+39) tmp = y * (-z / a); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y / a), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -4e+37], t$95$1, If[LessEqual[t, -1.26e-28], N[((-y) / N[(a / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.4e-76], x, If[LessEqual[t, 3.4e+39], N[(y * N[((-z) / a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{a} \cdot t\\
\mathbf{if}\;t \leq -4 \cdot 10^{+37}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -1.26 \cdot 10^{-28}:\\
\;\;\;\;\frac{-y}{\frac{a}{z}}\\
\mathbf{elif}\;t \leq 1.4 \cdot 10^{-76}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 3.4 \cdot 10^{+39}:\\
\;\;\;\;y \cdot \frac{-z}{a}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -3.99999999999999982e37 or 3.3999999999999999e39 < t Initial program 92.9%
associate-*l/98.7%
Simplified98.7%
Taylor expanded in t around inf 56.9%
associate-/l*61.3%
Simplified61.3%
clear-num61.3%
associate-/r/61.2%
clear-num61.4%
Applied egg-rr61.4%
if -3.99999999999999982e37 < t < -1.25999999999999999e-28Initial program 99.8%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in z around inf 77.1%
mul-1-neg77.1%
associate-/l*77.3%
Simplified77.3%
if -1.25999999999999999e-28 < t < 1.40000000000000005e-76Initial program 97.0%
associate-*l/95.2%
Simplified95.2%
Taylor expanded in x around inf 62.2%
if 1.40000000000000005e-76 < t < 3.3999999999999999e39Initial program 96.4%
associate-*l/99.8%
Simplified99.8%
Taylor expanded in z around inf 54.3%
mul-1-neg54.3%
associate-*l/64.4%
*-commutative64.4%
distribute-rgt-neg-in64.4%
*-lft-identity64.4%
associate-*l/64.3%
remove-double-neg64.3%
neg-mul-164.3%
associate-*r*64.3%
*-commutative64.3%
neg-mul-164.3%
*-commutative64.3%
distribute-neg-frac64.3%
metadata-eval64.3%
metadata-eval64.3%
associate-/r*64.3%
neg-mul-164.3%
associate-*r/64.4%
*-rgt-identity64.4%
distribute-frac-neg64.4%
remove-double-neg64.4%
Simplified64.4%
associate-*r/54.3%
frac-2neg54.3%
remove-double-neg54.3%
distribute-neg-frac54.3%
associate-*l/57.7%
*-commutative57.7%
Applied egg-rr57.7%
Final simplification62.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (/ y a) t)))
(if (<= t -4.8e+38)
t_1
(if (<= t -2.6e-32)
(/ (- y) (/ a z))
(if (<= t 1.15e-76) x (if (<= t 1.2e+42) (/ (- z) (/ a y)) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y / a) * t;
double tmp;
if (t <= -4.8e+38) {
tmp = t_1;
} else if (t <= -2.6e-32) {
tmp = -y / (a / z);
} else if (t <= 1.15e-76) {
tmp = x;
} else if (t <= 1.2e+42) {
tmp = -z / (a / y);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (y / a) * t
if (t <= (-4.8d+38)) then
tmp = t_1
else if (t <= (-2.6d-32)) then
tmp = -y / (a / z)
else if (t <= 1.15d-76) then
tmp = x
else if (t <= 1.2d+42) then
tmp = -z / (a / y)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (y / a) * t;
double tmp;
if (t <= -4.8e+38) {
tmp = t_1;
} else if (t <= -2.6e-32) {
tmp = -y / (a / z);
} else if (t <= 1.15e-76) {
tmp = x;
} else if (t <= 1.2e+42) {
tmp = -z / (a / y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y / a) * t tmp = 0 if t <= -4.8e+38: tmp = t_1 elif t <= -2.6e-32: tmp = -y / (a / z) elif t <= 1.15e-76: tmp = x elif t <= 1.2e+42: tmp = -z / (a / y) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y / a) * t) tmp = 0.0 if (t <= -4.8e+38) tmp = t_1; elseif (t <= -2.6e-32) tmp = Float64(Float64(-y) / Float64(a / z)); elseif (t <= 1.15e-76) tmp = x; elseif (t <= 1.2e+42) tmp = Float64(Float64(-z) / Float64(a / y)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y / a) * t; tmp = 0.0; if (t <= -4.8e+38) tmp = t_1; elseif (t <= -2.6e-32) tmp = -y / (a / z); elseif (t <= 1.15e-76) tmp = x; elseif (t <= 1.2e+42) tmp = -z / (a / y); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y / a), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -4.8e+38], t$95$1, If[LessEqual[t, -2.6e-32], N[((-y) / N[(a / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.15e-76], x, If[LessEqual[t, 1.2e+42], N[((-z) / N[(a / y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{a} \cdot t\\
\mathbf{if}\;t \leq -4.8 \cdot 10^{+38}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -2.6 \cdot 10^{-32}:\\
\;\;\;\;\frac{-y}{\frac{a}{z}}\\
\mathbf{elif}\;t \leq 1.15 \cdot 10^{-76}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 1.2 \cdot 10^{+42}:\\
\;\;\;\;\frac{-z}{\frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -4.80000000000000035e38 or 1.1999999999999999e42 < t Initial program 92.9%
associate-*l/98.7%
Simplified98.7%
Taylor expanded in t around inf 56.9%
associate-/l*61.3%
Simplified61.3%
clear-num61.3%
associate-/r/61.2%
clear-num61.4%
Applied egg-rr61.4%
if -4.80000000000000035e38 < t < -2.5999999999999997e-32Initial program 99.8%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in z around inf 77.1%
mul-1-neg77.1%
associate-/l*77.3%
Simplified77.3%
if -2.5999999999999997e-32 < t < 1.15000000000000003e-76Initial program 97.0%
associate-*l/95.2%
Simplified95.2%
Taylor expanded in x around inf 62.2%
if 1.15000000000000003e-76 < t < 1.1999999999999999e42Initial program 96.4%
associate-*l/99.8%
Simplified99.8%
Taylor expanded in z around inf 54.3%
mul-1-neg54.3%
associate-*l/64.4%
*-commutative64.4%
distribute-rgt-neg-in64.4%
*-lft-identity64.4%
associate-*l/64.3%
remove-double-neg64.3%
neg-mul-164.3%
associate-*r*64.3%
*-commutative64.3%
neg-mul-164.3%
*-commutative64.3%
distribute-neg-frac64.3%
metadata-eval64.3%
metadata-eval64.3%
associate-/r*64.3%
neg-mul-164.3%
associate-*r/64.4%
*-rgt-identity64.4%
distribute-frac-neg64.4%
remove-double-neg64.4%
Simplified64.4%
associate-*r/54.3%
frac-2neg54.3%
remove-double-neg54.3%
distribute-neg-frac54.3%
associate-*l/57.7%
*-commutative57.7%
Applied egg-rr57.7%
*-commutative57.7%
frac-2neg57.7%
add-sqr-sqrt30.7%
sqrt-unprod31.2%
sqr-neg31.2%
sqrt-unprod0.7%
add-sqr-sqrt1.4%
associate-/r/1.5%
frac-2neg1.5%
add-sqr-sqrt0.5%
sqrt-unprod23.8%
sqr-neg23.8%
sqrt-unprod30.2%
add-sqr-sqrt64.3%
Applied egg-rr64.3%
Final simplification62.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (/ y a) t)))
(if (<= t -1.5e+38)
t_1
(if (<= t -1.76e-32)
(/ (- y) (/ a z))
(if (<= t 2e-76) x (if (<= t 9.6e+45) (* z (/ y (- a))) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y / a) * t;
double tmp;
if (t <= -1.5e+38) {
tmp = t_1;
} else if (t <= -1.76e-32) {
tmp = -y / (a / z);
} else if (t <= 2e-76) {
tmp = x;
} else if (t <= 9.6e+45) {
tmp = z * (y / -a);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (y / a) * t
if (t <= (-1.5d+38)) then
tmp = t_1
else if (t <= (-1.76d-32)) then
tmp = -y / (a / z)
else if (t <= 2d-76) then
tmp = x
else if (t <= 9.6d+45) then
tmp = z * (y / -a)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (y / a) * t;
double tmp;
if (t <= -1.5e+38) {
tmp = t_1;
} else if (t <= -1.76e-32) {
tmp = -y / (a / z);
} else if (t <= 2e-76) {
tmp = x;
} else if (t <= 9.6e+45) {
tmp = z * (y / -a);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y / a) * t tmp = 0 if t <= -1.5e+38: tmp = t_1 elif t <= -1.76e-32: tmp = -y / (a / z) elif t <= 2e-76: tmp = x elif t <= 9.6e+45: tmp = z * (y / -a) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y / a) * t) tmp = 0.0 if (t <= -1.5e+38) tmp = t_1; elseif (t <= -1.76e-32) tmp = Float64(Float64(-y) / Float64(a / z)); elseif (t <= 2e-76) tmp = x; elseif (t <= 9.6e+45) tmp = Float64(z * Float64(y / Float64(-a))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y / a) * t; tmp = 0.0; if (t <= -1.5e+38) tmp = t_1; elseif (t <= -1.76e-32) tmp = -y / (a / z); elseif (t <= 2e-76) tmp = x; elseif (t <= 9.6e+45) tmp = z * (y / -a); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y / a), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -1.5e+38], t$95$1, If[LessEqual[t, -1.76e-32], N[((-y) / N[(a / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2e-76], x, If[LessEqual[t, 9.6e+45], N[(z * N[(y / (-a)), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{a} \cdot t\\
\mathbf{if}\;t \leq -1.5 \cdot 10^{+38}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -1.76 \cdot 10^{-32}:\\
\;\;\;\;\frac{-y}{\frac{a}{z}}\\
\mathbf{elif}\;t \leq 2 \cdot 10^{-76}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 9.6 \cdot 10^{+45}:\\
\;\;\;\;z \cdot \frac{y}{-a}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -1.5000000000000001e38 or 9.59999999999999958e45 < t Initial program 92.9%
associate-*l/98.7%
Simplified98.7%
Taylor expanded in t around inf 56.9%
associate-/l*61.3%
Simplified61.3%
clear-num61.3%
associate-/r/61.2%
clear-num61.4%
Applied egg-rr61.4%
if -1.5000000000000001e38 < t < -1.76000000000000004e-32Initial program 99.8%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in z around inf 77.1%
mul-1-neg77.1%
associate-/l*77.3%
Simplified77.3%
if -1.76000000000000004e-32 < t < 1.99999999999999985e-76Initial program 97.0%
associate-*l/95.2%
Simplified95.2%
Taylor expanded in x around inf 62.2%
if 1.99999999999999985e-76 < t < 9.59999999999999958e45Initial program 96.4%
associate-*l/99.8%
Simplified99.8%
Taylor expanded in z around inf 54.3%
mul-1-neg54.3%
associate-*l/64.4%
*-commutative64.4%
distribute-rgt-neg-in64.4%
*-lft-identity64.4%
associate-*l/64.3%
remove-double-neg64.3%
neg-mul-164.3%
associate-*r*64.3%
*-commutative64.3%
neg-mul-164.3%
*-commutative64.3%
distribute-neg-frac64.3%
metadata-eval64.3%
metadata-eval64.3%
associate-/r*64.3%
neg-mul-164.3%
associate-*r/64.4%
*-rgt-identity64.4%
distribute-frac-neg64.4%
remove-double-neg64.4%
Simplified64.4%
Final simplification62.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -8.6e+77) (not (<= z 2.3e+36))) (- x (/ (* y z) a)) (- x (/ y (/ (- a) t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -8.6e+77) || !(z <= 2.3e+36)) {
tmp = x - ((y * z) / a);
} else {
tmp = x - (y / (-a / t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-8.6d+77)) .or. (.not. (z <= 2.3d+36))) then
tmp = x - ((y * z) / a)
else
tmp = x - (y / (-a / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -8.6e+77) || !(z <= 2.3e+36)) {
tmp = x - ((y * z) / a);
} else {
tmp = x - (y / (-a / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -8.6e+77) or not (z <= 2.3e+36): tmp = x - ((y * z) / a) else: tmp = x - (y / (-a / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -8.6e+77) || !(z <= 2.3e+36)) tmp = Float64(x - Float64(Float64(y * z) / a)); else tmp = Float64(x - Float64(y / Float64(Float64(-a) / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -8.6e+77) || ~((z <= 2.3e+36))) tmp = x - ((y * z) / a); else tmp = x - (y / (-a / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -8.6e+77], N[Not[LessEqual[z, 2.3e+36]], $MachinePrecision]], N[(x - N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(x - N[(y / N[((-a) / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.6 \cdot 10^{+77} \lor \neg \left(z \leq 2.3 \cdot 10^{+36}\right):\\
\;\;\;\;x - \frac{y \cdot z}{a}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{\frac{-a}{t}}\\
\end{array}
\end{array}
if z < -8.59999999999999983e77 or 2.29999999999999996e36 < z Initial program 95.1%
associate-*l/98.5%
Simplified98.5%
Taylor expanded in z around inf 80.9%
if -8.59999999999999983e77 < z < 2.29999999999999996e36Initial program 95.2%
associate-/l*95.2%
Simplified95.2%
Taylor expanded in z around 0 88.7%
associate-*r/88.7%
neg-mul-188.7%
Simplified88.7%
Final simplification85.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.25e+70) (not (<= z 2.9e+36))) (- x (* y (/ z a))) (+ x (* y (/ t a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.25e+70) || !(z <= 2.9e+36)) {
tmp = x - (y * (z / a));
} else {
tmp = x + (y * (t / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-1.25d+70)) .or. (.not. (z <= 2.9d+36))) then
tmp = x - (y * (z / a))
else
tmp = x + (y * (t / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.25e+70) || !(z <= 2.9e+36)) {
tmp = x - (y * (z / a));
} else {
tmp = x + (y * (t / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.25e+70) or not (z <= 2.9e+36): tmp = x - (y * (z / a)) else: tmp = x + (y * (t / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.25e+70) || !(z <= 2.9e+36)) tmp = Float64(x - Float64(y * Float64(z / a))); else tmp = Float64(x + Float64(y * Float64(t / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.25e+70) || ~((z <= 2.9e+36))) tmp = x - (y * (z / a)); else tmp = x + (y * (t / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.25e+70], N[Not[LessEqual[z, 2.9e+36]], $MachinePrecision]], N[(x - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.25 \cdot 10^{+70} \lor \neg \left(z \leq 2.9 \cdot 10^{+36}\right):\\
\;\;\;\;x - y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\end{array}
\end{array}
if z < -1.2500000000000001e70 or 2.9e36 < z Initial program 95.1%
associate-*l/98.5%
Simplified98.5%
Taylor expanded in z around inf 80.9%
*-commutative80.9%
associate-/l*83.8%
associate-/r/74.2%
Simplified74.2%
if -1.2500000000000001e70 < z < 2.9e36Initial program 95.2%
associate-*l/96.9%
Simplified96.9%
Taylor expanded in z around 0 89.3%
cancel-sign-sub-inv89.3%
metadata-eval89.3%
*-lft-identity89.3%
+-commutative89.3%
associate-/l*90.9%
associate-/r/87.9%
Simplified87.9%
Final simplification82.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.32e+73) (not (<= z 1.65e+38))) (- x (/ (* y z) a)) (+ x (* y (/ t a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.32e+73) || !(z <= 1.65e+38)) {
tmp = x - ((y * z) / a);
} else {
tmp = x + (y * (t / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-1.32d+73)) .or. (.not. (z <= 1.65d+38))) then
tmp = x - ((y * z) / a)
else
tmp = x + (y * (t / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.32e+73) || !(z <= 1.65e+38)) {
tmp = x - ((y * z) / a);
} else {
tmp = x + (y * (t / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.32e+73) or not (z <= 1.65e+38): tmp = x - ((y * z) / a) else: tmp = x + (y * (t / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.32e+73) || !(z <= 1.65e+38)) tmp = Float64(x - Float64(Float64(y * z) / a)); else tmp = Float64(x + Float64(y * Float64(t / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.32e+73) || ~((z <= 1.65e+38))) tmp = x - ((y * z) / a); else tmp = x + (y * (t / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.32e+73], N[Not[LessEqual[z, 1.65e+38]], $MachinePrecision]], N[(x - N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.32 \cdot 10^{+73} \lor \neg \left(z \leq 1.65 \cdot 10^{+38}\right):\\
\;\;\;\;x - \frac{y \cdot z}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\end{array}
\end{array}
if z < -1.32e73 or 1.65e38 < z Initial program 95.1%
associate-*l/98.5%
Simplified98.5%
Taylor expanded in z around inf 80.9%
if -1.32e73 < z < 1.65e38Initial program 95.2%
associate-*l/96.9%
Simplified96.9%
Taylor expanded in z around 0 89.3%
cancel-sign-sub-inv89.3%
metadata-eval89.3%
*-lft-identity89.3%
+-commutative89.3%
associate-/l*90.9%
associate-/r/87.9%
Simplified87.9%
Final simplification85.2%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.75e+171) (/ (* y (- z)) a) (if (<= z 6.2e+79) (+ x (* y (/ t a))) (* z (/ y (- a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.75e+171) {
tmp = (y * -z) / a;
} else if (z <= 6.2e+79) {
tmp = x + (y * (t / a));
} else {
tmp = z * (y / -a);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-1.75d+171)) then
tmp = (y * -z) / a
else if (z <= 6.2d+79) then
tmp = x + (y * (t / a))
else
tmp = z * (y / -a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.75e+171) {
tmp = (y * -z) / a;
} else if (z <= 6.2e+79) {
tmp = x + (y * (t / a));
} else {
tmp = z * (y / -a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.75e+171: tmp = (y * -z) / a elif z <= 6.2e+79: tmp = x + (y * (t / a)) else: tmp = z * (y / -a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.75e+171) tmp = Float64(Float64(y * Float64(-z)) / a); elseif (z <= 6.2e+79) tmp = Float64(x + Float64(y * Float64(t / a))); else tmp = Float64(z * Float64(y / Float64(-a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.75e+171) tmp = (y * -z) / a; elseif (z <= 6.2e+79) tmp = x + (y * (t / a)); else tmp = z * (y / -a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.75e+171], N[(N[(y * (-z)), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[z, 6.2e+79], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z * N[(y / (-a)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.75 \cdot 10^{+171}:\\
\;\;\;\;\frac{y \cdot \left(-z\right)}{a}\\
\mathbf{elif}\;z \leq 6.2 \cdot 10^{+79}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;z \cdot \frac{y}{-a}\\
\end{array}
\end{array}
if z < -1.75e171Initial program 99.8%
associate-*l/96.1%
Simplified96.1%
Taylor expanded in z around inf 65.0%
mul-1-neg65.0%
associate-*l/61.2%
*-commutative61.2%
distribute-rgt-neg-in61.2%
*-lft-identity61.2%
associate-*l/61.1%
remove-double-neg61.1%
neg-mul-161.1%
associate-*r*61.1%
*-commutative61.1%
neg-mul-161.1%
*-commutative61.1%
distribute-neg-frac61.1%
metadata-eval61.1%
metadata-eval61.1%
associate-/r*61.1%
neg-mul-161.1%
associate-*r/61.2%
*-rgt-identity61.2%
distribute-frac-neg61.2%
remove-double-neg61.2%
Simplified61.2%
associate-*r/65.0%
add-sqr-sqrt43.0%
sqrt-unprod44.3%
sqr-neg44.3%
sqrt-unprod5.0%
add-sqr-sqrt5.8%
associate-*l/5.9%
frac-2neg5.9%
associate-*l/5.8%
add-sqr-sqrt0.7%
sqrt-unprod12.9%
sqr-neg12.9%
sqrt-unprod22.0%
add-sqr-sqrt65.0%
Applied egg-rr65.0%
if -1.75e171 < z < 6.1999999999999998e79Initial program 95.9%
associate-*l/97.2%
Simplified97.2%
Taylor expanded in z around 0 85.8%
cancel-sign-sub-inv85.8%
metadata-eval85.8%
*-lft-identity85.8%
+-commutative85.8%
associate-/l*87.0%
associate-/r/83.7%
Simplified83.7%
if 6.1999999999999998e79 < z Initial program 89.1%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in z around inf 52.1%
mul-1-neg52.1%
associate-*l/58.4%
*-commutative58.4%
distribute-rgt-neg-in58.4%
*-lft-identity58.4%
associate-*l/58.4%
remove-double-neg58.4%
neg-mul-158.4%
associate-*r*58.4%
*-commutative58.4%
neg-mul-158.4%
*-commutative58.4%
distribute-neg-frac58.4%
metadata-eval58.4%
metadata-eval58.4%
associate-/r*58.4%
neg-mul-158.4%
associate-*r/58.4%
*-rgt-identity58.4%
distribute-frac-neg58.4%
remove-double-neg58.4%
Simplified58.4%
Final simplification77.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.04e+64) (not (<= t 2.7e-60))) (* y (/ t a)) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.04e+64) || !(t <= 2.7e-60)) {
tmp = y * (t / a);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((t <= (-1.04d+64)) .or. (.not. (t <= 2.7d-60))) then
tmp = y * (t / a)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.04e+64) || !(t <= 2.7e-60)) {
tmp = y * (t / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.04e+64) or not (t <= 2.7e-60): tmp = y * (t / a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.04e+64) || !(t <= 2.7e-60)) tmp = Float64(y * Float64(t / a)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -1.04e+64) || ~((t <= 2.7e-60))) tmp = y * (t / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.04e+64], N[Not[LessEqual[t, 2.7e-60]], $MachinePrecision]], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.04 \cdot 10^{+64} \lor \neg \left(t \leq 2.7 \cdot 10^{-60}\right):\\
\;\;\;\;y \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < -1.04e64 or 2.7e-60 < t Initial program 93.8%
associate-*l/98.9%
Simplified98.9%
Taylor expanded in t around inf 55.4%
associate-/l*59.2%
associate-/r/50.8%
Simplified50.8%
if -1.04e64 < t < 2.7e-60Initial program 96.7%
associate-*l/96.0%
Simplified96.0%
Taylor expanded in x around inf 57.6%
Final simplification54.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.55e+61) (not (<= t 6.8e-60))) (* (/ y a) t) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.55e+61) || !(t <= 6.8e-60)) {
tmp = (y / a) * t;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((t <= (-1.55d+61)) .or. (.not. (t <= 6.8d-60))) then
tmp = (y / a) * t
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.55e+61) || !(t <= 6.8e-60)) {
tmp = (y / a) * t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.55e+61) or not (t <= 6.8e-60): tmp = (y / a) * t else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.55e+61) || !(t <= 6.8e-60)) tmp = Float64(Float64(y / a) * t); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -1.55e+61) || ~((t <= 6.8e-60))) tmp = (y / a) * t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.55e+61], N[Not[LessEqual[t, 6.8e-60]], $MachinePrecision]], N[(N[(y / a), $MachinePrecision] * t), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.55 \cdot 10^{+61} \lor \neg \left(t \leq 6.8 \cdot 10^{-60}\right):\\
\;\;\;\;\frac{y}{a} \cdot t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < -1.55e61 or 6.80000000000000013e-60 < t Initial program 93.8%
associate-*l/98.9%
Simplified98.9%
Taylor expanded in t around inf 55.4%
associate-/l*59.2%
Simplified59.2%
clear-num59.2%
associate-/r/59.1%
clear-num59.3%
Applied egg-rr59.3%
if -1.55e61 < t < 6.80000000000000013e-60Initial program 96.7%
associate-*l/96.0%
Simplified96.0%
Taylor expanded in x around inf 57.6%
Final simplification58.5%
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
return x;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x
end function
public static double code(double x, double y, double z, double t, double a) {
return x;
}
def code(x, y, z, t, a): return x
function code(x, y, z, t, a) return x end
function tmp = code(x, y, z, t, a) tmp = x; end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 95.2%
associate-*l/97.5%
Simplified97.5%
Taylor expanded in x around inf 39.4%
Final simplification39.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ a (- z t))))
(if (< y -1.0761266216389975e-10)
(- x (/ 1.0 (/ t_1 y)))
(if (< y 2.894426862792089e-49)
(- x (/ (* y (- z t)) a))
(- x (/ y t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = a / (z - t);
double tmp;
if (y < -1.0761266216389975e-10) {
tmp = x - (1.0 / (t_1 / y));
} else if (y < 2.894426862792089e-49) {
tmp = x - ((y * (z - t)) / a);
} else {
tmp = x - (y / t_1);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = a / (z - t)
if (y < (-1.0761266216389975d-10)) then
tmp = x - (1.0d0 / (t_1 / y))
else if (y < 2.894426862792089d-49) then
tmp = x - ((y * (z - t)) / a)
else
tmp = x - (y / t_1)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = a / (z - t);
double tmp;
if (y < -1.0761266216389975e-10) {
tmp = x - (1.0 / (t_1 / y));
} else if (y < 2.894426862792089e-49) {
tmp = x - ((y * (z - t)) / a);
} else {
tmp = x - (y / t_1);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = a / (z - t) tmp = 0 if y < -1.0761266216389975e-10: tmp = x - (1.0 / (t_1 / y)) elif y < 2.894426862792089e-49: tmp = x - ((y * (z - t)) / a) else: tmp = x - (y / t_1) return tmp
function code(x, y, z, t, a) t_1 = Float64(a / Float64(z - t)) tmp = 0.0 if (y < -1.0761266216389975e-10) tmp = Float64(x - Float64(1.0 / Float64(t_1 / y))); elseif (y < 2.894426862792089e-49) tmp = Float64(x - Float64(Float64(y * Float64(z - t)) / a)); else tmp = Float64(x - Float64(y / t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = a / (z - t); tmp = 0.0; if (y < -1.0761266216389975e-10) tmp = x - (1.0 / (t_1 / y)); elseif (y < 2.894426862792089e-49) tmp = x - ((y * (z - t)) / a); else tmp = x - (y / t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(a / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[Less[y, -1.0761266216389975e-10], N[(x - N[(1.0 / N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Less[y, 2.894426862792089e-49], N[(x - N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(x - N[(y / t$95$1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{a}{z - t}\\
\mathbf{if}\;y < -1.0761266216389975 \cdot 10^{-10}:\\
\;\;\;\;x - \frac{1}{\frac{t_1}{y}}\\
\mathbf{elif}\;y < 2.894426862792089 \cdot 10^{-49}:\\
\;\;\;\;x - \frac{y \cdot \left(z - t\right)}{a}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{t_1}\\
\end{array}
\end{array}
herbie shell --seed 2023322
(FPCore (x y z t a)
:name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, F"
:precision binary64
:herbie-target
(if (< y -1.0761266216389975e-10) (- x (/ 1.0 (/ (/ a (- z t)) y))) (if (< y 2.894426862792089e-49) (- x (/ (* y (- z t)) a)) (- x (/ y (/ a (- z t))))))
(- x (/ (* y (- z t)) a)))