
(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 15 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.2%
associate-*l/97.3%
Simplified97.3%
*-commutative97.3%
clear-num97.0%
un-div-inv97.5%
Applied egg-rr97.5%
Final simplification97.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* t (/ y a)))))
(if (<= t -5.8e-19)
t_1
(if (<= t 2e-209)
(- x (/ (* z y) a))
(if (<= t 6.1e+72)
(- x (/ y (/ a z)))
(if (or (<= t 2.5e+155) (not (<= t 2e+170)))
t_1
(/ (* y (- t z)) a)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (t * (y / a));
double tmp;
if (t <= -5.8e-19) {
tmp = t_1;
} else if (t <= 2e-209) {
tmp = x - ((z * y) / a);
} else if (t <= 6.1e+72) {
tmp = x - (y / (a / z));
} else if ((t <= 2.5e+155) || !(t <= 2e+170)) {
tmp = t_1;
} else {
tmp = (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) :: t_1
real(8) :: tmp
t_1 = x + (t * (y / a))
if (t <= (-5.8d-19)) then
tmp = t_1
else if (t <= 2d-209) then
tmp = x - ((z * y) / a)
else if (t <= 6.1d+72) then
tmp = x - (y / (a / z))
else if ((t <= 2.5d+155) .or. (.not. (t <= 2d+170))) then
tmp = t_1
else
tmp = (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 t_1 = x + (t * (y / a));
double tmp;
if (t <= -5.8e-19) {
tmp = t_1;
} else if (t <= 2e-209) {
tmp = x - ((z * y) / a);
} else if (t <= 6.1e+72) {
tmp = x - (y / (a / z));
} else if ((t <= 2.5e+155) || !(t <= 2e+170)) {
tmp = t_1;
} else {
tmp = (y * (t - z)) / a;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (t * (y / a)) tmp = 0 if t <= -5.8e-19: tmp = t_1 elif t <= 2e-209: tmp = x - ((z * y) / a) elif t <= 6.1e+72: tmp = x - (y / (a / z)) elif (t <= 2.5e+155) or not (t <= 2e+170): tmp = t_1 else: tmp = (y * (t - z)) / a return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(t * Float64(y / a))) tmp = 0.0 if (t <= -5.8e-19) tmp = t_1; elseif (t <= 2e-209) tmp = Float64(x - Float64(Float64(z * y) / a)); elseif (t <= 6.1e+72) tmp = Float64(x - Float64(y / Float64(a / z))); elseif ((t <= 2.5e+155) || !(t <= 2e+170)) tmp = t_1; else tmp = Float64(Float64(y * Float64(t - z)) / a); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (t * (y / a)); tmp = 0.0; if (t <= -5.8e-19) tmp = t_1; elseif (t <= 2e-209) tmp = x - ((z * y) / a); elseif (t <= 6.1e+72) tmp = x - (y / (a / z)); elseif ((t <= 2.5e+155) || ~((t <= 2e+170))) tmp = t_1; else tmp = (y * (t - z)) / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.8e-19], t$95$1, If[LessEqual[t, 2e-209], N[(x - N[(N[(z * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.1e+72], N[(x - N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, 2.5e+155], N[Not[LessEqual[t, 2e+170]], $MachinePrecision]], t$95$1, N[(N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + t \cdot \frac{y}{a}\\
\mathbf{if}\;t \leq -5.8 \cdot 10^{-19}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 2 \cdot 10^{-209}:\\
\;\;\;\;x - \frac{z \cdot y}{a}\\
\mathbf{elif}\;t \leq 6.1 \cdot 10^{+72}:\\
\;\;\;\;x - \frac{y}{\frac{a}{z}}\\
\mathbf{elif}\;t \leq 2.5 \cdot 10^{+155} \lor \neg \left(t \leq 2 \cdot 10^{+170}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot \left(t - z\right)}{a}\\
\end{array}
\end{array}
if t < -5.8e-19 or 6.09999999999999991e72 < t < 2.5e155 or 2.00000000000000007e170 < t Initial program 86.8%
associate-*l/99.2%
Simplified99.2%
Taylor expanded in z around 0 80.2%
cancel-sign-sub-inv80.2%
metadata-eval80.2%
*-lft-identity80.2%
+-commutative80.2%
associate-*l/91.7%
*-commutative91.7%
Simplified91.7%
if -5.8e-19 < t < 2.0000000000000001e-209Initial program 99.8%
associate-*l/97.6%
Simplified97.6%
Taylor expanded in z around inf 90.6%
if 2.0000000000000001e-209 < t < 6.09999999999999991e72Initial program 91.0%
associate-*l/94.6%
Simplified94.6%
Taylor expanded in z around inf 78.8%
associate-/l*86.7%
Simplified86.7%
if 2.5e155 < t < 2.00000000000000007e170Initial program 99.6%
associate-*l/88.3%
Simplified88.3%
Taylor expanded in x around 0 99.6%
mul-1-neg99.6%
distribute-frac-neg99.6%
distribute-rgt-neg-in99.6%
associate-*r/76.0%
Simplified76.0%
Taylor expanded in y around 0 99.6%
Final simplification90.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* t (/ y a)))))
(if (<= t -6.6e-18)
t_1
(if (<= t 2.9e-210)
(- x (/ (* z y) a))
(if (<= t 6.2e+72)
(- x (/ y (/ a z)))
(if (<= t 4.1e+155)
(- x (/ y (/ (- a) t)))
(if (<= t 2.9e+174) (* (/ y a) (- t z)) t_1)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (t * (y / a));
double tmp;
if (t <= -6.6e-18) {
tmp = t_1;
} else if (t <= 2.9e-210) {
tmp = x - ((z * y) / a);
} else if (t <= 6.2e+72) {
tmp = x - (y / (a / z));
} else if (t <= 4.1e+155) {
tmp = x - (y / (-a / t));
} else if (t <= 2.9e+174) {
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 + (t * (y / a))
if (t <= (-6.6d-18)) then
tmp = t_1
else if (t <= 2.9d-210) then
tmp = x - ((z * y) / a)
else if (t <= 6.2d+72) then
tmp = x - (y / (a / z))
else if (t <= 4.1d+155) then
tmp = x - (y / (-a / t))
else if (t <= 2.9d+174) 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 + (t * (y / a));
double tmp;
if (t <= -6.6e-18) {
tmp = t_1;
} else if (t <= 2.9e-210) {
tmp = x - ((z * y) / a);
} else if (t <= 6.2e+72) {
tmp = x - (y / (a / z));
} else if (t <= 4.1e+155) {
tmp = x - (y / (-a / t));
} else if (t <= 2.9e+174) {
tmp = (y / a) * (t - z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (t * (y / a)) tmp = 0 if t <= -6.6e-18: tmp = t_1 elif t <= 2.9e-210: tmp = x - ((z * y) / a) elif t <= 6.2e+72: tmp = x - (y / (a / z)) elif t <= 4.1e+155: tmp = x - (y / (-a / t)) elif t <= 2.9e+174: tmp = (y / a) * (t - z) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(t * Float64(y / a))) tmp = 0.0 if (t <= -6.6e-18) tmp = t_1; elseif (t <= 2.9e-210) tmp = Float64(x - Float64(Float64(z * y) / a)); elseif (t <= 6.2e+72) tmp = Float64(x - Float64(y / Float64(a / z))); elseif (t <= 4.1e+155) tmp = Float64(x - Float64(y / Float64(Float64(-a) / t))); elseif (t <= 2.9e+174) 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 + (t * (y / a)); tmp = 0.0; if (t <= -6.6e-18) tmp = t_1; elseif (t <= 2.9e-210) tmp = x - ((z * y) / a); elseif (t <= 6.2e+72) tmp = x - (y / (a / z)); elseif (t <= 4.1e+155) tmp = x - (y / (-a / t)); elseif (t <= 2.9e+174) 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[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.6e-18], t$95$1, If[LessEqual[t, 2.9e-210], N[(x - N[(N[(z * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.2e+72], N[(x - N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.1e+155], N[(x - N[(y / N[((-a) / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.9e+174], N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + t \cdot \frac{y}{a}\\
\mathbf{if}\;t \leq -6.6 \cdot 10^{-18}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 2.9 \cdot 10^{-210}:\\
\;\;\;\;x - \frac{z \cdot y}{a}\\
\mathbf{elif}\;t \leq 6.2 \cdot 10^{+72}:\\
\;\;\;\;x - \frac{y}{\frac{a}{z}}\\
\mathbf{elif}\;t \leq 4.1 \cdot 10^{+155}:\\
\;\;\;\;x - \frac{y}{\frac{-a}{t}}\\
\mathbf{elif}\;t \leq 2.9 \cdot 10^{+174}:\\
\;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -6.6000000000000003e-18 or 2.9e174 < t Initial program 87.4%
associate-*l/99.1%
Simplified99.1%
Taylor expanded in z around 0 80.1%
cancel-sign-sub-inv80.1%
metadata-eval80.1%
*-lft-identity80.1%
+-commutative80.1%
associate-*l/90.9%
*-commutative90.9%
Simplified90.9%
if -6.6000000000000003e-18 < t < 2.90000000000000006e-210Initial program 99.8%
associate-*l/97.6%
Simplified97.6%
Taylor expanded in z around inf 90.6%
if 2.90000000000000006e-210 < t < 6.19999999999999977e72Initial program 91.0%
associate-*l/94.6%
Simplified94.6%
Taylor expanded in z around inf 78.8%
associate-/l*86.7%
Simplified86.7%
if 6.19999999999999977e72 < t < 4.0999999999999998e155Initial program 84.2%
associate-/l*92.1%
Simplified92.1%
Taylor expanded in z around 0 99.9%
associate-*r/99.9%
neg-mul-199.9%
Simplified99.9%
if 4.0999999999999998e155 < t < 2.9e174Initial program 99.5%
associate-*l/99.7%
Simplified99.7%
associate-/r/81.6%
div-inv81.6%
associate-/r*99.2%
Applied egg-rr99.2%
Taylor expanded in x around 0 99.5%
mul-1-neg99.5%
associate-*l/99.7%
distribute-rgt-neg-in99.7%
sub-neg99.7%
distribute-neg-in99.7%
remove-double-neg99.7%
+-commutative99.7%
sub-neg99.7%
Simplified99.7%
Final simplification90.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (- y) (/ a z))))
(if (<= z -7.6e+134)
t_1
(if (<= z -3e-196)
x
(if (<= z 1.82e-273) (* y (/ t a)) (if (<= z 2.9e+67) x t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -y / (a / z);
double tmp;
if (z <= -7.6e+134) {
tmp = t_1;
} else if (z <= -3e-196) {
tmp = x;
} else if (z <= 1.82e-273) {
tmp = y * (t / a);
} else if (z <= 2.9e+67) {
tmp = x;
} 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 <= (-7.6d+134)) then
tmp = t_1
else if (z <= (-3d-196)) then
tmp = x
else if (z <= 1.82d-273) then
tmp = y * (t / a)
else if (z <= 2.9d+67) then
tmp = x
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 <= -7.6e+134) {
tmp = t_1;
} else if (z <= -3e-196) {
tmp = x;
} else if (z <= 1.82e-273) {
tmp = y * (t / a);
} else if (z <= 2.9e+67) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -y / (a / z) tmp = 0 if z <= -7.6e+134: tmp = t_1 elif z <= -3e-196: tmp = x elif z <= 1.82e-273: tmp = y * (t / a) elif z <= 2.9e+67: tmp = x else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(-y) / Float64(a / z)) tmp = 0.0 if (z <= -7.6e+134) tmp = t_1; elseif (z <= -3e-196) tmp = x; elseif (z <= 1.82e-273) tmp = Float64(y * Float64(t / a)); elseif (z <= 2.9e+67) tmp = x; 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 <= -7.6e+134) tmp = t_1; elseif (z <= -3e-196) tmp = x; elseif (z <= 1.82e-273) tmp = y * (t / a); elseif (z <= 2.9e+67) tmp = x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[((-y) / N[(a / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7.6e+134], t$95$1, If[LessEqual[z, -3e-196], x, If[LessEqual[z, 1.82e-273], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.9e+67], x, t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{-y}{\frac{a}{z}}\\
\mathbf{if}\;z \leq -7.6 \cdot 10^{+134}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -3 \cdot 10^{-196}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.82 \cdot 10^{-273}:\\
\;\;\;\;y \cdot \frac{t}{a}\\
\mathbf{elif}\;z \leq 2.9 \cdot 10^{+67}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -7.59999999999999997e134 or 2.90000000000000023e67 < z Initial program 92.5%
associate-*l/97.2%
Simplified97.2%
Taylor expanded in z around inf 59.0%
mul-1-neg59.0%
associate-/l*60.1%
Simplified60.1%
if -7.59999999999999997e134 < z < -3e-196 or 1.81999999999999997e-273 < z < 2.90000000000000023e67Initial program 92.5%
associate-*l/97.9%
Simplified97.9%
Taylor expanded in x around inf 56.2%
if -3e-196 < z < 1.81999999999999997e-273Initial program 90.9%
associate-*l/95.6%
Simplified95.6%
*-commutative95.6%
clear-num95.5%
un-div-inv95.6%
Applied egg-rr95.6%
Taylor expanded in t around inf 57.2%
*-commutative57.2%
associate-*l/61.5%
Simplified61.5%
Final simplification58.3%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.35e+135)
(* y (/ (- z) a))
(if (<= z -1.95e-200)
x
(if (<= z 1.72e-273)
(* y (/ t a))
(if (<= z 7.4e+68) x (/ (- y) (/ a z)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.35e+135) {
tmp = y * (-z / a);
} else if (z <= -1.95e-200) {
tmp = x;
} else if (z <= 1.72e-273) {
tmp = y * (t / a);
} else if (z <= 7.4e+68) {
tmp = x;
} 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 (z <= (-1.35d+135)) then
tmp = y * (-z / a)
else if (z <= (-1.95d-200)) then
tmp = x
else if (z <= 1.72d-273) then
tmp = y * (t / a)
else if (z <= 7.4d+68) then
tmp = x
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 (z <= -1.35e+135) {
tmp = y * (-z / a);
} else if (z <= -1.95e-200) {
tmp = x;
} else if (z <= 1.72e-273) {
tmp = y * (t / a);
} else if (z <= 7.4e+68) {
tmp = x;
} else {
tmp = -y / (a / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.35e+135: tmp = y * (-z / a) elif z <= -1.95e-200: tmp = x elif z <= 1.72e-273: tmp = y * (t / a) elif z <= 7.4e+68: tmp = x else: tmp = -y / (a / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.35e+135) tmp = Float64(y * Float64(Float64(-z) / a)); elseif (z <= -1.95e-200) tmp = x; elseif (z <= 1.72e-273) tmp = Float64(y * Float64(t / a)); elseif (z <= 7.4e+68) tmp = x; else tmp = Float64(Float64(-y) / Float64(a / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.35e+135) tmp = y * (-z / a); elseif (z <= -1.95e-200) tmp = x; elseif (z <= 1.72e-273) tmp = y * (t / a); elseif (z <= 7.4e+68) tmp = x; else tmp = -y / (a / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.35e+135], N[(y * N[((-z) / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.95e-200], x, If[LessEqual[z, 1.72e-273], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.4e+68], x, N[((-y) / N[(a / z), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.35 \cdot 10^{+135}:\\
\;\;\;\;y \cdot \frac{-z}{a}\\
\mathbf{elif}\;z \leq -1.95 \cdot 10^{-200}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.72 \cdot 10^{-273}:\\
\;\;\;\;y \cdot \frac{t}{a}\\
\mathbf{elif}\;z \leq 7.4 \cdot 10^{+68}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{-y}{\frac{a}{z}}\\
\end{array}
\end{array}
if z < -1.34999999999999992e135Initial program 94.1%
associate-*l/96.5%
Simplified96.5%
*-commutative96.5%
clear-num94.9%
un-div-inv95.1%
Applied egg-rr95.1%
Taylor expanded in z around inf 56.6%
mul-1-neg56.6%
associate-*r/62.6%
distribute-rgt-neg-out62.6%
Simplified62.6%
if -1.34999999999999992e135 < z < -1.94999999999999999e-200 or 1.71999999999999996e-273 < z < 7.39999999999999996e68Initial program 92.5%
associate-*l/97.9%
Simplified97.9%
Taylor expanded in x around inf 56.2%
if -1.94999999999999999e-200 < z < 1.71999999999999996e-273Initial program 90.9%
associate-*l/95.6%
Simplified95.6%
*-commutative95.6%
clear-num95.5%
un-div-inv95.6%
Applied egg-rr95.6%
Taylor expanded in t around inf 57.2%
*-commutative57.2%
associate-*l/61.5%
Simplified61.5%
if 7.39999999999999996e68 < z Initial program 91.4%
associate-*l/97.7%
Simplified97.7%
Taylor expanded in z around inf 60.8%
mul-1-neg60.8%
associate-/l*58.3%
Simplified58.3%
Final simplification58.3%
(FPCore (x y z t a)
:precision binary64
(if (<= z -3.8e+133)
(* y (/ (- z) a))
(if (<= z -1e-201)
x
(if (<= z 1.58e-273)
(* y (/ t a))
(if (<= z 1.9e+71) x (* z (/ y (- a))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.8e+133) {
tmp = y * (-z / a);
} else if (z <= -1e-201) {
tmp = x;
} else if (z <= 1.58e-273) {
tmp = y * (t / a);
} else if (z <= 1.9e+71) {
tmp = x;
} else {
tmp = z * (y / -a);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-3.8d+133)) then
tmp = y * (-z / a)
else if (z <= (-1d-201)) then
tmp = x
else if (z <= 1.58d-273) then
tmp = y * (t / a)
else if (z <= 1.9d+71) then
tmp = x
else
tmp = z * (y / -a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.8e+133) {
tmp = y * (-z / a);
} else if (z <= -1e-201) {
tmp = x;
} else if (z <= 1.58e-273) {
tmp = y * (t / a);
} else if (z <= 1.9e+71) {
tmp = x;
} else {
tmp = z * (y / -a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.8e+133: tmp = y * (-z / a) elif z <= -1e-201: tmp = x elif z <= 1.58e-273: tmp = y * (t / a) elif z <= 1.9e+71: tmp = x else: tmp = z * (y / -a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.8e+133) tmp = Float64(y * Float64(Float64(-z) / a)); elseif (z <= -1e-201) tmp = x; elseif (z <= 1.58e-273) tmp = Float64(y * Float64(t / a)); elseif (z <= 1.9e+71) tmp = x; else tmp = Float64(z * Float64(y / Float64(-a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3.8e+133) tmp = y * (-z / a); elseif (z <= -1e-201) tmp = x; elseif (z <= 1.58e-273) tmp = y * (t / a); elseif (z <= 1.9e+71) tmp = x; else tmp = z * (y / -a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.8e+133], N[(y * N[((-z) / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1e-201], x, If[LessEqual[z, 1.58e-273], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.9e+71], x, N[(z * N[(y / (-a)), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.8 \cdot 10^{+133}:\\
\;\;\;\;y \cdot \frac{-z}{a}\\
\mathbf{elif}\;z \leq -1 \cdot 10^{-201}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.58 \cdot 10^{-273}:\\
\;\;\;\;y \cdot \frac{t}{a}\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{+71}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;z \cdot \frac{y}{-a}\\
\end{array}
\end{array}
if z < -3.8000000000000002e133Initial program 94.1%
associate-*l/96.5%
Simplified96.5%
*-commutative96.5%
clear-num94.9%
un-div-inv95.1%
Applied egg-rr95.1%
Taylor expanded in z around inf 56.6%
mul-1-neg56.6%
associate-*r/62.6%
distribute-rgt-neg-out62.6%
Simplified62.6%
if -3.8000000000000002e133 < z < -9.99999999999999946e-202 or 1.57999999999999994e-273 < z < 1.9e71Initial program 92.5%
associate-*l/97.9%
Simplified97.9%
Taylor expanded in x around inf 56.2%
if -9.99999999999999946e-202 < z < 1.57999999999999994e-273Initial program 90.9%
associate-*l/95.6%
Simplified95.6%
*-commutative95.6%
clear-num95.5%
un-div-inv95.6%
Applied egg-rr95.6%
Taylor expanded in t around inf 57.2%
*-commutative57.2%
associate-*l/61.5%
Simplified61.5%
if 1.9e71 < z Initial program 91.4%
associate-*l/97.7%
Simplified97.7%
Taylor expanded in z around inf 60.8%
mul-1-neg60.8%
associate-*l/62.9%
*-commutative62.9%
distribute-rgt-neg-in62.9%
distribute-frac-neg62.9%
*-lft-identity62.9%
metadata-eval62.9%
times-frac62.9%
neg-mul-162.9%
neg-mul-162.9%
remove-double-neg62.9%
Simplified62.9%
Final simplification59.1%
(FPCore (x y z t a)
:precision binary64
(if (<= t -215.0)
(* t (/ y a))
(if (<= t 2.8e+141)
x
(if (<= t 7e+198) (/ y (/ a t)) (if (<= t 2.95e+209) x (/ t (/ a y)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -215.0) {
tmp = t * (y / a);
} else if (t <= 2.8e+141) {
tmp = x;
} else if (t <= 7e+198) {
tmp = y / (a / t);
} else if (t <= 2.95e+209) {
tmp = x;
} 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 (t <= (-215.0d0)) then
tmp = t * (y / a)
else if (t <= 2.8d+141) then
tmp = x
else if (t <= 7d+198) then
tmp = y / (a / t)
else if (t <= 2.95d+209) then
tmp = x
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 (t <= -215.0) {
tmp = t * (y / a);
} else if (t <= 2.8e+141) {
tmp = x;
} else if (t <= 7e+198) {
tmp = y / (a / t);
} else if (t <= 2.95e+209) {
tmp = x;
} else {
tmp = t / (a / y);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -215.0: tmp = t * (y / a) elif t <= 2.8e+141: tmp = x elif t <= 7e+198: tmp = y / (a / t) elif t <= 2.95e+209: tmp = x else: tmp = t / (a / y) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -215.0) tmp = Float64(t * Float64(y / a)); elseif (t <= 2.8e+141) tmp = x; elseif (t <= 7e+198) tmp = Float64(y / Float64(a / t)); elseif (t <= 2.95e+209) tmp = x; else tmp = Float64(t / Float64(a / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -215.0) tmp = t * (y / a); elseif (t <= 2.8e+141) tmp = x; elseif (t <= 7e+198) tmp = y / (a / t); elseif (t <= 2.95e+209) tmp = x; else tmp = t / (a / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -215.0], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.8e+141], x, If[LessEqual[t, 7e+198], N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.95e+209], x, N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -215:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{elif}\;t \leq 2.8 \cdot 10^{+141}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 7 \cdot 10^{+198}:\\
\;\;\;\;\frac{y}{\frac{a}{t}}\\
\mathbf{elif}\;t \leq 2.95 \cdot 10^{+209}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{\frac{a}{y}}\\
\end{array}
\end{array}
if t < -215Initial program 91.1%
associate-*l/99.7%
Simplified99.7%
Taylor expanded in t around inf 55.3%
associate-*l/59.8%
*-commutative59.8%
Simplified59.8%
if -215 < t < 2.79999999999999991e141 or 7.00000000000000026e198 < t < 2.9499999999999999e209Initial program 95.3%
associate-*l/96.3%
Simplified96.3%
Taylor expanded in x around inf 54.8%
if 2.79999999999999991e141 < t < 7.00000000000000026e198Initial program 87.1%
associate-*l/93.5%
Simplified93.5%
*-commutative93.5%
clear-num93.4%
un-div-inv93.4%
Applied egg-rr93.4%
Taylor expanded in t around inf 47.8%
*-commutative47.8%
associate-*l/54.2%
Simplified54.2%
associate-*l/47.8%
*-commutative47.8%
associate-/l*59.5%
Applied egg-rr59.5%
if 2.9499999999999999e209 < t Initial program 75.0%
associate-*l/99.9%
Simplified99.9%
*-commutative99.9%
clear-num99.9%
un-div-inv100.0%
Applied egg-rr100.0%
Taylor expanded in t around inf 69.8%
*-commutative69.8%
associate-/l*76.2%
Simplified76.2%
Final simplification57.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* t (/ y a)))))
(if (<= t -7.8e-17)
t_1
(if (<= t 1e-209)
(- x (/ (* z y) a))
(if (<= t 6.1e+72) (- x (/ y (/ a z))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (t * (y / a));
double tmp;
if (t <= -7.8e-17) {
tmp = t_1;
} else if (t <= 1e-209) {
tmp = x - ((z * y) / a);
} else if (t <= 6.1e+72) {
tmp = x - (y / (a / 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 + (t * (y / a))
if (t <= (-7.8d-17)) then
tmp = t_1
else if (t <= 1d-209) then
tmp = x - ((z * y) / a)
else if (t <= 6.1d+72) then
tmp = x - (y / (a / 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 + (t * (y / a));
double tmp;
if (t <= -7.8e-17) {
tmp = t_1;
} else if (t <= 1e-209) {
tmp = x - ((z * y) / a);
} else if (t <= 6.1e+72) {
tmp = x - (y / (a / z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (t * (y / a)) tmp = 0 if t <= -7.8e-17: tmp = t_1 elif t <= 1e-209: tmp = x - ((z * y) / a) elif t <= 6.1e+72: tmp = x - (y / (a / z)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(t * Float64(y / a))) tmp = 0.0 if (t <= -7.8e-17) tmp = t_1; elseif (t <= 1e-209) tmp = Float64(x - Float64(Float64(z * y) / a)); elseif (t <= 6.1e+72) tmp = Float64(x - Float64(y / Float64(a / z))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (t * (y / a)); tmp = 0.0; if (t <= -7.8e-17) tmp = t_1; elseif (t <= 1e-209) tmp = x - ((z * y) / a); elseif (t <= 6.1e+72) tmp = x - (y / (a / z)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -7.8e-17], t$95$1, If[LessEqual[t, 1e-209], N[(x - N[(N[(z * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.1e+72], N[(x - N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + t \cdot \frac{y}{a}\\
\mathbf{if}\;t \leq -7.8 \cdot 10^{-17}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 10^{-209}:\\
\;\;\;\;x - \frac{z \cdot y}{a}\\
\mathbf{elif}\;t \leq 6.1 \cdot 10^{+72}:\\
\;\;\;\;x - \frac{y}{\frac{a}{z}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -7.79999999999999979e-17 or 6.09999999999999991e72 < t Initial program 87.7%
associate-*l/98.4%
Simplified98.4%
Taylor expanded in z around 0 78.2%
cancel-sign-sub-inv78.2%
metadata-eval78.2%
*-lft-identity78.2%
+-commutative78.2%
associate-*l/88.1%
*-commutative88.1%
Simplified88.1%
if -7.79999999999999979e-17 < t < 1e-209Initial program 99.8%
associate-*l/97.6%
Simplified97.6%
Taylor expanded in z around inf 90.6%
if 1e-209 < t < 6.09999999999999991e72Initial program 91.0%
associate-*l/94.6%
Simplified94.6%
Taylor expanded in z around inf 78.8%
associate-/l*86.7%
Simplified86.7%
Final simplification88.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -5e-30) (not (<= y 2.2e-77))) (* (/ y a) (- t z)) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -5e-30) || !(y <= 2.2e-77)) {
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 ((y <= (-5d-30)) .or. (.not. (y <= 2.2d-77))) 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 ((y <= -5e-30) || !(y <= 2.2e-77)) {
tmp = (y / a) * (t - z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -5e-30) or not (y <= 2.2e-77): tmp = (y / a) * (t - z) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -5e-30) || !(y <= 2.2e-77)) 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 ((y <= -5e-30) || ~((y <= 2.2e-77))) tmp = (y / a) * (t - z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -5e-30], N[Not[LessEqual[y, 2.2e-77]], $MachinePrecision]], N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5 \cdot 10^{-30} \lor \neg \left(y \leq 2.2 \cdot 10^{-77}\right):\\
\;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -4.99999999999999972e-30 or 2.20000000000000007e-77 < y Initial program 86.8%
associate-*l/97.2%
Simplified97.2%
associate-/r/97.1%
div-inv97.0%
associate-/r*97.1%
Applied egg-rr97.1%
Taylor expanded in x around 0 68.4%
mul-1-neg68.4%
associate-*l/74.9%
distribute-rgt-neg-in74.9%
sub-neg74.9%
distribute-neg-in74.9%
remove-double-neg74.9%
+-commutative74.9%
sub-neg74.9%
Simplified74.9%
if -4.99999999999999972e-30 < y < 2.20000000000000007e-77Initial program 98.6%
associate-*l/97.4%
Simplified97.4%
Taylor expanded in x around inf 67.2%
Final simplification71.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.25e+135) (not (<= z 3.7e+67))) (* (/ y a) (- t z)) (+ x (* t (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.25e+135) || !(z <= 3.7e+67)) {
tmp = (y / a) * (t - z);
} else {
tmp = x + (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 ((z <= (-1.25d+135)) .or. (.not. (z <= 3.7d+67))) then
tmp = (y / a) * (t - z)
else
tmp = x + (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 ((z <= -1.25e+135) || !(z <= 3.7e+67)) {
tmp = (y / a) * (t - z);
} else {
tmp = x + (t * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.25e+135) or not (z <= 3.7e+67): tmp = (y / a) * (t - z) else: tmp = x + (t * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.25e+135) || !(z <= 3.7e+67)) tmp = Float64(Float64(y / a) * Float64(t - z)); else tmp = Float64(x + Float64(t * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.25e+135) || ~((z <= 3.7e+67))) tmp = (y / a) * (t - z); else tmp = x + (t * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.25e+135], N[Not[LessEqual[z, 3.7e+67]], $MachinePrecision]], N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.25 \cdot 10^{+135} \lor \neg \left(z \leq 3.7 \cdot 10^{+67}\right):\\
\;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\end{array}
\end{array}
if z < -1.25000000000000007e135 or 3.6999999999999997e67 < z Initial program 92.5%
associate-*l/97.2%
Simplified97.2%
associate-/r/87.4%
div-inv87.4%
associate-/r*97.1%
Applied egg-rr97.1%
Taylor expanded in x around 0 70.2%
mul-1-neg70.2%
associate-*l/74.5%
distribute-rgt-neg-in74.5%
sub-neg74.5%
distribute-neg-in74.5%
remove-double-neg74.5%
+-commutative74.5%
sub-neg74.5%
Simplified74.5%
if -1.25000000000000007e135 < z < 3.6999999999999997e67Initial program 92.1%
associate-*l/97.3%
Simplified97.3%
Taylor expanded in z around 0 83.6%
cancel-sign-sub-inv83.6%
metadata-eval83.6%
*-lft-identity83.6%
+-commutative83.6%
associate-*l/87.9%
*-commutative87.9%
Simplified87.9%
Final simplification83.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -6.5e-16) (not (<= t 6.1e+72))) (+ x (* t (/ y a))) (- x (/ y (/ a z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -6.5e-16) || !(t <= 6.1e+72)) {
tmp = x + (t * (y / 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 ((t <= (-6.5d-16)) .or. (.not. (t <= 6.1d+72))) then
tmp = x + (t * (y / 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 ((t <= -6.5e-16) || !(t <= 6.1e+72)) {
tmp = x + (t * (y / a));
} else {
tmp = x - (y / (a / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -6.5e-16) or not (t <= 6.1e+72): tmp = x + (t * (y / a)) else: tmp = x - (y / (a / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -6.5e-16) || !(t <= 6.1e+72)) tmp = Float64(x + Float64(t * Float64(y / 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 ((t <= -6.5e-16) || ~((t <= 6.1e+72))) tmp = x + (t * (y / a)); else tmp = x - (y / (a / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -6.5e-16], N[Not[LessEqual[t, 6.1e+72]], $MachinePrecision]], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.5 \cdot 10^{-16} \lor \neg \left(t \leq 6.1 \cdot 10^{+72}\right):\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{\frac{a}{z}}\\
\end{array}
\end{array}
if t < -6.50000000000000011e-16 or 6.09999999999999991e72 < t Initial program 87.7%
associate-*l/98.4%
Simplified98.4%
Taylor expanded in z around 0 78.2%
cancel-sign-sub-inv78.2%
metadata-eval78.2%
*-lft-identity78.2%
+-commutative78.2%
associate-*l/88.1%
*-commutative88.1%
Simplified88.1%
if -6.50000000000000011e-16 < t < 6.09999999999999991e72Initial program 96.1%
associate-*l/96.3%
Simplified96.3%
Taylor expanded in z around inf 85.6%
associate-/l*84.1%
Simplified84.1%
Final simplification85.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -0.0019) (not (<= t 2.85e+141))) (* t (/ y a)) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -0.0019) || !(t <= 2.85e+141)) {
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 ((t <= (-0.0019d0)) .or. (.not. (t <= 2.85d+141))) 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 ((t <= -0.0019) || !(t <= 2.85e+141)) {
tmp = t * (y / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -0.0019) or not (t <= 2.85e+141): tmp = t * (y / a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -0.0019) || !(t <= 2.85e+141)) 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 ((t <= -0.0019) || ~((t <= 2.85e+141))) tmp = t * (y / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -0.0019], N[Not[LessEqual[t, 2.85e+141]], $MachinePrecision]], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -0.0019 \lor \neg \left(t \leq 2.85 \cdot 10^{+141}\right):\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < -0.0019 or 2.84999999999999999e141 < t Initial program 86.9%
associate-*l/98.9%
Simplified98.9%
Taylor expanded in t around inf 54.8%
associate-*l/59.8%
*-commutative59.8%
Simplified59.8%
if -0.0019 < t < 2.84999999999999999e141Initial program 95.8%
associate-*l/96.2%
Simplified96.2%
Taylor expanded in x around inf 53.6%
Final simplification56.1%
(FPCore (x y z t a) :precision binary64 (if (<= t -1200.0) (* t (/ y a)) (if (<= t 1.9e+142) x (/ t (/ a y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1200.0) {
tmp = t * (y / a);
} else if (t <= 1.9e+142) {
tmp = x;
} 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 (t <= (-1200.0d0)) then
tmp = t * (y / a)
else if (t <= 1.9d+142) then
tmp = x
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 (t <= -1200.0) {
tmp = t * (y / a);
} else if (t <= 1.9e+142) {
tmp = x;
} else {
tmp = t / (a / y);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1200.0: tmp = t * (y / a) elif t <= 1.9e+142: tmp = x else: tmp = t / (a / y) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1200.0) tmp = Float64(t * Float64(y / a)); elseif (t <= 1.9e+142) tmp = x; else tmp = Float64(t / Float64(a / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -1200.0) tmp = t * (y / a); elseif (t <= 1.9e+142) tmp = x; else tmp = t / (a / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1200.0], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.9e+142], x, N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1200:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{elif}\;t \leq 1.9 \cdot 10^{+142}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{\frac{a}{y}}\\
\end{array}
\end{array}
if t < -1200Initial program 91.1%
associate-*l/99.7%
Simplified99.7%
Taylor expanded in t around inf 55.3%
associate-*l/59.8%
*-commutative59.8%
Simplified59.8%
if -1200 < t < 1.89999999999999995e142Initial program 95.8%
associate-*l/96.2%
Simplified96.2%
Taylor expanded in x around inf 53.6%
if 1.89999999999999995e142 < t Initial program 79.8%
associate-*l/97.4%
Simplified97.4%
*-commutative97.4%
clear-num97.4%
un-div-inv97.4%
Applied egg-rr97.4%
Taylor expanded in t around inf 54.1%
*-commutative54.1%
associate-/l*59.7%
Simplified59.7%
Final simplification56.1%
(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.2%
associate-*l/97.3%
Simplified97.3%
Final simplification97.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 92.2%
associate-*l/97.3%
Simplified97.3%
Taylor expanded in x around inf 44.1%
Final simplification44.1%
(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 2023279
(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)))