
(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 60.0 (/ (- x y) (- z t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return fma(60.0, ((x - y) / (z - t)), (a * 120.0));
}
function code(x, y, z, t, a) return fma(60.0, Float64(Float64(x - y) / Float64(z - t)), Float64(a * 120.0)) end
code[x_, y_, z_, t_, a_] := N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(60, \frac{x - y}{z - t}, a \cdot 120\right)
\end{array}
Initial program 99.4%
associate-/l*99.8%
fma-define99.8%
Simplified99.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* -60.0 (/ (- x y) t))) (t_2 (* 60.0 (/ (- x y) z))))
(if (<= a -1.1e-67)
(* a 120.0)
(if (<= a -5.9e-142)
t_2
(if (<= a -5.8e-150)
(* a 120.0)
(if (<= a -7.8e-256)
t_1
(if (<= a 3.5e-305)
t_2
(if (<= a 3.4e-192)
t_1
(if (<= a 1.7e-148)
t_2
(if (<= a 5.8e-27) t_1 (* a 120.0)))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -60.0 * ((x - y) / t);
double t_2 = 60.0 * ((x - y) / z);
double tmp;
if (a <= -1.1e-67) {
tmp = a * 120.0;
} else if (a <= -5.9e-142) {
tmp = t_2;
} else if (a <= -5.8e-150) {
tmp = a * 120.0;
} else if (a <= -7.8e-256) {
tmp = t_1;
} else if (a <= 3.5e-305) {
tmp = t_2;
} else if (a <= 3.4e-192) {
tmp = t_1;
} else if (a <= 1.7e-148) {
tmp = t_2;
} else if (a <= 5.8e-27) {
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) * ((x - y) / t)
t_2 = 60.0d0 * ((x - y) / z)
if (a <= (-1.1d-67)) then
tmp = a * 120.0d0
else if (a <= (-5.9d-142)) then
tmp = t_2
else if (a <= (-5.8d-150)) then
tmp = a * 120.0d0
else if (a <= (-7.8d-256)) then
tmp = t_1
else if (a <= 3.5d-305) then
tmp = t_2
else if (a <= 3.4d-192) then
tmp = t_1
else if (a <= 1.7d-148) then
tmp = t_2
else if (a <= 5.8d-27) 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 * ((x - y) / t);
double t_2 = 60.0 * ((x - y) / z);
double tmp;
if (a <= -1.1e-67) {
tmp = a * 120.0;
} else if (a <= -5.9e-142) {
tmp = t_2;
} else if (a <= -5.8e-150) {
tmp = a * 120.0;
} else if (a <= -7.8e-256) {
tmp = t_1;
} else if (a <= 3.5e-305) {
tmp = t_2;
} else if (a <= 3.4e-192) {
tmp = t_1;
} else if (a <= 1.7e-148) {
tmp = t_2;
} else if (a <= 5.8e-27) {
tmp = t_1;
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -60.0 * ((x - y) / t) t_2 = 60.0 * ((x - y) / z) tmp = 0 if a <= -1.1e-67: tmp = a * 120.0 elif a <= -5.9e-142: tmp = t_2 elif a <= -5.8e-150: tmp = a * 120.0 elif a <= -7.8e-256: tmp = t_1 elif a <= 3.5e-305: tmp = t_2 elif a <= 3.4e-192: tmp = t_1 elif a <= 1.7e-148: tmp = t_2 elif a <= 5.8e-27: tmp = t_1 else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) t_1 = Float64(-60.0 * Float64(Float64(x - y) / t)) t_2 = Float64(60.0 * Float64(Float64(x - y) / z)) tmp = 0.0 if (a <= -1.1e-67) tmp = Float64(a * 120.0); elseif (a <= -5.9e-142) tmp = t_2; elseif (a <= -5.8e-150) tmp = Float64(a * 120.0); elseif (a <= -7.8e-256) tmp = t_1; elseif (a <= 3.5e-305) tmp = t_2; elseif (a <= 3.4e-192) tmp = t_1; elseif (a <= 1.7e-148) tmp = t_2; elseif (a <= 5.8e-27) 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 * ((x - y) / t); t_2 = 60.0 * ((x - y) / z); tmp = 0.0; if (a <= -1.1e-67) tmp = a * 120.0; elseif (a <= -5.9e-142) tmp = t_2; elseif (a <= -5.8e-150) tmp = a * 120.0; elseif (a <= -7.8e-256) tmp = t_1; elseif (a <= 3.5e-305) tmp = t_2; elseif (a <= 3.4e-192) tmp = t_1; elseif (a <= 1.7e-148) tmp = t_2; elseif (a <= 5.8e-27) 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[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.1e-67], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -5.9e-142], t$95$2, If[LessEqual[a, -5.8e-150], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -7.8e-256], t$95$1, If[LessEqual[a, 3.5e-305], t$95$2, If[LessEqual[a, 3.4e-192], t$95$1, If[LessEqual[a, 1.7e-148], t$95$2, If[LessEqual[a, 5.8e-27], t$95$1, N[(a * 120.0), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -60 \cdot \frac{x - y}{t}\\
t_2 := 60 \cdot \frac{x - y}{z}\\
\mathbf{if}\;a \leq -1.1 \cdot 10^{-67}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -5.9 \cdot 10^{-142}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq -5.8 \cdot 10^{-150}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -7.8 \cdot 10^{-256}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 3.5 \cdot 10^{-305}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq 3.4 \cdot 10^{-192}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.7 \cdot 10^{-148}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq 5.8 \cdot 10^{-27}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -1.1000000000000001e-67 or -5.89999999999999966e-142 < a < -5.7999999999999996e-150 or 5.80000000000000008e-27 < a Initial program 99.2%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 73.8%
if -1.1000000000000001e-67 < a < -5.89999999999999966e-142 or -7.7999999999999997e-256 < a < 3.4999999999999998e-305 or 3.40000000000000002e-192 < a < 1.7000000000000001e-148Initial program 99.6%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 87.5%
Taylor expanded in z around inf 71.6%
if -5.7999999999999996e-150 < a < -7.7999999999999997e-256 or 3.4999999999999998e-305 < a < 3.40000000000000002e-192 or 1.7000000000000001e-148 < a < 5.80000000000000008e-27Initial program 99.6%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 85.8%
Taylor expanded in z around 0 62.0%
Final simplification70.1%
(FPCore (x y z t a)
:precision binary64
(if (or (<= y -3.9e+120)
(and (not (<= y -8e+108)) (or (<= y -4.8e+19) (not (<= y 9.5e+39)))))
(+ (* 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 <= -3.9e+120) || (!(y <= -8e+108) && ((y <= -4.8e+19) || !(y <= 9.5e+39)))) {
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 <= (-3.9d+120)) .or. (.not. (y <= (-8d+108))) .and. (y <= (-4.8d+19)) .or. (.not. (y <= 9.5d+39))) 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 <= -3.9e+120) || (!(y <= -8e+108) && ((y <= -4.8e+19) || !(y <= 9.5e+39)))) {
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 <= -3.9e+120) or (not (y <= -8e+108) and ((y <= -4.8e+19) or not (y <= 9.5e+39))): 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 <= -3.9e+120) || (!(y <= -8e+108) && ((y <= -4.8e+19) || !(y <= 9.5e+39)))) 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 <= -3.9e+120) || (~((y <= -8e+108)) && ((y <= -4.8e+19) || ~((y <= 9.5e+39))))) 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, -3.9e+120], And[N[Not[LessEqual[y, -8e+108]], $MachinePrecision], Or[LessEqual[y, -4.8e+19], N[Not[LessEqual[y, 9.5e+39]], $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 -3.9 \cdot 10^{+120} \lor \neg \left(y \leq -8 \cdot 10^{+108}\right) \land \left(y \leq -4.8 \cdot 10^{+19} \lor \neg \left(y \leq 9.5 \cdot 10^{+39}\right)\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 < -3.8999999999999998e120 or -8.0000000000000003e108 < y < -4.8e19 or 9.50000000000000011e39 < y Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 95.6%
associate-*r/95.5%
Simplified95.5%
if -3.8999999999999998e120 < y < -8.0000000000000003e108 or -4.8e19 < y < 9.50000000000000011e39Initial program 99.1%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 97.3%
associate-*r/96.6%
*-commutative96.6%
associate-*r/97.3%
Simplified97.3%
Final simplification96.6%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -5e+23)
(* a 120.0)
(if (<= (* a 120.0) 20.0)
(* 60.0 (/ (- x y) (- z t)))
(if (<= (* a 120.0) 4e+115)
(+ (* a 120.0) (/ (* 60.0 y) t))
(+ (* a 120.0) (* x (/ -60.0 t)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -5e+23) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 20.0) {
tmp = 60.0 * ((x - y) / (z - t));
} else if ((a * 120.0) <= 4e+115) {
tmp = (a * 120.0) + ((60.0 * y) / t);
} else {
tmp = (a * 120.0) + (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 ((a * 120.0d0) <= (-5d+23)) then
tmp = a * 120.0d0
else if ((a * 120.0d0) <= 20.0d0) then
tmp = 60.0d0 * ((x - y) / (z - t))
else if ((a * 120.0d0) <= 4d+115) then
tmp = (a * 120.0d0) + ((60.0d0 * y) / t)
else
tmp = (a * 120.0d0) + (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 ((a * 120.0) <= -5e+23) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 20.0) {
tmp = 60.0 * ((x - y) / (z - t));
} else if ((a * 120.0) <= 4e+115) {
tmp = (a * 120.0) + ((60.0 * y) / t);
} else {
tmp = (a * 120.0) + (x * (-60.0 / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -5e+23: tmp = a * 120.0 elif (a * 120.0) <= 20.0: tmp = 60.0 * ((x - y) / (z - t)) elif (a * 120.0) <= 4e+115: tmp = (a * 120.0) + ((60.0 * y) / t) else: tmp = (a * 120.0) + (x * (-60.0 / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -5e+23) tmp = Float64(a * 120.0); elseif (Float64(a * 120.0) <= 20.0) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); elseif (Float64(a * 120.0) <= 4e+115) tmp = Float64(Float64(a * 120.0) + Float64(Float64(60.0 * y) / t)); else tmp = Float64(Float64(a * 120.0) + Float64(x * Float64(-60.0 / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a * 120.0) <= -5e+23) tmp = a * 120.0; elseif ((a * 120.0) <= 20.0) tmp = 60.0 * ((x - y) / (z - t)); elseif ((a * 120.0) <= 4e+115) tmp = (a * 120.0) + ((60.0 * y) / t); else tmp = (a * 120.0) + (x * (-60.0 / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -5e+23], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 20.0], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 4e+115], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(60.0 * y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(x * N[(-60.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -5 \cdot 10^{+23}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq 20:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{elif}\;a \cdot 120 \leq 4 \cdot 10^{+115}:\\
\;\;\;\;a \cdot 120 + \frac{60 \cdot y}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + x \cdot \frac{-60}{t}\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -4.9999999999999999e23Initial program 98.0%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 88.6%
if -4.9999999999999999e23 < (*.f64 a #s(literal 120 binary64)) < 20Initial program 99.6%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 78.9%
if 20 < (*.f64 a #s(literal 120 binary64)) < 4.0000000000000001e115Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around 0 88.0%
associate-*r/88.1%
Simplified88.1%
Taylor expanded in z around 0 85.8%
associate-*r/85.9%
Simplified85.9%
if 4.0000000000000001e115 < (*.f64 a #s(literal 120 binary64)) Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 97.6%
associate-*r/97.6%
*-commutative97.6%
associate-*r/97.7%
Simplified97.7%
Taylor expanded in z around 0 86.7%
Final simplification82.8%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -5e+23)
(* a 120.0)
(if (<= (* a 120.0) 1e-24)
(* 60.0 (/ (- x y) (- z t)))
(if (<= (* a 120.0) 4e+104)
(+ (* a 120.0) (* x (/ 60.0 z)))
(+ (* a 120.0) (* x (/ -60.0 t)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -5e+23) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 1e-24) {
tmp = 60.0 * ((x - y) / (z - t));
} else if ((a * 120.0) <= 4e+104) {
tmp = (a * 120.0) + (x * (60.0 / z));
} else {
tmp = (a * 120.0) + (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 ((a * 120.0d0) <= (-5d+23)) then
tmp = a * 120.0d0
else if ((a * 120.0d0) <= 1d-24) then
tmp = 60.0d0 * ((x - y) / (z - t))
else if ((a * 120.0d0) <= 4d+104) then
tmp = (a * 120.0d0) + (x * (60.0d0 / z))
else
tmp = (a * 120.0d0) + (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 ((a * 120.0) <= -5e+23) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 1e-24) {
tmp = 60.0 * ((x - y) / (z - t));
} else if ((a * 120.0) <= 4e+104) {
tmp = (a * 120.0) + (x * (60.0 / z));
} else {
tmp = (a * 120.0) + (x * (-60.0 / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -5e+23: tmp = a * 120.0 elif (a * 120.0) <= 1e-24: tmp = 60.0 * ((x - y) / (z - t)) elif (a * 120.0) <= 4e+104: tmp = (a * 120.0) + (x * (60.0 / z)) else: tmp = (a * 120.0) + (x * (-60.0 / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -5e+23) tmp = Float64(a * 120.0); elseif (Float64(a * 120.0) <= 1e-24) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); elseif (Float64(a * 120.0) <= 4e+104) tmp = Float64(Float64(a * 120.0) + Float64(x * Float64(60.0 / z))); else tmp = Float64(Float64(a * 120.0) + Float64(x * Float64(-60.0 / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a * 120.0) <= -5e+23) tmp = a * 120.0; elseif ((a * 120.0) <= 1e-24) tmp = 60.0 * ((x - y) / (z - t)); elseif ((a * 120.0) <= 4e+104) tmp = (a * 120.0) + (x * (60.0 / z)); else tmp = (a * 120.0) + (x * (-60.0 / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -5e+23], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 1e-24], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 4e+104], N[(N[(a * 120.0), $MachinePrecision] + N[(x * N[(60.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(x * N[(-60.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -5 \cdot 10^{+23}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq 10^{-24}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{elif}\;a \cdot 120 \leq 4 \cdot 10^{+104}:\\
\;\;\;\;a \cdot 120 + x \cdot \frac{60}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + x \cdot \frac{-60}{t}\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -4.9999999999999999e23Initial program 98.0%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 88.6%
if -4.9999999999999999e23 < (*.f64 a #s(literal 120 binary64)) < 9.99999999999999924e-25Initial program 99.6%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 80.3%
if 9.99999999999999924e-25 < (*.f64 a #s(literal 120 binary64)) < 4e104Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 91.6%
associate-*r/91.7%
*-commutative91.7%
associate-*r/91.8%
Simplified91.8%
Taylor expanded in z around inf 79.4%
if 4e104 < (*.f64 a #s(literal 120 binary64)) Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 93.9%
associate-*r/93.9%
*-commutative93.9%
associate-*r/94.0%
Simplified94.0%
Taylor expanded in z around 0 84.3%
Final simplification82.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= (* a 120.0) -1e-81) (not (<= (* a 120.0) 1e-24))) (+ (* a 120.0) (* x (/ 60.0 (- z t)))) (* 60.0 (/ (- x y) (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((a * 120.0) <= -1e-81) || !((a * 120.0) <= 1e-24)) {
tmp = (a * 120.0) + (x * (60.0 / (z - t)));
} 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 * 120.0d0) <= (-1d-81)) .or. (.not. ((a * 120.0d0) <= 1d-24))) then
tmp = (a * 120.0d0) + (x * (60.0d0 / (z - t)))
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 * 120.0) <= -1e-81) || !((a * 120.0) <= 1e-24)) {
tmp = (a * 120.0) + (x * (60.0 / (z - t)));
} else {
tmp = 60.0 * ((x - y) / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if ((a * 120.0) <= -1e-81) or not ((a * 120.0) <= 1e-24): tmp = (a * 120.0) + (x * (60.0 / (z - t))) else: tmp = 60.0 * ((x - y) / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((Float64(a * 120.0) <= -1e-81) || !(Float64(a * 120.0) <= 1e-24)) tmp = Float64(Float64(a * 120.0) + Float64(x * Float64(60.0 / Float64(z - t)))); 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 * 120.0) <= -1e-81) || ~(((a * 120.0) <= 1e-24))) tmp = (a * 120.0) + (x * (60.0 / (z - t))); else tmp = 60.0 * ((x - y) / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[N[(a * 120.0), $MachinePrecision], -1e-81], N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 1e-24]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(x * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -1 \cdot 10^{-81} \lor \neg \left(a \cdot 120 \leq 10^{-24}\right):\\
\;\;\;\;a \cdot 120 + x \cdot \frac{60}{z - t}\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -9.9999999999999996e-82 or 9.99999999999999924e-25 < (*.f64 a #s(literal 120 binary64)) Initial program 99.2%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 89.8%
associate-*r/89.2%
*-commutative89.2%
associate-*r/89.9%
Simplified89.9%
if -9.9999999999999996e-82 < (*.f64 a #s(literal 120 binary64)) < 9.99999999999999924e-25Initial program 99.6%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 85.2%
Final simplification88.0%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -1e-81)
(+ (* a 120.0) (/ x (* (- z t) 0.016666666666666666)))
(if (<= (* a 120.0) 1e-24)
(* 60.0 (/ (- x y) (- 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 ((a * 120.0) <= -1e-81) {
tmp = (a * 120.0) + (x / ((z - t) * 0.016666666666666666));
} else if ((a * 120.0) <= 1e-24) {
tmp = 60.0 * ((x - y) / (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 ((a * 120.0d0) <= (-1d-81)) then
tmp = (a * 120.0d0) + (x / ((z - t) * 0.016666666666666666d0))
else if ((a * 120.0d0) <= 1d-24) then
tmp = 60.0d0 * ((x - y) / (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 ((a * 120.0) <= -1e-81) {
tmp = (a * 120.0) + (x / ((z - t) * 0.016666666666666666));
} else if ((a * 120.0) <= 1e-24) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = (a * 120.0) + (x * (60.0 / (z - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -1e-81: tmp = (a * 120.0) + (x / ((z - t) * 0.016666666666666666)) elif (a * 120.0) <= 1e-24: tmp = 60.0 * ((x - y) / (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 (Float64(a * 120.0) <= -1e-81) tmp = Float64(Float64(a * 120.0) + Float64(x / Float64(Float64(z - t) * 0.016666666666666666))); elseif (Float64(a * 120.0) <= 1e-24) tmp = Float64(60.0 * Float64(Float64(x - y) / 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 ((a * 120.0) <= -1e-81) tmp = (a * 120.0) + (x / ((z - t) * 0.016666666666666666)); elseif ((a * 120.0) <= 1e-24) tmp = 60.0 * ((x - y) / (z - t)); else tmp = (a * 120.0) + (x * (60.0 / (z - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -1e-81], N[(N[(a * 120.0), $MachinePrecision] + N[(x / N[(N[(z - t), $MachinePrecision] * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 1e-24], N[(60.0 * N[(N[(x - y), $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}\;a \cdot 120 \leq -1 \cdot 10^{-81}:\\
\;\;\;\;a \cdot 120 + \frac{x}{\left(z - t\right) \cdot 0.016666666666666666}\\
\mathbf{elif}\;a \cdot 120 \leq 10^{-24}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + x \cdot \frac{60}{z - t}\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -9.9999999999999996e-82Initial program 98.5%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 86.6%
associate-*r/85.3%
*-commutative85.3%
associate-*r/86.6%
Simplified86.6%
clear-num86.6%
un-div-inv86.6%
div-inv86.6%
metadata-eval86.6%
Applied egg-rr86.6%
if -9.9999999999999996e-82 < (*.f64 a #s(literal 120 binary64)) < 9.99999999999999924e-25Initial program 99.6%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 85.2%
if 9.99999999999999924e-25 < (*.f64 a #s(literal 120 binary64)) Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 93.2%
associate-*r/93.2%
*-commutative93.2%
associate-*r/93.3%
Simplified93.3%
Final simplification88.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= (* a 120.0) -5e+23) (not (<= (* a 120.0) 2e-15))) (* 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 * 120.0) <= -5e+23) || !((a * 120.0) <= 2e-15)) {
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 * 120.0d0) <= (-5d+23)) .or. (.not. ((a * 120.0d0) <= 2d-15))) 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 * 120.0) <= -5e+23) || !((a * 120.0) <= 2e-15)) {
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 * 120.0) <= -5e+23) or not ((a * 120.0) <= 2e-15): 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 ((Float64(a * 120.0) <= -5e+23) || !(Float64(a * 120.0) <= 2e-15)) 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 * 120.0) <= -5e+23) || ~(((a * 120.0) <= 2e-15))) 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[N[(a * 120.0), $MachinePrecision], -5e+23], N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 2e-15]], $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 \cdot 120 \leq -5 \cdot 10^{+23} \lor \neg \left(a \cdot 120 \leq 2 \cdot 10^{-15}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -4.9999999999999999e23 or 2.0000000000000002e-15 < (*.f64 a #s(literal 120 binary64)) Initial program 99.1%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 80.4%
if -4.9999999999999999e23 < (*.f64 a #s(literal 120 binary64)) < 2.0000000000000002e-15Initial program 99.6%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 80.2%
Final simplification80.3%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -5e+23)
(* a 120.0)
(if (<= (* a 120.0) 20.0)
(* 60.0 (/ (- x y) (- z t)))
(+ (* a 120.0) (* x (/ -60.0 t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -5e+23) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 20.0) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = (a * 120.0) + (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 ((a * 120.0d0) <= (-5d+23)) then
tmp = a * 120.0d0
else if ((a * 120.0d0) <= 20.0d0) then
tmp = 60.0d0 * ((x - y) / (z - t))
else
tmp = (a * 120.0d0) + (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 ((a * 120.0) <= -5e+23) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 20.0) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = (a * 120.0) + (x * (-60.0 / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -5e+23: tmp = a * 120.0 elif (a * 120.0) <= 20.0: tmp = 60.0 * ((x - y) / (z - t)) else: tmp = (a * 120.0) + (x * (-60.0 / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -5e+23) tmp = Float64(a * 120.0); elseif (Float64(a * 120.0) <= 20.0) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); else tmp = Float64(Float64(a * 120.0) + Float64(x * Float64(-60.0 / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a * 120.0) <= -5e+23) tmp = a * 120.0; elseif ((a * 120.0) <= 20.0) tmp = 60.0 * ((x - y) / (z - t)); else tmp = (a * 120.0) + (x * (-60.0 / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -5e+23], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 20.0], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(x * N[(-60.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -5 \cdot 10^{+23}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq 20:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + x \cdot \frac{-60}{t}\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -4.9999999999999999e23Initial program 98.0%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 88.6%
if -4.9999999999999999e23 < (*.f64 a #s(literal 120 binary64)) < 20Initial program 99.6%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 78.9%
if 20 < (*.f64 a #s(literal 120 binary64)) Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 92.6%
associate-*r/92.6%
*-commutative92.6%
associate-*r/92.7%
Simplified92.7%
Taylor expanded in z around 0 79.7%
Final simplification81.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.25e-45) (not (<= a 9.5e-24))) (* a 120.0) (* -60.0 (/ (- x y) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.25e-45) || !(a <= 9.5e-24)) {
tmp = a * 120.0;
} else {
tmp = -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 ((a <= (-1.25d-45)) .or. (.not. (a <= 9.5d-24))) then
tmp = a * 120.0d0
else
tmp = (-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 ((a <= -1.25e-45) || !(a <= 9.5e-24)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * ((x - y) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.25e-45) or not (a <= 9.5e-24): tmp = a * 120.0 else: tmp = -60.0 * ((x - y) / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.25e-45) || !(a <= 9.5e-24)) tmp = Float64(a * 120.0); else tmp = 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 ((a <= -1.25e-45) || ~((a <= 9.5e-24))) tmp = a * 120.0; else tmp = -60.0 * ((x - y) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.25e-45], N[Not[LessEqual[a, 9.5e-24]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.25 \cdot 10^{-45} \lor \neg \left(a \leq 9.5 \cdot 10^{-24}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\
\end{array}
\end{array}
if a < -1.24999999999999994e-45 or 9.50000000000000029e-24 < a Initial program 99.2%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 75.0%
if -1.24999999999999994e-45 < a < 9.50000000000000029e-24Initial program 99.6%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 83.9%
Taylor expanded in z around 0 49.3%
Final simplification63.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -2e-94) (not (<= a 5.8e-27))) (* a 120.0) (* -60.0 (/ y (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2e-94) || !(a <= 5.8e-27)) {
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 <= (-2d-94)) .or. (.not. (a <= 5.8d-27))) 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 <= -2e-94) || !(a <= 5.8e-27)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (y / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -2e-94) or not (a <= 5.8e-27): 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 <= -2e-94) || !(a <= 5.8e-27)) 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 <= -2e-94) || ~((a <= 5.8e-27))) 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, -2e-94], N[Not[LessEqual[a, 5.8e-27]], $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 -2 \cdot 10^{-94} \lor \neg \left(a \leq 5.8 \cdot 10^{-27}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\end{array}
\end{array}
if a < -1.9999999999999999e-94 or 5.80000000000000008e-27 < a Initial program 99.2%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 72.7%
if -1.9999999999999999e-94 < a < 5.80000000000000008e-27Initial program 99.6%
associate-/l*99.7%
Simplified99.7%
clear-num99.4%
un-div-inv99.6%
Applied egg-rr99.6%
Taylor expanded in a around inf 75.3%
associate-*r/75.3%
*-commutative75.3%
*-commutative75.3%
times-frac77.1%
Simplified77.1%
Taylor expanded in y around inf 44.1%
Final simplification61.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1e-151) (not (<= a 5.8e-27))) (* a 120.0) (* 60.0 (/ y t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1e-151) || !(a <= 5.8e-27)) {
tmp = a * 120.0;
} else {
tmp = 60.0 * (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 ((a <= (-1d-151)) .or. (.not. (a <= 5.8d-27))) then
tmp = a * 120.0d0
else
tmp = 60.0d0 * (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 ((a <= -1e-151) || !(a <= 5.8e-27)) {
tmp = a * 120.0;
} else {
tmp = 60.0 * (y / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1e-151) or not (a <= 5.8e-27): tmp = a * 120.0 else: tmp = 60.0 * (y / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1e-151) || !(a <= 5.8e-27)) tmp = Float64(a * 120.0); else tmp = Float64(60.0 * Float64(y / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1e-151) || ~((a <= 5.8e-27))) tmp = a * 120.0; else tmp = 60.0 * (y / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1e-151], N[Not[LessEqual[a, 5.8e-27]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1 \cdot 10^{-151} \lor \neg \left(a \leq 5.8 \cdot 10^{-27}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{y}{t}\\
\end{array}
\end{array}
if a < -9.9999999999999994e-152 or 5.80000000000000008e-27 < a Initial program 99.2%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 69.8%
if -9.9999999999999994e-152 < a < 5.80000000000000008e-27Initial program 99.6%
associate-/l*99.8%
Simplified99.8%
clear-num99.4%
un-div-inv99.5%
Applied egg-rr99.5%
Taylor expanded in a around inf 73.4%
associate-*r/73.4%
*-commutative73.4%
*-commutative73.4%
times-frac75.5%
Simplified75.5%
Taylor expanded in y around inf 44.1%
Taylor expanded in z around 0 27.5%
Final simplification54.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.45e-214) (not (<= a 8.5e-111))) (* a 120.0) (* -60.0 (/ y z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.45e-214) || !(a <= 8.5e-111)) {
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.45d-214)) .or. (.not. (a <= 8.5d-111))) 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.45e-214) || !(a <= 8.5e-111)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (y / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.45e-214) or not (a <= 8.5e-111): 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.45e-214) || !(a <= 8.5e-111)) 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.45e-214) || ~((a <= 8.5e-111))) 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.45e-214], N[Not[LessEqual[a, 8.5e-111]], $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.45 \cdot 10^{-214} \lor \neg \left(a \leq 8.5 \cdot 10^{-111}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if a < -1.44999999999999993e-214 or 8.5000000000000003e-111 < a Initial program 99.3%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 62.0%
if -1.44999999999999993e-214 < a < 8.5000000000000003e-111Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
clear-num99.3%
un-div-inv99.5%
Applied egg-rr99.5%
Taylor expanded in a around inf 68.0%
associate-*r/68.0%
*-commutative68.0%
*-commutative68.0%
times-frac71.2%
Simplified71.2%
Taylor expanded in y around inf 47.7%
Taylor expanded in z around inf 24.5%
Final simplification53.2%
(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.4%
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.4%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 49.6%
Final simplification49.6%
(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 2024088
(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)))