
(FPCore (x y z t a) :precision binary64 (+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
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 = ((60.0d0 * (x - y)) / (z - t)) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
def code(x, y, z, t, a): return ((60.0 * (x - y)) / (z - t)) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = ((60.0 * (x - y)) / (z - t)) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
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 = ((60.0d0 * (x - y)) / (z - t)) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
def code(x, y, z, t, a): return ((60.0 * (x - y)) / (z - t)) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = ((60.0 * (x - y)) / (z - t)) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120
\end{array}
(FPCore (x y z t a) :precision binary64 (+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
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 = ((60.0d0 * (x - y)) / (z - t)) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
def code(x, y, z, t, a): return ((60.0 * (x - y)) / (z - t)) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = ((60.0 * (x - y)) / (z - t)) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120
\end{array}
Initial program 99.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (* a 120.0) (* -60.0 (/ y z)))))
(if (<= (* a 120.0) -2e+175)
t_1
(if (<= (* a 120.0) -2e+55)
(+ (* a 120.0) (* x (/ -60.0 t)))
(if (<= (* a 120.0) -1e-32)
(+ (* a 120.0) (* 60.0 (/ y t)))
(if (<= (* a 120.0) 5e-106)
(* (- x y) (/ 60.0 (- z t)))
(if (<= (* a 120.0) 2e+139)
t_1
(+ (* a 120.0) (/ (* 60.0 x) z)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (a * 120.0) + (-60.0 * (y / z));
double tmp;
if ((a * 120.0) <= -2e+175) {
tmp = t_1;
} else if ((a * 120.0) <= -2e+55) {
tmp = (a * 120.0) + (x * (-60.0 / t));
} else if ((a * 120.0) <= -1e-32) {
tmp = (a * 120.0) + (60.0 * (y / t));
} else if ((a * 120.0) <= 5e-106) {
tmp = (x - y) * (60.0 / (z - t));
} else if ((a * 120.0) <= 2e+139) {
tmp = t_1;
} else {
tmp = (a * 120.0) + ((60.0 * x) / z);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (a * 120.0d0) + ((-60.0d0) * (y / z))
if ((a * 120.0d0) <= (-2d+175)) then
tmp = t_1
else if ((a * 120.0d0) <= (-2d+55)) then
tmp = (a * 120.0d0) + (x * ((-60.0d0) / t))
else if ((a * 120.0d0) <= (-1d-32)) then
tmp = (a * 120.0d0) + (60.0d0 * (y / t))
else if ((a * 120.0d0) <= 5d-106) then
tmp = (x - y) * (60.0d0 / (z - t))
else if ((a * 120.0d0) <= 2d+139) then
tmp = t_1
else
tmp = (a * 120.0d0) + ((60.0d0 * x) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (a * 120.0) + (-60.0 * (y / z));
double tmp;
if ((a * 120.0) <= -2e+175) {
tmp = t_1;
} else if ((a * 120.0) <= -2e+55) {
tmp = (a * 120.0) + (x * (-60.0 / t));
} else if ((a * 120.0) <= -1e-32) {
tmp = (a * 120.0) + (60.0 * (y / t));
} else if ((a * 120.0) <= 5e-106) {
tmp = (x - y) * (60.0 / (z - t));
} else if ((a * 120.0) <= 2e+139) {
tmp = t_1;
} else {
tmp = (a * 120.0) + ((60.0 * x) / z);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (a * 120.0) + (-60.0 * (y / z)) tmp = 0 if (a * 120.0) <= -2e+175: tmp = t_1 elif (a * 120.0) <= -2e+55: tmp = (a * 120.0) + (x * (-60.0 / t)) elif (a * 120.0) <= -1e-32: tmp = (a * 120.0) + (60.0 * (y / t)) elif (a * 120.0) <= 5e-106: tmp = (x - y) * (60.0 / (z - t)) elif (a * 120.0) <= 2e+139: tmp = t_1 else: tmp = (a * 120.0) + ((60.0 * x) / z) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / z))) tmp = 0.0 if (Float64(a * 120.0) <= -2e+175) tmp = t_1; elseif (Float64(a * 120.0) <= -2e+55) tmp = Float64(Float64(a * 120.0) + Float64(x * Float64(-60.0 / t))); elseif (Float64(a * 120.0) <= -1e-32) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(y / t))); elseif (Float64(a * 120.0) <= 5e-106) tmp = Float64(Float64(x - y) * Float64(60.0 / Float64(z - t))); elseif (Float64(a * 120.0) <= 2e+139) tmp = t_1; else tmp = Float64(Float64(a * 120.0) + Float64(Float64(60.0 * x) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (a * 120.0) + (-60.0 * (y / z)); tmp = 0.0; if ((a * 120.0) <= -2e+175) tmp = t_1; elseif ((a * 120.0) <= -2e+55) tmp = (a * 120.0) + (x * (-60.0 / t)); elseif ((a * 120.0) <= -1e-32) tmp = (a * 120.0) + (60.0 * (y / t)); elseif ((a * 120.0) <= 5e-106) tmp = (x - y) * (60.0 / (z - t)); elseif ((a * 120.0) <= 2e+139) tmp = t_1; else tmp = (a * 120.0) + ((60.0 * x) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * 120.0), $MachinePrecision], -2e+175], t$95$1, If[LessEqual[N[(a * 120.0), $MachinePrecision], -2e+55], N[(N[(a * 120.0), $MachinePrecision] + N[(x * N[(-60.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], -1e-32], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 5e-106], N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 2e+139], t$95$1, N[(N[(a * 120.0), $MachinePrecision] + N[(N[(60.0 * x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot 120 + -60 \cdot \frac{y}{z}\\
\mathbf{if}\;a \cdot 120 \leq -2 \cdot 10^{+175}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \cdot 120 \leq -2 \cdot 10^{+55}:\\
\;\;\;\;a \cdot 120 + x \cdot \frac{-60}{t}\\
\mathbf{elif}\;a \cdot 120 \leq -1 \cdot 10^{-32}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t}\\
\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-106}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{60}{z - t}\\
\mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{+139}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{60 \cdot x}{z}\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -1.9999999999999999e175 or 4.99999999999999983e-106 < (*.f64 a #s(literal 120 binary64)) < 2.00000000000000007e139Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around 0 90.5%
associate-*r/90.5%
Simplified90.5%
Taylor expanded in z around inf 77.3%
if -1.9999999999999999e175 < (*.f64 a #s(literal 120 binary64)) < -2.00000000000000002e55Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around 0 84.6%
Taylor expanded in x around inf 93.8%
associate-*r/93.8%
associate-*l/93.8%
*-commutative93.8%
Simplified93.8%
if -2.00000000000000002e55 < (*.f64 a #s(literal 120 binary64)) < -1.00000000000000006e-32Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around 0 78.6%
Taylor expanded in x around 0 78.7%
if -1.00000000000000006e-32 < (*.f64 a #s(literal 120 binary64)) < 4.99999999999999983e-106Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around 0 97.8%
associate-*r/97.9%
remove-double-neg97.9%
neg-mul-197.9%
times-frac97.8%
metadata-eval97.8%
distribute-neg-frac297.8%
distribute-lft-in97.8%
+-commutative97.8%
sub-neg97.8%
div-sub99.7%
associate-*r/99.8%
associate-*l/99.7%
Simplified99.7%
Taylor expanded in a around 0 82.0%
metadata-eval82.0%
times-frac82.0%
*-commutative82.0%
neg-mul-182.0%
associate-/l*82.0%
distribute-neg-frac282.0%
distribute-neg-frac82.0%
metadata-eval82.0%
Simplified82.0%
if 2.00000000000000007e139 < (*.f64 a #s(literal 120 binary64)) Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 94.7%
associate-*r/94.7%
Simplified94.7%
Taylor expanded in z around inf 82.9%
associate-*r/82.9%
*-commutative82.9%
Simplified82.9%
Final simplification81.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (* a 120.0) (* x (/ -60.0 t))))
(t_2 (+ (* a 120.0) (* -60.0 (/ y z)))))
(if (<= (* a 120.0) -2e+175)
t_2
(if (<= (* a 120.0) -2e+55)
t_1
(if (<= (* a 120.0) -1e-32)
(+ (* a 120.0) (* 60.0 (/ y t)))
(if (<= (* a 120.0) 5e-106)
(* (- x y) (/ 60.0 (- z t)))
(if (<= (* a 120.0) 2e+126) t_2 t_1)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (a * 120.0) + (x * (-60.0 / t));
double t_2 = (a * 120.0) + (-60.0 * (y / z));
double tmp;
if ((a * 120.0) <= -2e+175) {
tmp = t_2;
} else if ((a * 120.0) <= -2e+55) {
tmp = t_1;
} else if ((a * 120.0) <= -1e-32) {
tmp = (a * 120.0) + (60.0 * (y / t));
} else if ((a * 120.0) <= 5e-106) {
tmp = (x - y) * (60.0 / (z - t));
} else if ((a * 120.0) <= 2e+126) {
tmp = t_2;
} 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) :: t_2
real(8) :: tmp
t_1 = (a * 120.0d0) + (x * ((-60.0d0) / t))
t_2 = (a * 120.0d0) + ((-60.0d0) * (y / z))
if ((a * 120.0d0) <= (-2d+175)) then
tmp = t_2
else if ((a * 120.0d0) <= (-2d+55)) then
tmp = t_1
else if ((a * 120.0d0) <= (-1d-32)) then
tmp = (a * 120.0d0) + (60.0d0 * (y / t))
else if ((a * 120.0d0) <= 5d-106) then
tmp = (x - y) * (60.0d0 / (z - t))
else if ((a * 120.0d0) <= 2d+126) then
tmp = t_2
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 = (a * 120.0) + (x * (-60.0 / t));
double t_2 = (a * 120.0) + (-60.0 * (y / z));
double tmp;
if ((a * 120.0) <= -2e+175) {
tmp = t_2;
} else if ((a * 120.0) <= -2e+55) {
tmp = t_1;
} else if ((a * 120.0) <= -1e-32) {
tmp = (a * 120.0) + (60.0 * (y / t));
} else if ((a * 120.0) <= 5e-106) {
tmp = (x - y) * (60.0 / (z - t));
} else if ((a * 120.0) <= 2e+126) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (a * 120.0) + (x * (-60.0 / t)) t_2 = (a * 120.0) + (-60.0 * (y / z)) tmp = 0 if (a * 120.0) <= -2e+175: tmp = t_2 elif (a * 120.0) <= -2e+55: tmp = t_1 elif (a * 120.0) <= -1e-32: tmp = (a * 120.0) + (60.0 * (y / t)) elif (a * 120.0) <= 5e-106: tmp = (x - y) * (60.0 / (z - t)) elif (a * 120.0) <= 2e+126: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(a * 120.0) + Float64(x * Float64(-60.0 / t))) t_2 = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / z))) tmp = 0.0 if (Float64(a * 120.0) <= -2e+175) tmp = t_2; elseif (Float64(a * 120.0) <= -2e+55) tmp = t_1; elseif (Float64(a * 120.0) <= -1e-32) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(y / t))); elseif (Float64(a * 120.0) <= 5e-106) tmp = Float64(Float64(x - y) * Float64(60.0 / Float64(z - t))); elseif (Float64(a * 120.0) <= 2e+126) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (a * 120.0) + (x * (-60.0 / t)); t_2 = (a * 120.0) + (-60.0 * (y / z)); tmp = 0.0; if ((a * 120.0) <= -2e+175) tmp = t_2; elseif ((a * 120.0) <= -2e+55) tmp = t_1; elseif ((a * 120.0) <= -1e-32) tmp = (a * 120.0) + (60.0 * (y / t)); elseif ((a * 120.0) <= 5e-106) tmp = (x - y) * (60.0 / (z - t)); elseif ((a * 120.0) <= 2e+126) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(a * 120.0), $MachinePrecision] + N[(x * N[(-60.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * 120.0), $MachinePrecision], -2e+175], t$95$2, If[LessEqual[N[(a * 120.0), $MachinePrecision], -2e+55], t$95$1, If[LessEqual[N[(a * 120.0), $MachinePrecision], -1e-32], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 5e-106], N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 2e+126], t$95$2, t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot 120 + x \cdot \frac{-60}{t}\\
t_2 := a \cdot 120 + -60 \cdot \frac{y}{z}\\
\mathbf{if}\;a \cdot 120 \leq -2 \cdot 10^{+175}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \cdot 120 \leq -2 \cdot 10^{+55}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \cdot 120 \leq -1 \cdot 10^{-32}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t}\\
\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-106}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{60}{z - t}\\
\mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{+126}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -1.9999999999999999e175 or 4.99999999999999983e-106 < (*.f64 a #s(literal 120 binary64)) < 1.99999999999999985e126Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around 0 91.2%
associate-*r/91.2%
Simplified91.2%
Taylor expanded in z around inf 77.7%
if -1.9999999999999999e175 < (*.f64 a #s(literal 120 binary64)) < -2.00000000000000002e55 or 1.99999999999999985e126 < (*.f64 a #s(literal 120 binary64)) Initial program 99.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around 0 78.3%
Taylor expanded in x around inf 84.6%
associate-*r/84.6%
associate-*l/84.6%
*-commutative84.6%
Simplified84.6%
if -2.00000000000000002e55 < (*.f64 a #s(literal 120 binary64)) < -1.00000000000000006e-32Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around 0 78.6%
Taylor expanded in x around 0 78.7%
if -1.00000000000000006e-32 < (*.f64 a #s(literal 120 binary64)) < 4.99999999999999983e-106Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around 0 97.8%
associate-*r/97.9%
remove-double-neg97.9%
neg-mul-197.9%
times-frac97.8%
metadata-eval97.8%
distribute-neg-frac297.8%
distribute-lft-in97.8%
+-commutative97.8%
sub-neg97.8%
div-sub99.7%
associate-*r/99.8%
associate-*l/99.7%
Simplified99.7%
Taylor expanded in a around 0 82.0%
metadata-eval82.0%
times-frac82.0%
*-commutative82.0%
neg-mul-182.0%
associate-/l*82.0%
distribute-neg-frac282.0%
distribute-neg-frac82.0%
metadata-eval82.0%
Simplified82.0%
Final simplification81.1%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -2e-57)
(* a 120.0)
(if (<= (* a 120.0) 5e-106)
(* (- x y) (/ 60.0 (- z t)))
(if (<= (* a 120.0) 1.82e+15)
(+ (* a 120.0) (* -60.0 (/ y z)))
(if (<= (* a 120.0) 2e+51) (* 60.0 (/ (- x y) (- z t))) (* a 120.0))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -2e-57) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 5e-106) {
tmp = (x - y) * (60.0 / (z - t));
} else if ((a * 120.0) <= 1.82e+15) {
tmp = (a * 120.0) + (-60.0 * (y / z));
} else if ((a * 120.0) <= 2e+51) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = a * 120.0;
}
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 * 120.0d0) <= (-2d-57)) then
tmp = a * 120.0d0
else if ((a * 120.0d0) <= 5d-106) then
tmp = (x - y) * (60.0d0 / (z - t))
else if ((a * 120.0d0) <= 1.82d+15) then
tmp = (a * 120.0d0) + ((-60.0d0) * (y / z))
else if ((a * 120.0d0) <= 2d+51) then
tmp = 60.0d0 * ((x - y) / (z - t))
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -2e-57) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 5e-106) {
tmp = (x - y) * (60.0 / (z - t));
} else if ((a * 120.0) <= 1.82e+15) {
tmp = (a * 120.0) + (-60.0 * (y / z));
} else if ((a * 120.0) <= 2e+51) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -2e-57: tmp = a * 120.0 elif (a * 120.0) <= 5e-106: tmp = (x - y) * (60.0 / (z - t)) elif (a * 120.0) <= 1.82e+15: tmp = (a * 120.0) + (-60.0 * (y / z)) elif (a * 120.0) <= 2e+51: tmp = 60.0 * ((x - y) / (z - t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -2e-57) tmp = Float64(a * 120.0); elseif (Float64(a * 120.0) <= 5e-106) tmp = Float64(Float64(x - y) * Float64(60.0 / Float64(z - t))); elseif (Float64(a * 120.0) <= 1.82e+15) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / z))); elseif (Float64(a * 120.0) <= 2e+51) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a * 120.0) <= -2e-57) tmp = a * 120.0; elseif ((a * 120.0) <= 5e-106) tmp = (x - y) * (60.0 / (z - t)); elseif ((a * 120.0) <= 1.82e+15) tmp = (a * 120.0) + (-60.0 * (y / z)); elseif ((a * 120.0) <= 2e+51) tmp = 60.0 * ((x - y) / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -2e-57], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 5e-106], N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 1.82e+15], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 2e+51], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -2 \cdot 10^{-57}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-106}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{60}{z - t}\\
\mathbf{elif}\;a \cdot 120 \leq 1.82 \cdot 10^{+15}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\
\mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{+51}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -1.99999999999999991e-57 or 2e51 < (*.f64 a #s(literal 120 binary64)) Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 77.1%
if -1.99999999999999991e-57 < (*.f64 a #s(literal 120 binary64)) < 4.99999999999999983e-106Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around 0 97.7%
associate-*r/97.7%
remove-double-neg97.7%
neg-mul-197.7%
times-frac97.7%
metadata-eval97.7%
distribute-neg-frac297.7%
distribute-lft-in97.7%
+-commutative97.7%
sub-neg97.7%
div-sub99.7%
associate-*r/99.8%
associate-*l/99.7%
Simplified99.7%
Taylor expanded in a around 0 84.6%
metadata-eval84.6%
times-frac84.7%
*-commutative84.7%
neg-mul-184.7%
associate-/l*84.7%
distribute-neg-frac284.7%
distribute-neg-frac84.7%
metadata-eval84.7%
Simplified84.7%
if 4.99999999999999983e-106 < (*.f64 a #s(literal 120 binary64)) < 1.82e15Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around 0 90.1%
associate-*r/90.1%
Simplified90.1%
Taylor expanded in z around inf 66.2%
if 1.82e15 < (*.f64 a #s(literal 120 binary64)) < 2e51Initial program 100.0%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in a around 0 65.0%
Final simplification78.6%
(FPCore (x y z t a)
:precision binary64
(if (<= (- z t) -5e+90)
(* a 120.0)
(if (<= (- z t) 2e-76)
(* 60.0 (/ (- x y) z))
(if (<= (- z t) 2e+69) (* x (/ 60.0 (- z t))) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z - t) <= -5e+90) {
tmp = a * 120.0;
} else if ((z - t) <= 2e-76) {
tmp = 60.0 * ((x - y) / z);
} else if ((z - t) <= 2e+69) {
tmp = x * (60.0 / (z - t));
} else {
tmp = a * 120.0;
}
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 - t) <= (-5d+90)) then
tmp = a * 120.0d0
else if ((z - t) <= 2d-76) then
tmp = 60.0d0 * ((x - y) / z)
else if ((z - t) <= 2d+69) then
tmp = x * (60.0d0 / (z - t))
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z - t) <= -5e+90) {
tmp = a * 120.0;
} else if ((z - t) <= 2e-76) {
tmp = 60.0 * ((x - y) / z);
} else if ((z - t) <= 2e+69) {
tmp = x * (60.0 / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z - t) <= -5e+90: tmp = a * 120.0 elif (z - t) <= 2e-76: tmp = 60.0 * ((x - y) / z) elif (z - t) <= 2e+69: tmp = x * (60.0 / (z - t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(z - t) <= -5e+90) tmp = Float64(a * 120.0); elseif (Float64(z - t) <= 2e-76) tmp = Float64(60.0 * Float64(Float64(x - y) / z)); elseif (Float64(z - t) <= 2e+69) tmp = Float64(x * Float64(60.0 / Float64(z - t))); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z - t) <= -5e+90) tmp = a * 120.0; elseif ((z - t) <= 2e-76) tmp = 60.0 * ((x - y) / z); elseif ((z - t) <= 2e+69) tmp = x * (60.0 / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(z - t), $MachinePrecision], -5e+90], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(z - t), $MachinePrecision], 2e-76], N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z - t), $MachinePrecision], 2e+69], N[(x * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z - t \leq -5 \cdot 10^{+90}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;z - t \leq 2 \cdot 10^{-76}:\\
\;\;\;\;60 \cdot \frac{x - y}{z}\\
\mathbf{elif}\;z - t \leq 2 \cdot 10^{+69}:\\
\;\;\;\;x \cdot \frac{60}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (-.f64 z t) < -5.0000000000000004e90 or 2.0000000000000001e69 < (-.f64 z t) Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 69.0%
if -5.0000000000000004e90 < (-.f64 z t) < 1.99999999999999985e-76Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 81.3%
Taylor expanded in z around inf 54.3%
if 1.99999999999999985e-76 < (-.f64 z t) < 2.0000000000000001e69Initial program 99.8%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 78.7%
Taylor expanded in x around inf 50.0%
associate-*r/71.1%
*-commutative71.1%
associate-*r/71.2%
Simplified50.2%
Final simplification63.2%
(FPCore (x y z t a)
:precision binary64
(if (<= (- z t) -5e+90)
(* a 120.0)
(if (<= (- z t) 2e-76)
(* 60.0 (/ (- x y) z))
(if (<= (- z t) 2e+69) (* 60.0 (/ x (- z t))) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z - t) <= -5e+90) {
tmp = a * 120.0;
} else if ((z - t) <= 2e-76) {
tmp = 60.0 * ((x - y) / z);
} else if ((z - t) <= 2e+69) {
tmp = 60.0 * (x / (z - t));
} else {
tmp = a * 120.0;
}
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 - t) <= (-5d+90)) then
tmp = a * 120.0d0
else if ((z - t) <= 2d-76) then
tmp = 60.0d0 * ((x - y) / z)
else if ((z - t) <= 2d+69) then
tmp = 60.0d0 * (x / (z - t))
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z - t) <= -5e+90) {
tmp = a * 120.0;
} else if ((z - t) <= 2e-76) {
tmp = 60.0 * ((x - y) / z);
} else if ((z - t) <= 2e+69) {
tmp = 60.0 * (x / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z - t) <= -5e+90: tmp = a * 120.0 elif (z - t) <= 2e-76: tmp = 60.0 * ((x - y) / z) elif (z - t) <= 2e+69: tmp = 60.0 * (x / (z - t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(z - t) <= -5e+90) tmp = Float64(a * 120.0); elseif (Float64(z - t) <= 2e-76) tmp = Float64(60.0 * Float64(Float64(x - y) / z)); elseif (Float64(z - t) <= 2e+69) tmp = Float64(60.0 * Float64(x / Float64(z - t))); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z - t) <= -5e+90) tmp = a * 120.0; elseif ((z - t) <= 2e-76) tmp = 60.0 * ((x - y) / z); elseif ((z - t) <= 2e+69) tmp = 60.0 * (x / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(z - t), $MachinePrecision], -5e+90], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(z - t), $MachinePrecision], 2e-76], N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z - t), $MachinePrecision], 2e+69], N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z - t \leq -5 \cdot 10^{+90}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;z - t \leq 2 \cdot 10^{-76}:\\
\;\;\;\;60 \cdot \frac{x - y}{z}\\
\mathbf{elif}\;z - t \leq 2 \cdot 10^{+69}:\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (-.f64 z t) < -5.0000000000000004e90 or 2.0000000000000001e69 < (-.f64 z t) Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 69.0%
if -5.0000000000000004e90 < (-.f64 z t) < 1.99999999999999985e-76Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 81.3%
Taylor expanded in z around inf 54.3%
if 1.99999999999999985e-76 < (-.f64 z t) < 2.0000000000000001e69Initial program 99.8%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in x around 0 96.0%
associate-*r/96.1%
remove-double-neg96.1%
neg-mul-196.1%
times-frac96.0%
metadata-eval96.0%
distribute-neg-frac296.0%
distribute-lft-in96.0%
+-commutative96.0%
sub-neg96.0%
div-sub99.6%
associate-*r/99.8%
associate-*l/99.8%
Simplified99.8%
Taylor expanded in a around inf 73.2%
associate-*r/73.3%
*-commutative73.3%
*-commutative73.3%
times-frac76.7%
Simplified76.7%
Taylor expanded in x around inf 50.0%
Final simplification63.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (- x y) (/ -60.0 t))))
(if (<= a -2.7e-60)
(* a 120.0)
(if (<= a 8.2e-303)
t_1
(if (<= a 9e-236)
(* 60.0 (/ (- x y) z))
(if (<= a 1.55e-105) t_1 (* a 120.0)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (x - y) * (-60.0 / t);
double tmp;
if (a <= -2.7e-60) {
tmp = a * 120.0;
} else if (a <= 8.2e-303) {
tmp = t_1;
} else if (a <= 9e-236) {
tmp = 60.0 * ((x - y) / z);
} else if (a <= 1.55e-105) {
tmp = t_1;
} else {
tmp = a * 120.0;
}
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) * ((-60.0d0) / t)
if (a <= (-2.7d-60)) then
tmp = a * 120.0d0
else if (a <= 8.2d-303) then
tmp = t_1
else if (a <= 9d-236) then
tmp = 60.0d0 * ((x - y) / z)
else if (a <= 1.55d-105) then
tmp = t_1
else
tmp = a * 120.0d0
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) * (-60.0 / t);
double tmp;
if (a <= -2.7e-60) {
tmp = a * 120.0;
} else if (a <= 8.2e-303) {
tmp = t_1;
} else if (a <= 9e-236) {
tmp = 60.0 * ((x - y) / z);
} else if (a <= 1.55e-105) {
tmp = t_1;
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (x - y) * (-60.0 / t) tmp = 0 if a <= -2.7e-60: tmp = a * 120.0 elif a <= 8.2e-303: tmp = t_1 elif a <= 9e-236: tmp = 60.0 * ((x - y) / z) elif a <= 1.55e-105: tmp = t_1 else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(x - y) * Float64(-60.0 / t)) tmp = 0.0 if (a <= -2.7e-60) tmp = Float64(a * 120.0); elseif (a <= 8.2e-303) tmp = t_1; elseif (a <= 9e-236) tmp = Float64(60.0 * Float64(Float64(x - y) / z)); elseif (a <= 1.55e-105) tmp = t_1; else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (x - y) * (-60.0 / t); tmp = 0.0; if (a <= -2.7e-60) tmp = a * 120.0; elseif (a <= 8.2e-303) tmp = t_1; elseif (a <= 9e-236) tmp = 60.0 * ((x - y) / z); elseif (a <= 1.55e-105) tmp = t_1; else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x - y), $MachinePrecision] * N[(-60.0 / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.7e-60], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 8.2e-303], t$95$1, If[LessEqual[a, 9e-236], N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.55e-105], t$95$1, N[(a * 120.0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x - y\right) \cdot \frac{-60}{t}\\
\mathbf{if}\;a \leq -2.7 \cdot 10^{-60}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq 8.2 \cdot 10^{-303}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 9 \cdot 10^{-236}:\\
\;\;\;\;60 \cdot \frac{x - y}{z}\\
\mathbf{elif}\;a \leq 1.55 \cdot 10^{-105}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -2.7e-60 or 1.55000000000000007e-105 < a Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 71.6%
if -2.7e-60 < a < 8.20000000000000037e-303 or 8.99999999999999997e-236 < a < 1.55000000000000007e-105Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 82.0%
Taylor expanded in z around 0 55.8%
associate-*r/55.9%
*-commutative55.9%
associate-/l*55.9%
Simplified55.9%
if 8.20000000000000037e-303 < a < 8.99999999999999997e-236Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 95.0%
Taylor expanded in z around inf 75.5%
Final simplification67.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ 60.0 (- z t))))
(if (or (<= (* a 120.0) -2e-57) (not (<= (* a 120.0) 1e-93)))
(+ (* a 120.0) (* x t_1))
(* (- x y) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 / (z - t);
double tmp;
if (((a * 120.0) <= -2e-57) || !((a * 120.0) <= 1e-93)) {
tmp = (a * 120.0) + (x * t_1);
} 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 = 60.0d0 / (z - t)
if (((a * 120.0d0) <= (-2d-57)) .or. (.not. ((a * 120.0d0) <= 1d-93))) then
tmp = (a * 120.0d0) + (x * t_1)
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 = 60.0 / (z - t);
double tmp;
if (((a * 120.0) <= -2e-57) || !((a * 120.0) <= 1e-93)) {
tmp = (a * 120.0) + (x * t_1);
} else {
tmp = (x - y) * t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = 60.0 / (z - t) tmp = 0 if ((a * 120.0) <= -2e-57) or not ((a * 120.0) <= 1e-93): tmp = (a * 120.0) + (x * t_1) else: tmp = (x - y) * t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(60.0 / Float64(z - t)) tmp = 0.0 if ((Float64(a * 120.0) <= -2e-57) || !(Float64(a * 120.0) <= 1e-93)) tmp = Float64(Float64(a * 120.0) + Float64(x * t_1)); else tmp = Float64(Float64(x - y) * t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = 60.0 / (z - t); tmp = 0.0; if (((a * 120.0) <= -2e-57) || ~(((a * 120.0) <= 1e-93))) tmp = (a * 120.0) + (x * t_1); else tmp = (x - y) * t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[N[(a * 120.0), $MachinePrecision], -2e-57], N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 1e-93]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(x * t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(x - y), $MachinePrecision] * t$95$1), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{60}{z - t}\\
\mathbf{if}\;a \cdot 120 \leq -2 \cdot 10^{-57} \lor \neg \left(a \cdot 120 \leq 10^{-93}\right):\\
\;\;\;\;a \cdot 120 + x \cdot t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(x - y\right) \cdot t\_1\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -1.99999999999999991e-57 or 9.999999999999999e-94 < (*.f64 a #s(literal 120 binary64)) Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 86.0%
associate-*r/86.1%
*-commutative86.1%
associate-*r/86.1%
Simplified86.1%
if -1.99999999999999991e-57 < (*.f64 a #s(literal 120 binary64)) < 9.999999999999999e-94Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around 0 97.7%
associate-*r/97.8%
remove-double-neg97.8%
neg-mul-197.8%
times-frac97.7%
metadata-eval97.7%
distribute-neg-frac297.7%
distribute-lft-in97.7%
+-commutative97.7%
sub-neg97.7%
div-sub99.7%
associate-*r/99.8%
associate-*l/99.7%
Simplified99.7%
Taylor expanded in a around 0 84.1%
metadata-eval84.1%
times-frac84.2%
*-commutative84.2%
neg-mul-184.2%
associate-/l*84.2%
distribute-neg-frac284.2%
distribute-neg-frac84.2%
metadata-eval84.2%
Simplified84.2%
Final simplification85.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -11000000000000.0) (not (<= y 1.9e-20))) (+ (* a 120.0) (/ (* y -60.0) (- z t))) (+ (* a 120.0) (/ (* 60.0 x) (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -11000000000000.0) || !(y <= 1.9e-20)) {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
} else {
tmp = (a * 120.0) + ((60.0 * x) / (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) :: tmp
if ((y <= (-11000000000000.0d0)) .or. (.not. (y <= 1.9d-20))) then
tmp = (a * 120.0d0) + ((y * (-60.0d0)) / (z - t))
else
tmp = (a * 120.0d0) + ((60.0d0 * x) / (z - 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 <= -11000000000000.0) || !(y <= 1.9e-20)) {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
} else {
tmp = (a * 120.0) + ((60.0 * x) / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -11000000000000.0) or not (y <= 1.9e-20): tmp = (a * 120.0) + ((y * -60.0) / (z - t)) else: tmp = (a * 120.0) + ((60.0 * x) / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -11000000000000.0) || !(y <= 1.9e-20)) tmp = Float64(Float64(a * 120.0) + Float64(Float64(y * -60.0) / Float64(z - t))); else tmp = Float64(Float64(a * 120.0) + Float64(Float64(60.0 * x) / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -11000000000000.0) || ~((y <= 1.9e-20))) tmp = (a * 120.0) + ((y * -60.0) / (z - t)); else tmp = (a * 120.0) + ((60.0 * x) / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -11000000000000.0], N[Not[LessEqual[y, 1.9e-20]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(60.0 * x), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -11000000000000 \lor \neg \left(y \leq 1.9 \cdot 10^{-20}\right):\\
\;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{60 \cdot x}{z - t}\\
\end{array}
\end{array}
if y < -1.1e13 or 1.8999999999999999e-20 < y Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 89.3%
associate-*r/89.3%
Simplified89.3%
if -1.1e13 < y < 1.8999999999999999e-20Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 96.4%
associate-*r/96.4%
Simplified96.4%
Final simplification92.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -24000000000000.0) (not (<= y 5.2e-21))) (+ (* a 120.0) (/ (* y -60.0) (- z t))) (+ (* a 120.0) (* x (/ 60.0 (- z t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -24000000000000.0) || !(y <= 5.2e-21)) {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
} else {
tmp = (a * 120.0) + (x * (60.0 / (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) :: tmp
if ((y <= (-24000000000000.0d0)) .or. (.not. (y <= 5.2d-21))) then
tmp = (a * 120.0d0) + ((y * (-60.0d0)) / (z - t))
else
tmp = (a * 120.0d0) + (x * (60.0d0 / (z - 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 <= -24000000000000.0) || !(y <= 5.2e-21)) {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
} else {
tmp = (a * 120.0) + (x * (60.0 / (z - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -24000000000000.0) or not (y <= 5.2e-21): tmp = (a * 120.0) + ((y * -60.0) / (z - t)) else: tmp = (a * 120.0) + (x * (60.0 / (z - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -24000000000000.0) || !(y <= 5.2e-21)) tmp = Float64(Float64(a * 120.0) + Float64(Float64(y * -60.0) / Float64(z - t))); else tmp = Float64(Float64(a * 120.0) + Float64(x * Float64(60.0 / Float64(z - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -24000000000000.0) || ~((y <= 5.2e-21))) tmp = (a * 120.0) + ((y * -60.0) / (z - t)); else tmp = (a * 120.0) + (x * (60.0 / (z - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -24000000000000.0], N[Not[LessEqual[y, 5.2e-21]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(x * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -24000000000000 \lor \neg \left(y \leq 5.2 \cdot 10^{-21}\right):\\
\;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + x \cdot \frac{60}{z - t}\\
\end{array}
\end{array}
if y < -2.4e13 or 5.20000000000000035e-21 < y Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 89.3%
associate-*r/89.3%
Simplified89.3%
if -2.4e13 < y < 5.20000000000000035e-21Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 96.4%
associate-*r/96.4%
*-commutative96.4%
associate-*r/96.4%
Simplified96.4%
Final simplification92.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -6.1) (not (<= z 1.02e+69))) (+ (* a 120.0) (* -60.0 (/ y z))) (+ (* a 120.0) (* -60.0 (/ (- x y) t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -6.1) || !(z <= 1.02e+69)) {
tmp = (a * 120.0) + (-60.0 * (y / z));
} else {
tmp = (a * 120.0) + (-60.0 * ((x - y) / 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 ((z <= (-6.1d0)) .or. (.not. (z <= 1.02d+69))) then
tmp = (a * 120.0d0) + ((-60.0d0) * (y / z))
else
tmp = (a * 120.0d0) + ((-60.0d0) * ((x - y) / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -6.1) || !(z <= 1.02e+69)) {
tmp = (a * 120.0) + (-60.0 * (y / z));
} else {
tmp = (a * 120.0) + (-60.0 * ((x - y) / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -6.1) or not (z <= 1.02e+69): tmp = (a * 120.0) + (-60.0 * (y / z)) else: tmp = (a * 120.0) + (-60.0 * ((x - y) / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -6.1) || !(z <= 1.02e+69)) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / z))); else tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(Float64(x - y) / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -6.1) || ~((z <= 1.02e+69))) tmp = (a * 120.0) + (-60.0 * (y / z)); else tmp = (a * 120.0) + (-60.0 * ((x - y) / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -6.1], N[Not[LessEqual[z, 1.02e+69]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.1 \lor \neg \left(z \leq 1.02 \cdot 10^{+69}\right):\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{x - y}{t}\\
\end{array}
\end{array}
if z < -6.0999999999999996 or 1.02e69 < z Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around 0 88.3%
associate-*r/88.3%
Simplified88.3%
Taylor expanded in z around inf 85.5%
if -6.0999999999999996 < z < 1.02e69Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in z around 0 83.3%
Final simplification84.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.85e-59) (not (<= a 2.65e-92))) (* a 120.0) (* (- x y) (/ 60.0 (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.85e-59) || !(a <= 2.65e-92)) {
tmp = a * 120.0;
} else {
tmp = (x - y) * (60.0 / (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) :: tmp
if ((a <= (-1.85d-59)) .or. (.not. (a <= 2.65d-92))) then
tmp = a * 120.0d0
else
tmp = (x - y) * (60.0d0 / (z - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.85e-59) || !(a <= 2.65e-92)) {
tmp = a * 120.0;
} else {
tmp = (x - y) * (60.0 / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.85e-59) or not (a <= 2.65e-92): tmp = a * 120.0 else: tmp = (x - y) * (60.0 / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.85e-59) || !(a <= 2.65e-92)) tmp = Float64(a * 120.0); else tmp = Float64(Float64(x - y) * Float64(60.0 / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1.85e-59) || ~((a <= 2.65e-92))) tmp = a * 120.0; else tmp = (x - y) * (60.0 / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.85e-59], N[Not[LessEqual[a, 2.65e-92]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.85 \cdot 10^{-59} \lor \neg \left(a \leq 2.65 \cdot 10^{-92}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{60}{z - t}\\
\end{array}
\end{array}
if a < -1.85e-59 or 2.65000000000000015e-92 < a Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 72.3%
if -1.85e-59 < a < 2.65000000000000015e-92Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around 0 97.7%
associate-*r/97.8%
remove-double-neg97.8%
neg-mul-197.8%
times-frac97.7%
metadata-eval97.7%
distribute-neg-frac297.7%
distribute-lft-in97.7%
+-commutative97.7%
sub-neg97.7%
div-sub99.7%
associate-*r/99.8%
associate-*l/99.7%
Simplified99.7%
Taylor expanded in a around 0 84.1%
metadata-eval84.1%
times-frac84.2%
*-commutative84.2%
neg-mul-184.2%
associate-/l*84.2%
distribute-neg-frac284.2%
distribute-neg-frac84.2%
metadata-eval84.2%
Simplified84.2%
Final simplification77.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.15e-61) (not (<= a 1.8e-92))) (* a 120.0) (* 60.0 (/ (- x y) (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.15e-61) || !(a <= 1.8e-92)) {
tmp = a * 120.0;
} else {
tmp = 60.0 * ((x - y) / (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) :: tmp
if ((a <= (-1.15d-61)) .or. (.not. (a <= 1.8d-92))) then
tmp = a * 120.0d0
else
tmp = 60.0d0 * ((x - y) / (z - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.15e-61) || !(a <= 1.8e-92)) {
tmp = a * 120.0;
} else {
tmp = 60.0 * ((x - y) / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.15e-61) or not (a <= 1.8e-92): tmp = a * 120.0 else: tmp = 60.0 * ((x - y) / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.15e-61) || !(a <= 1.8e-92)) tmp = Float64(a * 120.0); else tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1.15e-61) || ~((a <= 1.8e-92))) tmp = a * 120.0; else tmp = 60.0 * ((x - y) / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.15e-61], N[Not[LessEqual[a, 1.8e-92]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.15 \cdot 10^{-61} \lor \neg \left(a \leq 1.8 \cdot 10^{-92}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\end{array}
\end{array}
if a < -1.14999999999999996e-61 or 1.80000000000000008e-92 < a Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 72.3%
if -1.14999999999999996e-61 < a < 1.80000000000000008e-92Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 84.1%
Final simplification77.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -1.55e+195) (not (<= x 1.6e+179))) (* 60.0 (/ x (- z t))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -1.55e+195) || !(x <= 1.6e+179)) {
tmp = 60.0 * (x / (z - t));
} else {
tmp = a * 120.0;
}
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.55d+195)) .or. (.not. (x <= 1.6d+179))) then
tmp = 60.0d0 * (x / (z - t))
else
tmp = a * 120.0d0
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.55e+195) || !(x <= 1.6e+179)) {
tmp = 60.0 * (x / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -1.55e+195) or not (x <= 1.6e+179): tmp = 60.0 * (x / (z - t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -1.55e+195) || !(x <= 1.6e+179)) tmp = Float64(60.0 * Float64(x / Float64(z - t))); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -1.55e+195) || ~((x <= 1.6e+179))) tmp = 60.0 * (x / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -1.55e+195], N[Not[LessEqual[x, 1.6e+179]], $MachinePrecision]], N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.55 \cdot 10^{+195} \lor \neg \left(x \leq 1.6 \cdot 10^{+179}\right):\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if x < -1.5500000000000001e195 or 1.6000000000000001e179 < x Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 96.3%
associate-*r/96.4%
remove-double-neg96.4%
neg-mul-196.4%
times-frac96.3%
metadata-eval96.3%
distribute-neg-frac296.3%
distribute-lft-in96.3%
+-commutative96.3%
sub-neg96.3%
div-sub99.8%
associate-*r/99.9%
associate-*l/99.8%
Simplified99.8%
Taylor expanded in a around inf 83.6%
associate-*r/83.7%
*-commutative83.7%
*-commutative83.7%
times-frac83.5%
Simplified83.5%
Taylor expanded in x around inf 67.9%
if -1.5500000000000001e195 < x < 1.6000000000000001e179Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 59.7%
Final simplification61.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -2.35e+198) (not (<= x 1.38e+172))) (* -60.0 (/ x t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -2.35e+198) || !(x <= 1.38e+172)) {
tmp = -60.0 * (x / t);
} else {
tmp = a * 120.0;
}
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.35d+198)) .or. (.not. (x <= 1.38d+172))) then
tmp = (-60.0d0) * (x / t)
else
tmp = a * 120.0d0
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.35e+198) || !(x <= 1.38e+172)) {
tmp = -60.0 * (x / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -2.35e+198) or not (x <= 1.38e+172): tmp = -60.0 * (x / t) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -2.35e+198) || !(x <= 1.38e+172)) tmp = Float64(-60.0 * Float64(x / t)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -2.35e+198) || ~((x <= 1.38e+172))) tmp = -60.0 * (x / t); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -2.35e+198], N[Not[LessEqual[x, 1.38e+172]], $MachinePrecision]], N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.35 \cdot 10^{+198} \lor \neg \left(x \leq 1.38 \cdot 10^{+172}\right):\\
\;\;\;\;-60 \cdot \frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if x < -2.3500000000000001e198 or 1.38000000000000002e172 < x Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 80.1%
Taylor expanded in x around inf 67.9%
associate-*r/87.7%
*-commutative87.7%
associate-*r/87.6%
Simplified68.0%
Taylor expanded in z around 0 56.0%
if -2.3500000000000001e198 < x < 1.38000000000000002e172Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 59.7%
Final simplification58.9%
(FPCore (x y z t a) :precision binary64 (if (<= x -6.2e+194) (* -60.0 (/ x t)) (if (<= x 1.1e+183) (* a 120.0) (* x (/ -60.0 t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -6.2e+194) {
tmp = -60.0 * (x / t);
} else if (x <= 1.1e+183) {
tmp = a * 120.0;
} else {
tmp = x * (-60.0 / 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 (x <= (-6.2d+194)) then
tmp = (-60.0d0) * (x / t)
else if (x <= 1.1d+183) then
tmp = a * 120.0d0
else
tmp = x * ((-60.0d0) / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -6.2e+194) {
tmp = -60.0 * (x / t);
} else if (x <= 1.1e+183) {
tmp = a * 120.0;
} else {
tmp = x * (-60.0 / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -6.2e+194: tmp = -60.0 * (x / t) elif x <= 1.1e+183: tmp = a * 120.0 else: tmp = x * (-60.0 / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -6.2e+194) tmp = Float64(-60.0 * Float64(x / t)); elseif (x <= 1.1e+183) tmp = Float64(a * 120.0); else tmp = Float64(x * Float64(-60.0 / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -6.2e+194) tmp = -60.0 * (x / t); elseif (x <= 1.1e+183) tmp = a * 120.0; else tmp = x * (-60.0 / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -6.2e+194], N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.1e+183], N[(a * 120.0), $MachinePrecision], N[(x * N[(-60.0 / t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.2 \cdot 10^{+194}:\\
\;\;\;\;-60 \cdot \frac{x}{t}\\
\mathbf{elif}\;x \leq 1.1 \cdot 10^{+183}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-60}{t}\\
\end{array}
\end{array}
if x < -6.1999999999999999e194Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 77.6%
Taylor expanded in x around inf 70.2%
associate-*r/92.2%
*-commutative92.2%
associate-*r/92.2%
Simplified70.2%
Taylor expanded in z around 0 62.3%
if -6.1999999999999999e194 < x < 1.09999999999999995e183Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 59.7%
if 1.09999999999999995e183 < x Initial program 100.0%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 82.1%
Taylor expanded in x around inf 66.1%
associate-*r/84.0%
*-commutative84.0%
associate-*r/83.9%
Simplified66.2%
Taylor expanded in z around 0 50.8%
Final simplification58.9%
(FPCore (x y z t a) :precision binary64 (+ (* a 120.0) (* (- x y) (/ 60.0 (- z t)))))
double code(double x, double y, double z, double t, double a) {
return (a * 120.0) + ((x - y) * (60.0 / (z - t)));
}
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 = (a * 120.0d0) + ((x - y) * (60.0d0 / (z - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return (a * 120.0) + ((x - y) * (60.0 / (z - t)));
}
def code(x, y, z, t, a): return (a * 120.0) + ((x - y) * (60.0 / (z - t)))
function code(x, y, z, t, a) return Float64(Float64(a * 120.0) + Float64(Float64(x - y) * Float64(60.0 / Float64(z - t)))) end
function tmp = code(x, y, z, t, a) tmp = (a * 120.0) + ((x - y) * (60.0 / (z - t))); end
code[x_, y_, z_, t_, a_] := N[(N[(a * 120.0), $MachinePrecision] + N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
a \cdot 120 + \left(x - y\right) \cdot \frac{60}{z - t}
\end{array}
Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 99.0%
associate-*r/99.0%
remove-double-neg99.0%
neg-mul-199.0%
times-frac99.0%
metadata-eval99.0%
distribute-neg-frac299.0%
distribute-lft-in99.0%
+-commutative99.0%
sub-neg99.0%
div-sub99.8%
associate-*r/99.8%
associate-*l/99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t a) :precision binary64 (+ (* a 120.0) (* 60.0 (/ (- x y) (- z t)))))
double code(double x, double y, double z, double t, double a) {
return (a * 120.0) + (60.0 * ((x - y) / (z - t)));
}
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 = (a * 120.0d0) + (60.0d0 * ((x - y) / (z - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return (a * 120.0) + (60.0 * ((x - y) / (z - t)));
}
def code(x, y, z, t, a): return (a * 120.0) + (60.0 * ((x - y) / (z - t)))
function code(x, y, z, t, a) return Float64(Float64(a * 120.0) + Float64(60.0 * Float64(Float64(x - y) / Float64(z - t)))) end
function tmp = code(x, y, z, t, a) tmp = (a * 120.0) + (60.0 * ((x - y) / (z - t))); end
code[x_, y_, z_, t_, a_] := N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
a \cdot 120 + 60 \cdot \frac{x - y}{z - t}
\end{array}
Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t a) :precision binary64 (* a 120.0))
double code(double x, double y, double z, double t, double a) {
return a * 120.0;
}
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 = a * 120.0d0
end function
public static double code(double x, double y, double z, double t, double a) {
return a * 120.0;
}
def code(x, y, z, t, a): return a * 120.0
function code(x, y, z, t, a) return Float64(a * 120.0) end
function tmp = code(x, y, z, t, a) tmp = a * 120.0; end
code[x_, y_, z_, t_, a_] := N[(a * 120.0), $MachinePrecision]
\begin{array}{l}
\\
a \cdot 120
\end{array}
Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 51.1%
Final simplification51.1%
(FPCore (x y z t a) :precision binary64 (+ (/ 60.0 (/ (- z t) (- x y))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
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 = (60.0d0 / ((z - t) / (x - y))) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
def code(x, y, z, t, a): return (60.0 / ((z - t) / (x - y))) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = (60.0 / ((z - t) / (x - y))) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60}{\frac{z - t}{x - y}} + a \cdot 120
\end{array}
herbie shell --seed 2024091
(FPCore (x y z t a)
:name "Data.Colour.RGB:hslsv from colour-2.3.3, B"
:precision binary64
:alt
(+ (/ 60.0 (/ (- z t) (- x y))) (* a 120.0))
(+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))