
(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 15 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 (fma a 120.0 (* (/ 60.0 (- z t)) (- x y))))
double code(double x, double y, double z, double t, double a) {
return fma(a, 120.0, ((60.0 / (z - t)) * (x - y)));
}
function code(x, y, z, t, a) return fma(a, 120.0, Float64(Float64(60.0 / Float64(z - t)) * Float64(x - y))) end
code[x_, y_, z_, t_, a_] := N[(a * 120.0 + N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(a, 120, \frac{60}{z - t} \cdot \left(x - y\right)\right)
\end{array}
Initial program 99.1%
+-commutative99.1%
fma-def99.1%
associate-*l/99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* -60.0 (/ y (- z t)))) (t_2 (* 60.0 (/ x (- z t)))))
(if (<= a -7e-95)
(* a 120.0)
(if (<= a -1.9e-237)
t_2
(if (<= a 8e-243)
t_1
(if (<= a 3.5e-168) t_2 (if (<= a 5.8e-36) t_1 (* a 120.0))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -60.0 * (y / (z - t));
double t_2 = 60.0 * (x / (z - t));
double tmp;
if (a <= -7e-95) {
tmp = a * 120.0;
} else if (a <= -1.9e-237) {
tmp = t_2;
} else if (a <= 8e-243) {
tmp = t_1;
} else if (a <= 3.5e-168) {
tmp = t_2;
} else if (a <= 5.8e-36) {
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) :: t_2
real(8) :: tmp
t_1 = (-60.0d0) * (y / (z - t))
t_2 = 60.0d0 * (x / (z - t))
if (a <= (-7d-95)) then
tmp = a * 120.0d0
else if (a <= (-1.9d-237)) then
tmp = t_2
else if (a <= 8d-243) then
tmp = t_1
else if (a <= 3.5d-168) then
tmp = t_2
else if (a <= 5.8d-36) 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 = -60.0 * (y / (z - t));
double t_2 = 60.0 * (x / (z - t));
double tmp;
if (a <= -7e-95) {
tmp = a * 120.0;
} else if (a <= -1.9e-237) {
tmp = t_2;
} else if (a <= 8e-243) {
tmp = t_1;
} else if (a <= 3.5e-168) {
tmp = t_2;
} else if (a <= 5.8e-36) {
tmp = t_1;
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -60.0 * (y / (z - t)) t_2 = 60.0 * (x / (z - t)) tmp = 0 if a <= -7e-95: tmp = a * 120.0 elif a <= -1.9e-237: tmp = t_2 elif a <= 8e-243: tmp = t_1 elif a <= 3.5e-168: tmp = t_2 elif a <= 5.8e-36: tmp = t_1 else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) t_1 = Float64(-60.0 * Float64(y / Float64(z - t))) t_2 = Float64(60.0 * Float64(x / Float64(z - t))) tmp = 0.0 if (a <= -7e-95) tmp = Float64(a * 120.0); elseif (a <= -1.9e-237) tmp = t_2; elseif (a <= 8e-243) tmp = t_1; elseif (a <= 3.5e-168) tmp = t_2; elseif (a <= 5.8e-36) tmp = t_1; else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = -60.0 * (y / (z - t)); t_2 = 60.0 * (x / (z - t)); tmp = 0.0; if (a <= -7e-95) tmp = a * 120.0; elseif (a <= -1.9e-237) tmp = t_2; elseif (a <= 8e-243) tmp = t_1; elseif (a <= 3.5e-168) tmp = t_2; elseif (a <= 5.8e-36) tmp = t_1; else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -7e-95], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -1.9e-237], t$95$2, If[LessEqual[a, 8e-243], t$95$1, If[LessEqual[a, 3.5e-168], t$95$2, If[LessEqual[a, 5.8e-36], t$95$1, N[(a * 120.0), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -60 \cdot \frac{y}{z - t}\\
t_2 := 60 \cdot \frac{x}{z - t}\\
\mathbf{if}\;a \leq -7 \cdot 10^{-95}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -1.9 \cdot 10^{-237}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq 8 \cdot 10^{-243}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 3.5 \cdot 10^{-168}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq 5.8 \cdot 10^{-36}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -6.9999999999999994e-95 or 5.80000000000000026e-36 < a Initial program 99.2%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 71.0%
if -6.9999999999999994e-95 < a < -1.90000000000000012e-237 or 7.99999999999999996e-243 < a < 3.49999999999999982e-168Initial program 97.7%
associate-/l*99.6%
Simplified99.6%
associate-/r/99.6%
Applied egg-rr99.6%
Taylor expanded in x around inf 55.5%
if -1.90000000000000012e-237 < a < 7.99999999999999996e-243 or 3.49999999999999982e-168 < a < 5.80000000000000026e-36Initial program 99.8%
associate-/l*99.6%
Simplified99.6%
associate-/r/99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 69.9%
Final simplification67.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* -60.0 (/ y (- z t)))))
(if (<= a -5.6e-105)
(* a 120.0)
(if (<= a -5.2e-239)
(* 60.0 (/ x (- z t)))
(if (<= a 1.75e-243)
t_1
(if (<= a 4.8e-168)
(* (/ 60.0 (- z t)) x)
(if (<= a 2.9e-40) t_1 (* a 120.0))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -60.0 * (y / (z - t));
double tmp;
if (a <= -5.6e-105) {
tmp = a * 120.0;
} else if (a <= -5.2e-239) {
tmp = 60.0 * (x / (z - t));
} else if (a <= 1.75e-243) {
tmp = t_1;
} else if (a <= 4.8e-168) {
tmp = (60.0 / (z - t)) * x;
} else if (a <= 2.9e-40) {
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 = (-60.0d0) * (y / (z - t))
if (a <= (-5.6d-105)) then
tmp = a * 120.0d0
else if (a <= (-5.2d-239)) then
tmp = 60.0d0 * (x / (z - t))
else if (a <= 1.75d-243) then
tmp = t_1
else if (a <= 4.8d-168) then
tmp = (60.0d0 / (z - t)) * x
else if (a <= 2.9d-40) 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 = -60.0 * (y / (z - t));
double tmp;
if (a <= -5.6e-105) {
tmp = a * 120.0;
} else if (a <= -5.2e-239) {
tmp = 60.0 * (x / (z - t));
} else if (a <= 1.75e-243) {
tmp = t_1;
} else if (a <= 4.8e-168) {
tmp = (60.0 / (z - t)) * x;
} else if (a <= 2.9e-40) {
tmp = t_1;
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -60.0 * (y / (z - t)) tmp = 0 if a <= -5.6e-105: tmp = a * 120.0 elif a <= -5.2e-239: tmp = 60.0 * (x / (z - t)) elif a <= 1.75e-243: tmp = t_1 elif a <= 4.8e-168: tmp = (60.0 / (z - t)) * x elif a <= 2.9e-40: tmp = t_1 else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) t_1 = Float64(-60.0 * Float64(y / Float64(z - t))) tmp = 0.0 if (a <= -5.6e-105) tmp = Float64(a * 120.0); elseif (a <= -5.2e-239) tmp = Float64(60.0 * Float64(x / Float64(z - t))); elseif (a <= 1.75e-243) tmp = t_1; elseif (a <= 4.8e-168) tmp = Float64(Float64(60.0 / Float64(z - t)) * x); elseif (a <= 2.9e-40) tmp = t_1; else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = -60.0 * (y / (z - t)); tmp = 0.0; if (a <= -5.6e-105) tmp = a * 120.0; elseif (a <= -5.2e-239) tmp = 60.0 * (x / (z - t)); elseif (a <= 1.75e-243) tmp = t_1; elseif (a <= 4.8e-168) tmp = (60.0 / (z - t)) * x; elseif (a <= 2.9e-40) tmp = t_1; else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -5.6e-105], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -5.2e-239], N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.75e-243], t$95$1, If[LessEqual[a, 4.8e-168], N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[a, 2.9e-40], t$95$1, N[(a * 120.0), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -60 \cdot \frac{y}{z - t}\\
\mathbf{if}\;a \leq -5.6 \cdot 10^{-105}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -5.2 \cdot 10^{-239}:\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\
\mathbf{elif}\;a \leq 1.75 \cdot 10^{-243}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 4.8 \cdot 10^{-168}:\\
\;\;\;\;\frac{60}{z - t} \cdot x\\
\mathbf{elif}\;a \leq 2.9 \cdot 10^{-40}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -5.6e-105 or 2.8999999999999999e-40 < a Initial program 99.2%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 71.0%
if -5.6e-105 < a < -5.20000000000000005e-239Initial program 96.4%
associate-/l*99.5%
Simplified99.5%
associate-/r/99.5%
Applied egg-rr99.5%
Taylor expanded in x around inf 54.5%
if -5.20000000000000005e-239 < a < 1.74999999999999989e-243 or 4.7999999999999999e-168 < a < 2.8999999999999999e-40Initial program 99.8%
associate-/l*99.6%
Simplified99.6%
associate-/r/99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 69.9%
if 1.74999999999999989e-243 < a < 4.7999999999999999e-168Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in x around inf 56.9%
associate-*r/57.1%
associate-*l/57.0%
*-commutative57.0%
Simplified57.0%
Final simplification67.9%
(FPCore (x y z t a)
:precision binary64
(if (<= a -1.3e-96)
(* a 120.0)
(if (<= a -8.5e-238)
(* 60.0 (/ x (- z t)))
(if (<= a 1.8e-242)
(/ (* 60.0 y) (- t z))
(if (<= a 1.65e-168)
(* (/ 60.0 (- z t)) x)
(if (<= a 1.16e-39) (* -60.0 (/ y (- z t))) (* a 120.0)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.3e-96) {
tmp = a * 120.0;
} else if (a <= -8.5e-238) {
tmp = 60.0 * (x / (z - t));
} else if (a <= 1.8e-242) {
tmp = (60.0 * y) / (t - z);
} else if (a <= 1.65e-168) {
tmp = (60.0 / (z - t)) * x;
} else if (a <= 1.16e-39) {
tmp = -60.0 * (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 <= (-1.3d-96)) then
tmp = a * 120.0d0
else if (a <= (-8.5d-238)) then
tmp = 60.0d0 * (x / (z - t))
else if (a <= 1.8d-242) then
tmp = (60.0d0 * y) / (t - z)
else if (a <= 1.65d-168) then
tmp = (60.0d0 / (z - t)) * x
else if (a <= 1.16d-39) then
tmp = (-60.0d0) * (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 <= -1.3e-96) {
tmp = a * 120.0;
} else if (a <= -8.5e-238) {
tmp = 60.0 * (x / (z - t));
} else if (a <= 1.8e-242) {
tmp = (60.0 * y) / (t - z);
} else if (a <= 1.65e-168) {
tmp = (60.0 / (z - t)) * x;
} else if (a <= 1.16e-39) {
tmp = -60.0 * (y / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.3e-96: tmp = a * 120.0 elif a <= -8.5e-238: tmp = 60.0 * (x / (z - t)) elif a <= 1.8e-242: tmp = (60.0 * y) / (t - z) elif a <= 1.65e-168: tmp = (60.0 / (z - t)) * x elif a <= 1.16e-39: tmp = -60.0 * (y / (z - t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.3e-96) tmp = Float64(a * 120.0); elseif (a <= -8.5e-238) tmp = Float64(60.0 * Float64(x / Float64(z - t))); elseif (a <= 1.8e-242) tmp = Float64(Float64(60.0 * y) / Float64(t - z)); elseif (a <= 1.65e-168) tmp = Float64(Float64(60.0 / Float64(z - t)) * x); elseif (a <= 1.16e-39) tmp = Float64(-60.0 * Float64(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 <= -1.3e-96) tmp = a * 120.0; elseif (a <= -8.5e-238) tmp = 60.0 * (x / (z - t)); elseif (a <= 1.8e-242) tmp = (60.0 * y) / (t - z); elseif (a <= 1.65e-168) tmp = (60.0 / (z - t)) * x; elseif (a <= 1.16e-39) tmp = -60.0 * (y / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.3e-96], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -8.5e-238], N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.8e-242], N[(N[(60.0 * y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.65e-168], N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[a, 1.16e-39], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.3 \cdot 10^{-96}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -8.5 \cdot 10^{-238}:\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\
\mathbf{elif}\;a \leq 1.8 \cdot 10^{-242}:\\
\;\;\;\;\frac{60 \cdot y}{t - z}\\
\mathbf{elif}\;a \leq 1.65 \cdot 10^{-168}:\\
\;\;\;\;\frac{60}{z - t} \cdot x\\
\mathbf{elif}\;a \leq 1.16 \cdot 10^{-39}:\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -1.3000000000000001e-96 or 1.16e-39 < a Initial program 99.2%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 71.0%
if -1.3000000000000001e-96 < a < -8.5000000000000006e-238Initial program 96.4%
associate-/l*99.5%
Simplified99.5%
associate-/r/99.5%
Applied egg-rr99.5%
Taylor expanded in x around inf 54.5%
if -8.5000000000000006e-238 < a < 1.80000000000000007e-242Initial program 99.8%
associate-/l*99.6%
Simplified99.6%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 77.4%
clear-num77.3%
div-inv77.4%
frac-2neg77.4%
metadata-eval77.4%
distribute-neg-frac77.4%
sub-neg77.4%
distribute-neg-in77.4%
remove-double-neg77.4%
Applied egg-rr77.4%
associate-/l*77.6%
*-commutative77.6%
+-commutative77.6%
unsub-neg77.6%
Simplified77.6%
if 1.80000000000000007e-242 < a < 1.6500000000000001e-168Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in x around inf 56.9%
associate-*r/57.1%
associate-*l/57.0%
*-commutative57.0%
Simplified57.0%
if 1.6500000000000001e-168 < a < 1.16e-39Initial program 99.8%
associate-/l*99.6%
Simplified99.6%
associate-/r/99.9%
Applied egg-rr99.9%
Taylor expanded in y around inf 62.3%
Final simplification67.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= (* a 120.0) -4e+32) (not (<= (* a 120.0) 5000000000000.0))) (* a 120.0) (* (/ 60.0 (- z t)) (- x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((a * 120.0) <= -4e+32) || !((a * 120.0) <= 5000000000000.0)) {
tmp = a * 120.0;
} else {
tmp = (60.0 / (z - t)) * (x - 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 (((a * 120.0d0) <= (-4d+32)) .or. (.not. ((a * 120.0d0) <= 5000000000000.0d0))) then
tmp = a * 120.0d0
else
tmp = (60.0d0 / (z - t)) * (x - y)
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) <= -4e+32) || !((a * 120.0) <= 5000000000000.0)) {
tmp = a * 120.0;
} else {
tmp = (60.0 / (z - t)) * (x - y);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if ((a * 120.0) <= -4e+32) or not ((a * 120.0) <= 5000000000000.0): tmp = a * 120.0 else: tmp = (60.0 / (z - t)) * (x - y) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((Float64(a * 120.0) <= -4e+32) || !(Float64(a * 120.0) <= 5000000000000.0)) tmp = Float64(a * 120.0); else tmp = Float64(Float64(60.0 / Float64(z - t)) * Float64(x - y)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (((a * 120.0) <= -4e+32) || ~(((a * 120.0) <= 5000000000000.0))) tmp = a * 120.0; else tmp = (60.0 / (z - t)) * (x - y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[N[(a * 120.0), $MachinePrecision], -4e+32], N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 5000000000000.0]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -4 \cdot 10^{+32} \lor \neg \left(a \cdot 120 \leq 5000000000000\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{60}{z - t} \cdot \left(x - y\right)\\
\end{array}
\end{array}
if (*.f64 a 120) < -4.00000000000000021e32 or 5e12 < (*.f64 a 120) Initial program 99.0%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 79.5%
if -4.00000000000000021e32 < (*.f64 a 120) < 5e12Initial program 99.1%
associate-/l*99.6%
Simplified99.6%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 80.2%
associate-*r/79.6%
associate-*l/80.2%
*-commutative80.2%
Simplified80.2%
Final simplification79.9%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -4e+32)
(+ (* 60.0 (/ x z)) (* a 120.0))
(if (<= (* a 120.0) 5000000000000.0)
(* (/ 60.0 (- z t)) (- x y))
(* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -4e+32) {
tmp = (60.0 * (x / z)) + (a * 120.0);
} else if ((a * 120.0) <= 5000000000000.0) {
tmp = (60.0 / (z - t)) * (x - y);
} 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) <= (-4d+32)) then
tmp = (60.0d0 * (x / z)) + (a * 120.0d0)
else if ((a * 120.0d0) <= 5000000000000.0d0) then
tmp = (60.0d0 / (z - t)) * (x - y)
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) <= -4e+32) {
tmp = (60.0 * (x / z)) + (a * 120.0);
} else if ((a * 120.0) <= 5000000000000.0) {
tmp = (60.0 / (z - t)) * (x - y);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -4e+32: tmp = (60.0 * (x / z)) + (a * 120.0) elif (a * 120.0) <= 5000000000000.0: tmp = (60.0 / (z - t)) * (x - y) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -4e+32) tmp = Float64(Float64(60.0 * Float64(x / z)) + Float64(a * 120.0)); elseif (Float64(a * 120.0) <= 5000000000000.0) tmp = Float64(Float64(60.0 / Float64(z - t)) * Float64(x - y)); 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) <= -4e+32) tmp = (60.0 * (x / z)) + (a * 120.0); elseif ((a * 120.0) <= 5000000000000.0) tmp = (60.0 / (z - t)) * (x - y); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -4e+32], N[(N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 5000000000000.0], N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -4 \cdot 10^{+32}:\\
\;\;\;\;60 \cdot \frac{x}{z} + a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq 5000000000000:\\
\;\;\;\;\frac{60}{z - t} \cdot \left(x - y\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a 120) < -4.00000000000000021e32Initial program 99.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 77.3%
Taylor expanded in x around inf 78.1%
if -4.00000000000000021e32 < (*.f64 a 120) < 5e12Initial program 99.1%
associate-/l*99.6%
Simplified99.6%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 80.2%
associate-*r/79.6%
associate-*l/80.2%
*-commutative80.2%
Simplified80.2%
if 5e12 < (*.f64 a 120) Initial program 98.2%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in z around inf 84.7%
Final simplification80.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -1.75e+88) (not (<= x 1.36e+48))) (+ (* (/ 60.0 (- z t)) x) (* a 120.0)) (+ (* -60.0 (/ y (- z t))) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -1.75e+88) || !(x <= 1.36e+48)) {
tmp = ((60.0 / (z - t)) * x) + (a * 120.0);
} else {
tmp = (-60.0 * (y / (z - t))) + (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.75d+88)) .or. (.not. (x <= 1.36d+48))) then
tmp = ((60.0d0 / (z - t)) * x) + (a * 120.0d0)
else
tmp = ((-60.0d0) * (y / (z - t))) + (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.75e+88) || !(x <= 1.36e+48)) {
tmp = ((60.0 / (z - t)) * x) + (a * 120.0);
} else {
tmp = (-60.0 * (y / (z - t))) + (a * 120.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -1.75e+88) or not (x <= 1.36e+48): tmp = ((60.0 / (z - t)) * x) + (a * 120.0) else: tmp = (-60.0 * (y / (z - t))) + (a * 120.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -1.75e+88) || !(x <= 1.36e+48)) tmp = Float64(Float64(Float64(60.0 / Float64(z - t)) * x) + Float64(a * 120.0)); else tmp = Float64(Float64(-60.0 * Float64(y / Float64(z - t))) + Float64(a * 120.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -1.75e+88) || ~((x <= 1.36e+48))) tmp = ((60.0 / (z - t)) * x) + (a * 120.0); else tmp = (-60.0 * (y / (z - t))) + (a * 120.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -1.75e+88], N[Not[LessEqual[x, 1.36e+48]], $MachinePrecision]], N[(N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.75 \cdot 10^{+88} \lor \neg \left(x \leq 1.36 \cdot 10^{+48}\right):\\
\;\;\;\;\frac{60}{z - t} \cdot x + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{y}{z - t} + a \cdot 120\\
\end{array}
\end{array}
if x < -1.7499999999999999e88 or 1.3599999999999999e48 < x Initial program 97.9%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around inf 88.6%
associate-*r/86.8%
associate-*l/88.6%
*-commutative88.6%
Simplified88.6%
if -1.7499999999999999e88 < x < 1.3599999999999999e48Initial program 99.9%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around 0 94.9%
Final simplification92.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -9.5e+85) (not (<= x 4.8e+48))) (+ (* (/ 60.0 (- z t)) x) (* a 120.0)) (+ (/ (* y -60.0) (- z t)) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -9.5e+85) || !(x <= 4.8e+48)) {
tmp = ((60.0 / (z - t)) * x) + (a * 120.0);
} else {
tmp = ((y * -60.0) / (z - t)) + (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 <= (-9.5d+85)) .or. (.not. (x <= 4.8d+48))) then
tmp = ((60.0d0 / (z - t)) * x) + (a * 120.0d0)
else
tmp = ((y * (-60.0d0)) / (z - t)) + (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 <= -9.5e+85) || !(x <= 4.8e+48)) {
tmp = ((60.0 / (z - t)) * x) + (a * 120.0);
} else {
tmp = ((y * -60.0) / (z - t)) + (a * 120.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -9.5e+85) or not (x <= 4.8e+48): tmp = ((60.0 / (z - t)) * x) + (a * 120.0) else: tmp = ((y * -60.0) / (z - t)) + (a * 120.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -9.5e+85) || !(x <= 4.8e+48)) tmp = Float64(Float64(Float64(60.0 / Float64(z - t)) * x) + Float64(a * 120.0)); else tmp = Float64(Float64(Float64(y * -60.0) / Float64(z - t)) + Float64(a * 120.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -9.5e+85) || ~((x <= 4.8e+48))) tmp = ((60.0 / (z - t)) * x) + (a * 120.0); else tmp = ((y * -60.0) / (z - t)) + (a * 120.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -9.5e+85], N[Not[LessEqual[x, 4.8e+48]], $MachinePrecision]], N[(N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -9.5 \cdot 10^{+85} \lor \neg \left(x \leq 4.8 \cdot 10^{+48}\right):\\
\;\;\;\;\frac{60}{z - t} \cdot x + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot -60}{z - t} + a \cdot 120\\
\end{array}
\end{array}
if x < -9.49999999999999945e85 or 4.8000000000000002e48 < x Initial program 97.9%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around inf 88.6%
associate-*r/86.8%
associate-*l/88.6%
*-commutative88.6%
Simplified88.6%
if -9.49999999999999945e85 < x < 4.8000000000000002e48Initial program 99.9%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around 0 94.9%
associate-*r/94.9%
Simplified94.9%
Final simplification92.4%
(FPCore (x y z t a)
:precision binary64
(if (<= x -4.45e+89)
(* (/ 60.0 (- z t)) (- x y))
(if (<= x 4.6e+136)
(+ (* -60.0 (/ y (- z t))) (* a 120.0))
(* 60.0 (/ (- x y) (- z t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -4.45e+89) {
tmp = (60.0 / (z - t)) * (x - y);
} else if (x <= 4.6e+136) {
tmp = (-60.0 * (y / (z - t))) + (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 (x <= (-4.45d+89)) then
tmp = (60.0d0 / (z - t)) * (x - y)
else if (x <= 4.6d+136) then
tmp = ((-60.0d0) * (y / (z - t))) + (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 (x <= -4.45e+89) {
tmp = (60.0 / (z - t)) * (x - y);
} else if (x <= 4.6e+136) {
tmp = (-60.0 * (y / (z - t))) + (a * 120.0);
} else {
tmp = 60.0 * ((x - y) / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -4.45e+89: tmp = (60.0 / (z - t)) * (x - y) elif x <= 4.6e+136: tmp = (-60.0 * (y / (z - t))) + (a * 120.0) else: tmp = 60.0 * ((x - y) / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -4.45e+89) tmp = Float64(Float64(60.0 / Float64(z - t)) * Float64(x - y)); elseif (x <= 4.6e+136) tmp = Float64(Float64(-60.0 * Float64(y / Float64(z - t))) + 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 (x <= -4.45e+89) tmp = (60.0 / (z - t)) * (x - y); elseif (x <= 4.6e+136) tmp = (-60.0 * (y / (z - t))) + (a * 120.0); else tmp = 60.0 * ((x - y) / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -4.45e+89], N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.6e+136], N[(N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.45 \cdot 10^{+89}:\\
\;\;\;\;\frac{60}{z - t} \cdot \left(x - y\right)\\
\mathbf{elif}\;x \leq 4.6 \cdot 10^{+136}:\\
\;\;\;\;-60 \cdot \frac{y}{z - t} + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\end{array}
\end{array}
if x < -4.44999999999999997e89Initial program 95.6%
associate-/l*99.7%
Simplified99.7%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 72.6%
associate-*r/70.7%
associate-*l/72.6%
*-commutative72.6%
Simplified72.6%
if -4.44999999999999997e89 < x < 4.6e136Initial program 99.9%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around 0 93.3%
if 4.6e136 < x Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 71.5%
Final simplification86.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -3.8e+29) (not (<= a 3.4e+14))) (* 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 <= -3.8e+29) || !(a <= 3.4e+14)) {
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 <= (-3.8d+29)) .or. (.not. (a <= 3.4d+14))) 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 <= -3.8e+29) || !(a <= 3.4e+14)) {
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 <= -3.8e+29) or not (a <= 3.4e+14): 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 <= -3.8e+29) || !(a <= 3.4e+14)) 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 <= -3.8e+29) || ~((a <= 3.4e+14))) 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, -3.8e+29], N[Not[LessEqual[a, 3.4e+14]], $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 -3.8 \cdot 10^{+29} \lor \neg \left(a \leq 3.4 \cdot 10^{+14}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\end{array}
\end{array}
if a < -3.79999999999999971e29 or 3.4e14 < a Initial program 99.0%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 79.5%
if -3.79999999999999971e29 < a < 3.4e14Initial program 99.1%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 80.2%
Final simplification79.9%
(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(Float64(60.0 / 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[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60}{z - t} \cdot \left(x - y\right) + a \cdot 120
\end{array}
Initial program 99.1%
associate-/l*99.7%
Simplified99.7%
associate-/r/99.8%
Applied egg-rr99.8%
Final simplification99.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -3e-201) (not (<= a 4.65e-38))) (* a 120.0) (* -60.0 (/ y (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -3e-201) || !(a <= 4.65e-38)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (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 <= (-3d-201)) .or. (.not. (a <= 4.65d-38))) then
tmp = a * 120.0d0
else
tmp = (-60.0d0) * (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 <= -3e-201) || !(a <= 4.65e-38)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (y / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -3e-201) or not (a <= 4.65e-38): tmp = a * 120.0 else: tmp = -60.0 * (y / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -3e-201) || !(a <= 4.65e-38)) tmp = Float64(a * 120.0); else tmp = Float64(-60.0 * Float64(y / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -3e-201) || ~((a <= 4.65e-38))) tmp = a * 120.0; else tmp = -60.0 * (y / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -3e-201], N[Not[LessEqual[a, 4.65e-38]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3 \cdot 10^{-201} \lor \neg \left(a \leq 4.65 \cdot 10^{-38}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\end{array}
\end{array}
if a < -3.00000000000000002e-201 or 4.65000000000000001e-38 < a Initial program 99.2%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 67.5%
if -3.00000000000000002e-201 < a < 4.65000000000000001e-38Initial program 98.8%
associate-/l*99.6%
Simplified99.6%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 57.6%
Final simplification63.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.18e-200) (not (<= a 0.82))) (* a 120.0) (* -60.0 (/ y z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.18e-200) || !(a <= 0.82)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (y / 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 ((a <= (-1.18d-200)) .or. (.not. (a <= 0.82d0))) then
tmp = a * 120.0d0
else
tmp = (-60.0d0) * (y / z)
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.18e-200) || !(a <= 0.82)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (y / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.18e-200) or not (a <= 0.82): tmp = a * 120.0 else: tmp = -60.0 * (y / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.18e-200) || !(a <= 0.82)) tmp = Float64(a * 120.0); else tmp = Float64(-60.0 * Float64(y / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1.18e-200) || ~((a <= 0.82))) tmp = a * 120.0; else tmp = -60.0 * (y / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.18e-200], N[Not[LessEqual[a, 0.82]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.18 \cdot 10^{-200} \lor \neg \left(a \leq 0.82\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if a < -1.17999999999999996e-200 or 0.819999999999999951 < a Initial program 99.2%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 69.2%
if -1.17999999999999996e-200 < a < 0.819999999999999951Initial program 98.9%
associate-/l*99.6%
Simplified99.6%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 54.7%
Taylor expanded in z around inf 38.3%
Final simplification57.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -4.5e-201) (not (<= a 0.00054))) (* a 120.0) (/ (* y -60.0) z)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -4.5e-201) || !(a <= 0.00054)) {
tmp = a * 120.0;
} else {
tmp = (y * -60.0) / 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 ((a <= (-4.5d-201)) .or. (.not. (a <= 0.00054d0))) then
tmp = a * 120.0d0
else
tmp = (y * (-60.0d0)) / z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -4.5e-201) || !(a <= 0.00054)) {
tmp = a * 120.0;
} else {
tmp = (y * -60.0) / z;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -4.5e-201) or not (a <= 0.00054): tmp = a * 120.0 else: tmp = (y * -60.0) / z return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -4.5e-201) || !(a <= 0.00054)) tmp = Float64(a * 120.0); else tmp = Float64(Float64(y * -60.0) / z); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -4.5e-201) || ~((a <= 0.00054))) tmp = a * 120.0; else tmp = (y * -60.0) / z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -4.5e-201], N[Not[LessEqual[a, 0.00054]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(N[(y * -60.0), $MachinePrecision] / z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.5 \cdot 10^{-201} \lor \neg \left(a \leq 0.00054\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot -60}{z}\\
\end{array}
\end{array}
if a < -4.5000000000000002e-201 or 5.40000000000000007e-4 < a Initial program 99.2%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 69.2%
if -4.5000000000000002e-201 < a < 5.40000000000000007e-4Initial program 98.9%
associate-/l*99.6%
Simplified99.6%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 54.7%
Taylor expanded in z around inf 38.3%
associate-*r/38.4%
metadata-eval38.4%
distribute-lft-neg-in38.4%
*-commutative38.4%
distribute-rgt-neg-in38.4%
metadata-eval38.4%
Applied egg-rr38.4%
Final simplification57.2%
(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.1%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in z around inf 48.0%
Final simplification48.0%
(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 2023334
(FPCore (x y z t a)
:name "Data.Colour.RGB:hslsv from colour-2.3.3, B"
:precision binary64
:herbie-target
(+ (/ 60.0 (/ (- z t) (- x y))) (* a 120.0))
(+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))