
(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 90.3%
associate-*l/97.7%
Simplified97.7%
Final simplification97.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* y (- z)) a)))
(if (<= a -2.4e-94)
x
(if (<= a -1.45e-231)
(/ (* y t) a)
(if (<= a 1.75e-305)
t_1
(if (<= a 5e-42) (/ t (/ a y)) (if (<= a 6.0) t_1 x)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y * -z) / a;
double tmp;
if (a <= -2.4e-94) {
tmp = x;
} else if (a <= -1.45e-231) {
tmp = (y * t) / a;
} else if (a <= 1.75e-305) {
tmp = t_1;
} else if (a <= 5e-42) {
tmp = t / (a / y);
} else if (a <= 6.0) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = (y * -z) / a
if (a <= (-2.4d-94)) then
tmp = x
else if (a <= (-1.45d-231)) then
tmp = (y * t) / a
else if (a <= 1.75d-305) then
tmp = t_1
else if (a <= 5d-42) then
tmp = t / (a / y)
else if (a <= 6.0d0) then
tmp = t_1
else
tmp = x
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 tmp;
if (a <= -2.4e-94) {
tmp = x;
} else if (a <= -1.45e-231) {
tmp = (y * t) / a;
} else if (a <= 1.75e-305) {
tmp = t_1;
} else if (a <= 5e-42) {
tmp = t / (a / y);
} else if (a <= 6.0) {
tmp = t_1;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y * -z) / a tmp = 0 if a <= -2.4e-94: tmp = x elif a <= -1.45e-231: tmp = (y * t) / a elif a <= 1.75e-305: tmp = t_1 elif a <= 5e-42: tmp = t / (a / y) elif a <= 6.0: tmp = t_1 else: tmp = x return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y * Float64(-z)) / a) tmp = 0.0 if (a <= -2.4e-94) tmp = x; elseif (a <= -1.45e-231) tmp = Float64(Float64(y * t) / a); elseif (a <= 1.75e-305) tmp = t_1; elseif (a <= 5e-42) tmp = Float64(t / Float64(a / y)); elseif (a <= 6.0) tmp = t_1; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y * -z) / a; tmp = 0.0; if (a <= -2.4e-94) tmp = x; elseif (a <= -1.45e-231) tmp = (y * t) / a; elseif (a <= 1.75e-305) tmp = t_1; elseif (a <= 5e-42) tmp = t / (a / y); elseif (a <= 6.0) tmp = t_1; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y * (-z)), $MachinePrecision] / a), $MachinePrecision]}, If[LessEqual[a, -2.4e-94], x, If[LessEqual[a, -1.45e-231], N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[a, 1.75e-305], t$95$1, If[LessEqual[a, 5e-42], N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6.0], t$95$1, x]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot \left(-z\right)}{a}\\
\mathbf{if}\;a \leq -2.4 \cdot 10^{-94}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -1.45 \cdot 10^{-231}:\\
\;\;\;\;\frac{y \cdot t}{a}\\
\mathbf{elif}\;a \leq 1.75 \cdot 10^{-305}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 5 \cdot 10^{-42}:\\
\;\;\;\;\frac{t}{\frac{a}{y}}\\
\mathbf{elif}\;a \leq 6:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -2.4e-94 or 6 < a Initial program 83.8%
associate-*r/99.9%
Simplified99.9%
Taylor expanded in x around inf 61.0%
if -2.4e-94 < a < -1.45e-231Initial program 99.9%
associate-*r/82.5%
Simplified82.5%
Taylor expanded in t around inf 50.8%
if -1.45e-231 < a < 1.7499999999999999e-305 or 5.00000000000000003e-42 < a < 6Initial program 99.7%
associate-*r/69.9%
Simplified69.9%
Taylor expanded in z around inf 68.4%
mul-1-neg68.4%
Simplified68.4%
if 1.7499999999999999e-305 < a < 5.00000000000000003e-42Initial program 99.8%
associate-*r/86.5%
Simplified86.5%
Taylor expanded in t around inf 58.2%
*-commutative58.2%
associate-*r/63.9%
Simplified63.9%
clear-num63.9%
div-inv63.9%
Applied egg-rr63.9%
Final simplification61.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (/ y a) (- z))))
(if (<= y -2.6e+188)
t_1
(if (<= y -1.75e+158)
x
(if (<= y -6.2e-27)
t_1
(if (<= y 9.8e-88) x (if (<= y 2.1e+176) (* (/ y a) t) t_1)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y / a) * -z;
double tmp;
if (y <= -2.6e+188) {
tmp = t_1;
} else if (y <= -1.75e+158) {
tmp = x;
} else if (y <= -6.2e-27) {
tmp = t_1;
} else if (y <= 9.8e-88) {
tmp = x;
} else if (y <= 2.1e+176) {
tmp = (y / a) * t;
} 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) * -z
if (y <= (-2.6d+188)) then
tmp = t_1
else if (y <= (-1.75d+158)) then
tmp = x
else if (y <= (-6.2d-27)) then
tmp = t_1
else if (y <= 9.8d-88) then
tmp = x
else if (y <= 2.1d+176) then
tmp = (y / a) * t
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) * -z;
double tmp;
if (y <= -2.6e+188) {
tmp = t_1;
} else if (y <= -1.75e+158) {
tmp = x;
} else if (y <= -6.2e-27) {
tmp = t_1;
} else if (y <= 9.8e-88) {
tmp = x;
} else if (y <= 2.1e+176) {
tmp = (y / a) * t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y / a) * -z tmp = 0 if y <= -2.6e+188: tmp = t_1 elif y <= -1.75e+158: tmp = x elif y <= -6.2e-27: tmp = t_1 elif y <= 9.8e-88: tmp = x elif y <= 2.1e+176: tmp = (y / a) * t else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y / a) * Float64(-z)) tmp = 0.0 if (y <= -2.6e+188) tmp = t_1; elseif (y <= -1.75e+158) tmp = x; elseif (y <= -6.2e-27) tmp = t_1; elseif (y <= 9.8e-88) tmp = x; elseif (y <= 2.1e+176) tmp = Float64(Float64(y / a) * t); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y / a) * -z; tmp = 0.0; if (y <= -2.6e+188) tmp = t_1; elseif (y <= -1.75e+158) tmp = x; elseif (y <= -6.2e-27) tmp = t_1; elseif (y <= 9.8e-88) tmp = x; elseif (y <= 2.1e+176) tmp = (y / a) * t; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y / a), $MachinePrecision] * (-z)), $MachinePrecision]}, If[LessEqual[y, -2.6e+188], t$95$1, If[LessEqual[y, -1.75e+158], x, If[LessEqual[y, -6.2e-27], t$95$1, If[LessEqual[y, 9.8e-88], x, If[LessEqual[y, 2.1e+176], N[(N[(y / a), $MachinePrecision] * t), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{a} \cdot \left(-z\right)\\
\mathbf{if}\;y \leq -2.6 \cdot 10^{+188}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -1.75 \cdot 10^{+158}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq -6.2 \cdot 10^{-27}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 9.8 \cdot 10^{-88}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 2.1 \cdot 10^{+176}:\\
\;\;\;\;\frac{y}{a} \cdot t\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -2.59999999999999987e188 or -1.7500000000000001e158 < y < -6.1999999999999997e-27 or 2.0999999999999999e176 < y Initial program 80.7%
associate-*r/99.8%
Simplified99.8%
Taylor expanded in z around inf 51.4%
mul-1-neg51.4%
associate-*l/58.6%
*-commutative58.6%
distribute-rgt-neg-in58.6%
distribute-frac-neg58.6%
Simplified58.6%
if -2.59999999999999987e188 < y < -1.7500000000000001e158 or -6.1999999999999997e-27 < y < 9.80000000000000055e-88Initial program 98.3%
associate-*r/85.2%
Simplified85.2%
Taylor expanded in x around inf 69.4%
if 9.80000000000000055e-88 < y < 2.0999999999999999e176Initial program 87.7%
associate-*r/95.9%
Simplified95.9%
Taylor expanded in t around inf 37.0%
*-commutative37.0%
associate-*r/45.0%
Simplified45.0%
Final simplification61.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ y (/ a t)))) (t_2 (* (/ y a) (- z))))
(if (<= z -5.4e+194)
t_2
(if (<= z -3.1e+106)
t_1
(if (<= z -2.9e+66) (/ y (/ (- a) z)) (if (<= z 1.45e+151) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y / (a / t));
double t_2 = (y / a) * -z;
double tmp;
if (z <= -5.4e+194) {
tmp = t_2;
} else if (z <= -3.1e+106) {
tmp = t_1;
} else if (z <= -2.9e+66) {
tmp = y / (-a / z);
} else if (z <= 1.45e+151) {
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 = x + (y / (a / t))
t_2 = (y / a) * -z
if (z <= (-5.4d+194)) then
tmp = t_2
else if (z <= (-3.1d+106)) then
tmp = t_1
else if (z <= (-2.9d+66)) then
tmp = y / (-a / z)
else if (z <= 1.45d+151) 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 = x + (y / (a / t));
double t_2 = (y / a) * -z;
double tmp;
if (z <= -5.4e+194) {
tmp = t_2;
} else if (z <= -3.1e+106) {
tmp = t_1;
} else if (z <= -2.9e+66) {
tmp = y / (-a / z);
} else if (z <= 1.45e+151) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y / (a / t)) t_2 = (y / a) * -z tmp = 0 if z <= -5.4e+194: tmp = t_2 elif z <= -3.1e+106: tmp = t_1 elif z <= -2.9e+66: tmp = y / (-a / z) elif z <= 1.45e+151: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y / Float64(a / t))) t_2 = Float64(Float64(y / a) * Float64(-z)) tmp = 0.0 if (z <= -5.4e+194) tmp = t_2; elseif (z <= -3.1e+106) tmp = t_1; elseif (z <= -2.9e+66) tmp = Float64(y / Float64(Float64(-a) / z)); elseif (z <= 1.45e+151) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y / (a / t)); t_2 = (y / a) * -z; tmp = 0.0; if (z <= -5.4e+194) tmp = t_2; elseif (z <= -3.1e+106) tmp = t_1; elseif (z <= -2.9e+66) tmp = y / (-a / z); elseif (z <= 1.45e+151) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y / a), $MachinePrecision] * (-z)), $MachinePrecision]}, If[LessEqual[z, -5.4e+194], t$95$2, If[LessEqual[z, -3.1e+106], t$95$1, If[LessEqual[z, -2.9e+66], N[(y / N[((-a) / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.45e+151], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y}{\frac{a}{t}}\\
t_2 := \frac{y}{a} \cdot \left(-z\right)\\
\mathbf{if}\;z \leq -5.4 \cdot 10^{+194}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -3.1 \cdot 10^{+106}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -2.9 \cdot 10^{+66}:\\
\;\;\;\;\frac{y}{\frac{-a}{z}}\\
\mathbf{elif}\;z \leq 1.45 \cdot 10^{+151}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -5.4000000000000003e194 or 1.45000000000000009e151 < z Initial program 82.7%
associate-*r/87.0%
Simplified87.0%
Taylor expanded in z around inf 60.7%
mul-1-neg60.7%
associate-*l/70.9%
*-commutative70.9%
distribute-rgt-neg-in70.9%
distribute-frac-neg70.9%
Simplified70.9%
if -5.4000000000000003e194 < z < -3.0999999999999999e106 or -2.89999999999999986e66 < z < 1.45000000000000009e151Initial program 93.1%
associate-*r/93.6%
Simplified93.6%
associate-*r/93.1%
associate-/l*94.7%
div-inv94.7%
associate-/r*96.9%
Applied egg-rr96.9%
Taylor expanded in z around 0 81.3%
cancel-sign-sub-inv81.3%
metadata-eval81.3%
associate-*r/81.3%
*-lft-identity81.3%
associate-/l*82.0%
Simplified82.0%
if -3.0999999999999999e106 < z < -2.89999999999999986e66Initial program 90.1%
associate-*r/99.5%
Simplified99.5%
*-commutative99.5%
associate-*l/90.1%
associate-/l*99.8%
Applied egg-rr99.8%
Taylor expanded in z around inf 70.8%
associate-*r/80.2%
associate-*r*80.2%
neg-mul-180.2%
*-commutative80.2%
Simplified80.2%
add-sqr-sqrt39.6%
clear-num39.6%
sqrt-unprod30.8%
sqr-neg30.8%
sqrt-unprod0.4%
add-sqr-sqrt0.9%
associate-*l/0.9%
*-un-lft-identity0.9%
frac-2neg0.9%
add-sqr-sqrt0.5%
sqrt-unprod40.8%
sqr-neg40.8%
sqrt-unprod40.2%
add-sqr-sqrt80.6%
distribute-neg-frac80.6%
Applied egg-rr80.6%
Final simplification79.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (/ y a) (- z))))
(if (<= z -4.8e+198)
t_1
(if (<= z -3.55e+106)
(+ x (/ y (/ a t)))
(if (<= z -2.9e+66)
(/ y (/ (- a) z))
(if (<= z 1.02e+151) (+ x (* (/ y a) t)) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y / a) * -z;
double tmp;
if (z <= -4.8e+198) {
tmp = t_1;
} else if (z <= -3.55e+106) {
tmp = x + (y / (a / t));
} else if (z <= -2.9e+66) {
tmp = y / (-a / z);
} else if (z <= 1.02e+151) {
tmp = x + ((y / a) * t);
} 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) * -z
if (z <= (-4.8d+198)) then
tmp = t_1
else if (z <= (-3.55d+106)) then
tmp = x + (y / (a / t))
else if (z <= (-2.9d+66)) then
tmp = y / (-a / z)
else if (z <= 1.02d+151) then
tmp = x + ((y / a) * t)
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) * -z;
double tmp;
if (z <= -4.8e+198) {
tmp = t_1;
} else if (z <= -3.55e+106) {
tmp = x + (y / (a / t));
} else if (z <= -2.9e+66) {
tmp = y / (-a / z);
} else if (z <= 1.02e+151) {
tmp = x + ((y / a) * t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y / a) * -z tmp = 0 if z <= -4.8e+198: tmp = t_1 elif z <= -3.55e+106: tmp = x + (y / (a / t)) elif z <= -2.9e+66: tmp = y / (-a / z) elif z <= 1.02e+151: tmp = x + ((y / a) * t) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y / a) * Float64(-z)) tmp = 0.0 if (z <= -4.8e+198) tmp = t_1; elseif (z <= -3.55e+106) tmp = Float64(x + Float64(y / Float64(a / t))); elseif (z <= -2.9e+66) tmp = Float64(y / Float64(Float64(-a) / z)); elseif (z <= 1.02e+151) tmp = Float64(x + Float64(Float64(y / a) * t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y / a) * -z; tmp = 0.0; if (z <= -4.8e+198) tmp = t_1; elseif (z <= -3.55e+106) tmp = x + (y / (a / t)); elseif (z <= -2.9e+66) tmp = y / (-a / z); elseif (z <= 1.02e+151) tmp = x + ((y / a) * t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y / a), $MachinePrecision] * (-z)), $MachinePrecision]}, If[LessEqual[z, -4.8e+198], t$95$1, If[LessEqual[z, -3.55e+106], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.9e+66], N[(y / N[((-a) / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.02e+151], N[(x + N[(N[(y / a), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{a} \cdot \left(-z\right)\\
\mathbf{if}\;z \leq -4.8 \cdot 10^{+198}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -3.55 \cdot 10^{+106}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\
\mathbf{elif}\;z \leq -2.9 \cdot 10^{+66}:\\
\;\;\;\;\frac{y}{\frac{-a}{z}}\\
\mathbf{elif}\;z \leq 1.02 \cdot 10^{+151}:\\
\;\;\;\;x + \frac{y}{a} \cdot t\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -4.8000000000000003e198 or 1.02000000000000002e151 < z Initial program 82.7%
associate-*r/87.0%
Simplified87.0%
Taylor expanded in z around inf 60.7%
mul-1-neg60.7%
associate-*l/70.9%
*-commutative70.9%
distribute-rgt-neg-in70.9%
distribute-frac-neg70.9%
Simplified70.9%
if -4.8000000000000003e198 < z < -3.55000000000000015e106Initial program 92.8%
associate-*r/100.0%
Simplified100.0%
associate-*r/92.8%
associate-/l*99.9%
div-inv100.0%
associate-/r*100.0%
Applied egg-rr100.0%
Taylor expanded in z around 0 79.5%
cancel-sign-sub-inv79.5%
metadata-eval79.5%
associate-*r/79.5%
*-lft-identity79.5%
associate-/l*79.6%
Simplified79.6%
if -3.55000000000000015e106 < z < -2.89999999999999986e66Initial program 90.1%
associate-*r/99.5%
Simplified99.5%
*-commutative99.5%
associate-*l/90.1%
associate-/l*99.8%
Applied egg-rr99.8%
Taylor expanded in z around inf 70.8%
associate-*r/80.2%
associate-*r*80.2%
neg-mul-180.2%
*-commutative80.2%
Simplified80.2%
add-sqr-sqrt39.6%
clear-num39.6%
sqrt-unprod30.8%
sqr-neg30.8%
sqrt-unprod0.4%
add-sqr-sqrt0.9%
associate-*l/0.9%
*-un-lft-identity0.9%
frac-2neg0.9%
add-sqr-sqrt0.5%
sqrt-unprod40.8%
sqr-neg40.8%
sqrt-unprod40.2%
add-sqr-sqrt80.6%
distribute-neg-frac80.6%
Applied egg-rr80.6%
if -2.89999999999999986e66 < z < 1.02000000000000002e151Initial program 93.1%
associate-*r/93.1%
Simplified93.1%
Taylor expanded in z around 0 81.4%
sub-neg81.4%
mul-1-neg81.4%
remove-double-neg81.4%
+-commutative81.4%
*-commutative81.4%
associate-*r/86.6%
Simplified86.6%
Final simplification82.0%
(FPCore (x y z t a)
:precision binary64
(if (<= y -2.5e+188)
(* (/ y a) (- z))
(if (<= y -4.4e+158)
x
(if (or (<= y -2.4e-27) (not (<= y 2e-27))) (* (/ z a) (- y)) x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -2.5e+188) {
tmp = (y / a) * -z;
} else if (y <= -4.4e+158) {
tmp = x;
} else if ((y <= -2.4e-27) || !(y <= 2e-27)) {
tmp = (z / a) * -y;
} 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 (y <= (-2.5d+188)) then
tmp = (y / a) * -z
else if (y <= (-4.4d+158)) then
tmp = x
else if ((y <= (-2.4d-27)) .or. (.not. (y <= 2d-27))) then
tmp = (z / a) * -y
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 (y <= -2.5e+188) {
tmp = (y / a) * -z;
} else if (y <= -4.4e+158) {
tmp = x;
} else if ((y <= -2.4e-27) || !(y <= 2e-27)) {
tmp = (z / a) * -y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -2.5e+188: tmp = (y / a) * -z elif y <= -4.4e+158: tmp = x elif (y <= -2.4e-27) or not (y <= 2e-27): tmp = (z / a) * -y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -2.5e+188) tmp = Float64(Float64(y / a) * Float64(-z)); elseif (y <= -4.4e+158) tmp = x; elseif ((y <= -2.4e-27) || !(y <= 2e-27)) tmp = Float64(Float64(z / a) * Float64(-y)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -2.5e+188) tmp = (y / a) * -z; elseif (y <= -4.4e+158) tmp = x; elseif ((y <= -2.4e-27) || ~((y <= 2e-27))) tmp = (z / a) * -y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -2.5e+188], N[(N[(y / a), $MachinePrecision] * (-z)), $MachinePrecision], If[LessEqual[y, -4.4e+158], x, If[Or[LessEqual[y, -2.4e-27], N[Not[LessEqual[y, 2e-27]], $MachinePrecision]], N[(N[(z / a), $MachinePrecision] * (-y)), $MachinePrecision], x]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.5 \cdot 10^{+188}:\\
\;\;\;\;\frac{y}{a} \cdot \left(-z\right)\\
\mathbf{elif}\;y \leq -4.4 \cdot 10^{+158}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq -2.4 \cdot 10^{-27} \lor \neg \left(y \leq 2 \cdot 10^{-27}\right):\\
\;\;\;\;\frac{z}{a} \cdot \left(-y\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -2.5000000000000001e188Initial program 81.3%
associate-*r/99.7%
Simplified99.7%
Taylor expanded in z around inf 54.5%
mul-1-neg54.5%
associate-*l/60.8%
*-commutative60.8%
distribute-rgt-neg-in60.8%
distribute-frac-neg60.8%
Simplified60.8%
if -2.5000000000000001e188 < y < -4.4000000000000002e158 or -2.40000000000000002e-27 < y < 2.0000000000000001e-27Initial program 98.3%
associate-*r/84.8%
Simplified84.8%
Taylor expanded in x around inf 66.3%
if -4.4000000000000002e158 < y < -2.40000000000000002e-27 or 2.0000000000000001e-27 < y Initial program 82.3%
associate-*r/99.8%
Simplified99.8%
*-commutative99.8%
associate-*l/82.3%
associate-/l*98.0%
Applied egg-rr98.0%
Taylor expanded in z around inf 45.8%
associate-*r/52.7%
associate-*r*52.7%
neg-mul-152.7%
*-commutative52.7%
Simplified52.7%
Final simplification60.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -0.4) (not (<= t 1.9e+29))) (+ x (* (/ y a) t)) (- x (* y (/ z a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -0.4) || !(t <= 1.9e+29)) {
tmp = x + ((y / a) * t);
} else {
tmp = x - (y * (z / 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 ((t <= (-0.4d0)) .or. (.not. (t <= 1.9d+29))) then
tmp = x + ((y / a) * t)
else
tmp = x - (y * (z / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -0.4) || !(t <= 1.9e+29)) {
tmp = x + ((y / a) * t);
} else {
tmp = x - (y * (z / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -0.4) or not (t <= 1.9e+29): tmp = x + ((y / a) * t) else: tmp = x - (y * (z / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -0.4) || !(t <= 1.9e+29)) tmp = Float64(x + Float64(Float64(y / a) * t)); else tmp = Float64(x - Float64(y * Float64(z / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -0.4) || ~((t <= 1.9e+29))) tmp = x + ((y / a) * t); else tmp = x - (y * (z / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -0.4], N[Not[LessEqual[t, 1.9e+29]], $MachinePrecision]], N[(x + N[(N[(y / a), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], N[(x - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -0.4 \lor \neg \left(t \leq 1.9 \cdot 10^{+29}\right):\\
\;\;\;\;x + \frac{y}{a} \cdot t\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot \frac{z}{a}\\
\end{array}
\end{array}
if t < -0.40000000000000002 or 1.89999999999999985e29 < t Initial program 88.2%
associate-*r/89.8%
Simplified89.8%
Taylor expanded in z around 0 78.8%
sub-neg78.8%
mul-1-neg78.8%
remove-double-neg78.8%
+-commutative78.8%
*-commutative78.8%
associate-*r/86.7%
Simplified86.7%
if -0.40000000000000002 < t < 1.89999999999999985e29Initial program 92.2%
associate-*r/94.3%
Simplified94.3%
Taylor expanded in z around inf 88.8%
*-commutative88.8%
associate-/l*95.1%
associate-/r/90.9%
Simplified90.9%
Final simplification88.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -82.0) (not (<= t 3.1e+31))) (+ x (* (/ y a) t)) (- x (/ y (/ a z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -82.0) || !(t <= 3.1e+31)) {
tmp = x + ((y / a) * t);
} else {
tmp = x - (y / (a / z));
}
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 <= (-82.0d0)) .or. (.not. (t <= 3.1d+31))) then
tmp = x + ((y / a) * t)
else
tmp = x - (y / (a / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -82.0) || !(t <= 3.1e+31)) {
tmp = x + ((y / a) * t);
} else {
tmp = x - (y / (a / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -82.0) or not (t <= 3.1e+31): tmp = x + ((y / a) * t) else: tmp = x - (y / (a / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -82.0) || !(t <= 3.1e+31)) tmp = Float64(x + Float64(Float64(y / a) * t)); else tmp = Float64(x - Float64(y / Float64(a / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -82.0) || ~((t <= 3.1e+31))) tmp = x + ((y / a) * t); else tmp = x - (y / (a / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -82.0], N[Not[LessEqual[t, 3.1e+31]], $MachinePrecision]], N[(x + N[(N[(y / a), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], N[(x - N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -82 \lor \neg \left(t \leq 3.1 \cdot 10^{+31}\right):\\
\;\;\;\;x + \frac{y}{a} \cdot t\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{\frac{a}{z}}\\
\end{array}
\end{array}
if t < -82 or 3.1000000000000002e31 < t Initial program 88.2%
associate-*r/89.8%
Simplified89.8%
Taylor expanded in z around 0 78.8%
sub-neg78.8%
mul-1-neg78.8%
remove-double-neg78.8%
+-commutative78.8%
*-commutative78.8%
associate-*r/86.7%
Simplified86.7%
if -82 < t < 3.1000000000000002e31Initial program 92.2%
associate-/l*95.0%
Simplified95.0%
Taylor expanded in z around inf 91.6%
Final simplification89.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -51.0) (not (<= t 1.5e+31))) (+ x (* (/ y a) t)) (- x (/ z (/ a y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -51.0) || !(t <= 1.5e+31)) {
tmp = x + ((y / a) * t);
} else {
tmp = x - (z / (a / y));
}
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 <= (-51.0d0)) .or. (.not. (t <= 1.5d+31))) then
tmp = x + ((y / a) * t)
else
tmp = x - (z / (a / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -51.0) || !(t <= 1.5e+31)) {
tmp = x + ((y / a) * t);
} else {
tmp = x - (z / (a / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -51.0) or not (t <= 1.5e+31): tmp = x + ((y / a) * t) else: tmp = x - (z / (a / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -51.0) || !(t <= 1.5e+31)) tmp = Float64(x + Float64(Float64(y / a) * t)); else tmp = Float64(x - Float64(z / Float64(a / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -51.0) || ~((t <= 1.5e+31))) tmp = x + ((y / a) * t); else tmp = x - (z / (a / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -51.0], N[Not[LessEqual[t, 1.5e+31]], $MachinePrecision]], N[(x + N[(N[(y / a), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], N[(x - N[(z / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -51 \lor \neg \left(t \leq 1.5 \cdot 10^{+31}\right):\\
\;\;\;\;x + \frac{y}{a} \cdot t\\
\mathbf{else}:\\
\;\;\;\;x - \frac{z}{\frac{a}{y}}\\
\end{array}
\end{array}
if t < -51 or 1.49999999999999995e31 < t Initial program 88.2%
associate-*r/89.8%
Simplified89.8%
Taylor expanded in z around 0 78.8%
sub-neg78.8%
mul-1-neg78.8%
remove-double-neg78.8%
+-commutative78.8%
*-commutative78.8%
associate-*r/86.7%
Simplified86.7%
if -51 < t < 1.49999999999999995e31Initial program 92.2%
associate-*r/94.3%
Simplified94.3%
Taylor expanded in z around inf 88.8%
*-commutative88.8%
associate-/l*95.1%
associate-/r/90.9%
Simplified90.9%
associate-/r/95.1%
Applied egg-rr95.1%
Final simplification91.1%
(FPCore (x y z t a) :precision binary64 (if (<= t -5.3e+132) (+ x (* (/ y a) t)) (+ x (* y (/ (- t z) a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -5.3e+132) {
tmp = x + ((y / a) * t);
} else {
tmp = x + (y * ((t - z) / 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 (t <= (-5.3d+132)) then
tmp = x + ((y / a) * t)
else
tmp = x + (y * ((t - z) / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -5.3e+132) {
tmp = x + ((y / a) * t);
} else {
tmp = x + (y * ((t - z) / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -5.3e+132: tmp = x + ((y / a) * t) else: tmp = x + (y * ((t - z) / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -5.3e+132) tmp = Float64(x + Float64(Float64(y / a) * t)); else tmp = Float64(x + Float64(y * Float64(Float64(t - z) / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -5.3e+132) tmp = x + ((y / a) * t); else tmp = x + (y * ((t - z) / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -5.3e+132], N[(x + N[(N[(y / a), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.3 \cdot 10^{+132}:\\
\;\;\;\;x + \frac{y}{a} \cdot t\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t - z}{a}\\
\end{array}
\end{array}
if t < -5.3e132Initial program 85.8%
associate-*r/81.2%
Simplified81.2%
Taylor expanded in z around 0 81.1%
sub-neg81.1%
mul-1-neg81.1%
remove-double-neg81.1%
+-commutative81.1%
*-commutative81.1%
associate-*r/94.4%
Simplified94.4%
if -5.3e132 < t Initial program 91.1%
associate-*r/94.2%
Simplified94.2%
Final simplification94.2%
(FPCore (x y z t a) :precision binary64 (if (<= a -3.4e-95) x (if (<= a 2.6e-34) (* (/ y a) t) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.4e-95) {
tmp = x;
} else if (a <= 2.6e-34) {
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 (a <= (-3.4d-95)) then
tmp = x
else if (a <= 2.6d-34) 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 (a <= -3.4e-95) {
tmp = x;
} else if (a <= 2.6e-34) {
tmp = (y / a) * t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -3.4e-95: tmp = x elif a <= 2.6e-34: tmp = (y / a) * t else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -3.4e-95) tmp = x; elseif (a <= 2.6e-34) 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 (a <= -3.4e-95) tmp = x; elseif (a <= 2.6e-34) tmp = (y / a) * t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3.4e-95], x, If[LessEqual[a, 2.6e-34], N[(N[(y / a), $MachinePrecision] * t), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.4 \cdot 10^{-95}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 2.6 \cdot 10^{-34}:\\
\;\;\;\;\frac{y}{a} \cdot t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -3.39999999999999993e-95 or 2.5999999999999999e-34 < a Initial program 84.5%
associate-*r/99.9%
Simplified99.9%
Taylor expanded in x around inf 59.1%
if -3.39999999999999993e-95 < a < 2.5999999999999999e-34Initial program 99.8%
associate-*r/79.6%
Simplified79.6%
Taylor expanded in t around inf 47.8%
*-commutative47.8%
associate-*r/50.7%
Simplified50.7%
Final simplification55.9%
(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 90.3%
associate-*r/92.2%
Simplified92.2%
Taylor expanded in x around inf 43.5%
Final simplification43.5%
(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 2023257
(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)))