
(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 (* (- z t) (/ y a))))
double code(double x, double y, double z, double t, double a) {
return x + ((z - t) * (y / 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 + ((z - t) * (y / a))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((z - t) * (y / a));
}
def code(x, y, z, t, a): return x + ((z - t) * (y / a))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(z - t) * Float64(y / a))) end
function tmp = code(x, y, z, t, a) tmp = x + ((z - t) * (y / a)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(z - t), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(z - t\right) \cdot \frac{y}{a}
\end{array}
Initial program 93.3%
associate-/l*94.3%
Simplified94.3%
Taylor expanded in y around 0 93.3%
associate-*l/98.0%
*-commutative98.0%
Simplified98.0%
(FPCore (x y z t a)
:precision binary64
(if (<= y -5.5e+167)
(/ (* z y) a)
(if (<= y -4e+51)
(* t (/ y (- a)))
(if (<= y -2.75e-36)
(* y (/ z a))
(if (<= y 3.2e-44)
x
(if (or (<= y 5.6e+65) (not (<= y 1.9e+130)))
(* y (/ (- t) a))
(/ y (/ a z))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -5.5e+167) {
tmp = (z * y) / a;
} else if (y <= -4e+51) {
tmp = t * (y / -a);
} else if (y <= -2.75e-36) {
tmp = y * (z / a);
} else if (y <= 3.2e-44) {
tmp = x;
} else if ((y <= 5.6e+65) || !(y <= 1.9e+130)) {
tmp = y * (-t / a);
} else {
tmp = 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 (y <= (-5.5d+167)) then
tmp = (z * y) / a
else if (y <= (-4d+51)) then
tmp = t * (y / -a)
else if (y <= (-2.75d-36)) then
tmp = y * (z / a)
else if (y <= 3.2d-44) then
tmp = x
else if ((y <= 5.6d+65) .or. (.not. (y <= 1.9d+130))) then
tmp = y * (-t / a)
else
tmp = 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 (y <= -5.5e+167) {
tmp = (z * y) / a;
} else if (y <= -4e+51) {
tmp = t * (y / -a);
} else if (y <= -2.75e-36) {
tmp = y * (z / a);
} else if (y <= 3.2e-44) {
tmp = x;
} else if ((y <= 5.6e+65) || !(y <= 1.9e+130)) {
tmp = y * (-t / a);
} else {
tmp = y / (a / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -5.5e+167: tmp = (z * y) / a elif y <= -4e+51: tmp = t * (y / -a) elif y <= -2.75e-36: tmp = y * (z / a) elif y <= 3.2e-44: tmp = x elif (y <= 5.6e+65) or not (y <= 1.9e+130): tmp = y * (-t / a) else: tmp = y / (a / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -5.5e+167) tmp = Float64(Float64(z * y) / a); elseif (y <= -4e+51) tmp = Float64(t * Float64(y / Float64(-a))); elseif (y <= -2.75e-36) tmp = Float64(y * Float64(z / a)); elseif (y <= 3.2e-44) tmp = x; elseif ((y <= 5.6e+65) || !(y <= 1.9e+130)) tmp = Float64(y * Float64(Float64(-t) / a)); else tmp = Float64(y / Float64(a / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -5.5e+167) tmp = (z * y) / a; elseif (y <= -4e+51) tmp = t * (y / -a); elseif (y <= -2.75e-36) tmp = y * (z / a); elseif (y <= 3.2e-44) tmp = x; elseif ((y <= 5.6e+65) || ~((y <= 1.9e+130))) tmp = y * (-t / a); else tmp = y / (a / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -5.5e+167], N[(N[(z * y), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[y, -4e+51], N[(t * N[(y / (-a)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.75e-36], N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.2e-44], x, If[Or[LessEqual[y, 5.6e+65], N[Not[LessEqual[y, 1.9e+130]], $MachinePrecision]], N[(y * N[((-t) / a), $MachinePrecision]), $MachinePrecision], N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.5 \cdot 10^{+167}:\\
\;\;\;\;\frac{z \cdot y}{a}\\
\mathbf{elif}\;y \leq -4 \cdot 10^{+51}:\\
\;\;\;\;t \cdot \frac{y}{-a}\\
\mathbf{elif}\;y \leq -2.75 \cdot 10^{-36}:\\
\;\;\;\;y \cdot \frac{z}{a}\\
\mathbf{elif}\;y \leq 3.2 \cdot 10^{-44}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 5.6 \cdot 10^{+65} \lor \neg \left(y \leq 1.9 \cdot 10^{+130}\right):\\
\;\;\;\;y \cdot \frac{-t}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{\frac{a}{z}}\\
\end{array}
\end{array}
if y < -5.5000000000000005e167Initial program 88.3%
associate-/l*97.0%
Simplified97.0%
Taylor expanded in y around 0 88.3%
associate-*l/100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in y around inf 79.0%
Taylor expanded in z around inf 64.2%
*-commutative75.9%
associate-*l/78.7%
Applied egg-rr72.6%
if -5.5000000000000005e167 < y < -4e51Initial program 85.4%
associate-/l*98.3%
Simplified98.3%
Taylor expanded in y around 0 85.4%
associate-*l/99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in z around 0 70.3%
associate-*l/83.3%
*-commutative83.3%
neg-mul-183.3%
sub-neg83.3%
associate-*r/70.3%
associate-*l/84.6%
*-commutative84.6%
Simplified84.6%
Taylor expanded in x around 0 62.9%
mul-1-neg62.9%
associate-/l*77.2%
distribute-lft-neg-in77.2%
*-commutative77.2%
Simplified77.2%
if -4e51 < y < -2.74999999999999992e-36Initial program 94.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in y around 0 94.9%
associate-*l/99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in y around inf 89.5%
Taylor expanded in z around inf 74.5%
if -2.74999999999999992e-36 < y < 3.19999999999999995e-44Initial program 99.9%
associate-/l*87.1%
Simplified87.1%
Taylor expanded in x around inf 67.3%
if 3.19999999999999995e-44 < y < 5.5999999999999998e65 or 1.9000000000000001e130 < y Initial program 89.5%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in y around 0 89.5%
associate-*l/97.2%
*-commutative97.2%
Simplified97.2%
Taylor expanded in z around 0 65.2%
associate-*l/70.3%
*-commutative70.3%
neg-mul-170.3%
sub-neg70.3%
associate-*r/65.2%
associate-*l/67.7%
*-commutative67.7%
Simplified67.7%
Taylor expanded in x around 0 49.2%
associate-*r/49.2%
neg-mul-149.2%
distribute-lft-neg-in49.2%
*-commutative49.2%
associate-/l*54.2%
Simplified54.2%
if 5.5999999999999998e65 < y < 1.9000000000000001e130Initial program 83.3%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in y around 0 83.3%
associate-*l/94.5%
*-commutative94.5%
Simplified94.5%
Taylor expanded in y around inf 76.8%
Taylor expanded in z around inf 65.2%
clear-num65.2%
un-div-inv65.3%
Applied egg-rr65.3%
Final simplification65.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ (- t) a))))
(if (<= y -3.45e+162)
(/ (* z y) a)
(if (<= y -2.25e+52)
t_1
(if (<= y -2.3e-36)
(* y (/ z a))
(if (<= y 2.2e-44)
x
(if (or (<= y 8e+65) (not (<= y 1.65e+130)))
t_1
(/ y (/ a z)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (-t / a);
double tmp;
if (y <= -3.45e+162) {
tmp = (z * y) / a;
} else if (y <= -2.25e+52) {
tmp = t_1;
} else if (y <= -2.3e-36) {
tmp = y * (z / a);
} else if (y <= 2.2e-44) {
tmp = x;
} else if ((y <= 8e+65) || !(y <= 1.65e+130)) {
tmp = t_1;
} else {
tmp = 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) :: t_1
real(8) :: tmp
t_1 = y * (-t / a)
if (y <= (-3.45d+162)) then
tmp = (z * y) / a
else if (y <= (-2.25d+52)) then
tmp = t_1
else if (y <= (-2.3d-36)) then
tmp = y * (z / a)
else if (y <= 2.2d-44) then
tmp = x
else if ((y <= 8d+65) .or. (.not. (y <= 1.65d+130))) then
tmp = t_1
else
tmp = y / (a / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y * (-t / a);
double tmp;
if (y <= -3.45e+162) {
tmp = (z * y) / a;
} else if (y <= -2.25e+52) {
tmp = t_1;
} else if (y <= -2.3e-36) {
tmp = y * (z / a);
} else if (y <= 2.2e-44) {
tmp = x;
} else if ((y <= 8e+65) || !(y <= 1.65e+130)) {
tmp = t_1;
} else {
tmp = y / (a / z);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (-t / a) tmp = 0 if y <= -3.45e+162: tmp = (z * y) / a elif y <= -2.25e+52: tmp = t_1 elif y <= -2.3e-36: tmp = y * (z / a) elif y <= 2.2e-44: tmp = x elif (y <= 8e+65) or not (y <= 1.65e+130): tmp = t_1 else: tmp = y / (a / z) return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(Float64(-t) / a)) tmp = 0.0 if (y <= -3.45e+162) tmp = Float64(Float64(z * y) / a); elseif (y <= -2.25e+52) tmp = t_1; elseif (y <= -2.3e-36) tmp = Float64(y * Float64(z / a)); elseif (y <= 2.2e-44) tmp = x; elseif ((y <= 8e+65) || !(y <= 1.65e+130)) tmp = t_1; else tmp = Float64(y / Float64(a / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * (-t / a); tmp = 0.0; if (y <= -3.45e+162) tmp = (z * y) / a; elseif (y <= -2.25e+52) tmp = t_1; elseif (y <= -2.3e-36) tmp = y * (z / a); elseif (y <= 2.2e-44) tmp = x; elseif ((y <= 8e+65) || ~((y <= 1.65e+130))) tmp = t_1; else tmp = y / (a / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[((-t) / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.45e+162], N[(N[(z * y), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[y, -2.25e+52], t$95$1, If[LessEqual[y, -2.3e-36], N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.2e-44], x, If[Or[LessEqual[y, 8e+65], N[Not[LessEqual[y, 1.65e+130]], $MachinePrecision]], t$95$1, N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{-t}{a}\\
\mathbf{if}\;y \leq -3.45 \cdot 10^{+162}:\\
\;\;\;\;\frac{z \cdot y}{a}\\
\mathbf{elif}\;y \leq -2.25 \cdot 10^{+52}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -2.3 \cdot 10^{-36}:\\
\;\;\;\;y \cdot \frac{z}{a}\\
\mathbf{elif}\;y \leq 2.2 \cdot 10^{-44}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 8 \cdot 10^{+65} \lor \neg \left(y \leq 1.65 \cdot 10^{+130}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{\frac{a}{z}}\\
\end{array}
\end{array}
if y < -3.45000000000000011e162Initial program 88.3%
associate-/l*97.0%
Simplified97.0%
Taylor expanded in y around 0 88.3%
associate-*l/100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in y around inf 79.0%
Taylor expanded in z around inf 64.2%
*-commutative75.9%
associate-*l/78.7%
Applied egg-rr72.6%
if -3.45000000000000011e162 < y < -2.25e52 or 2.20000000000000012e-44 < y < 7.9999999999999999e65 or 1.65e130 < y Initial program 88.9%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in y around 0 88.9%
associate-*l/97.6%
*-commutative97.6%
Simplified97.6%
Taylor expanded in z around 0 66.0%
associate-*l/72.3%
*-commutative72.3%
neg-mul-172.3%
sub-neg72.3%
associate-*r/66.0%
associate-*l/70.3%
*-commutative70.3%
Simplified70.3%
Taylor expanded in x around 0 51.3%
associate-*r/51.3%
neg-mul-151.3%
distribute-lft-neg-in51.3%
*-commutative51.3%
associate-/l*57.5%
Simplified57.5%
if -2.25e52 < y < -2.29999999999999996e-36Initial program 94.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in y around 0 94.9%
associate-*l/99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in y around inf 89.5%
Taylor expanded in z around inf 74.5%
if -2.29999999999999996e-36 < y < 2.20000000000000012e-44Initial program 99.9%
associate-/l*87.1%
Simplified87.1%
Taylor expanded in x around inf 67.3%
if 7.9999999999999999e65 < y < 1.65e130Initial program 83.3%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in y around 0 83.3%
associate-*l/94.5%
*-commutative94.5%
Simplified94.5%
Taylor expanded in y around inf 76.8%
Taylor expanded in z around inf 65.2%
clear-num65.2%
un-div-inv65.3%
Applied egg-rr65.3%
Final simplification65.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -1.06e-41) (not (<= y 8e-140))) (* y (/ (- z t) a)) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.06e-41) || !(y <= 8e-140)) {
tmp = y * ((z - 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 ((y <= (-1.06d-41)) .or. (.not. (y <= 8d-140))) then
tmp = y * ((z - 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 ((y <= -1.06e-41) || !(y <= 8e-140)) {
tmp = y * ((z - t) / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -1.06e-41) or not (y <= 8e-140): tmp = y * ((z - t) / a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -1.06e-41) || !(y <= 8e-140)) tmp = Float64(y * Float64(Float64(z - t) / a)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -1.06e-41) || ~((y <= 8e-140))) tmp = y * ((z - t) / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -1.06e-41], N[Not[LessEqual[y, 8e-140]], $MachinePrecision]], N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.06 \cdot 10^{-41} \lor \neg \left(y \leq 8 \cdot 10^{-140}\right):\\
\;\;\;\;y \cdot \frac{z - t}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.06e-41 or 7.9999999999999999e-140 < y Initial program 90.0%
associate-/l*98.7%
Simplified98.7%
Taylor expanded in y around 0 90.0%
associate-*l/97.7%
*-commutative97.7%
Simplified97.7%
Taylor expanded in y around inf 75.9%
Taylor expanded in z around 0 61.7%
+-commutative61.7%
associate-*l/61.3%
mul-1-neg61.3%
associate-/l*64.4%
distribute-lft-neg-in64.4%
*-commutative64.4%
distribute-lft-out80.8%
sub-neg80.8%
*-commutative80.8%
associate-/l*73.9%
associate-*l/81.1%
*-commutative81.1%
Simplified81.1%
if -1.06e-41 < y < 7.9999999999999999e-140Initial program 99.9%
associate-/l*85.5%
Simplified85.5%
Taylor expanded in x around inf 73.9%
Final simplification78.7%
(FPCore (x y z t a) :precision binary64 (if (<= t -4.3e+137) (- x (* t (/ y a))) (if (<= t 2.05e+114) (+ x (* z (/ y a))) (* (- z t) (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -4.3e+137) {
tmp = x - (t * (y / a));
} else if (t <= 2.05e+114) {
tmp = x + (z * (y / a));
} else {
tmp = (z - t) * (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 (t <= (-4.3d+137)) then
tmp = x - (t * (y / a))
else if (t <= 2.05d+114) then
tmp = x + (z * (y / a))
else
tmp = (z - t) * (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 (t <= -4.3e+137) {
tmp = x - (t * (y / a));
} else if (t <= 2.05e+114) {
tmp = x + (z * (y / a));
} else {
tmp = (z - t) * (y / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -4.3e+137: tmp = x - (t * (y / a)) elif t <= 2.05e+114: tmp = x + (z * (y / a)) else: tmp = (z - t) * (y / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -4.3e+137) tmp = Float64(x - Float64(t * Float64(y / a))); elseif (t <= 2.05e+114) tmp = Float64(x + Float64(z * Float64(y / a))); else tmp = Float64(Float64(z - t) * Float64(y / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -4.3e+137) tmp = x - (t * (y / a)); elseif (t <= 2.05e+114) tmp = x + (z * (y / a)); else tmp = (z - t) * (y / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -4.3e+137], N[(x - N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.05e+114], N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z - t), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.3 \cdot 10^{+137}:\\
\;\;\;\;x - t \cdot \frac{y}{a}\\
\mathbf{elif}\;t \leq 2.05 \cdot 10^{+114}:\\
\;\;\;\;x + z \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;\left(z - t\right) \cdot \frac{y}{a}\\
\end{array}
\end{array}
if t < -4.29999999999999965e137Initial program 94.4%
associate-/l*94.4%
Simplified94.4%
Taylor expanded in y around 0 94.4%
associate-*l/97.1%
*-commutative97.1%
Simplified97.1%
Taylor expanded in z around 0 85.6%
associate-*l/85.6%
*-commutative85.6%
neg-mul-185.6%
sub-neg85.6%
associate-*r/85.6%
associate-*l/88.3%
*-commutative88.3%
Simplified88.3%
if -4.29999999999999965e137 < t < 2.05e114Initial program 95.1%
associate-/l*94.0%
Simplified94.0%
Taylor expanded in t around 0 83.8%
+-commutative83.8%
associate-/l*83.3%
Simplified83.3%
*-commutative83.3%
associate-*l/83.8%
Applied egg-rr83.8%
*-commutative83.8%
associate-*l/88.0%
Applied egg-rr88.0%
if 2.05e114 < t Initial program 85.3%
associate-/l*95.6%
Simplified95.6%
Taylor expanded in y around 0 85.3%
associate-*l/99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in y around inf 78.0%
Taylor expanded in z around 0 60.6%
+-commutative60.6%
associate-*l/56.1%
mul-1-neg56.1%
associate-/l*68.6%
distribute-lft-neg-in68.6%
*-commutative68.6%
distribute-lft-out89.1%
sub-neg89.1%
*-commutative89.1%
associate-/l*76.5%
associate-*l/84.8%
*-commutative84.8%
Simplified84.8%
Taylor expanded in y around 0 76.5%
associate-*l/99.9%
*-commutative99.9%
Simplified89.1%
Final simplification88.2%
(FPCore (x y z t a) :precision binary64 (if (<= t -6.2e+172) (* y (/ (- z t) a)) (if (<= t 5.5e+114) (+ x (* z (/ y a))) (* (- z t) (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -6.2e+172) {
tmp = y * ((z - t) / a);
} else if (t <= 5.5e+114) {
tmp = x + (z * (y / a));
} else {
tmp = (z - t) * (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 (t <= (-6.2d+172)) then
tmp = y * ((z - t) / a)
else if (t <= 5.5d+114) then
tmp = x + (z * (y / a))
else
tmp = (z - t) * (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 (t <= -6.2e+172) {
tmp = y * ((z - t) / a);
} else if (t <= 5.5e+114) {
tmp = x + (z * (y / a));
} else {
tmp = (z - t) * (y / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -6.2e+172: tmp = y * ((z - t) / a) elif t <= 5.5e+114: tmp = x + (z * (y / a)) else: tmp = (z - t) * (y / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -6.2e+172) tmp = Float64(y * Float64(Float64(z - t) / a)); elseif (t <= 5.5e+114) tmp = Float64(x + Float64(z * Float64(y / a))); else tmp = Float64(Float64(z - t) * Float64(y / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -6.2e+172) tmp = y * ((z - t) / a); elseif (t <= 5.5e+114) tmp = x + (z * (y / a)); else tmp = (z - t) * (y / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -6.2e+172], N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.5e+114], N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z - t), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.2 \cdot 10^{+172}:\\
\;\;\;\;y \cdot \frac{z - t}{a}\\
\mathbf{elif}\;t \leq 5.5 \cdot 10^{+114}:\\
\;\;\;\;x + z \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;\left(z - t\right) \cdot \frac{y}{a}\\
\end{array}
\end{array}
if t < -6.19999999999999976e172Initial program 93.7%
associate-/l*93.6%
Simplified93.6%
Taylor expanded in y around 0 93.7%
associate-*l/96.8%
*-commutative96.8%
Simplified96.8%
Taylor expanded in y around inf 70.4%
Taylor expanded in z around 0 57.5%
+-commutative57.5%
associate-*l/50.9%
mul-1-neg50.9%
associate-/l*53.9%
distribute-lft-neg-in53.9%
*-commutative53.9%
distribute-lft-out83.9%
sub-neg83.9%
*-commutative83.9%
associate-/l*80.8%
associate-*l/83.9%
*-commutative83.9%
Simplified83.9%
if -6.19999999999999976e172 < t < 5.5000000000000001e114Initial program 95.2%
associate-/l*94.1%
Simplified94.1%
Taylor expanded in t around 0 84.1%
+-commutative84.1%
associate-/l*83.6%
Simplified83.6%
*-commutative83.6%
associate-*l/84.1%
Applied egg-rr84.1%
*-commutative84.1%
associate-*l/88.2%
Applied egg-rr88.2%
if 5.5000000000000001e114 < t Initial program 85.3%
associate-/l*95.6%
Simplified95.6%
Taylor expanded in y around 0 85.3%
associate-*l/99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in y around inf 78.0%
Taylor expanded in z around 0 60.6%
+-commutative60.6%
associate-*l/56.1%
mul-1-neg56.1%
associate-/l*68.6%
distribute-lft-neg-in68.6%
*-commutative68.6%
distribute-lft-out89.1%
sub-neg89.1%
*-commutative89.1%
associate-/l*76.5%
associate-*l/84.8%
*-commutative84.8%
Simplified84.8%
Taylor expanded in y around 0 76.5%
associate-*l/99.9%
*-commutative99.9%
Simplified89.1%
Final simplification87.9%
(FPCore (x y z t a) :precision binary64 (if (<= t -2.65e+183) (* y (/ (- z t) a)) (if (<= t 3.2e+115) (+ x (/ (* z y) a)) (* (- z t) (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.65e+183) {
tmp = y * ((z - t) / a);
} else if (t <= 3.2e+115) {
tmp = x + ((z * y) / a);
} else {
tmp = (z - t) * (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 (t <= (-2.65d+183)) then
tmp = y * ((z - t) / a)
else if (t <= 3.2d+115) then
tmp = x + ((z * y) / a)
else
tmp = (z - t) * (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 (t <= -2.65e+183) {
tmp = y * ((z - t) / a);
} else if (t <= 3.2e+115) {
tmp = x + ((z * y) / a);
} else {
tmp = (z - t) * (y / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -2.65e+183: tmp = y * ((z - t) / a) elif t <= 3.2e+115: tmp = x + ((z * y) / a) else: tmp = (z - t) * (y / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -2.65e+183) tmp = Float64(y * Float64(Float64(z - t) / a)); elseif (t <= 3.2e+115) tmp = Float64(x + Float64(Float64(z * y) / a)); else tmp = Float64(Float64(z - t) * Float64(y / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -2.65e+183) tmp = y * ((z - t) / a); elseif (t <= 3.2e+115) tmp = x + ((z * y) / a); else tmp = (z - t) * (y / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2.65e+183], N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.2e+115], N[(x + N[(N[(z * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(N[(z - t), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.65 \cdot 10^{+183}:\\
\;\;\;\;y \cdot \frac{z - t}{a}\\
\mathbf{elif}\;t \leq 3.2 \cdot 10^{+115}:\\
\;\;\;\;x + \frac{z \cdot y}{a}\\
\mathbf{else}:\\
\;\;\;\;\left(z - t\right) \cdot \frac{y}{a}\\
\end{array}
\end{array}
if t < -2.6500000000000001e183Initial program 93.2%
associate-/l*93.2%
Simplified93.2%
Taylor expanded in y around 0 93.2%
associate-*l/96.5%
*-commutative96.5%
Simplified96.5%
Taylor expanded in y around inf 71.6%
Taylor expanded in z around 0 57.8%
+-commutative57.8%
associate-*l/54.3%
mul-1-neg54.3%
associate-/l*57.5%
distribute-lft-neg-in57.5%
*-commutative57.5%
distribute-lft-out86.1%
sub-neg86.1%
*-commutative86.1%
associate-/l*82.8%
associate-*l/86.1%
*-commutative86.1%
Simplified86.1%
if -2.6500000000000001e183 < t < 3.2e115Initial program 95.3%
associate-/l*94.2%
Simplified94.2%
Taylor expanded in z around inf 83.7%
if 3.2e115 < t Initial program 85.3%
associate-/l*95.6%
Simplified95.6%
Taylor expanded in y around 0 85.3%
associate-*l/99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in y around inf 78.0%
Taylor expanded in z around 0 60.6%
+-commutative60.6%
associate-*l/56.1%
mul-1-neg56.1%
associate-/l*68.6%
distribute-lft-neg-in68.6%
*-commutative68.6%
distribute-lft-out89.1%
sub-neg89.1%
*-commutative89.1%
associate-/l*76.5%
associate-*l/84.8%
*-commutative84.8%
Simplified84.8%
Taylor expanded in y around 0 76.5%
associate-*l/99.9%
*-commutative99.9%
Simplified89.1%
Final simplification84.9%
(FPCore (x y z t a) :precision binary64 (if (<= y -4.1e-44) (* (- z t) (/ y a)) (if (<= y 9.6e-147) x (* y (/ (- z t) a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -4.1e-44) {
tmp = (z - t) * (y / a);
} else if (y <= 9.6e-147) {
tmp = x;
} else {
tmp = y * ((z - 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 (y <= (-4.1d-44)) then
tmp = (z - t) * (y / a)
else if (y <= 9.6d-147) then
tmp = x
else
tmp = y * ((z - 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 (y <= -4.1e-44) {
tmp = (z - t) * (y / a);
} else if (y <= 9.6e-147) {
tmp = x;
} else {
tmp = y * ((z - t) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -4.1e-44: tmp = (z - t) * (y / a) elif y <= 9.6e-147: tmp = x else: tmp = y * ((z - t) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -4.1e-44) tmp = Float64(Float64(z - t) * Float64(y / a)); elseif (y <= 9.6e-147) tmp = x; else tmp = Float64(y * Float64(Float64(z - t) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -4.1e-44) tmp = (z - t) * (y / a); elseif (y <= 9.6e-147) tmp = x; else tmp = y * ((z - t) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -4.1e-44], N[(N[(z - t), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9.6e-147], x, N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.1 \cdot 10^{-44}:\\
\;\;\;\;\left(z - t\right) \cdot \frac{y}{a}\\
\mathbf{elif}\;y \leq 9.6 \cdot 10^{-147}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{z - t}{a}\\
\end{array}
\end{array}
if y < -4.09999999999999992e-44Initial program 89.8%
associate-/l*98.1%
Simplified98.1%
Taylor expanded in y around 0 89.8%
associate-*l/99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in y around inf 80.0%
Taylor expanded in z around 0 66.7%
+-commutative66.7%
associate-*l/66.8%
mul-1-neg66.8%
associate-/l*72.4%
distribute-lft-neg-in72.4%
*-commutative72.4%
distribute-lft-out87.8%
sub-neg87.8%
*-commutative87.8%
associate-/l*80.6%
associate-*l/86.2%
*-commutative86.2%
Simplified86.2%
Taylor expanded in y around 0 80.6%
associate-*l/99.8%
*-commutative99.8%
Simplified87.8%
if -4.09999999999999992e-44 < y < 9.59999999999999994e-147Initial program 99.9%
associate-/l*85.5%
Simplified85.5%
Taylor expanded in x around inf 73.9%
if 9.59999999999999994e-147 < y Initial program 90.2%
associate-/l*99.0%
Simplified99.0%
Taylor expanded in y around 0 90.2%
associate-*l/96.3%
*-commutative96.3%
Simplified96.3%
Taylor expanded in y around inf 73.3%
Taylor expanded in z around 0 58.6%
+-commutative58.6%
associate-*l/58.0%
mul-1-neg58.0%
associate-/l*59.5%
distribute-lft-neg-in59.5%
*-commutative59.5%
distribute-lft-out76.5%
sub-neg76.5%
*-commutative76.5%
associate-/l*69.9%
associate-*l/78.0%
*-commutative78.0%
Simplified78.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -2.8e-36) (not (<= y 1.18e+33))) (* y (/ z a)) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -2.8e-36) || !(y <= 1.18e+33)) {
tmp = y * (z / 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 ((y <= (-2.8d-36)) .or. (.not. (y <= 1.18d+33))) then
tmp = y * (z / 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 ((y <= -2.8e-36) || !(y <= 1.18e+33)) {
tmp = y * (z / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -2.8e-36) or not (y <= 1.18e+33): tmp = y * (z / a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -2.8e-36) || !(y <= 1.18e+33)) tmp = Float64(y * Float64(z / a)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -2.8e-36) || ~((y <= 1.18e+33))) tmp = y * (z / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -2.8e-36], N[Not[LessEqual[y, 1.18e+33]], $MachinePrecision]], N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.8 \cdot 10^{-36} \lor \neg \left(y \leq 1.18 \cdot 10^{+33}\right):\\
\;\;\;\;y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -2.8000000000000001e-36 or 1.17999999999999993e33 < y Initial program 87.4%
associate-/l*99.0%
Simplified99.0%
Taylor expanded in y around 0 87.4%
associate-*l/97.7%
*-commutative97.7%
Simplified97.7%
Taylor expanded in y around inf 79.0%
Taylor expanded in z around inf 52.7%
if -2.8000000000000001e-36 < y < 1.17999999999999993e33Initial program 99.9%
associate-/l*89.1%
Simplified89.1%
Taylor expanded in x around inf 61.5%
Final simplification56.9%
(FPCore (x y z t a) :precision binary64 (if (<= y -2.3e-36) (/ (* z y) a) (if (<= y 2.5e+35) x (* y (/ z a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -2.3e-36) {
tmp = (z * y) / a;
} else if (y <= 2.5e+35) {
tmp = x;
} else {
tmp = 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 (y <= (-2.3d-36)) then
tmp = (z * y) / a
else if (y <= 2.5d+35) then
tmp = x
else
tmp = 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 (y <= -2.3e-36) {
tmp = (z * y) / a;
} else if (y <= 2.5e+35) {
tmp = x;
} else {
tmp = y * (z / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -2.3e-36: tmp = (z * y) / a elif y <= 2.5e+35: tmp = x else: tmp = y * (z / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -2.3e-36) tmp = Float64(Float64(z * y) / a); elseif (y <= 2.5e+35) tmp = x; else tmp = Float64(y * Float64(z / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -2.3e-36) tmp = (z * y) / a; elseif (y <= 2.5e+35) tmp = x; else tmp = y * (z / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -2.3e-36], N[(N[(z * y), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[y, 2.5e+35], x, N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.3 \cdot 10^{-36}:\\
\;\;\;\;\frac{z \cdot y}{a}\\
\mathbf{elif}\;y \leq 2.5 \cdot 10^{+35}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{z}{a}\\
\end{array}
\end{array}
if y < -2.29999999999999996e-36Initial program 89.7%
associate-/l*98.1%
Simplified98.1%
Taylor expanded in y around 0 89.7%
associate-*l/99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in y around inf 80.5%
Taylor expanded in z around inf 57.2%
*-commutative68.1%
associate-*l/69.4%
Applied egg-rr61.4%
if -2.29999999999999996e-36 < y < 2.50000000000000011e35Initial program 99.9%
associate-/l*89.1%
Simplified89.1%
Taylor expanded in x around inf 61.5%
if 2.50000000000000011e35 < y Initial program 85.3%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in y around 0 85.3%
associate-*l/95.9%
*-commutative95.9%
Simplified95.9%
Taylor expanded in y around inf 77.7%
Taylor expanded in z around inf 48.6%
(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(y * Float64(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[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \frac{z - t}{a}
\end{array}
Initial program 93.3%
associate-/l*94.3%
Simplified94.3%
(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 93.3%
associate-/l*94.3%
Simplified94.3%
Taylor expanded in x around inf 36.8%
(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 2024096
(FPCore (x y z t a)
:name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, E"
:precision binary64
:alt
(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)))