
(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 13 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 (/ (- t z) (/ a y))))
double code(double x, double y, double z, double t, double a) {
return x + ((t - z) / (a / y));
}
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 + ((t - z) / (a / y))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((t - z) / (a / y));
}
def code(x, y, z, t, a): return x + ((t - z) / (a / y))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(t - z) / Float64(a / y))) end
function tmp = code(x, y, z, t, a) tmp = x + ((t - z) / (a / y)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(t - z), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{t - z}{\frac{a}{y}}
\end{array}
Initial program 92.9%
associate-*l/96.5%
Simplified96.5%
*-commutative96.5%
clear-num96.5%
un-div-inv96.9%
Applied egg-rr96.9%
Final simplification96.9%
(FPCore (x y z t a)
:precision binary64
(if (or (<= a -5.4e-72)
(not (or (<= a 4.3e-70) (and (not (<= a 4.3e+28)) (<= a 8e+81)))))
(+ x (* t (/ y a)))
(* (/ y a) (- t z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -5.4e-72) || !((a <= 4.3e-70) || (!(a <= 4.3e+28) && (a <= 8e+81)))) {
tmp = x + (t * (y / a));
} else {
tmp = (y / a) * (t - 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 ((a <= (-5.4d-72)) .or. (.not. (a <= 4.3d-70) .or. (.not. (a <= 4.3d+28)) .and. (a <= 8d+81))) then
tmp = x + (t * (y / a))
else
tmp = (y / a) * (t - z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -5.4e-72) || !((a <= 4.3e-70) || (!(a <= 4.3e+28) && (a <= 8e+81)))) {
tmp = x + (t * (y / a));
} else {
tmp = (y / a) * (t - z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -5.4e-72) or not ((a <= 4.3e-70) or (not (a <= 4.3e+28) and (a <= 8e+81))): tmp = x + (t * (y / a)) else: tmp = (y / a) * (t - z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -5.4e-72) || !((a <= 4.3e-70) || (!(a <= 4.3e+28) && (a <= 8e+81)))) tmp = Float64(x + Float64(t * Float64(y / a))); else tmp = Float64(Float64(y / a) * Float64(t - z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -5.4e-72) || ~(((a <= 4.3e-70) || (~((a <= 4.3e+28)) && (a <= 8e+81))))) tmp = x + (t * (y / a)); else tmp = (y / a) * (t - z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -5.4e-72], N[Not[Or[LessEqual[a, 4.3e-70], And[N[Not[LessEqual[a, 4.3e+28]], $MachinePrecision], LessEqual[a, 8e+81]]]], $MachinePrecision]], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.4 \cdot 10^{-72} \lor \neg \left(a \leq 4.3 \cdot 10^{-70} \lor \neg \left(a \leq 4.3 \cdot 10^{+28}\right) \land a \leq 8 \cdot 10^{+81}\right):\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\
\end{array}
\end{array}
if a < -5.4e-72 or 4.3e-70 < a < 4.29999999999999975e28 or 7.99999999999999937e81 < a Initial program 88.6%
associate-*l/96.1%
Simplified96.1%
Taylor expanded in z around 0 77.8%
cancel-sign-sub-inv77.8%
metadata-eval77.8%
*-lft-identity77.8%
+-commutative77.8%
associate-*r/80.9%
Simplified80.9%
if -5.4e-72 < a < 4.3e-70 or 4.29999999999999975e28 < a < 7.99999999999999937e81Initial program 99.1%
associate-*l/97.1%
Simplified97.1%
*-commutative97.1%
clear-num97.1%
un-div-inv98.1%
Applied egg-rr98.1%
Taylor expanded in x around 0 90.7%
mul-1-neg90.7%
associate-*l/88.7%
distribute-rgt-out--73.2%
sub-neg73.2%
+-commutative73.2%
distribute-neg-in73.2%
remove-double-neg73.2%
sub-neg73.2%
distribute-rgt-out--88.7%
Simplified88.7%
Final simplification84.1%
(FPCore (x y z t a)
:precision binary64
(if (<= a -3.6e+171)
x
(if (or (<= a -9.5e+131) (and (not (<= a -6.4e+63)) (<= a 2.1e+106)))
(* (/ y a) (- t z))
x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.6e+171) {
tmp = x;
} else if ((a <= -9.5e+131) || (!(a <= -6.4e+63) && (a <= 2.1e+106))) {
tmp = (y / a) * (t - z);
} 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.6d+171)) then
tmp = x
else if ((a <= (-9.5d+131)) .or. (.not. (a <= (-6.4d+63))) .and. (a <= 2.1d+106)) then
tmp = (y / a) * (t - z)
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.6e+171) {
tmp = x;
} else if ((a <= -9.5e+131) || (!(a <= -6.4e+63) && (a <= 2.1e+106))) {
tmp = (y / a) * (t - z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -3.6e+171: tmp = x elif (a <= -9.5e+131) or (not (a <= -6.4e+63) and (a <= 2.1e+106)): tmp = (y / a) * (t - z) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -3.6e+171) tmp = x; elseif ((a <= -9.5e+131) || (!(a <= -6.4e+63) && (a <= 2.1e+106))) tmp = Float64(Float64(y / a) * Float64(t - z)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -3.6e+171) tmp = x; elseif ((a <= -9.5e+131) || (~((a <= -6.4e+63)) && (a <= 2.1e+106))) tmp = (y / a) * (t - z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3.6e+171], x, If[Or[LessEqual[a, -9.5e+131], And[N[Not[LessEqual[a, -6.4e+63]], $MachinePrecision], LessEqual[a, 2.1e+106]]], N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.6 \cdot 10^{+171}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -9.5 \cdot 10^{+131} \lor \neg \left(a \leq -6.4 \cdot 10^{+63}\right) \land a \leq 2.1 \cdot 10^{+106}:\\
\;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -3.60000000000000018e171 or -9.50000000000000015e131 < a < -6.40000000000000022e63 or 2.10000000000000005e106 < a Initial program 87.2%
associate-*l/95.2%
Simplified95.2%
Taylor expanded in x around inf 70.0%
if -3.60000000000000018e171 < a < -9.50000000000000015e131 or -6.40000000000000022e63 < a < 2.10000000000000005e106Initial program 95.6%
associate-*l/97.1%
Simplified97.1%
*-commutative97.1%
clear-num97.1%
un-div-inv97.7%
Applied egg-rr97.7%
Taylor expanded in x around 0 76.6%
mul-1-neg76.6%
associate-*l/78.1%
distribute-rgt-out--68.8%
sub-neg68.8%
+-commutative68.8%
distribute-neg-in68.8%
remove-double-neg68.8%
sub-neg68.8%
distribute-rgt-out--78.1%
Simplified78.1%
Final simplification75.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (/ y (/ a z)))))
(if (<= z -10500000000000.0)
t_1
(if (<= z 1.5e-29)
(+ x (* t (/ y a)))
(if (or (<= z 1.65e+130) (not (<= z 1.08e+176)))
t_1
(* (/ y a) (- t z)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (y / (a / z));
double tmp;
if (z <= -10500000000000.0) {
tmp = t_1;
} else if (z <= 1.5e-29) {
tmp = x + (t * (y / a));
} else if ((z <= 1.65e+130) || !(z <= 1.08e+176)) {
tmp = t_1;
} else {
tmp = (y / a) * (t - 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 = x - (y / (a / z))
if (z <= (-10500000000000.0d0)) then
tmp = t_1
else if (z <= 1.5d-29) then
tmp = x + (t * (y / a))
else if ((z <= 1.65d+130) .or. (.not. (z <= 1.08d+176))) then
tmp = t_1
else
tmp = (y / a) * (t - z)
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 / z));
double tmp;
if (z <= -10500000000000.0) {
tmp = t_1;
} else if (z <= 1.5e-29) {
tmp = x + (t * (y / a));
} else if ((z <= 1.65e+130) || !(z <= 1.08e+176)) {
tmp = t_1;
} else {
tmp = (y / a) * (t - z);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (y / (a / z)) tmp = 0 if z <= -10500000000000.0: tmp = t_1 elif z <= 1.5e-29: tmp = x + (t * (y / a)) elif (z <= 1.65e+130) or not (z <= 1.08e+176): tmp = t_1 else: tmp = (y / a) * (t - z) return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(y / Float64(a / z))) tmp = 0.0 if (z <= -10500000000000.0) tmp = t_1; elseif (z <= 1.5e-29) tmp = Float64(x + Float64(t * Float64(y / a))); elseif ((z <= 1.65e+130) || !(z <= 1.08e+176)) tmp = t_1; else tmp = Float64(Float64(y / a) * Float64(t - z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - (y / (a / z)); tmp = 0.0; if (z <= -10500000000000.0) tmp = t_1; elseif (z <= 1.5e-29) tmp = x + (t * (y / a)); elseif ((z <= 1.65e+130) || ~((z <= 1.08e+176))) tmp = t_1; else tmp = (y / a) * (t - z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -10500000000000.0], t$95$1, If[LessEqual[z, 1.5e-29], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, 1.65e+130], N[Not[LessEqual[z, 1.08e+176]], $MachinePrecision]], t$95$1, N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \frac{y}{\frac{a}{z}}\\
\mathbf{if}\;z \leq -10500000000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{-29}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq 1.65 \cdot 10^{+130} \lor \neg \left(z \leq 1.08 \cdot 10^{+176}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\
\end{array}
\end{array}
if z < -1.05e13 or 1.5000000000000001e-29 < z < 1.65e130 or 1.08e176 < z Initial program 91.1%
associate-/l*96.5%
Simplified96.5%
Taylor expanded in z around inf 84.0%
if -1.05e13 < z < 1.5000000000000001e-29Initial program 95.5%
associate-*l/95.3%
Simplified95.3%
Taylor expanded in z around 0 90.9%
cancel-sign-sub-inv90.9%
metadata-eval90.9%
*-lft-identity90.9%
+-commutative90.9%
associate-*r/91.6%
Simplified91.6%
if 1.65e130 < z < 1.08e176Initial program 90.6%
associate-*l/100.0%
Simplified100.0%
*-commutative100.0%
clear-num99.8%
un-div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in x around 0 81.0%
mul-1-neg81.0%
associate-*l/90.4%
distribute-rgt-out--80.4%
sub-neg80.4%
+-commutative80.4%
distribute-neg-in80.4%
remove-double-neg80.4%
sub-neg80.4%
distribute-rgt-out--90.4%
Simplified90.4%
Final simplification87.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (/ y (/ a z)))))
(if (<= z -31000000000000.0)
t_1
(if (<= z 6.5e-31)
(+ x (* t (/ y a)))
(if (<= z 7.8e+72)
(- x (/ (* z y) a))
(if (<= z 6.8e+91) (* (/ y a) (- t z)) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (y / (a / z));
double tmp;
if (z <= -31000000000000.0) {
tmp = t_1;
} else if (z <= 6.5e-31) {
tmp = x + (t * (y / a));
} else if (z <= 7.8e+72) {
tmp = x - ((z * y) / a);
} else if (z <= 6.8e+91) {
tmp = (y / a) * (t - z);
} 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 = x - (y / (a / z))
if (z <= (-31000000000000.0d0)) then
tmp = t_1
else if (z <= 6.5d-31) then
tmp = x + (t * (y / a))
else if (z <= 7.8d+72) then
tmp = x - ((z * y) / a)
else if (z <= 6.8d+91) then
tmp = (y / a) * (t - z)
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 = x - (y / (a / z));
double tmp;
if (z <= -31000000000000.0) {
tmp = t_1;
} else if (z <= 6.5e-31) {
tmp = x + (t * (y / a));
} else if (z <= 7.8e+72) {
tmp = x - ((z * y) / a);
} else if (z <= 6.8e+91) {
tmp = (y / a) * (t - z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (y / (a / z)) tmp = 0 if z <= -31000000000000.0: tmp = t_1 elif z <= 6.5e-31: tmp = x + (t * (y / a)) elif z <= 7.8e+72: tmp = x - ((z * y) / a) elif z <= 6.8e+91: tmp = (y / a) * (t - z) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(y / Float64(a / z))) tmp = 0.0 if (z <= -31000000000000.0) tmp = t_1; elseif (z <= 6.5e-31) tmp = Float64(x + Float64(t * Float64(y / a))); elseif (z <= 7.8e+72) tmp = Float64(x - Float64(Float64(z * y) / a)); elseif (z <= 6.8e+91) tmp = Float64(Float64(y / a) * Float64(t - z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - (y / (a / z)); tmp = 0.0; if (z <= -31000000000000.0) tmp = t_1; elseif (z <= 6.5e-31) tmp = x + (t * (y / a)); elseif (z <= 7.8e+72) tmp = x - ((z * y) / a); elseif (z <= 6.8e+91) tmp = (y / a) * (t - z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -31000000000000.0], t$95$1, If[LessEqual[z, 6.5e-31], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.8e+72], N[(x - N[(N[(z * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.8e+91], N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \frac{y}{\frac{a}{z}}\\
\mathbf{if}\;z \leq -31000000000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 6.5 \cdot 10^{-31}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq 7.8 \cdot 10^{+72}:\\
\;\;\;\;x - \frac{z \cdot y}{a}\\
\mathbf{elif}\;z \leq 6.8 \cdot 10^{+91}:\\
\;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -3.1e13 or 6.8000000000000002e91 < z Initial program 89.6%
associate-/l*95.5%
Simplified95.5%
Taylor expanded in z around inf 82.9%
if -3.1e13 < z < 6.49999999999999967e-31Initial program 95.5%
associate-*l/95.3%
Simplified95.3%
Taylor expanded in z around 0 90.9%
cancel-sign-sub-inv90.9%
metadata-eval90.9%
*-lft-identity90.9%
+-commutative90.9%
associate-*r/91.6%
Simplified91.6%
if 6.49999999999999967e-31 < z < 7.79999999999999984e72Initial program 99.9%
associate-*l/99.8%
Simplified99.8%
Taylor expanded in z around inf 89.3%
if 7.79999999999999984e72 < z < 6.8000000000000002e91Initial program 83.8%
associate-*l/100.0%
Simplified100.0%
*-commutative100.0%
clear-num100.0%
un-div-inv100.0%
Applied egg-rr100.0%
Taylor expanded in x around 0 83.8%
mul-1-neg83.8%
associate-*l/100.0%
distribute-rgt-out--83.3%
sub-neg83.3%
+-commutative83.3%
distribute-neg-in83.3%
remove-double-neg83.3%
sub-neg83.3%
distribute-rgt-out--100.0%
Simplified100.0%
Final simplification87.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* z (/ (- y) a))))
(if (<= y -1.05e+51)
t_1
(if (<= y 6.5e-60) x (if (<= y 1.42e+54) t_1 (/ t (/ a y)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = z * (-y / a);
double tmp;
if (y <= -1.05e+51) {
tmp = t_1;
} else if (y <= 6.5e-60) {
tmp = x;
} else if (y <= 1.42e+54) {
tmp = t_1;
} else {
tmp = t / (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) :: t_1
real(8) :: tmp
t_1 = z * (-y / a)
if (y <= (-1.05d+51)) then
tmp = t_1
else if (y <= 6.5d-60) then
tmp = x
else if (y <= 1.42d+54) then
tmp = t_1
else
tmp = t / (a / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = z * (-y / a);
double tmp;
if (y <= -1.05e+51) {
tmp = t_1;
} else if (y <= 6.5e-60) {
tmp = x;
} else if (y <= 1.42e+54) {
tmp = t_1;
} else {
tmp = t / (a / y);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = z * (-y / a) tmp = 0 if y <= -1.05e+51: tmp = t_1 elif y <= 6.5e-60: tmp = x elif y <= 1.42e+54: tmp = t_1 else: tmp = t / (a / y) return tmp
function code(x, y, z, t, a) t_1 = Float64(z * Float64(Float64(-y) / a)) tmp = 0.0 if (y <= -1.05e+51) tmp = t_1; elseif (y <= 6.5e-60) tmp = x; elseif (y <= 1.42e+54) tmp = t_1; else tmp = Float64(t / Float64(a / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = z * (-y / a); tmp = 0.0; if (y <= -1.05e+51) tmp = t_1; elseif (y <= 6.5e-60) tmp = x; elseif (y <= 1.42e+54) tmp = t_1; else tmp = t / (a / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(z * N[((-y) / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.05e+51], t$95$1, If[LessEqual[y, 6.5e-60], x, If[LessEqual[y, 1.42e+54], t$95$1, N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \frac{-y}{a}\\
\mathbf{if}\;y \leq -1.05 \cdot 10^{+51}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 6.5 \cdot 10^{-60}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 1.42 \cdot 10^{+54}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{\frac{a}{y}}\\
\end{array}
\end{array}
if y < -1.0500000000000001e51 or 6.49999999999999995e-60 < y < 1.41999999999999995e54Initial program 93.8%
associate-*l/97.5%
Simplified97.5%
Taylor expanded in z around inf 49.2%
mul-1-neg49.2%
associate-*l/51.8%
*-commutative51.8%
Simplified51.8%
if -1.0500000000000001e51 < y < 6.49999999999999995e-60Initial program 98.4%
associate-*l/95.8%
Simplified95.8%
Taylor expanded in x around inf 56.5%
if 1.41999999999999995e54 < y Initial program 80.2%
associate-*l/96.5%
Simplified96.5%
Taylor expanded in t around inf 55.1%
associate-/l*63.1%
Simplified63.1%
Final simplification56.5%
(FPCore (x y z t a) :precision binary64 (if (<= y -1.05e+51) (* z (/ (- y) a)) (if (<= y 1.5e-59) x (if (<= y 2.6e+58) (/ (- z) (/ a y)) (/ t (/ a y))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.05e+51) {
tmp = z * (-y / a);
} else if (y <= 1.5e-59) {
tmp = x;
} else if (y <= 2.6e+58) {
tmp = -z / (a / y);
} else {
tmp = t / (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 (y <= (-1.05d+51)) then
tmp = z * (-y / a)
else if (y <= 1.5d-59) then
tmp = x
else if (y <= 2.6d+58) then
tmp = -z / (a / y)
else
tmp = t / (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 (y <= -1.05e+51) {
tmp = z * (-y / a);
} else if (y <= 1.5e-59) {
tmp = x;
} else if (y <= 2.6e+58) {
tmp = -z / (a / y);
} else {
tmp = t / (a / y);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -1.05e+51: tmp = z * (-y / a) elif y <= 1.5e-59: tmp = x elif y <= 2.6e+58: tmp = -z / (a / y) else: tmp = t / (a / y) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -1.05e+51) tmp = Float64(z * Float64(Float64(-y) / a)); elseif (y <= 1.5e-59) tmp = x; elseif (y <= 2.6e+58) tmp = Float64(Float64(-z) / Float64(a / y)); else tmp = Float64(t / Float64(a / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -1.05e+51) tmp = z * (-y / a); elseif (y <= 1.5e-59) tmp = x; elseif (y <= 2.6e+58) tmp = -z / (a / y); else tmp = t / (a / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -1.05e+51], N[(z * N[((-y) / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.5e-59], x, If[LessEqual[y, 2.6e+58], N[((-z) / N[(a / y), $MachinePrecision]), $MachinePrecision], N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.05 \cdot 10^{+51}:\\
\;\;\;\;z \cdot \frac{-y}{a}\\
\mathbf{elif}\;y \leq 1.5 \cdot 10^{-59}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 2.6 \cdot 10^{+58}:\\
\;\;\;\;\frac{-z}{\frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{\frac{a}{y}}\\
\end{array}
\end{array}
if y < -1.0500000000000001e51Initial program 91.6%
associate-*l/98.0%
Simplified98.0%
Taylor expanded in z around inf 47.9%
mul-1-neg47.9%
associate-*l/52.1%
*-commutative52.1%
Simplified52.1%
if -1.0500000000000001e51 < y < 1.5e-59Initial program 98.4%
associate-*l/95.8%
Simplified95.8%
Taylor expanded in x around inf 56.5%
if 1.5e-59 < y < 2.59999999999999988e58Initial program 96.8%
associate-*l/96.8%
Simplified96.8%
Taylor expanded in z around inf 51.2%
mul-1-neg51.2%
*-commutative51.2%
associate-/l*51.4%
associate-/r/48.4%
Simplified48.4%
associate-/r/51.4%
Applied egg-rr51.4%
if 2.59999999999999988e58 < y Initial program 80.2%
associate-*l/96.5%
Simplified96.5%
Taylor expanded in t around inf 55.1%
associate-/l*63.1%
Simplified63.1%
Final simplification56.5%
(FPCore (x y z t a) :precision binary64 (if (<= a -5.1e-77) (+ x (* t (/ y a))) (if (<= a 5.8e+52) (/ (* y (- t z)) a) (- x (/ y (/ a z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -5.1e-77) {
tmp = x + (t * (y / a));
} else if (a <= 5.8e+52) {
tmp = (y * (t - z)) / a;
} 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 (a <= (-5.1d-77)) then
tmp = x + (t * (y / a))
else if (a <= 5.8d+52) then
tmp = (y * (t - z)) / a
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 (a <= -5.1e-77) {
tmp = x + (t * (y / a));
} else if (a <= 5.8e+52) {
tmp = (y * (t - z)) / a;
} else {
tmp = x - (y / (a / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -5.1e-77: tmp = x + (t * (y / a)) elif a <= 5.8e+52: tmp = (y * (t - z)) / a else: tmp = x - (y / (a / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -5.1e-77) tmp = Float64(x + Float64(t * Float64(y / a))); elseif (a <= 5.8e+52) tmp = Float64(Float64(y * Float64(t - z)) / a); 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 (a <= -5.1e-77) tmp = x + (t * (y / a)); elseif (a <= 5.8e+52) tmp = (y * (t - z)) / a; else tmp = x - (y / (a / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -5.1e-77], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 5.8e+52], N[(N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], N[(x - N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.1 \cdot 10^{-77}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{elif}\;a \leq 5.8 \cdot 10^{+52}:\\
\;\;\;\;\frac{y \cdot \left(t - z\right)}{a}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{\frac{a}{z}}\\
\end{array}
\end{array}
if a < -5.10000000000000032e-77Initial program 86.9%
associate-*l/97.7%
Simplified97.7%
Taylor expanded in z around 0 77.0%
cancel-sign-sub-inv77.0%
metadata-eval77.0%
*-lft-identity77.0%
+-commutative77.0%
associate-*r/84.6%
Simplified84.6%
if -5.10000000000000032e-77 < a < 5.8e52Initial program 99.2%
associate-*l/96.6%
Simplified96.6%
Taylor expanded in x around 0 86.5%
associate-*r/86.5%
neg-mul-186.5%
distribute-rgt-neg-in86.5%
associate-*r/80.6%
Simplified80.6%
Taylor expanded in y around 0 86.5%
if 5.8e52 < a Initial program 89.2%
associate-/l*98.1%
Simplified98.1%
Taylor expanded in z around inf 83.5%
Final simplification85.2%
(FPCore (x y z t a) :precision binary64 (if (<= a -6.6e-70) (- x (/ y (/ (- a) t))) (if (<= a 7.5e+54) (/ (* y (- t z)) a) (- x (/ y (/ a z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -6.6e-70) {
tmp = x - (y / (-a / t));
} else if (a <= 7.5e+54) {
tmp = (y * (t - z)) / a;
} 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 (a <= (-6.6d-70)) then
tmp = x - (y / (-a / t))
else if (a <= 7.5d+54) then
tmp = (y * (t - z)) / a
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 (a <= -6.6e-70) {
tmp = x - (y / (-a / t));
} else if (a <= 7.5e+54) {
tmp = (y * (t - z)) / a;
} else {
tmp = x - (y / (a / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -6.6e-70: tmp = x - (y / (-a / t)) elif a <= 7.5e+54: tmp = (y * (t - z)) / a else: tmp = x - (y / (a / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -6.6e-70) tmp = Float64(x - Float64(y / Float64(Float64(-a) / t))); elseif (a <= 7.5e+54) tmp = Float64(Float64(y * Float64(t - z)) / a); 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 (a <= -6.6e-70) tmp = x - (y / (-a / t)); elseif (a <= 7.5e+54) tmp = (y * (t - z)) / a; else tmp = x - (y / (a / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -6.6e-70], N[(x - N[(y / N[((-a) / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 7.5e+54], N[(N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], N[(x - N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -6.6 \cdot 10^{-70}:\\
\;\;\;\;x - \frac{y}{\frac{-a}{t}}\\
\mathbf{elif}\;a \leq 7.5 \cdot 10^{+54}:\\
\;\;\;\;\frac{y \cdot \left(t - z\right)}{a}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{\frac{a}{z}}\\
\end{array}
\end{array}
if a < -6.60000000000000033e-70Initial program 86.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around 0 85.7%
associate-*r/85.7%
neg-mul-185.7%
Simplified85.7%
if -6.60000000000000033e-70 < a < 7.50000000000000042e54Initial program 99.2%
associate-*l/96.6%
Simplified96.6%
Taylor expanded in x around 0 86.5%
associate-*r/86.5%
neg-mul-186.5%
distribute-rgt-neg-in86.5%
associate-*r/80.6%
Simplified80.6%
Taylor expanded in y around 0 86.5%
if 7.50000000000000042e54 < a Initial program 89.2%
associate-/l*98.1%
Simplified98.1%
Taylor expanded in z around inf 83.5%
Final simplification85.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -1.12e+52) (not (<= y 1.15))) (* t (/ y a)) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.12e+52) || !(y <= 1.15)) {
tmp = t * (y / 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.12d+52)) .or. (.not. (y <= 1.15d0))) then
tmp = t * (y / 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.12e+52) || !(y <= 1.15)) {
tmp = t * (y / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -1.12e+52) or not (y <= 1.15): tmp = t * (y / a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -1.12e+52) || !(y <= 1.15)) tmp = Float64(t * Float64(y / a)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -1.12e+52) || ~((y <= 1.15))) tmp = t * (y / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -1.12e+52], N[Not[LessEqual[y, 1.15]], $MachinePrecision]], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.12 \cdot 10^{+52} \lor \neg \left(y \leq 1.15\right):\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.12000000000000002e52 or 1.1499999999999999 < y Initial program 86.8%
associate-*l/96.8%
Simplified96.8%
Taylor expanded in t around inf 47.7%
associate-*r/52.2%
Simplified52.2%
if -1.12000000000000002e52 < y < 1.1499999999999999Initial program 98.5%
associate-*l/96.2%
Simplified96.2%
Taylor expanded in x around inf 54.6%
Final simplification53.4%
(FPCore (x y z t a) :precision binary64 (if (<= y -7.5e+51) (* t (/ y a)) (if (<= y 14000.0) x (* y (/ t a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -7.5e+51) {
tmp = t * (y / a);
} else if (y <= 14000.0) {
tmp = x;
} else {
tmp = 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 (y <= (-7.5d+51)) then
tmp = t * (y / a)
else if (y <= 14000.0d0) then
tmp = x
else
tmp = 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 (y <= -7.5e+51) {
tmp = t * (y / a);
} else if (y <= 14000.0) {
tmp = x;
} else {
tmp = y * (t / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -7.5e+51: tmp = t * (y / a) elif y <= 14000.0: tmp = x else: tmp = y * (t / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -7.5e+51) tmp = Float64(t * Float64(y / a)); elseif (y <= 14000.0) tmp = x; else tmp = Float64(y * Float64(t / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -7.5e+51) tmp = t * (y / a); elseif (y <= 14000.0) tmp = x; else tmp = y * (t / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -7.5e+51], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 14000.0], x, N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.5 \cdot 10^{+51}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{elif}\;y \leq 14000:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{t}{a}\\
\end{array}
\end{array}
if y < -7.4999999999999999e51Initial program 91.5%
associate-*l/97.9%
Simplified97.9%
Taylor expanded in t around inf 45.9%
associate-*r/48.0%
Simplified48.0%
if -7.4999999999999999e51 < y < 14000Initial program 98.5%
associate-*l/96.2%
Simplified96.2%
Taylor expanded in x around inf 54.6%
if 14000 < y Initial program 84.2%
associate-*l/96.2%
Simplified96.2%
Taylor expanded in t around inf 48.7%
associate-/l*54.7%
associate-/r/55.0%
Applied egg-rr55.0%
Final simplification53.5%
(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 92.9%
associate-*l/96.5%
Simplified96.5%
Final simplification96.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 92.9%
associate-*l/96.5%
Simplified96.5%
Taylor expanded in x around inf 36.4%
Final simplification36.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 2023297
(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)))