
(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 93.9%
*-commutative93.9%
associate-/l*97.6%
Applied egg-rr97.6%
clear-num97.5%
un-div-inv97.8%
Applied egg-rr97.8%
Final simplification97.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ t (/ a y))) (t_2 (* (/ y a) (- z))))
(if (<= z -5.2e+76)
t_2
(if (<= z 1.6e-227)
t_1
(if (<= z 2.6e-183)
x
(if (<= z 3e+53)
t_1
(if (or (<= z 1.15e+167) (not (<= z 6.5e+245))) t_2 x)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t / (a / y);
double t_2 = (y / a) * -z;
double tmp;
if (z <= -5.2e+76) {
tmp = t_2;
} else if (z <= 1.6e-227) {
tmp = t_1;
} else if (z <= 2.6e-183) {
tmp = x;
} else if (z <= 3e+53) {
tmp = t_1;
} else if ((z <= 1.15e+167) || !(z <= 6.5e+245)) {
tmp = t_2;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = t / (a / y)
t_2 = (y / a) * -z
if (z <= (-5.2d+76)) then
tmp = t_2
else if (z <= 1.6d-227) then
tmp = t_1
else if (z <= 2.6d-183) then
tmp = x
else if (z <= 3d+53) then
tmp = t_1
else if ((z <= 1.15d+167) .or. (.not. (z <= 6.5d+245))) then
tmp = t_2
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t / (a / y);
double t_2 = (y / a) * -z;
double tmp;
if (z <= -5.2e+76) {
tmp = t_2;
} else if (z <= 1.6e-227) {
tmp = t_1;
} else if (z <= 2.6e-183) {
tmp = x;
} else if (z <= 3e+53) {
tmp = t_1;
} else if ((z <= 1.15e+167) || !(z <= 6.5e+245)) {
tmp = t_2;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t / (a / y) t_2 = (y / a) * -z tmp = 0 if z <= -5.2e+76: tmp = t_2 elif z <= 1.6e-227: tmp = t_1 elif z <= 2.6e-183: tmp = x elif z <= 3e+53: tmp = t_1 elif (z <= 1.15e+167) or not (z <= 6.5e+245): tmp = t_2 else: tmp = x return tmp
function code(x, y, z, t, a) t_1 = Float64(t / Float64(a / y)) t_2 = Float64(Float64(y / a) * Float64(-z)) tmp = 0.0 if (z <= -5.2e+76) tmp = t_2; elseif (z <= 1.6e-227) tmp = t_1; elseif (z <= 2.6e-183) tmp = x; elseif (z <= 3e+53) tmp = t_1; elseif ((z <= 1.15e+167) || !(z <= 6.5e+245)) tmp = t_2; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t / (a / y); t_2 = (y / a) * -z; tmp = 0.0; if (z <= -5.2e+76) tmp = t_2; elseif (z <= 1.6e-227) tmp = t_1; elseif (z <= 2.6e-183) tmp = x; elseif (z <= 3e+53) tmp = t_1; elseif ((z <= 1.15e+167) || ~((z <= 6.5e+245))) tmp = t_2; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y / a), $MachinePrecision] * (-z)), $MachinePrecision]}, If[LessEqual[z, -5.2e+76], t$95$2, If[LessEqual[z, 1.6e-227], t$95$1, If[LessEqual[z, 2.6e-183], x, If[LessEqual[z, 3e+53], t$95$1, If[Or[LessEqual[z, 1.15e+167], N[Not[LessEqual[z, 6.5e+245]], $MachinePrecision]], t$95$2, x]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{\frac{a}{y}}\\
t_2 := \frac{y}{a} \cdot \left(-z\right)\\
\mathbf{if}\;z \leq -5.2 \cdot 10^{+76}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{-227}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{-183}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 3 \cdot 10^{+53}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.15 \cdot 10^{+167} \lor \neg \left(z \leq 6.5 \cdot 10^{+245}\right):\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -5.1999999999999999e76 or 2.99999999999999998e53 < z < 1.14999999999999994e167 or 6.50000000000000035e245 < z Initial program 90.1%
*-commutative90.1%
associate-/l*98.7%
Applied egg-rr98.7%
Taylor expanded in z around inf 62.5%
associate-*r/62.5%
*-commutative62.5%
neg-mul-162.5%
distribute-rgt-neg-in62.5%
associate-*r/71.1%
Simplified71.1%
if -5.1999999999999999e76 < z < 1.60000000000000005e-227 or 2.5999999999999999e-183 < z < 2.99999999999999998e53Initial program 95.8%
*-commutative95.8%
associate-/l*97.1%
Applied egg-rr97.1%
Taylor expanded in t around inf 54.4%
associate-/l*57.5%
Simplified57.5%
clear-num57.6%
div-inv57.9%
Applied egg-rr57.9%
if 1.60000000000000005e-227 < z < 2.5999999999999999e-183 or 1.14999999999999994e167 < z < 6.50000000000000035e245Initial program 96.0%
associate-/l*81.9%
Simplified81.9%
Taylor expanded in x around inf 80.7%
Final simplification64.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (/ t a)))) (t_2 (- x (* y (/ z a)))))
(if (<= z -1.65e+18)
t_2
(if (<= z 1.75e+50)
t_1
(if (<= z 1.15e+167)
(* (/ y a) (- t z))
(if (<= z 6.5e+245) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * (t / a));
double t_2 = x - (y * (z / a));
double tmp;
if (z <= -1.65e+18) {
tmp = t_2;
} else if (z <= 1.75e+50) {
tmp = t_1;
} else if (z <= 1.15e+167) {
tmp = (y / a) * (t - z);
} else if (z <= 6.5e+245) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + (y * (t / a))
t_2 = x - (y * (z / a))
if (z <= (-1.65d+18)) then
tmp = t_2
else if (z <= 1.75d+50) then
tmp = t_1
else if (z <= 1.15d+167) then
tmp = (y / a) * (t - z)
else if (z <= 6.5d+245) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * (t / a));
double t_2 = x - (y * (z / a));
double tmp;
if (z <= -1.65e+18) {
tmp = t_2;
} else if (z <= 1.75e+50) {
tmp = t_1;
} else if (z <= 1.15e+167) {
tmp = (y / a) * (t - z);
} else if (z <= 6.5e+245) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * (t / a)) t_2 = x - (y * (z / a)) tmp = 0 if z <= -1.65e+18: tmp = t_2 elif z <= 1.75e+50: tmp = t_1 elif z <= 1.15e+167: tmp = (y / a) * (t - z) elif z <= 6.5e+245: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y * Float64(t / a))) t_2 = Float64(x - Float64(y * Float64(z / a))) tmp = 0.0 if (z <= -1.65e+18) tmp = t_2; elseif (z <= 1.75e+50) tmp = t_1; elseif (z <= 1.15e+167) tmp = Float64(Float64(y / a) * Float64(t - z)); elseif (z <= 6.5e+245) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y * (t / a)); t_2 = x - (y * (z / a)); tmp = 0.0; if (z <= -1.65e+18) tmp = t_2; elseif (z <= 1.75e+50) tmp = t_1; elseif (z <= 1.15e+167) tmp = (y / a) * (t - z); elseif (z <= 6.5e+245) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.65e+18], t$95$2, If[LessEqual[z, 1.75e+50], t$95$1, If[LessEqual[z, 1.15e+167], N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.5e+245], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{t}{a}\\
t_2 := x - y \cdot \frac{z}{a}\\
\mathbf{if}\;z \leq -1.65 \cdot 10^{+18}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 1.75 \cdot 10^{+50}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.15 \cdot 10^{+167}:\\
\;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\
\mathbf{elif}\;z \leq 6.5 \cdot 10^{+245}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -1.65e18 or 6.50000000000000035e245 < z Initial program 88.3%
associate-/l*92.1%
Simplified92.1%
Taylor expanded in z around inf 80.5%
associate-/l*83.8%
Simplified83.8%
if -1.65e18 < z < 1.75000000000000003e50 or 1.14999999999999994e167 < z < 6.50000000000000035e245Initial program 96.3%
*-commutative96.3%
associate-/l*97.0%
Applied egg-rr97.0%
Taylor expanded in z around 0 88.0%
mul-1-neg88.0%
associate-/l*89.7%
distribute-lft-neg-out89.7%
*-commutative89.7%
Simplified89.7%
*-commutative89.7%
cancel-sign-sub89.7%
+-commutative89.7%
associate-*r/88.0%
*-commutative88.0%
associate-/l*85.8%
Applied egg-rr85.8%
if 1.75000000000000003e50 < z < 1.14999999999999994e167Initial program 94.5%
*-commutative94.5%
associate-/l*98.0%
Applied egg-rr98.0%
Taylor expanded in x around 0 89.2%
*-commutative89.2%
associate-*r/94.4%
associate-*r*94.4%
neg-mul-194.4%
*-commutative94.4%
neg-sub094.4%
associate--r-94.4%
neg-sub094.4%
+-commutative94.4%
sub-neg94.4%
Simplified94.4%
Final simplification85.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (/ t a)))) (t_2 (- x (/ y (/ a z)))))
(if (<= z -4.1e+71)
t_2
(if (<= z 1.26e+51)
t_1
(if (<= z 1.15e+167)
(* (/ y a) (- t z))
(if (<= z 6.5e+245) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * (t / a));
double t_2 = x - (y / (a / z));
double tmp;
if (z <= -4.1e+71) {
tmp = t_2;
} else if (z <= 1.26e+51) {
tmp = t_1;
} else if (z <= 1.15e+167) {
tmp = (y / a) * (t - z);
} else if (z <= 6.5e+245) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + (y * (t / a))
t_2 = x - (y / (a / z))
if (z <= (-4.1d+71)) then
tmp = t_2
else if (z <= 1.26d+51) then
tmp = t_1
else if (z <= 1.15d+167) then
tmp = (y / a) * (t - z)
else if (z <= 6.5d+245) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * (t / a));
double t_2 = x - (y / (a / z));
double tmp;
if (z <= -4.1e+71) {
tmp = t_2;
} else if (z <= 1.26e+51) {
tmp = t_1;
} else if (z <= 1.15e+167) {
tmp = (y / a) * (t - z);
} else if (z <= 6.5e+245) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * (t / a)) t_2 = x - (y / (a / z)) tmp = 0 if z <= -4.1e+71: tmp = t_2 elif z <= 1.26e+51: tmp = t_1 elif z <= 1.15e+167: tmp = (y / a) * (t - z) elif z <= 6.5e+245: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y * Float64(t / a))) t_2 = Float64(x - Float64(y / Float64(a / z))) tmp = 0.0 if (z <= -4.1e+71) tmp = t_2; elseif (z <= 1.26e+51) tmp = t_1; elseif (z <= 1.15e+167) tmp = Float64(Float64(y / a) * Float64(t - z)); elseif (z <= 6.5e+245) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y * (t / a)); t_2 = x - (y / (a / z)); tmp = 0.0; if (z <= -4.1e+71) tmp = t_2; elseif (z <= 1.26e+51) tmp = t_1; elseif (z <= 1.15e+167) tmp = (y / a) * (t - z); elseif (z <= 6.5e+245) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.1e+71], t$95$2, If[LessEqual[z, 1.26e+51], t$95$1, If[LessEqual[z, 1.15e+167], N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.5e+245], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{t}{a}\\
t_2 := x - \frac{y}{\frac{a}{z}}\\
\mathbf{if}\;z \leq -4.1 \cdot 10^{+71}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 1.26 \cdot 10^{+51}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.15 \cdot 10^{+167}:\\
\;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\
\mathbf{elif}\;z \leq 6.5 \cdot 10^{+245}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -4.1000000000000002e71 or 6.50000000000000035e245 < z Initial program 89.1%
associate-/l*91.7%
Simplified91.7%
clear-num91.6%
un-div-inv92.3%
Applied egg-rr92.3%
Taylor expanded in z around inf 86.4%
if -4.1000000000000002e71 < z < 1.25999999999999997e51 or 1.14999999999999994e167 < z < 6.50000000000000035e245Initial program 95.8%
*-commutative95.8%
associate-/l*97.1%
Applied egg-rr97.1%
Taylor expanded in z around 0 86.5%
mul-1-neg86.5%
associate-/l*88.8%
distribute-lft-neg-out88.8%
*-commutative88.8%
Simplified88.8%
*-commutative88.8%
cancel-sign-sub88.8%
+-commutative88.8%
associate-*r/86.5%
*-commutative86.5%
associate-/l*85.0%
Applied egg-rr85.0%
if 1.25999999999999997e51 < z < 1.14999999999999994e167Initial program 94.5%
*-commutative94.5%
associate-/l*98.0%
Applied egg-rr98.0%
Taylor expanded in x around 0 89.2%
*-commutative89.2%
associate-*r/94.4%
associate-*r*94.4%
neg-mul-194.4%
*-commutative94.4%
neg-sub094.4%
associate--r-94.4%
neg-sub094.4%
+-commutative94.4%
sub-neg94.4%
Simplified94.4%
Final simplification86.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* t (/ y a)))))
(if (<= t -2.35e+104)
t_1
(if (<= t -2.8e+40)
(/ (- t z) (/ a y))
(if (<= t 4.8e-79) (- x (/ (* z y) a)) 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 <= -2.35e+104) {
tmp = t_1;
} else if (t <= -2.8e+40) {
tmp = (t - z) / (a / y);
} else if (t <= 4.8e-79) {
tmp = x - ((z * y) / a);
} 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 <= (-2.35d+104)) then
tmp = t_1
else if (t <= (-2.8d+40)) then
tmp = (t - z) / (a / y)
else if (t <= 4.8d-79) then
tmp = x - ((z * y) / a)
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 <= -2.35e+104) {
tmp = t_1;
} else if (t <= -2.8e+40) {
tmp = (t - z) / (a / y);
} else if (t <= 4.8e-79) {
tmp = x - ((z * y) / a);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (t * (y / a)) tmp = 0 if t <= -2.35e+104: tmp = t_1 elif t <= -2.8e+40: tmp = (t - z) / (a / y) elif t <= 4.8e-79: tmp = x - ((z * y) / a) 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 <= -2.35e+104) tmp = t_1; elseif (t <= -2.8e+40) tmp = Float64(Float64(t - z) / Float64(a / y)); elseif (t <= 4.8e-79) tmp = Float64(x - Float64(Float64(z * y) / a)); 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 <= -2.35e+104) tmp = t_1; elseif (t <= -2.8e+40) tmp = (t - z) / (a / y); elseif (t <= 4.8e-79) tmp = x - ((z * y) / a); 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, -2.35e+104], t$95$1, If[LessEqual[t, -2.8e+40], N[(N[(t - z), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.8e-79], N[(x - N[(N[(z * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + t \cdot \frac{y}{a}\\
\mathbf{if}\;t \leq -2.35 \cdot 10^{+104}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -2.8 \cdot 10^{+40}:\\
\;\;\;\;\frac{t - z}{\frac{a}{y}}\\
\mathbf{elif}\;t \leq 4.8 \cdot 10^{-79}:\\
\;\;\;\;x - \frac{z \cdot y}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -2.35000000000000008e104 or 4.80000000000000011e-79 < t Initial program 92.6%
associate-/l*90.7%
Simplified90.7%
Taylor expanded in z around 0 83.2%
mul-1-neg83.2%
associate-/l*86.8%
distribute-rgt-neg-in86.8%
distribute-neg-frac286.8%
Simplified86.8%
if -2.35000000000000008e104 < t < -2.8000000000000001e40Initial program 91.8%
*-commutative91.8%
associate-/l*99.2%
Applied egg-rr99.2%
Taylor expanded in x around 0 91.8%
*-commutative91.8%
associate-*r/99.2%
associate-*r*99.2%
neg-mul-199.2%
*-commutative99.2%
neg-sub099.2%
associate--r-99.2%
neg-sub099.2%
+-commutative99.2%
sub-neg99.2%
Simplified99.2%
*-commutative99.2%
clear-num99.5%
un-div-inv99.6%
Applied egg-rr99.6%
if -2.8000000000000001e40 < t < 4.80000000000000011e-79Initial program 96.0%
associate-/l*93.9%
Simplified93.9%
Taylor expanded in z around inf 90.6%
Final simplification88.9%
(FPCore (x y z t a)
:precision binary64
(if (<= x -1.45e+110)
(/ (* x y) y)
(if (<= x 2.3e-176)
(/ t (/ a y))
(if (<= x 6400000.0) (* y (/ z (- a))) x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -1.45e+110) {
tmp = (x * y) / y;
} else if (x <= 2.3e-176) {
tmp = t / (a / y);
} else if (x <= 6400000.0) {
tmp = y * (z / -a);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (x <= (-1.45d+110)) then
tmp = (x * y) / y
else if (x <= 2.3d-176) then
tmp = t / (a / y)
else if (x <= 6400000.0d0) then
tmp = y * (z / -a)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -1.45e+110) {
tmp = (x * y) / y;
} else if (x <= 2.3e-176) {
tmp = t / (a / y);
} else if (x <= 6400000.0) {
tmp = y * (z / -a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -1.45e+110: tmp = (x * y) / y elif x <= 2.3e-176: tmp = t / (a / y) elif x <= 6400000.0: tmp = y * (z / -a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -1.45e+110) tmp = Float64(Float64(x * y) / y); elseif (x <= 2.3e-176) tmp = Float64(t / Float64(a / y)); elseif (x <= 6400000.0) tmp = Float64(y * Float64(z / Float64(-a))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -1.45e+110) tmp = (x * y) / y; elseif (x <= 2.3e-176) tmp = t / (a / y); elseif (x <= 6400000.0) tmp = y * (z / -a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -1.45e+110], N[(N[(x * y), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[x, 2.3e-176], N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 6400000.0], N[(y * N[(z / (-a)), $MachinePrecision]), $MachinePrecision], x]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.45 \cdot 10^{+110}:\\
\;\;\;\;\frac{x \cdot y}{y}\\
\mathbf{elif}\;x \leq 2.3 \cdot 10^{-176}:\\
\;\;\;\;\frac{t}{\frac{a}{y}}\\
\mathbf{elif}\;x \leq 6400000:\\
\;\;\;\;y \cdot \frac{z}{-a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -1.45e110Initial program 94.9%
associate-/l*92.2%
Simplified92.2%
Taylor expanded in y around inf 71.2%
associate--l+71.2%
+-commutative71.2%
associate--r-71.2%
div-sub74.0%
Simplified74.0%
Taylor expanded in x around inf 33.6%
associate-*r/59.9%
Applied egg-rr59.9%
if -1.45e110 < x < 2.3000000000000001e-176Initial program 93.4%
*-commutative93.4%
associate-/l*96.6%
Applied egg-rr96.6%
Taylor expanded in t around inf 58.2%
associate-/l*60.4%
Simplified60.4%
clear-num60.5%
div-inv60.5%
Applied egg-rr60.5%
if 2.3000000000000001e-176 < x < 6.4e6Initial program 92.4%
associate-/l*90.5%
Simplified90.5%
Taylor expanded in z around inf 54.4%
mul-1-neg54.4%
associate-/l*51.6%
distribute-rgt-neg-in51.6%
distribute-frac-neg251.6%
Simplified51.6%
if 6.4e6 < x Initial program 95.3%
associate-/l*93.7%
Simplified93.7%
Taylor expanded in x around inf 62.6%
Final simplification59.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -5.2e-107) (not (<= y 6.1e-139))) (* (/ y a) (- t z)) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -5.2e-107) || !(y <= 6.1e-139)) {
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 <= (-5.2d-107)) .or. (.not. (y <= 6.1d-139))) 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 <= -5.2e-107) || !(y <= 6.1e-139)) {
tmp = (y / a) * (t - z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -5.2e-107) or not (y <= 6.1e-139): tmp = (y / a) * (t - z) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -5.2e-107) || !(y <= 6.1e-139)) 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 <= -5.2e-107) || ~((y <= 6.1e-139))) tmp = (y / a) * (t - z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -5.2e-107], N[Not[LessEqual[y, 6.1e-139]], $MachinePrecision]], N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.2 \cdot 10^{-107} \lor \neg \left(y \leq 6.1 \cdot 10^{-139}\right):\\
\;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -5.2000000000000001e-107 or 6.0999999999999998e-139 < y Initial program 91.8%
*-commutative91.8%
associate-/l*97.7%
Applied egg-rr97.7%
Taylor expanded in x around 0 70.3%
*-commutative70.3%
associate-*r/76.2%
associate-*r*76.2%
neg-mul-176.2%
*-commutative76.2%
neg-sub076.2%
associate--r-76.2%
neg-sub076.2%
+-commutative76.2%
sub-neg76.2%
Simplified76.2%
if -5.2000000000000001e-107 < y < 6.0999999999999998e-139Initial program 99.5%
associate-/l*80.0%
Simplified80.0%
Taylor expanded in x around inf 64.3%
Final simplification72.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -2.8e-112) (not (<= x 3700000000.0))) (+ x (* y (/ t a))) (* (/ y a) (- t z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -2.8e-112) || !(x <= 3700000000.0)) {
tmp = x + (y * (t / 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 ((x <= (-2.8d-112)) .or. (.not. (x <= 3700000000.0d0))) then
tmp = x + (y * (t / 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 ((x <= -2.8e-112) || !(x <= 3700000000.0)) {
tmp = x + (y * (t / a));
} else {
tmp = (y / a) * (t - z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -2.8e-112) or not (x <= 3700000000.0): tmp = x + (y * (t / a)) else: tmp = (y / a) * (t - z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -2.8e-112) || !(x <= 3700000000.0)) tmp = Float64(x + Float64(y * Float64(t / 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 ((x <= -2.8e-112) || ~((x <= 3700000000.0))) tmp = x + (y * (t / a)); else tmp = (y / a) * (t - z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -2.8e-112], N[Not[LessEqual[x, 3700000000.0]], $MachinePrecision]], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.8 \cdot 10^{-112} \lor \neg \left(x \leq 3700000000\right):\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\
\end{array}
\end{array}
if x < -2.80000000000000023e-112 or 3.7e9 < x Initial program 92.7%
*-commutative92.7%
associate-/l*96.7%
Applied egg-rr96.7%
Taylor expanded in z around 0 78.9%
mul-1-neg78.9%
associate-/l*79.4%
distribute-lft-neg-out79.4%
*-commutative79.4%
Simplified79.4%
*-commutative79.4%
cancel-sign-sub79.4%
+-commutative79.4%
associate-*r/78.9%
*-commutative78.9%
associate-/l*78.8%
Applied egg-rr78.8%
if -2.80000000000000023e-112 < x < 3.7e9Initial program 95.4%
*-commutative95.4%
associate-/l*98.7%
Applied egg-rr98.7%
Taylor expanded in x around 0 81.6%
*-commutative81.6%
associate-*r/85.0%
associate-*r*85.0%
neg-mul-185.0%
*-commutative85.0%
neg-sub085.0%
associate--r-85.0%
neg-sub085.0%
+-commutative85.0%
sub-neg85.0%
Simplified85.0%
Final simplification81.6%
(FPCore (x y z t a) :precision binary64 (if (<= z -3e+71) (- x (/ y (/ a z))) (if (<= z 1.55e+53) (+ x (* y (/ t a))) (- x (/ (* z y) a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3e+71) {
tmp = x - (y / (a / z));
} else if (z <= 1.55e+53) {
tmp = x + (y * (t / a));
} else {
tmp = x - ((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+71)) then
tmp = x - (y / (a / z))
else if (z <= 1.55d+53) then
tmp = x + (y * (t / a))
else
tmp = x - ((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+71) {
tmp = x - (y / (a / z));
} else if (z <= 1.55e+53) {
tmp = x + (y * (t / a));
} else {
tmp = x - ((z * y) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3e+71: tmp = x - (y / (a / z)) elif z <= 1.55e+53: tmp = x + (y * (t / a)) else: tmp = x - ((z * y) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3e+71) tmp = Float64(x - Float64(y / Float64(a / z))); elseif (z <= 1.55e+53) tmp = Float64(x + Float64(y * Float64(t / a))); else tmp = Float64(x - Float64(Float64(z * y) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3e+71) tmp = x - (y / (a / z)); elseif (z <= 1.55e+53) tmp = x + (y * (t / a)); else tmp = x - ((z * y) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3e+71], N[(x - N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.55e+53], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(z * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3 \cdot 10^{+71}:\\
\;\;\;\;x - \frac{y}{\frac{a}{z}}\\
\mathbf{elif}\;z \leq 1.55 \cdot 10^{+53}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{z \cdot y}{a}\\
\end{array}
\end{array}
if z < -3.00000000000000013e71Initial program 90.0%
associate-/l*91.6%
Simplified91.6%
clear-num91.5%
un-div-inv92.4%
Applied egg-rr92.4%
Taylor expanded in z around inf 85.1%
if -3.00000000000000013e71 < z < 1.5500000000000001e53Initial program 96.0%
*-commutative96.0%
associate-/l*97.3%
Applied egg-rr97.3%
Taylor expanded in z around 0 85.9%
mul-1-neg85.9%
associate-/l*88.3%
distribute-lft-neg-out88.3%
*-commutative88.3%
Simplified88.3%
*-commutative88.3%
cancel-sign-sub88.3%
+-commutative88.3%
associate-*r/85.9%
*-commutative85.9%
associate-/l*84.2%
Applied egg-rr84.2%
if 1.5500000000000001e53 < z Initial program 91.6%
associate-/l*87.6%
Simplified87.6%
Taylor expanded in z around inf 83.0%
Final simplification84.2%
(FPCore (x y z t a) :precision binary64 (if (<= x -1.05e+110) x (if (<= x 9e-139) (* t (/ y a)) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -1.05e+110) {
tmp = x;
} else if (x <= 9e-139) {
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 (x <= (-1.05d+110)) then
tmp = x
else if (x <= 9d-139) 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 (x <= -1.05e+110) {
tmp = x;
} else if (x <= 9e-139) {
tmp = t * (y / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -1.05e+110: tmp = x elif x <= 9e-139: tmp = t * (y / a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -1.05e+110) tmp = x; elseif (x <= 9e-139) 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 (x <= -1.05e+110) tmp = x; elseif (x <= 9e-139) tmp = t * (y / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -1.05e+110], x, If[LessEqual[x, 9e-139], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.05 \cdot 10^{+110}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 9 \cdot 10^{-139}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -1.05000000000000007e110 or 9.00000000000000046e-139 < x Initial program 94.7%
associate-/l*91.9%
Simplified91.9%
Taylor expanded in x around inf 52.7%
if -1.05000000000000007e110 < x < 9.00000000000000046e-139Initial program 93.1%
*-commutative93.1%
associate-/l*96.9%
Applied egg-rr96.9%
Taylor expanded in t around inf 56.6%
associate-/l*59.4%
Simplified59.4%
Final simplification56.1%
(FPCore (x y z t a) :precision binary64 (if (<= x -9.8e+109) x (if (<= x 9e-139) (/ t (/ a y)) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -9.8e+109) {
tmp = x;
} else if (x <= 9e-139) {
tmp = t / (a / y);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (x <= (-9.8d+109)) then
tmp = x
else if (x <= 9d-139) then
tmp = t / (a / y)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -9.8e+109) {
tmp = x;
} else if (x <= 9e-139) {
tmp = t / (a / y);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -9.8e+109: tmp = x elif x <= 9e-139: tmp = t / (a / y) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -9.8e+109) tmp = x; elseif (x <= 9e-139) tmp = Float64(t / Float64(a / y)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -9.8e+109) tmp = x; elseif (x <= 9e-139) tmp = t / (a / y); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -9.8e+109], x, If[LessEqual[x, 9e-139], N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -9.8 \cdot 10^{+109}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 9 \cdot 10^{-139}:\\
\;\;\;\;\frac{t}{\frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -9.8000000000000007e109 or 9.00000000000000046e-139 < x Initial program 94.7%
associate-/l*91.9%
Simplified91.9%
Taylor expanded in x around inf 52.7%
if -9.8000000000000007e109 < x < 9.00000000000000046e-139Initial program 93.1%
*-commutative93.1%
associate-/l*96.9%
Applied egg-rr96.9%
Taylor expanded in t around inf 56.6%
associate-/l*59.4%
Simplified59.4%
clear-num59.5%
div-inv59.5%
Applied egg-rr59.5%
Final simplification56.1%
(FPCore (x y z t a) :precision binary64 (if (<= x -1.22e+110) (/ (* x y) y) (if (<= x 9e-139) (/ t (/ a y)) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -1.22e+110) {
tmp = (x * y) / y;
} else if (x <= 9e-139) {
tmp = t / (a / y);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (x <= (-1.22d+110)) then
tmp = (x * y) / y
else if (x <= 9d-139) then
tmp = t / (a / y)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -1.22e+110) {
tmp = (x * y) / y;
} else if (x <= 9e-139) {
tmp = t / (a / y);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -1.22e+110: tmp = (x * y) / y elif x <= 9e-139: tmp = t / (a / y) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -1.22e+110) tmp = Float64(Float64(x * y) / y); elseif (x <= 9e-139) tmp = Float64(t / Float64(a / y)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -1.22e+110) tmp = (x * y) / y; elseif (x <= 9e-139) tmp = t / (a / y); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -1.22e+110], N[(N[(x * y), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[x, 9e-139], N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.22 \cdot 10^{+110}:\\
\;\;\;\;\frac{x \cdot y}{y}\\
\mathbf{elif}\;x \leq 9 \cdot 10^{-139}:\\
\;\;\;\;\frac{t}{\frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -1.22000000000000002e110Initial program 94.9%
associate-/l*92.2%
Simplified92.2%
Taylor expanded in y around inf 71.2%
associate--l+71.2%
+-commutative71.2%
associate--r-71.2%
div-sub74.0%
Simplified74.0%
Taylor expanded in x around inf 33.6%
associate-*r/59.9%
Applied egg-rr59.9%
if -1.22000000000000002e110 < x < 9.00000000000000046e-139Initial program 93.1%
*-commutative93.1%
associate-/l*96.9%
Applied egg-rr96.9%
Taylor expanded in t around inf 56.6%
associate-/l*59.4%
Simplified59.4%
clear-num59.5%
div-inv59.5%
Applied egg-rr59.5%
if 9.00000000000000046e-139 < x Initial program 94.7%
associate-/l*91.7%
Simplified91.7%
Taylor expanded in x around inf 51.0%
Final simplification56.5%
(FPCore (x y z t a) :precision binary64 (+ x (* y (/ (- t z) a))))
double code(double x, double y, double z, double t, double a) {
return x + (y * ((t - z) / 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 * ((t - z) / a))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y * ((t - z) / a));
}
def code(x, y, z, t, a): return x + (y * ((t - z) / a))
function code(x, y, z, t, a) return Float64(x + Float64(y * Float64(Float64(t - z) / a))) end
function tmp = code(x, y, z, t, a) tmp = x + (y * ((t - z) / a)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \frac{t - z}{a}
\end{array}
Initial program 93.9%
associate-/l*92.0%
Simplified92.0%
Final simplification92.0%
(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 93.9%
*-commutative93.9%
associate-/l*97.6%
Applied egg-rr97.6%
Final simplification97.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 93.9%
associate-/l*92.0%
Simplified92.0%
Taylor expanded in x around inf 34.8%
Final simplification34.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ a (- z t))))
(if (< y -1.0761266216389975e-10)
(- x (/ 1.0 (/ t_1 y)))
(if (< y 2.894426862792089e-49)
(- x (/ (* y (- z t)) a))
(- x (/ y t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = a / (z - t);
double tmp;
if (y < -1.0761266216389975e-10) {
tmp = x - (1.0 / (t_1 / y));
} else if (y < 2.894426862792089e-49) {
tmp = x - ((y * (z - t)) / a);
} else {
tmp = x - (y / t_1);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = a / (z - t)
if (y < (-1.0761266216389975d-10)) then
tmp = x - (1.0d0 / (t_1 / y))
else if (y < 2.894426862792089d-49) then
tmp = x - ((y * (z - t)) / a)
else
tmp = x - (y / t_1)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = a / (z - t);
double tmp;
if (y < -1.0761266216389975e-10) {
tmp = x - (1.0 / (t_1 / y));
} else if (y < 2.894426862792089e-49) {
tmp = x - ((y * (z - t)) / a);
} else {
tmp = x - (y / t_1);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = a / (z - t) tmp = 0 if y < -1.0761266216389975e-10: tmp = x - (1.0 / (t_1 / y)) elif y < 2.894426862792089e-49: tmp = x - ((y * (z - t)) / a) else: tmp = x - (y / t_1) return tmp
function code(x, y, z, t, a) t_1 = Float64(a / Float64(z - t)) tmp = 0.0 if (y < -1.0761266216389975e-10) tmp = Float64(x - Float64(1.0 / Float64(t_1 / y))); elseif (y < 2.894426862792089e-49) tmp = Float64(x - Float64(Float64(y * Float64(z - t)) / a)); else tmp = Float64(x - Float64(y / t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = a / (z - t); tmp = 0.0; if (y < -1.0761266216389975e-10) tmp = x - (1.0 / (t_1 / y)); elseif (y < 2.894426862792089e-49) tmp = x - ((y * (z - t)) / a); else tmp = x - (y / t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(a / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[Less[y, -1.0761266216389975e-10], N[(x - N[(1.0 / N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Less[y, 2.894426862792089e-49], N[(x - N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(x - N[(y / t$95$1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{a}{z - t}\\
\mathbf{if}\;y < -1.0761266216389975 \cdot 10^{-10}:\\
\;\;\;\;x - \frac{1}{\frac{t\_1}{y}}\\
\mathbf{elif}\;y < 2.894426862792089 \cdot 10^{-49}:\\
\;\;\;\;x - \frac{y \cdot \left(z - t\right)}{a}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{t\_1}\\
\end{array}
\end{array}
herbie shell --seed 2024071
(FPCore (x y z t a)
:name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, F"
:precision binary64
:alt
(if (< y -1.0761266216389975e-10) (- x (/ 1.0 (/ (/ a (- z t)) y))) (if (< y 2.894426862792089e-49) (- x (/ (* y (- z t)) a)) (- x (/ y (/ a (- z t))))))
(- x (/ (* y (- z t)) a)))