
(FPCore (x y z t a) :precision binary64 (- x (/ (* y (- z t)) a)))
double code(double x, double y, double z, double t, double a) {
return x - ((y * (z - t)) / a);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x - ((y * (z - t)) / a)
end function
public static double code(double x, double y, double z, double t, double a) {
return x - ((y * (z - t)) / a);
}
def code(x, y, z, t, a): return x - ((y * (z - t)) / a)
function code(x, y, z, t, a) return Float64(x - Float64(Float64(y * Float64(z - t)) / a)) end
function tmp = code(x, y, z, t, a) tmp = x - ((y * (z - t)) / a); end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{y \cdot \left(z - t\right)}{a}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 13 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (- x (/ (* y (- z t)) a)))
double code(double x, double y, double z, double t, double a) {
return x - ((y * (z - t)) / a);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x - ((y * (z - t)) / a)
end function
public static double code(double x, double y, double z, double t, double a) {
return x - ((y * (z - t)) / a);
}
def code(x, y, z, t, a): return x - ((y * (z - t)) / a)
function code(x, y, z, t, a) return Float64(x - Float64(Float64(y * Float64(z - t)) / a)) end
function tmp = code(x, y, z, t, a) tmp = x - ((y * (z - t)) / a); end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{y \cdot \left(z - t\right)}{a}
\end{array}
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (/ (* y (- z t)) a))) (if (<= t_1 2e+285) (- x t_1) (- x (/ y (/ a (- z t)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y * (z - t)) / a;
double tmp;
if (t_1 <= 2e+285) {
tmp = x - t_1;
} else {
tmp = x - (y / (a / (z - 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) :: t_1
real(8) :: tmp
t_1 = (y * (z - t)) / a
if (t_1 <= 2d+285) then
tmp = x - t_1
else
tmp = x - (y / (a / (z - t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (y * (z - t)) / a;
double tmp;
if (t_1 <= 2e+285) {
tmp = x - t_1;
} else {
tmp = x - (y / (a / (z - t)));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y * (z - t)) / a tmp = 0 if t_1 <= 2e+285: tmp = x - t_1 else: tmp = x - (y / (a / (z - t))) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y * Float64(z - t)) / a) tmp = 0.0 if (t_1 <= 2e+285) tmp = Float64(x - t_1); else tmp = Float64(x - Float64(y / Float64(a / Float64(z - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y * (z - t)) / a; tmp = 0.0; if (t_1 <= 2e+285) tmp = x - t_1; else tmp = x - (y / (a / (z - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]}, If[LessEqual[t$95$1, 2e+285], N[(x - t$95$1), $MachinePrecision], N[(x - N[(y / N[(a / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot \left(z - t\right)}{a}\\
\mathbf{if}\;t_1 \leq 2 \cdot 10^{+285}:\\
\;\;\;\;x - t_1\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{\frac{a}{z - t}}\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (-.f64 z t)) a) < 2e285Initial program 98.2%
if 2e285 < (/.f64 (*.f64 y (-.f64 z t)) a) Initial program 72.7%
associate-/l*100.0%
Simplified100.0%
Final simplification98.4%
(FPCore (x y z t a)
:precision binary64
(if (<= t -7.7e+42)
(* y (/ t a))
(if (<= t -4.4e-298)
x
(if (<= t 5.6e-182)
(* z (/ (- y) a))
(if (<= t 1.55e+46)
x
(if (<= t 3.4e+188)
(* t (/ y a))
(if (<= t 1.85e+197) x (/ t (/ a y)))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -7.7e+42) {
tmp = y * (t / a);
} else if (t <= -4.4e-298) {
tmp = x;
} else if (t <= 5.6e-182) {
tmp = z * (-y / a);
} else if (t <= 1.55e+46) {
tmp = x;
} else if (t <= 3.4e+188) {
tmp = t * (y / a);
} else if (t <= 1.85e+197) {
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 <= (-7.7d+42)) then
tmp = y * (t / a)
else if (t <= (-4.4d-298)) then
tmp = x
else if (t <= 5.6d-182) then
tmp = z * (-y / a)
else if (t <= 1.55d+46) then
tmp = x
else if (t <= 3.4d+188) then
tmp = t * (y / a)
else if (t <= 1.85d+197) 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 <= -7.7e+42) {
tmp = y * (t / a);
} else if (t <= -4.4e-298) {
tmp = x;
} else if (t <= 5.6e-182) {
tmp = z * (-y / a);
} else if (t <= 1.55e+46) {
tmp = x;
} else if (t <= 3.4e+188) {
tmp = t * (y / a);
} else if (t <= 1.85e+197) {
tmp = x;
} else {
tmp = t / (a / y);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -7.7e+42: tmp = y * (t / a) elif t <= -4.4e-298: tmp = x elif t <= 5.6e-182: tmp = z * (-y / a) elif t <= 1.55e+46: tmp = x elif t <= 3.4e+188: tmp = t * (y / a) elif t <= 1.85e+197: tmp = x else: tmp = t / (a / y) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -7.7e+42) tmp = Float64(y * Float64(t / a)); elseif (t <= -4.4e-298) tmp = x; elseif (t <= 5.6e-182) tmp = Float64(z * Float64(Float64(-y) / a)); elseif (t <= 1.55e+46) tmp = x; elseif (t <= 3.4e+188) tmp = Float64(t * Float64(y / a)); elseif (t <= 1.85e+197) 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 <= -7.7e+42) tmp = y * (t / a); elseif (t <= -4.4e-298) tmp = x; elseif (t <= 5.6e-182) tmp = z * (-y / a); elseif (t <= 1.55e+46) tmp = x; elseif (t <= 3.4e+188) tmp = t * (y / a); elseif (t <= 1.85e+197) tmp = x; else tmp = t / (a / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -7.7e+42], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -4.4e-298], x, If[LessEqual[t, 5.6e-182], N[(z * N[((-y) / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.55e+46], x, If[LessEqual[t, 3.4e+188], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.85e+197], x, N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7.7 \cdot 10^{+42}:\\
\;\;\;\;y \cdot \frac{t}{a}\\
\mathbf{elif}\;t \leq -4.4 \cdot 10^{-298}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 5.6 \cdot 10^{-182}:\\
\;\;\;\;z \cdot \frac{-y}{a}\\
\mathbf{elif}\;t \leq 1.55 \cdot 10^{+46}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 3.4 \cdot 10^{+188}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{elif}\;t \leq 1.85 \cdot 10^{+197}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{\frac{a}{y}}\\
\end{array}
\end{array}
if t < -7.7000000000000001e42Initial program 90.7%
associate-*r/95.2%
Simplified95.2%
Taylor expanded in x around 0 68.9%
associate-/l*73.3%
associate-*r/73.3%
neg-mul-173.3%
*-rgt-identity73.3%
*-commutative73.3%
remove-double-neg73.3%
distribute-frac-neg73.3%
neg-mul-173.3%
times-frac73.3%
metadata-eval73.3%
*-rgt-identity73.3%
associate-*r/73.4%
associate-*l*73.4%
neg-mul-173.4%
remove-double-neg73.4%
associate-/r/73.3%
associate-*l/73.5%
*-lft-identity73.5%
Simplified73.5%
Taylor expanded in z around 0 62.1%
if -7.7000000000000001e42 < t < -4.4e-298 or 5.59999999999999986e-182 < t < 1.54999999999999988e46 or 3.39999999999999995e188 < t < 1.8500000000000002e197Initial program 97.7%
associate-*r/95.5%
Simplified95.5%
Taylor expanded in x around inf 57.9%
if -4.4e-298 < t < 5.59999999999999986e-182Initial program 89.4%
associate-*r/99.9%
Simplified99.9%
Taylor expanded in z around inf 64.9%
mul-1-neg64.9%
associate-*l/65.0%
*-commutative65.0%
Simplified65.0%
if 1.54999999999999988e46 < t < 3.39999999999999995e188Initial program 93.6%
associate-*r/96.9%
Simplified96.9%
Taylor expanded in t around inf 68.2%
*-commutative68.2%
associate-*r/68.3%
Simplified68.3%
if 1.8500000000000002e197 < t Initial program 86.6%
associate-*r/90.5%
Simplified90.5%
Taylor expanded in t around inf 72.1%
*-commutative72.1%
associate-*r/78.6%
Simplified78.6%
clear-num78.6%
div-inv78.8%
Applied egg-rr78.8%
Final simplification62.4%
(FPCore (x y z t a)
:precision binary64
(if (<= t -1.8e+41)
(* y (/ t a))
(if (<= t -1.6e-298)
x
(if (<= t 7.8e-166)
(* y (/ (- z) a))
(if (<= t 1e+51)
x
(if (<= t 2.05e+187)
(* t (/ y a))
(if (<= t 2.3e+197) x (/ t (/ a y)))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.8e+41) {
tmp = y * (t / a);
} else if (t <= -1.6e-298) {
tmp = x;
} else if (t <= 7.8e-166) {
tmp = y * (-z / a);
} else if (t <= 1e+51) {
tmp = x;
} else if (t <= 2.05e+187) {
tmp = t * (y / a);
} else if (t <= 2.3e+197) {
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 <= (-1.8d+41)) then
tmp = y * (t / a)
else if (t <= (-1.6d-298)) then
tmp = x
else if (t <= 7.8d-166) then
tmp = y * (-z / a)
else if (t <= 1d+51) then
tmp = x
else if (t <= 2.05d+187) then
tmp = t * (y / a)
else if (t <= 2.3d+197) 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 <= -1.8e+41) {
tmp = y * (t / a);
} else if (t <= -1.6e-298) {
tmp = x;
} else if (t <= 7.8e-166) {
tmp = y * (-z / a);
} else if (t <= 1e+51) {
tmp = x;
} else if (t <= 2.05e+187) {
tmp = t * (y / a);
} else if (t <= 2.3e+197) {
tmp = x;
} else {
tmp = t / (a / y);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.8e+41: tmp = y * (t / a) elif t <= -1.6e-298: tmp = x elif t <= 7.8e-166: tmp = y * (-z / a) elif t <= 1e+51: tmp = x elif t <= 2.05e+187: tmp = t * (y / a) elif t <= 2.3e+197: tmp = x else: tmp = t / (a / y) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.8e+41) tmp = Float64(y * Float64(t / a)); elseif (t <= -1.6e-298) tmp = x; elseif (t <= 7.8e-166) tmp = Float64(y * Float64(Float64(-z) / a)); elseif (t <= 1e+51) tmp = x; elseif (t <= 2.05e+187) tmp = Float64(t * Float64(y / a)); elseif (t <= 2.3e+197) 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 <= -1.8e+41) tmp = y * (t / a); elseif (t <= -1.6e-298) tmp = x; elseif (t <= 7.8e-166) tmp = y * (-z / a); elseif (t <= 1e+51) tmp = x; elseif (t <= 2.05e+187) tmp = t * (y / a); elseif (t <= 2.3e+197) tmp = x; else tmp = t / (a / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.8e+41], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.6e-298], x, If[LessEqual[t, 7.8e-166], N[(y * N[((-z) / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1e+51], x, If[LessEqual[t, 2.05e+187], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.3e+197], x, N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.8 \cdot 10^{+41}:\\
\;\;\;\;y \cdot \frac{t}{a}\\
\mathbf{elif}\;t \leq -1.6 \cdot 10^{-298}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 7.8 \cdot 10^{-166}:\\
\;\;\;\;y \cdot \frac{-z}{a}\\
\mathbf{elif}\;t \leq 10^{+51}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 2.05 \cdot 10^{+187}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{elif}\;t \leq 2.3 \cdot 10^{+197}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{\frac{a}{y}}\\
\end{array}
\end{array}
if t < -1.80000000000000013e41Initial program 90.7%
associate-*r/95.2%
Simplified95.2%
Taylor expanded in x around 0 68.9%
associate-/l*73.3%
associate-*r/73.3%
neg-mul-173.3%
*-rgt-identity73.3%
*-commutative73.3%
remove-double-neg73.3%
distribute-frac-neg73.3%
neg-mul-173.3%
times-frac73.3%
metadata-eval73.3%
*-rgt-identity73.3%
associate-*r/73.4%
associate-*l*73.4%
neg-mul-173.4%
remove-double-neg73.4%
associate-/r/73.3%
associate-*l/73.5%
*-lft-identity73.5%
Simplified73.5%
Taylor expanded in z around 0 62.1%
if -1.80000000000000013e41 < t < -1.59999999999999999e-298 or 7.79999999999999998e-166 < t < 1e51 or 2.05e187 < t < 2.3000000000000001e197Initial program 97.6%
associate-*r/95.3%
Simplified95.3%
Taylor expanded in x around inf 58.1%
if -1.59999999999999999e-298 < t < 7.79999999999999998e-166Initial program 90.5%
associate-*r/99.9%
Simplified99.9%
associate-*r/90.5%
associate-*l/86.0%
*-commutative86.0%
clear-num86.0%
un-div-inv88.0%
Applied egg-rr88.0%
Taylor expanded in z around inf 63.5%
mul-1-neg63.5%
associate-*r/72.8%
distribute-rgt-neg-in72.8%
distribute-neg-frac72.8%
Simplified72.8%
if 1e51 < t < 2.05e187Initial program 93.6%
associate-*r/96.9%
Simplified96.9%
Taylor expanded in t around inf 68.2%
*-commutative68.2%
associate-*r/68.3%
Simplified68.3%
if 2.3000000000000001e197 < t Initial program 86.6%
associate-*r/90.5%
Simplified90.5%
Taylor expanded in t around inf 72.1%
*-commutative72.1%
associate-*r/78.6%
Simplified78.6%
clear-num78.6%
div-inv78.8%
Applied egg-rr78.8%
Final simplification63.9%
(FPCore (x y z t a)
:precision binary64
(if (or (<= t -1.56e+44)
(and (not (<= t 2.75e+54)) (or (<= t 5e+186) (not (<= t 1.8e+197)))))
(* t (/ y a))
x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.56e+44) || (!(t <= 2.75e+54) && ((t <= 5e+186) || !(t <= 1.8e+197)))) {
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 <= (-1.56d+44)) .or. (.not. (t <= 2.75d+54)) .and. (t <= 5d+186) .or. (.not. (t <= 1.8d+197))) 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 <= -1.56e+44) || (!(t <= 2.75e+54) && ((t <= 5e+186) || !(t <= 1.8e+197)))) {
tmp = t * (y / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.56e+44) or (not (t <= 2.75e+54) and ((t <= 5e+186) or not (t <= 1.8e+197))): tmp = t * (y / a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.56e+44) || (!(t <= 2.75e+54) && ((t <= 5e+186) || !(t <= 1.8e+197)))) 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 <= -1.56e+44) || (~((t <= 2.75e+54)) && ((t <= 5e+186) || ~((t <= 1.8e+197))))) tmp = t * (y / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.56e+44], And[N[Not[LessEqual[t, 2.75e+54]], $MachinePrecision], Or[LessEqual[t, 5e+186], N[Not[LessEqual[t, 1.8e+197]], $MachinePrecision]]]], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.56 \cdot 10^{+44} \lor \neg \left(t \leq 2.75 \cdot 10^{+54}\right) \land \left(t \leq 5 \cdot 10^{+186} \lor \neg \left(t \leq 1.8 \cdot 10^{+197}\right)\right):\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < -1.56e44 or 2.75000000000000013e54 < t < 4.99999999999999954e186 or 1.79999999999999991e197 < t Initial program 90.8%
associate-*r/94.8%
Simplified94.8%
Taylor expanded in t around inf 65.3%
*-commutative65.3%
associate-*r/67.6%
Simplified67.6%
if -1.56e44 < t < 2.75000000000000013e54 or 4.99999999999999954e186 < t < 1.79999999999999991e197Initial program 95.9%
associate-*r/96.4%
Simplified96.4%
Taylor expanded in x around inf 50.5%
Final simplification56.6%
(FPCore (x y z t a)
:precision binary64
(if (<= t -1.7e+40)
(* y (/ t a))
(if (<= t 2e+51)
x
(if (or (<= t 3.4e+188) (not (<= t 1.8e+197))) (* t (/ y a)) x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.7e+40) {
tmp = y * (t / a);
} else if (t <= 2e+51) {
tmp = x;
} else if ((t <= 3.4e+188) || !(t <= 1.8e+197)) {
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 <= (-1.7d+40)) then
tmp = y * (t / a)
else if (t <= 2d+51) then
tmp = x
else if ((t <= 3.4d+188) .or. (.not. (t <= 1.8d+197))) 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 <= -1.7e+40) {
tmp = y * (t / a);
} else if (t <= 2e+51) {
tmp = x;
} else if ((t <= 3.4e+188) || !(t <= 1.8e+197)) {
tmp = t * (y / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.7e+40: tmp = y * (t / a) elif t <= 2e+51: tmp = x elif (t <= 3.4e+188) or not (t <= 1.8e+197): tmp = t * (y / a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.7e+40) tmp = Float64(y * Float64(t / a)); elseif (t <= 2e+51) tmp = x; elseif ((t <= 3.4e+188) || !(t <= 1.8e+197)) 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 <= -1.7e+40) tmp = y * (t / a); elseif (t <= 2e+51) tmp = x; elseif ((t <= 3.4e+188) || ~((t <= 1.8e+197))) tmp = t * (y / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.7e+40], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2e+51], x, If[Or[LessEqual[t, 3.4e+188], N[Not[LessEqual[t, 1.8e+197]], $MachinePrecision]], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], x]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.7 \cdot 10^{+40}:\\
\;\;\;\;y \cdot \frac{t}{a}\\
\mathbf{elif}\;t \leq 2 \cdot 10^{+51}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 3.4 \cdot 10^{+188} \lor \neg \left(t \leq 1.8 \cdot 10^{+197}\right):\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < -1.69999999999999994e40Initial program 90.7%
associate-*r/95.2%
Simplified95.2%
Taylor expanded in x around 0 68.9%
associate-/l*73.3%
associate-*r/73.3%
neg-mul-173.3%
*-rgt-identity73.3%
*-commutative73.3%
remove-double-neg73.3%
distribute-frac-neg73.3%
neg-mul-173.3%
times-frac73.3%
metadata-eval73.3%
*-rgt-identity73.3%
associate-*r/73.4%
associate-*l*73.4%
neg-mul-173.4%
remove-double-neg73.4%
associate-/r/73.3%
associate-*l/73.5%
*-lft-identity73.5%
Simplified73.5%
Taylor expanded in z around 0 62.1%
if -1.69999999999999994e40 < t < 2e51 or 3.39999999999999995e188 < t < 1.79999999999999991e197Initial program 95.9%
associate-*r/96.4%
Simplified96.4%
Taylor expanded in x around inf 50.5%
if 2e51 < t < 3.39999999999999995e188 or 1.79999999999999991e197 < t Initial program 90.9%
associate-*r/94.4%
Simplified94.4%
Taylor expanded in t around inf 69.8%
*-commutative69.8%
associate-*r/72.3%
Simplified72.3%
Final simplification56.7%
(FPCore (x y z t a)
:precision binary64
(if (<= t -3.3e+44)
(* y (/ t a))
(if (<= t 4.2e+51)
x
(if (<= t 3.4e+188) (* t (/ y a)) (if (<= t 1.9e+197) x (/ t (/ a y)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -3.3e+44) {
tmp = y * (t / a);
} else if (t <= 4.2e+51) {
tmp = x;
} else if (t <= 3.4e+188) {
tmp = t * (y / a);
} else if (t <= 1.9e+197) {
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 <= (-3.3d+44)) then
tmp = y * (t / a)
else if (t <= 4.2d+51) then
tmp = x
else if (t <= 3.4d+188) then
tmp = t * (y / a)
else if (t <= 1.9d+197) 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 <= -3.3e+44) {
tmp = y * (t / a);
} else if (t <= 4.2e+51) {
tmp = x;
} else if (t <= 3.4e+188) {
tmp = t * (y / a);
} else if (t <= 1.9e+197) {
tmp = x;
} else {
tmp = t / (a / y);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -3.3e+44: tmp = y * (t / a) elif t <= 4.2e+51: tmp = x elif t <= 3.4e+188: tmp = t * (y / a) elif t <= 1.9e+197: tmp = x else: tmp = t / (a / y) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -3.3e+44) tmp = Float64(y * Float64(t / a)); elseif (t <= 4.2e+51) tmp = x; elseif (t <= 3.4e+188) tmp = Float64(t * Float64(y / a)); elseif (t <= 1.9e+197) 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 <= -3.3e+44) tmp = y * (t / a); elseif (t <= 4.2e+51) tmp = x; elseif (t <= 3.4e+188) tmp = t * (y / a); elseif (t <= 1.9e+197) tmp = x; else tmp = t / (a / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -3.3e+44], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.2e+51], x, If[LessEqual[t, 3.4e+188], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.9e+197], x, N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.3 \cdot 10^{+44}:\\
\;\;\;\;y \cdot \frac{t}{a}\\
\mathbf{elif}\;t \leq 4.2 \cdot 10^{+51}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 3.4 \cdot 10^{+188}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{elif}\;t \leq 1.9 \cdot 10^{+197}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{\frac{a}{y}}\\
\end{array}
\end{array}
if t < -3.30000000000000013e44Initial program 90.7%
associate-*r/95.2%
Simplified95.2%
Taylor expanded in x around 0 68.9%
associate-/l*73.3%
associate-*r/73.3%
neg-mul-173.3%
*-rgt-identity73.3%
*-commutative73.3%
remove-double-neg73.3%
distribute-frac-neg73.3%
neg-mul-173.3%
times-frac73.3%
metadata-eval73.3%
*-rgt-identity73.3%
associate-*r/73.4%
associate-*l*73.4%
neg-mul-173.4%
remove-double-neg73.4%
associate-/r/73.3%
associate-*l/73.5%
*-lft-identity73.5%
Simplified73.5%
Taylor expanded in z around 0 62.1%
if -3.30000000000000013e44 < t < 4.2000000000000002e51 or 3.39999999999999995e188 < t < 1.9000000000000001e197Initial program 95.9%
associate-*r/96.4%
Simplified96.4%
Taylor expanded in x around inf 50.5%
if 4.2000000000000002e51 < t < 3.39999999999999995e188Initial program 93.6%
associate-*r/96.9%
Simplified96.9%
Taylor expanded in t around inf 68.2%
*-commutative68.2%
associate-*r/68.3%
Simplified68.3%
if 1.9000000000000001e197 < t Initial program 86.6%
associate-*r/90.5%
Simplified90.5%
Taylor expanded in t around inf 72.1%
*-commutative72.1%
associate-*r/78.6%
Simplified78.6%
clear-num78.6%
div-inv78.8%
Applied egg-rr78.8%
Final simplification56.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -2.9e+100) (not (<= y 2.6e+105))) (* (/ y a) (- t z)) (+ x (* t (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -2.9e+100) || !(y <= 2.6e+105)) {
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 ((y <= (-2.9d+100)) .or. (.not. (y <= 2.6d+105))) 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 ((y <= -2.9e+100) || !(y <= 2.6e+105)) {
tmp = (y / a) * (t - z);
} else {
tmp = x + (t * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -2.9e+100) or not (y <= 2.6e+105): tmp = (y / a) * (t - z) else: tmp = x + (t * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -2.9e+100) || !(y <= 2.6e+105)) 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 ((y <= -2.9e+100) || ~((y <= 2.6e+105))) 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[y, -2.9e+100], N[Not[LessEqual[y, 2.6e+105]], $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}\;y \leq -2.9 \cdot 10^{+100} \lor \neg \left(y \leq 2.6 \cdot 10^{+105}\right):\\
\;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\end{array}
\end{array}
if y < -2.9e100 or 2.6000000000000002e105 < y Initial program 84.8%
associate-/l*99.9%
Simplified99.9%
frac-2neg99.9%
div-inv99.8%
distribute-neg-frac99.8%
Applied egg-rr99.8%
un-div-inv99.9%
clear-num99.8%
add-sqr-sqrt37.8%
sqrt-unprod41.3%
sqr-neg41.3%
sqrt-unprod8.1%
add-sqr-sqrt11.6%
add-sqr-sqrt3.5%
sqrt-unprod42.0%
sqr-neg42.0%
sqrt-unprod55.0%
add-sqr-sqrt99.8%
Applied egg-rr99.8%
Taylor expanded in x around 0 75.9%
mul-1-neg75.9%
neg-sub075.9%
associate-*l/82.5%
sub-neg82.5%
distribute-rgt-out62.8%
distribute-lft-neg-out62.8%
unsub-neg62.8%
associate-+l-62.8%
neg-sub062.8%
distribute-lft-neg-in62.8%
distribute-rgt-out82.5%
+-commutative82.5%
sub-neg82.5%
Simplified82.5%
if -2.9e100 < y < 2.6000000000000002e105Initial program 98.8%
associate-*r/93.8%
Simplified93.8%
Taylor expanded in z around 0 79.0%
cancel-sign-sub-inv79.0%
metadata-eval79.0%
*-lft-identity79.0%
+-commutative79.0%
*-commutative79.0%
associate-*r/79.4%
Simplified79.4%
Final simplification80.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -2.5e+40) (not (<= t 550000000000.0))) (+ x (* t (/ y a))) (- x (* y (/ z a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -2.5e+40) || !(t <= 550000000000.0)) {
tmp = x + (t * (y / a));
} else {
tmp = x - (y * (z / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((t <= (-2.5d+40)) .or. (.not. (t <= 550000000000.0d0))) then
tmp = x + (t * (y / a))
else
tmp = x - (y * (z / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -2.5e+40) || !(t <= 550000000000.0)) {
tmp = x + (t * (y / a));
} else {
tmp = x - (y * (z / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -2.5e+40) or not (t <= 550000000000.0): tmp = x + (t * (y / a)) else: tmp = x - (y * (z / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -2.5e+40) || !(t <= 550000000000.0)) tmp = Float64(x + Float64(t * Float64(y / a))); else tmp = Float64(x - Float64(y * Float64(z / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -2.5e+40) || ~((t <= 550000000000.0))) tmp = x + (t * (y / a)); else tmp = x - (y * (z / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -2.5e+40], N[Not[LessEqual[t, 550000000000.0]], $MachinePrecision]], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.5 \cdot 10^{+40} \lor \neg \left(t \leq 550000000000\right):\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot \frac{z}{a}\\
\end{array}
\end{array}
if t < -2.50000000000000002e40 or 5.5e11 < t Initial program 92.1%
associate-*r/94.6%
Simplified94.6%
Taylor expanded in z around 0 85.4%
cancel-sign-sub-inv85.4%
metadata-eval85.4%
*-lft-identity85.4%
+-commutative85.4%
*-commutative85.4%
associate-*r/90.2%
Simplified90.2%
if -2.50000000000000002e40 < t < 5.5e11Initial program 95.5%
associate-*r/96.7%
Simplified96.7%
Taylor expanded in z around inf 92.1%
Final simplification91.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -8.2e+43) (not (<= t 1.1e+25))) (+ x (* t (/ y a))) (- x (/ y (/ a z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -8.2e+43) || !(t <= 1.1e+25)) {
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 <= (-8.2d+43)) .or. (.not. (t <= 1.1d+25))) 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 <= -8.2e+43) || !(t <= 1.1e+25)) {
tmp = x + (t * (y / a));
} else {
tmp = x - (y / (a / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -8.2e+43) or not (t <= 1.1e+25): 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 <= -8.2e+43) || !(t <= 1.1e+25)) 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 <= -8.2e+43) || ~((t <= 1.1e+25))) 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, -8.2e+43], N[Not[LessEqual[t, 1.1e+25]], $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 -8.2 \cdot 10^{+43} \lor \neg \left(t \leq 1.1 \cdot 10^{+25}\right):\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{\frac{a}{z}}\\
\end{array}
\end{array}
if t < -8.2000000000000001e43 or 1.1e25 < t Initial program 92.1%
associate-*r/94.6%
Simplified94.6%
Taylor expanded in z around 0 85.4%
cancel-sign-sub-inv85.4%
metadata-eval85.4%
*-lft-identity85.4%
+-commutative85.4%
*-commutative85.4%
associate-*r/90.2%
Simplified90.2%
if -8.2000000000000001e43 < t < 1.1e25Initial program 95.5%
associate-/l*96.7%
Simplified96.7%
Taylor expanded in z around inf 92.1%
Final simplification91.3%
(FPCore (x y z t a) :precision binary64 (if (<= a -9.4e+154) x (if (<= a 2.6e+37) (* (/ y a) (- t z)) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -9.4e+154) {
tmp = x;
} else if (a <= 2.6e+37) {
tmp = (y / a) * (t - z);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-9.4d+154)) then
tmp = x
else if (a <= 2.6d+37) then
tmp = (y / a) * (t - z)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -9.4e+154) {
tmp = x;
} else if (a <= 2.6e+37) {
tmp = (y / a) * (t - z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -9.4e+154: tmp = x elif a <= 2.6e+37: tmp = (y / a) * (t - z) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -9.4e+154) tmp = x; elseif (a <= 2.6e+37) tmp = Float64(Float64(y / a) * Float64(t - z)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -9.4e+154) tmp = x; elseif (a <= 2.6e+37) tmp = (y / a) * (t - z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -9.4e+154], x, If[LessEqual[a, 2.6e+37], N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -9.4 \cdot 10^{+154}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 2.6 \cdot 10^{+37}:\\
\;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -9.39999999999999966e154 or 2.5999999999999999e37 < a Initial program 88.5%
associate-*r/99.9%
Simplified99.9%
Taylor expanded in x around inf 72.9%
if -9.39999999999999966e154 < a < 2.5999999999999999e37Initial program 97.1%
associate-/l*93.7%
Simplified93.7%
frac-2neg93.7%
div-inv93.5%
distribute-neg-frac93.5%
Applied egg-rr93.5%
un-div-inv93.7%
clear-num93.6%
add-sqr-sqrt50.5%
sqrt-unprod52.7%
sqr-neg52.7%
sqrt-unprod9.2%
add-sqr-sqrt21.0%
add-sqr-sqrt11.7%
sqrt-unprod55.6%
sqr-neg55.6%
sqrt-unprod51.4%
add-sqr-sqrt93.6%
Applied egg-rr93.6%
Taylor expanded in x around 0 75.6%
mul-1-neg75.6%
neg-sub075.6%
associate-*l/73.6%
sub-neg73.6%
distribute-rgt-out63.2%
distribute-lft-neg-out63.2%
unsub-neg63.2%
associate-+l-63.2%
neg-sub063.2%
distribute-lft-neg-in63.2%
distribute-rgt-out73.6%
+-commutative73.6%
sub-neg73.6%
Simplified73.6%
Final simplification73.4%
(FPCore (x y z t a) :precision binary64 (if (<= t 2.4e-112) (+ x (* y (/ (- t z) a))) (+ x (* (/ y a) (- t z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 2.4e-112) {
tmp = x + (y * ((t - z) / a));
} else {
tmp = x + ((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 (t <= 2.4d-112) then
tmp = x + (y * ((t - z) / a))
else
tmp = x + ((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 (t <= 2.4e-112) {
tmp = x + (y * ((t - z) / a));
} else {
tmp = x + ((y / a) * (t - z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 2.4e-112: tmp = x + (y * ((t - z) / a)) else: tmp = x + ((y / a) * (t - z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 2.4e-112) tmp = Float64(x + Float64(y * Float64(Float64(t - z) / a))); else tmp = Float64(x + Float64(Float64(y / a) * Float64(t - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= 2.4e-112) tmp = x + (y * ((t - z) / a)); else tmp = x + ((y / a) * (t - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 2.4e-112], N[(x + N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 2.4 \cdot 10^{-112}:\\
\;\;\;\;x + y \cdot \frac{t - z}{a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{a} \cdot \left(t - z\right)\\
\end{array}
\end{array}
if t < 2.4000000000000001e-112Initial program 93.8%
associate-*r/97.1%
Simplified97.1%
if 2.4000000000000001e-112 < t Initial program 94.5%
associate-*l/99.9%
Simplified99.9%
Final simplification98.0%
(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 94.1%
associate-*r/95.8%
Simplified95.8%
Final simplification95.8%
(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 94.1%
associate-*r/95.8%
Simplified95.8%
Taylor expanded in x around inf 41.2%
Final simplification41.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 2023240
(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)))