
(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 91.2%
associate-*l/96.6%
Simplified96.6%
Taylor expanded in y around 0 91.2%
*-commutative91.2%
associate-/l*96.9%
Simplified96.9%
Final simplification96.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ (- t z) a))))
(if (<= y -5.4e-49)
t_1
(if (<= y 7.2e-143)
x
(if (<= y 6.8e-108) (/ (* z (- y)) a) (if (<= y 2.7e-33) x t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * ((t - z) / a);
double tmp;
if (y <= -5.4e-49) {
tmp = t_1;
} else if (y <= 7.2e-143) {
tmp = x;
} else if (y <= 6.8e-108) {
tmp = (z * -y) / a;
} else if (y <= 2.7e-33) {
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 * ((t - z) / a)
if (y <= (-5.4d-49)) then
tmp = t_1
else if (y <= 7.2d-143) then
tmp = x
else if (y <= 6.8d-108) then
tmp = (z * -y) / a
else if (y <= 2.7d-33) 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 * ((t - z) / a);
double tmp;
if (y <= -5.4e-49) {
tmp = t_1;
} else if (y <= 7.2e-143) {
tmp = x;
} else if (y <= 6.8e-108) {
tmp = (z * -y) / a;
} else if (y <= 2.7e-33) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * ((t - z) / a) tmp = 0 if y <= -5.4e-49: tmp = t_1 elif y <= 7.2e-143: tmp = x elif y <= 6.8e-108: tmp = (z * -y) / a elif y <= 2.7e-33: tmp = x else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(Float64(t - z) / a)) tmp = 0.0 if (y <= -5.4e-49) tmp = t_1; elseif (y <= 7.2e-143) tmp = x; elseif (y <= 6.8e-108) tmp = Float64(Float64(z * Float64(-y)) / a); elseif (y <= 2.7e-33) tmp = x; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * ((t - z) / a); tmp = 0.0; if (y <= -5.4e-49) tmp = t_1; elseif (y <= 7.2e-143) tmp = x; elseif (y <= 6.8e-108) tmp = (z * -y) / a; elseif (y <= 2.7e-33) tmp = x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5.4e-49], t$95$1, If[LessEqual[y, 7.2e-143], x, If[LessEqual[y, 6.8e-108], N[(N[(z * (-y)), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[y, 2.7e-33], x, t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{t - z}{a}\\
\mathbf{if}\;y \leq -5.4 \cdot 10^{-49}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 7.2 \cdot 10^{-143}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 6.8 \cdot 10^{-108}:\\
\;\;\;\;\frac{z \cdot \left(-y\right)}{a}\\
\mathbf{elif}\;y \leq 2.7 \cdot 10^{-33}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -5.3999999999999999e-49 or 2.7000000000000001e-33 < y Initial program 85.1%
associate-*l/95.1%
Simplified95.1%
Taylor expanded in x around 0 62.5%
mul-1-neg62.5%
associate-*r/72.4%
distribute-rgt-neg-out72.4%
*-rgt-identity72.4%
*-rgt-identity72.4%
distribute-neg-frac72.4%
neg-sub072.4%
associate--r-72.4%
neg-sub072.4%
+-commutative72.4%
sub-neg72.4%
Simplified72.4%
if -5.3999999999999999e-49 < y < 7.1999999999999996e-143 or 6.80000000000000004e-108 < y < 2.7000000000000001e-33Initial program 98.4%
associate-*l/98.5%
Simplified98.5%
Taylor expanded in x around inf 69.5%
if 7.1999999999999996e-143 < y < 6.80000000000000004e-108Initial program 100.0%
associate-*l/99.4%
Simplified99.4%
Taylor expanded in z around inf 75.4%
mul-1-neg75.4%
associate-*l/75.0%
*-commutative75.0%
distribute-rgt-neg-in75.0%
*-lft-identity75.0%
associate-*l/75.0%
remove-double-neg75.0%
neg-mul-175.0%
associate-*r*75.0%
*-commutative75.0%
neg-mul-175.0%
*-commutative75.0%
distribute-neg-frac75.0%
metadata-eval75.0%
metadata-eval75.0%
associate-/r*75.0%
neg-mul-175.0%
associate-*r/75.0%
*-rgt-identity75.0%
distribute-frac-neg75.0%
remove-double-neg75.0%
Simplified75.0%
*-commutative75.0%
frac-2neg75.0%
remove-double-neg75.0%
associate-*l/75.4%
Applied egg-rr75.4%
Final simplification71.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (/ y (/ a z)))))
(if (<= z -1.15e+55)
t_1
(if (<= z 0.68)
(- x (/ y (/ (- a) t)))
(if (<= z 5e+216)
t_1
(if (<= z 2.75e+243) (/ (* y (- t z)) a) (* z (/ y (- a)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (y / (a / z));
double tmp;
if (z <= -1.15e+55) {
tmp = t_1;
} else if (z <= 0.68) {
tmp = x - (y / (-a / t));
} else if (z <= 5e+216) {
tmp = t_1;
} else if (z <= 2.75e+243) {
tmp = (y * (t - z)) / a;
} else {
tmp = z * (y / -a);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x - (y / (a / z))
if (z <= (-1.15d+55)) then
tmp = t_1
else if (z <= 0.68d0) then
tmp = x - (y / (-a / t))
else if (z <= 5d+216) then
tmp = t_1
else if (z <= 2.75d+243) then
tmp = (y * (t - z)) / a
else
tmp = z * (y / -a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x - (y / (a / z));
double tmp;
if (z <= -1.15e+55) {
tmp = t_1;
} else if (z <= 0.68) {
tmp = x - (y / (-a / t));
} else if (z <= 5e+216) {
tmp = t_1;
} else if (z <= 2.75e+243) {
tmp = (y * (t - z)) / a;
} else {
tmp = z * (y / -a);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (y / (a / z)) tmp = 0 if z <= -1.15e+55: tmp = t_1 elif z <= 0.68: tmp = x - (y / (-a / t)) elif z <= 5e+216: tmp = t_1 elif z <= 2.75e+243: tmp = (y * (t - z)) / a else: tmp = z * (y / -a) return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(y / Float64(a / z))) tmp = 0.0 if (z <= -1.15e+55) tmp = t_1; elseif (z <= 0.68) tmp = Float64(x - Float64(y / Float64(Float64(-a) / t))); elseif (z <= 5e+216) tmp = t_1; elseif (z <= 2.75e+243) tmp = Float64(Float64(y * Float64(t - z)) / a); else tmp = Float64(z * Float64(y / Float64(-a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - (y / (a / z)); tmp = 0.0; if (z <= -1.15e+55) tmp = t_1; elseif (z <= 0.68) tmp = x - (y / (-a / t)); elseif (z <= 5e+216) tmp = t_1; elseif (z <= 2.75e+243) tmp = (y * (t - z)) / a; else tmp = z * (y / -a); 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, -1.15e+55], t$95$1, If[LessEqual[z, 0.68], N[(x - N[(y / N[((-a) / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5e+216], t$95$1, If[LessEqual[z, 2.75e+243], N[(N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], N[(z * N[(y / (-a)), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \frac{y}{\frac{a}{z}}\\
\mathbf{if}\;z \leq -1.15 \cdot 10^{+55}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 0.68:\\
\;\;\;\;x - \frac{y}{\frac{-a}{t}}\\
\mathbf{elif}\;z \leq 5 \cdot 10^{+216}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 2.75 \cdot 10^{+243}:\\
\;\;\;\;\frac{y \cdot \left(t - z\right)}{a}\\
\mathbf{else}:\\
\;\;\;\;z \cdot \frac{y}{-a}\\
\end{array}
\end{array}
if z < -1.14999999999999994e55 or 0.680000000000000049 < z < 4.9999999999999998e216Initial program 85.0%
associate-/l*90.7%
Simplified90.7%
Taylor expanded in z around inf 80.2%
if -1.14999999999999994e55 < z < 0.680000000000000049Initial program 96.0%
associate-/l*96.4%
Simplified96.4%
Taylor expanded in z around 0 89.3%
associate-*r/89.3%
neg-mul-189.3%
Simplified89.3%
if 4.9999999999999998e216 < z < 2.75000000000000002e243Initial program 99.8%
sub-neg99.8%
distribute-frac-neg99.8%
distribute-lft-neg-out99.8%
+-commutative99.8%
distribute-lft-neg-out99.8%
distribute-rgt-neg-in99.8%
associate-*l/85.9%
fma-def85.9%
sub-neg85.9%
distribute-neg-in85.9%
remove-double-neg85.9%
+-commutative85.9%
sub-neg85.9%
Simplified85.9%
Taylor expanded in y around -inf 99.8%
if 2.75000000000000002e243 < z Initial program 81.4%
associate-*l/99.7%
Simplified99.7%
Taylor expanded in z around inf 71.7%
mul-1-neg71.7%
associate-*l/90.0%
*-commutative90.0%
distribute-rgt-neg-in90.0%
*-lft-identity90.0%
associate-*l/89.9%
remove-double-neg89.9%
neg-mul-189.9%
associate-*r*89.9%
*-commutative89.9%
neg-mul-189.9%
*-commutative89.9%
distribute-neg-frac89.9%
metadata-eval89.9%
metadata-eval89.9%
associate-/r*89.9%
neg-mul-189.9%
associate-*r/90.0%
*-rgt-identity90.0%
distribute-frac-neg90.0%
remove-double-neg90.0%
Simplified90.0%
Final simplification86.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* z (/ y (- a)))))
(if (<= z -1.45e+60)
t_1
(if (<= z 1.8e-198)
x
(if (<= z 4.9e-161) (* y (/ t a)) (if (<= z 4.6e+119) x t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = z * (y / -a);
double tmp;
if (z <= -1.45e+60) {
tmp = t_1;
} else if (z <= 1.8e-198) {
tmp = x;
} else if (z <= 4.9e-161) {
tmp = y * (t / a);
} else if (z <= 4.6e+119) {
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 = z * (y / -a)
if (z <= (-1.45d+60)) then
tmp = t_1
else if (z <= 1.8d-198) then
tmp = x
else if (z <= 4.9d-161) then
tmp = y * (t / a)
else if (z <= 4.6d+119) 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 = z * (y / -a);
double tmp;
if (z <= -1.45e+60) {
tmp = t_1;
} else if (z <= 1.8e-198) {
tmp = x;
} else if (z <= 4.9e-161) {
tmp = y * (t / a);
} else if (z <= 4.6e+119) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = z * (y / -a) tmp = 0 if z <= -1.45e+60: tmp = t_1 elif z <= 1.8e-198: tmp = x elif z <= 4.9e-161: tmp = y * (t / a) elif z <= 4.6e+119: tmp = x else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(z * Float64(y / Float64(-a))) tmp = 0.0 if (z <= -1.45e+60) tmp = t_1; elseif (z <= 1.8e-198) tmp = x; elseif (z <= 4.9e-161) tmp = Float64(y * Float64(t / a)); elseif (z <= 4.6e+119) tmp = x; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = z * (y / -a); tmp = 0.0; if (z <= -1.45e+60) tmp = t_1; elseif (z <= 1.8e-198) tmp = x; elseif (z <= 4.9e-161) tmp = y * (t / a); elseif (z <= 4.6e+119) tmp = x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(z * N[(y / (-a)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.45e+60], t$95$1, If[LessEqual[z, 1.8e-198], x, If[LessEqual[z, 4.9e-161], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.6e+119], x, t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \frac{y}{-a}\\
\mathbf{if}\;z \leq -1.45 \cdot 10^{+60}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{-198}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 4.9 \cdot 10^{-161}:\\
\;\;\;\;y \cdot \frac{t}{a}\\
\mathbf{elif}\;z \leq 4.6 \cdot 10^{+119}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -1.45e60 or 4.6000000000000001e119 < z Initial program 83.0%
associate-*l/98.7%
Simplified98.7%
Taylor expanded in z around inf 56.3%
mul-1-neg56.3%
associate-*l/65.1%
*-commutative65.1%
distribute-rgt-neg-in65.1%
*-lft-identity65.1%
associate-*l/65.0%
remove-double-neg65.0%
neg-mul-165.0%
associate-*r*65.0%
*-commutative65.0%
neg-mul-165.0%
*-commutative65.0%
distribute-neg-frac65.0%
metadata-eval65.0%
metadata-eval65.0%
associate-/r*65.0%
neg-mul-165.0%
associate-*r/65.1%
*-rgt-identity65.1%
distribute-frac-neg65.1%
remove-double-neg65.1%
Simplified65.1%
if -1.45e60 < z < 1.79999999999999999e-198 or 4.90000000000000035e-161 < z < 4.6000000000000001e119Initial program 95.6%
associate-*l/96.4%
Simplified96.4%
Taylor expanded in x around inf 58.1%
if 1.79999999999999999e-198 < z < 4.90000000000000035e-161Initial program 99.7%
associate-*l/82.9%
Simplified82.9%
Taylor expanded in y around 0 99.7%
*-commutative99.7%
associate-/l*82.5%
Simplified82.5%
Taylor expanded in t around inf 73.8%
associate-*l/73.9%
*-commutative73.9%
Simplified73.9%
Final simplification61.3%
(FPCore (x y z t a)
:precision binary64
(if (<= z -3e+59)
(/ (- z) (/ a y))
(if (<= z 1.25e-197)
x
(if (<= z 2.8e-161)
(* y (/ t a))
(if (<= z 4.9e+119) x (* z (/ y (- a))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3e+59) {
tmp = -z / (a / y);
} else if (z <= 1.25e-197) {
tmp = x;
} else if (z <= 2.8e-161) {
tmp = y * (t / a);
} else if (z <= 4.9e+119) {
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 <= (-3d+59)) then
tmp = -z / (a / y)
else if (z <= 1.25d-197) then
tmp = x
else if (z <= 2.8d-161) then
tmp = y * (t / a)
else if (z <= 4.9d+119) 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 <= -3e+59) {
tmp = -z / (a / y);
} else if (z <= 1.25e-197) {
tmp = x;
} else if (z <= 2.8e-161) {
tmp = y * (t / a);
} else if (z <= 4.9e+119) {
tmp = x;
} else {
tmp = z * (y / -a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3e+59: tmp = -z / (a / y) elif z <= 1.25e-197: tmp = x elif z <= 2.8e-161: tmp = y * (t / a) elif z <= 4.9e+119: tmp = x else: tmp = z * (y / -a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3e+59) tmp = Float64(Float64(-z) / Float64(a / y)); elseif (z <= 1.25e-197) tmp = x; elseif (z <= 2.8e-161) tmp = Float64(y * Float64(t / a)); elseif (z <= 4.9e+119) 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 <= -3e+59) tmp = -z / (a / y); elseif (z <= 1.25e-197) tmp = x; elseif (z <= 2.8e-161) tmp = y * (t / a); elseif (z <= 4.9e+119) tmp = x; else tmp = z * (y / -a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3e+59], N[((-z) / N[(a / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.25e-197], x, If[LessEqual[z, 2.8e-161], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.9e+119], x, N[(z * N[(y / (-a)), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3 \cdot 10^{+59}:\\
\;\;\;\;\frac{-z}{\frac{a}{y}}\\
\mathbf{elif}\;z \leq 1.25 \cdot 10^{-197}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{-161}:\\
\;\;\;\;y \cdot \frac{t}{a}\\
\mathbf{elif}\;z \leq 4.9 \cdot 10^{+119}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;z \cdot \frac{y}{-a}\\
\end{array}
\end{array}
if z < -3e59Initial program 82.4%
associate-*l/99.8%
Simplified99.8%
Taylor expanded in z around inf 50.7%
mul-1-neg50.7%
associate-*l/60.9%
*-commutative60.9%
distribute-rgt-neg-in60.9%
*-lft-identity60.9%
associate-*l/60.9%
remove-double-neg60.9%
neg-mul-160.9%
associate-*r*60.9%
*-commutative60.9%
neg-mul-160.9%
*-commutative60.9%
distribute-neg-frac60.9%
metadata-eval60.9%
metadata-eval60.9%
associate-/r*60.9%
neg-mul-160.9%
associate-*r/60.9%
*-rgt-identity60.9%
distribute-frac-neg60.9%
remove-double-neg60.9%
Simplified60.9%
add-sqr-sqrt42.3%
sqrt-unprod26.0%
sqr-neg26.0%
sqrt-unprod2.3%
add-sqr-sqrt2.9%
clear-num2.9%
div-inv2.9%
frac-2neg2.9%
distribute-frac-neg2.9%
add-sqr-sqrt0.6%
sqrt-unprod15.5%
sqr-neg15.5%
sqrt-unprod18.4%
add-sqr-sqrt60.9%
Applied egg-rr60.9%
if -3e59 < z < 1.2500000000000001e-197 or 2.79999999999999992e-161 < z < 4.89999999999999996e119Initial program 95.6%
associate-*l/96.4%
Simplified96.4%
Taylor expanded in x around inf 58.1%
if 1.2500000000000001e-197 < z < 2.79999999999999992e-161Initial program 99.7%
associate-*l/82.9%
Simplified82.9%
Taylor expanded in y around 0 99.7%
*-commutative99.7%
associate-/l*82.5%
Simplified82.5%
Taylor expanded in t around inf 73.8%
associate-*l/73.9%
*-commutative73.9%
Simplified73.9%
if 4.89999999999999996e119 < z Initial program 84.2%
associate-*l/96.4%
Simplified96.4%
Taylor expanded in z around inf 68.2%
mul-1-neg68.2%
associate-*l/74.0%
*-commutative74.0%
distribute-rgt-neg-in74.0%
*-lft-identity74.0%
associate-*l/73.7%
remove-double-neg73.7%
neg-mul-173.7%
associate-*r*73.7%
*-commutative73.7%
neg-mul-173.7%
*-commutative73.7%
distribute-neg-frac73.7%
metadata-eval73.7%
metadata-eval73.7%
associate-/r*73.7%
neg-mul-173.7%
associate-*r/74.0%
*-rgt-identity74.0%
distribute-frac-neg74.0%
remove-double-neg74.0%
Simplified74.0%
Final simplification61.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2.05e+132) (not (<= z 1.05e+175))) (/ (- z) (/ a y)) (+ x (* t (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.05e+132) || !(z <= 1.05e+175)) {
tmp = -z / (a / y);
} 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 <= (-2.05d+132)) .or. (.not. (z <= 1.05d+175))) then
tmp = -z / (a / y)
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 <= -2.05e+132) || !(z <= 1.05e+175)) {
tmp = -z / (a / y);
} else {
tmp = x + (t * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2.05e+132) or not (z <= 1.05e+175): tmp = -z / (a / y) else: tmp = x + (t * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2.05e+132) || !(z <= 1.05e+175)) tmp = Float64(Float64(-z) / Float64(a / y)); 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 <= -2.05e+132) || ~((z <= 1.05e+175))) tmp = -z / (a / y); else tmp = x + (t * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.05e+132], N[Not[LessEqual[z, 1.05e+175]], $MachinePrecision]], N[((-z) / N[(a / y), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.05 \cdot 10^{+132} \lor \neg \left(z \leq 1.05 \cdot 10^{+175}\right):\\
\;\;\;\;\frac{-z}{\frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\end{array}
\end{array}
if z < -2.04999999999999996e132 or 1.05e175 < z Initial program 80.9%
associate-*l/98.2%
Simplified98.2%
Taylor expanded in z around inf 58.7%
mul-1-neg58.7%
associate-*l/71.5%
*-commutative71.5%
distribute-rgt-neg-in71.5%
*-lft-identity71.5%
associate-*l/71.5%
remove-double-neg71.5%
neg-mul-171.5%
associate-*r*71.5%
*-commutative71.5%
neg-mul-171.5%
*-commutative71.5%
distribute-neg-frac71.5%
metadata-eval71.5%
metadata-eval71.5%
associate-/r*71.5%
neg-mul-171.5%
associate-*r/71.5%
*-rgt-identity71.5%
distribute-frac-neg71.5%
remove-double-neg71.5%
Simplified71.5%
add-sqr-sqrt47.0%
sqrt-unprod25.7%
sqr-neg25.7%
sqrt-unprod2.2%
add-sqr-sqrt2.8%
clear-num2.7%
div-inv2.7%
frac-2neg2.7%
distribute-frac-neg2.7%
add-sqr-sqrt0.6%
sqrt-unprod18.0%
sqr-neg18.0%
sqrt-unprod24.3%
add-sqr-sqrt71.6%
Applied egg-rr71.6%
if -2.04999999999999996e132 < z < 1.05e175Initial program 94.6%
associate-*l/96.1%
Simplified96.1%
Taylor expanded in z around 0 81.1%
cancel-sign-sub-inv81.1%
metadata-eval81.1%
*-lft-identity81.1%
+-commutative81.1%
associate-*r/83.6%
Simplified83.6%
Final simplification80.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -3.4e+134) (not (<= z 1.4e+172))) (/ (- z) (/ a y)) (+ x (/ t (/ a y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -3.4e+134) || !(z <= 1.4e+172)) {
tmp = -z / (a / y);
} else {
tmp = x + (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 ((z <= (-3.4d+134)) .or. (.not. (z <= 1.4d+172))) then
tmp = -z / (a / y)
else
tmp = x + (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 ((z <= -3.4e+134) || !(z <= 1.4e+172)) {
tmp = -z / (a / y);
} else {
tmp = x + (t / (a / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -3.4e+134) or not (z <= 1.4e+172): tmp = -z / (a / y) else: tmp = x + (t / (a / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -3.4e+134) || !(z <= 1.4e+172)) tmp = Float64(Float64(-z) / Float64(a / y)); else tmp = Float64(x + Float64(t / Float64(a / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -3.4e+134) || ~((z <= 1.4e+172))) tmp = -z / (a / y); else tmp = x + (t / (a / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -3.4e+134], N[Not[LessEqual[z, 1.4e+172]], $MachinePrecision]], N[((-z) / N[(a / y), $MachinePrecision]), $MachinePrecision], N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.4 \cdot 10^{+134} \lor \neg \left(z \leq 1.4 \cdot 10^{+172}\right):\\
\;\;\;\;\frac{-z}{\frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t}{\frac{a}{y}}\\
\end{array}
\end{array}
if z < -3.40000000000000018e134 or 1.4e172 < z Initial program 80.9%
associate-*l/98.2%
Simplified98.2%
Taylor expanded in z around inf 58.7%
mul-1-neg58.7%
associate-*l/71.5%
*-commutative71.5%
distribute-rgt-neg-in71.5%
*-lft-identity71.5%
associate-*l/71.5%
remove-double-neg71.5%
neg-mul-171.5%
associate-*r*71.5%
*-commutative71.5%
neg-mul-171.5%
*-commutative71.5%
distribute-neg-frac71.5%
metadata-eval71.5%
metadata-eval71.5%
associate-/r*71.5%
neg-mul-171.5%
associate-*r/71.5%
*-rgt-identity71.5%
distribute-frac-neg71.5%
remove-double-neg71.5%
Simplified71.5%
add-sqr-sqrt47.0%
sqrt-unprod25.7%
sqr-neg25.7%
sqrt-unprod2.2%
add-sqr-sqrt2.8%
clear-num2.7%
div-inv2.7%
frac-2neg2.7%
distribute-frac-neg2.7%
add-sqr-sqrt0.6%
sqrt-unprod18.0%
sqr-neg18.0%
sqrt-unprod24.3%
add-sqr-sqrt71.6%
Applied egg-rr71.6%
if -3.40000000000000018e134 < z < 1.4e172Initial program 94.6%
associate-*l/96.1%
Simplified96.1%
Taylor expanded in z around 0 81.1%
cancel-sign-sub-inv81.1%
metadata-eval81.1%
*-lft-identity81.1%
+-commutative81.1%
associate-*r/83.6%
Simplified83.6%
clear-num34.0%
div-inv34.0%
Applied egg-rr83.9%
Final simplification80.8%
(FPCore (x y z t a) :precision binary64 (if (<= t -6.8e-59) (+ x (/ t (/ a y))) (if (<= t 9.5e+176) (- x (/ y (/ a z))) (+ x (* t (/ y a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -6.8e-59) {
tmp = x + (t / (a / y));
} else if (t <= 9.5e+176) {
tmp = x - (y / (a / 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 (t <= (-6.8d-59)) then
tmp = x + (t / (a / y))
else if (t <= 9.5d+176) then
tmp = x - (y / (a / 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 (t <= -6.8e-59) {
tmp = x + (t / (a / y));
} else if (t <= 9.5e+176) {
tmp = x - (y / (a / z));
} else {
tmp = x + (t * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -6.8e-59: tmp = x + (t / (a / y)) elif t <= 9.5e+176: tmp = x - (y / (a / z)) else: tmp = x + (t * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -6.8e-59) tmp = Float64(x + Float64(t / Float64(a / y))); elseif (t <= 9.5e+176) tmp = Float64(x - Float64(y / Float64(a / 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 (t <= -6.8e-59) tmp = x + (t / (a / y)); elseif (t <= 9.5e+176) tmp = x - (y / (a / z)); else tmp = x + (t * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -6.8e-59], N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9.5e+176], N[(x - N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.8 \cdot 10^{-59}:\\
\;\;\;\;x + \frac{t}{\frac{a}{y}}\\
\mathbf{elif}\;t \leq 9.5 \cdot 10^{+176}:\\
\;\;\;\;x - \frac{y}{\frac{a}{z}}\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\end{array}
\end{array}
if t < -6.80000000000000035e-59Initial program 90.4%
associate-*l/98.4%
Simplified98.4%
Taylor expanded in z around 0 75.3%
cancel-sign-sub-inv75.3%
metadata-eval75.3%
*-lft-identity75.3%
+-commutative75.3%
associate-*r/80.6%
Simplified80.6%
clear-num51.4%
div-inv51.4%
Applied egg-rr80.7%
if -6.80000000000000035e-59 < t < 9.4999999999999995e176Initial program 92.0%
associate-/l*92.9%
Simplified92.9%
Taylor expanded in z around inf 81.8%
if 9.4999999999999995e176 < t Initial program 87.5%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in z around 0 83.6%
cancel-sign-sub-inv83.6%
metadata-eval83.6%
*-lft-identity83.6%
+-commutative83.6%
associate-*r/96.1%
Simplified96.1%
Final simplification82.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -8.5e+69) (not (<= y 2.2e+175))) (* t (/ y a)) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -8.5e+69) || !(y <= 2.2e+175)) {
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 <= (-8.5d+69)) .or. (.not. (y <= 2.2d+175))) 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 <= -8.5e+69) || !(y <= 2.2e+175)) {
tmp = t * (y / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -8.5e+69) or not (y <= 2.2e+175): tmp = t * (y / a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -8.5e+69) || !(y <= 2.2e+175)) 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 <= -8.5e+69) || ~((y <= 2.2e+175))) tmp = t * (y / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -8.5e+69], N[Not[LessEqual[y, 2.2e+175]], $MachinePrecision]], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.5 \cdot 10^{+69} \lor \neg \left(y \leq 2.2 \cdot 10^{+175}\right):\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -8.5000000000000002e69 or 2.1999999999999999e175 < y Initial program 81.4%
associate-*l/96.3%
Simplified96.3%
Taylor expanded in t around inf 49.2%
associate-*r/54.9%
Simplified54.9%
if -8.5000000000000002e69 < y < 2.1999999999999999e175Initial program 95.8%
associate-*l/96.8%
Simplified96.8%
Taylor expanded in x around inf 56.6%
Final simplification56.0%
(FPCore (x y z t a) :precision binary64 (if (<= y -1.75e+71) (* t (/ y a)) (if (<= y 3e+175) x (* y (/ t a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.75e+71) {
tmp = t * (y / a);
} else if (y <= 3e+175) {
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 <= (-1.75d+71)) then
tmp = t * (y / a)
else if (y <= 3d+175) 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 <= -1.75e+71) {
tmp = t * (y / a);
} else if (y <= 3e+175) {
tmp = x;
} else {
tmp = y * (t / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -1.75e+71: tmp = t * (y / a) elif y <= 3e+175: tmp = x else: tmp = y * (t / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -1.75e+71) tmp = Float64(t * Float64(y / a)); elseif (y <= 3e+175) 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 <= -1.75e+71) tmp = t * (y / a); elseif (y <= 3e+175) tmp = x; else tmp = y * (t / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -1.75e+71], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3e+175], x, N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.75 \cdot 10^{+71}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{elif}\;y \leq 3 \cdot 10^{+175}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{t}{a}\\
\end{array}
\end{array}
if y < -1.75e71Initial program 81.1%
associate-*l/97.9%
Simplified97.9%
Taylor expanded in t around inf 50.6%
associate-*r/61.7%
Simplified61.7%
if -1.75e71 < y < 3.0000000000000002e175Initial program 95.8%
associate-*l/96.8%
Simplified96.8%
Taylor expanded in x around inf 56.6%
if 3.0000000000000002e175 < y Initial program 81.8%
associate-*l/93.8%
Simplified93.8%
Taylor expanded in y around 0 81.8%
*-commutative81.8%
associate-/l*93.9%
Simplified93.9%
Taylor expanded in t around inf 46.7%
associate-*l/46.5%
*-commutative46.5%
Simplified46.5%
Final simplification56.4%
(FPCore (x y z t a) :precision binary64 (if (<= y -1.08e+71) (/ t (/ a y)) (if (<= y 1.06e+182) x (* y (/ t a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.08e+71) {
tmp = t / (a / y);
} else if (y <= 1.06e+182) {
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 <= (-1.08d+71)) then
tmp = t / (a / y)
else if (y <= 1.06d+182) 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 <= -1.08e+71) {
tmp = t / (a / y);
} else if (y <= 1.06e+182) {
tmp = x;
} else {
tmp = y * (t / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -1.08e+71: tmp = t / (a / y) elif y <= 1.06e+182: tmp = x else: tmp = y * (t / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -1.08e+71) tmp = Float64(t / Float64(a / y)); elseif (y <= 1.06e+182) 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 <= -1.08e+71) tmp = t / (a / y); elseif (y <= 1.06e+182) tmp = x; else tmp = y * (t / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -1.08e+71], N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.06e+182], x, N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.08 \cdot 10^{+71}:\\
\;\;\;\;\frac{t}{\frac{a}{y}}\\
\mathbf{elif}\;y \leq 1.06 \cdot 10^{+182}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{t}{a}\\
\end{array}
\end{array}
if y < -1.08e71Initial program 81.1%
associate-*l/97.9%
Simplified97.9%
Taylor expanded in t around inf 50.6%
associate-*r/61.7%
Simplified61.7%
clear-num61.8%
div-inv61.8%
Applied egg-rr61.8%
if -1.08e71 < y < 1.0599999999999999e182Initial program 95.8%
associate-*l/96.8%
Simplified96.8%
Taylor expanded in x around inf 56.6%
if 1.0599999999999999e182 < y Initial program 81.8%
associate-*l/93.8%
Simplified93.8%
Taylor expanded in y around 0 81.8%
*-commutative81.8%
associate-/l*93.9%
Simplified93.9%
Taylor expanded in t around inf 46.7%
associate-*l/46.5%
*-commutative46.5%
Simplified46.5%
Final simplification56.4%
(FPCore (x y z t a) :precision binary64 (if (<= y -2.45e+67) (/ t (/ a y)) (if (<= y 2.25e+175) x (/ y (/ a t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -2.45e+67) {
tmp = t / (a / y);
} else if (y <= 2.25e+175) {
tmp = x;
} else {
tmp = y / (a / t);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (y <= (-2.45d+67)) then
tmp = t / (a / y)
else if (y <= 2.25d+175) then
tmp = x
else
tmp = y / (a / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -2.45e+67) {
tmp = t / (a / y);
} else if (y <= 2.25e+175) {
tmp = x;
} else {
tmp = y / (a / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -2.45e+67: tmp = t / (a / y) elif y <= 2.25e+175: tmp = x else: tmp = y / (a / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -2.45e+67) tmp = Float64(t / Float64(a / y)); elseif (y <= 2.25e+175) tmp = x; else tmp = Float64(y / Float64(a / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -2.45e+67) tmp = t / (a / y); elseif (y <= 2.25e+175) tmp = x; else tmp = y / (a / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -2.45e+67], N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.25e+175], x, N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.45 \cdot 10^{+67}:\\
\;\;\;\;\frac{t}{\frac{a}{y}}\\
\mathbf{elif}\;y \leq 2.25 \cdot 10^{+175}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{\frac{a}{t}}\\
\end{array}
\end{array}
if y < -2.44999999999999995e67Initial program 81.1%
associate-*l/97.9%
Simplified97.9%
Taylor expanded in t around inf 50.6%
associate-*r/61.7%
Simplified61.7%
clear-num61.8%
div-inv61.8%
Applied egg-rr61.8%
if -2.44999999999999995e67 < y < 2.24999999999999995e175Initial program 95.8%
associate-*l/96.8%
Simplified96.8%
Taylor expanded in x around inf 56.6%
if 2.24999999999999995e175 < y Initial program 81.8%
associate-*l/93.8%
Simplified93.8%
Taylor expanded in y around 0 81.8%
*-commutative81.8%
associate-/l*93.9%
Simplified93.9%
Taylor expanded in t around inf 46.7%
associate-*l/46.5%
*-commutative46.5%
Simplified46.5%
associate-*r/46.7%
associate-/l*46.5%
Applied egg-rr46.5%
Final simplification56.4%
(FPCore (x y z t a) :precision binary64 (if (<= y -7e+69) (/ t (/ a y)) (if (<= y 2.2e+175) x (/ (* t y) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -7e+69) {
tmp = t / (a / y);
} else if (y <= 2.2e+175) {
tmp = x;
} else {
tmp = (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 (y <= (-7d+69)) then
tmp = t / (a / y)
else if (y <= 2.2d+175) then
tmp = x
else
tmp = (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 (y <= -7e+69) {
tmp = t / (a / y);
} else if (y <= 2.2e+175) {
tmp = x;
} else {
tmp = (t * y) / a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -7e+69: tmp = t / (a / y) elif y <= 2.2e+175: tmp = x else: tmp = (t * y) / a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -7e+69) tmp = Float64(t / Float64(a / y)); elseif (y <= 2.2e+175) tmp = x; else tmp = Float64(Float64(t * y) / a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -7e+69) tmp = t / (a / y); elseif (y <= 2.2e+175) tmp = x; else tmp = (t * y) / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -7e+69], N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.2e+175], x, N[(N[(t * y), $MachinePrecision] / a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7 \cdot 10^{+69}:\\
\;\;\;\;\frac{t}{\frac{a}{y}}\\
\mathbf{elif}\;y \leq 2.2 \cdot 10^{+175}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{t \cdot y}{a}\\
\end{array}
\end{array}
if y < -6.99999999999999974e69Initial program 81.1%
associate-*l/97.9%
Simplified97.9%
Taylor expanded in t around inf 50.6%
associate-*r/61.7%
Simplified61.7%
clear-num61.8%
div-inv61.8%
Applied egg-rr61.8%
if -6.99999999999999974e69 < y < 2.1999999999999999e175Initial program 95.8%
associate-*l/96.8%
Simplified96.8%
Taylor expanded in x around inf 56.6%
if 2.1999999999999999e175 < y Initial program 81.8%
associate-*l/93.8%
Simplified93.8%
Taylor expanded in t around inf 46.7%
*-commutative46.7%
Simplified46.7%
Final simplification56.4%
(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 91.2%
associate-*l/96.6%
Simplified96.6%
Final simplification96.6%
(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 91.2%
associate-*l/96.6%
Simplified96.6%
Taylor expanded in x around inf 44.2%
Final simplification44.2%
(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 2024018
(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)))