
(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 17 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 (+ (/ (- x y) (* (- z t) 0.016666666666666666)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return ((x - y) / ((z - t) * 0.016666666666666666)) + (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 = ((x - y) / ((z - t) * 0.016666666666666666d0)) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return ((x - y) / ((z - t) * 0.016666666666666666)) + (a * 120.0);
}
def code(x, y, z, t, a): return ((x - y) / ((z - t) * 0.016666666666666666)) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(Float64(x - y) / Float64(Float64(z - t) * 0.016666666666666666)) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = ((x - y) / ((z - t) * 0.016666666666666666)) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(x - y), $MachinePrecision] / N[(N[(z - t), $MachinePrecision] * 0.016666666666666666), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x - y}{\left(z - t\right) \cdot 0.016666666666666666} + a \cdot 120
\end{array}
Initial program 99.0%
*-commutative99.0%
associate-/l*99.8%
Applied egg-rr99.8%
clear-num99.8%
un-div-inv99.8%
div-inv99.8%
metadata-eval99.8%
Applied egg-rr99.8%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -2e+175)
(* a 120.0)
(if (<= (* a 120.0) -5e+76)
(+ (* a 120.0) (* -60.0 (/ y z)))
(if (<= (* a 120.0) -1e-41)
(+ (* a 120.0) (* 60.0 (/ y t)))
(if (<= (* a 120.0) 1e-44)
(* 60.0 (/ (- x y) (- z t)))
(+ (* a 120.0) (/ 60.0 (/ z x))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -2e+175) {
tmp = a * 120.0;
} else if ((a * 120.0) <= -5e+76) {
tmp = (a * 120.0) + (-60.0 * (y / z));
} else if ((a * 120.0) <= -1e-41) {
tmp = (a * 120.0) + (60.0 * (y / t));
} else if ((a * 120.0) <= 1e-44) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = (a * 120.0) + (60.0 / (z / x));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a * 120.0d0) <= (-2d+175)) then
tmp = a * 120.0d0
else if ((a * 120.0d0) <= (-5d+76)) then
tmp = (a * 120.0d0) + ((-60.0d0) * (y / z))
else if ((a * 120.0d0) <= (-1d-41)) then
tmp = (a * 120.0d0) + (60.0d0 * (y / t))
else if ((a * 120.0d0) <= 1d-44) then
tmp = 60.0d0 * ((x - y) / (z - t))
else
tmp = (a * 120.0d0) + (60.0d0 / (z / x))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -2e+175) {
tmp = a * 120.0;
} else if ((a * 120.0) <= -5e+76) {
tmp = (a * 120.0) + (-60.0 * (y / z));
} else if ((a * 120.0) <= -1e-41) {
tmp = (a * 120.0) + (60.0 * (y / t));
} else if ((a * 120.0) <= 1e-44) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = (a * 120.0) + (60.0 / (z / x));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -2e+175: tmp = a * 120.0 elif (a * 120.0) <= -5e+76: tmp = (a * 120.0) + (-60.0 * (y / z)) elif (a * 120.0) <= -1e-41: tmp = (a * 120.0) + (60.0 * (y / t)) elif (a * 120.0) <= 1e-44: tmp = 60.0 * ((x - y) / (z - t)) else: tmp = (a * 120.0) + (60.0 / (z / x)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -2e+175) tmp = Float64(a * 120.0); elseif (Float64(a * 120.0) <= -5e+76) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / z))); elseif (Float64(a * 120.0) <= -1e-41) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(y / t))); elseif (Float64(a * 120.0) <= 1e-44) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); else tmp = Float64(Float64(a * 120.0) + Float64(60.0 / Float64(z / x))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a * 120.0) <= -2e+175) tmp = a * 120.0; elseif ((a * 120.0) <= -5e+76) tmp = (a * 120.0) + (-60.0 * (y / z)); elseif ((a * 120.0) <= -1e-41) tmp = (a * 120.0) + (60.0 * (y / t)); elseif ((a * 120.0) <= 1e-44) tmp = 60.0 * ((x - y) / (z - t)); else tmp = (a * 120.0) + (60.0 / (z / x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -2e+175], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], -5e+76], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], -1e-41], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 1e-44], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 / N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -2 \cdot 10^{+175}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq -5 \cdot 10^{+76}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\
\mathbf{elif}\;a \cdot 120 \leq -1 \cdot 10^{-41}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t}\\
\mathbf{elif}\;a \cdot 120 \leq 10^{-44}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{60}{\frac{z}{x}}\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -1.9999999999999999e175Initial program 96.4%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 89.7%
if -1.9999999999999999e175 < (*.f64 a #s(literal 120 binary64)) < -4.99999999999999991e76Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 81.3%
Taylor expanded in x around 0 85.3%
if -4.99999999999999991e76 < (*.f64 a #s(literal 120 binary64)) < -1.00000000000000001e-41Initial program 99.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around 0 84.4%
associate-*r/84.3%
Simplified84.3%
Taylor expanded in z around 0 77.1%
if -1.00000000000000001e-41 < (*.f64 a #s(literal 120 binary64)) < 9.99999999999999953e-45Initial program 99.6%
*-commutative99.6%
associate-/l*99.7%
Applied egg-rr99.7%
clear-num99.6%
un-div-inv99.7%
div-inv99.7%
metadata-eval99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 85.9%
if 9.99999999999999953e-45 < (*.f64 a #s(literal 120 binary64)) Initial program 98.6%
associate-/l*99.8%
Simplified99.8%
clear-num99.7%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in x around inf 89.9%
Taylor expanded in z around inf 75.2%
Final simplification82.4%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -2e+175)
(* a 120.0)
(if (<= (* a 120.0) -5e+76)
(+ (* a 120.0) (* -60.0 (/ y z)))
(if (<= (* a 120.0) -1e-41)
(+ (* a 120.0) (* 60.0 (/ y t)))
(if (<= (* a 120.0) 1e-44)
(* 60.0 (/ (- x y) (- z t)))
(+ (* a 120.0) (* 60.0 (/ x z))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -2e+175) {
tmp = a * 120.0;
} else if ((a * 120.0) <= -5e+76) {
tmp = (a * 120.0) + (-60.0 * (y / z));
} else if ((a * 120.0) <= -1e-41) {
tmp = (a * 120.0) + (60.0 * (y / t));
} else if ((a * 120.0) <= 1e-44) {
tmp = 60.0 * ((x - y) / (z - t));
} 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) :: tmp
if ((a * 120.0d0) <= (-2d+175)) then
tmp = a * 120.0d0
else if ((a * 120.0d0) <= (-5d+76)) then
tmp = (a * 120.0d0) + ((-60.0d0) * (y / z))
else if ((a * 120.0d0) <= (-1d-41)) then
tmp = (a * 120.0d0) + (60.0d0 * (y / t))
else if ((a * 120.0d0) <= 1d-44) then
tmp = 60.0d0 * ((x - y) / (z - t))
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 tmp;
if ((a * 120.0) <= -2e+175) {
tmp = a * 120.0;
} else if ((a * 120.0) <= -5e+76) {
tmp = (a * 120.0) + (-60.0 * (y / z));
} else if ((a * 120.0) <= -1e-41) {
tmp = (a * 120.0) + (60.0 * (y / t));
} else if ((a * 120.0) <= 1e-44) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = (a * 120.0) + (60.0 * (x / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -2e+175: tmp = a * 120.0 elif (a * 120.0) <= -5e+76: tmp = (a * 120.0) + (-60.0 * (y / z)) elif (a * 120.0) <= -1e-41: tmp = (a * 120.0) + (60.0 * (y / t)) elif (a * 120.0) <= 1e-44: tmp = 60.0 * ((x - y) / (z - t)) else: tmp = (a * 120.0) + (60.0 * (x / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -2e+175) tmp = Float64(a * 120.0); elseif (Float64(a * 120.0) <= -5e+76) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / z))); elseif (Float64(a * 120.0) <= -1e-41) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(y / t))); elseif (Float64(a * 120.0) <= 1e-44) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); else tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(x / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a * 120.0) <= -2e+175) tmp = a * 120.0; elseif ((a * 120.0) <= -5e+76) tmp = (a * 120.0) + (-60.0 * (y / z)); elseif ((a * 120.0) <= -1e-41) tmp = (a * 120.0) + (60.0 * (y / t)); elseif ((a * 120.0) <= 1e-44) tmp = 60.0 * ((x - y) / (z - t)); else tmp = (a * 120.0) + (60.0 * (x / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -2e+175], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], -5e+76], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], -1e-41], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 1e-44], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -2 \cdot 10^{+175}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq -5 \cdot 10^{+76}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\
\mathbf{elif}\;a \cdot 120 \leq -1 \cdot 10^{-41}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t}\\
\mathbf{elif}\;a \cdot 120 \leq 10^{-44}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{x}{z}\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -1.9999999999999999e175Initial program 96.4%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 89.7%
if -1.9999999999999999e175 < (*.f64 a #s(literal 120 binary64)) < -4.99999999999999991e76Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 81.3%
Taylor expanded in x around 0 85.3%
if -4.99999999999999991e76 < (*.f64 a #s(literal 120 binary64)) < -1.00000000000000001e-41Initial program 99.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around 0 84.4%
associate-*r/84.3%
Simplified84.3%
Taylor expanded in z around 0 77.1%
if -1.00000000000000001e-41 < (*.f64 a #s(literal 120 binary64)) < 9.99999999999999953e-45Initial program 99.6%
*-commutative99.6%
associate-/l*99.7%
Applied egg-rr99.7%
clear-num99.6%
un-div-inv99.7%
div-inv99.7%
metadata-eval99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 85.9%
if 9.99999999999999953e-45 < (*.f64 a #s(literal 120 binary64)) Initial program 98.6%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 74.7%
Taylor expanded in x around inf 75.2%
Final simplification82.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= (* a 120.0) -1e-41) (not (<= (* a 120.0) 5e-106))) (+ (* a 120.0) (* 60.0 (/ y (- t z)))) (* 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-41) || !((a * 120.0) <= 5e-106)) {
tmp = (a * 120.0) + (60.0 * (y / (t - z)));
} 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-41)) .or. (.not. ((a * 120.0d0) <= 5d-106))) then
tmp = (a * 120.0d0) + (60.0d0 * (y / (t - z)))
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-41) || !((a * 120.0) <= 5e-106)) {
tmp = (a * 120.0) + (60.0 * (y / (t - z)));
} else {
tmp = 60.0 * ((x - y) / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if ((a * 120.0) <= -1e-41) or not ((a * 120.0) <= 5e-106): tmp = (a * 120.0) + (60.0 * (y / (t - z))) 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-41) || !(Float64(a * 120.0) <= 5e-106)) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(y / Float64(t - z)))); 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-41) || ~(((a * 120.0) <= 5e-106))) tmp = (a * 120.0) + (60.0 * (y / (t - z))); 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-41], N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 5e-106]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(y / N[(t - z), $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^{-41} \lor \neg \left(a \cdot 120 \leq 5 \cdot 10^{-106}\right):\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t - z}\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -1.00000000000000001e-41 or 4.99999999999999983e-106 < (*.f64 a #s(literal 120 binary64)) Initial program 98.6%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 86.0%
neg-mul-186.0%
distribute-neg-frac286.0%
neg-sub086.0%
sub-neg86.0%
+-commutative86.0%
associate--r+86.0%
neg-sub086.0%
remove-double-neg86.0%
Simplified86.0%
if -1.00000000000000001e-41 < (*.f64 a #s(literal 120 binary64)) < 4.99999999999999983e-106Initial program 99.6%
*-commutative99.6%
associate-/l*99.7%
Applied egg-rr99.7%
clear-num99.6%
un-div-inv99.7%
div-inv99.7%
metadata-eval99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 88.6%
Final simplification87.0%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -1e-41)
(+ (* a 120.0) (* 60.0 (/ y (- t z))))
(if (<= (* a 120.0) 5e-106)
(* 60.0 (/ (- x y) (- z t)))
(+ (* a 120.0) (* y (/ -60.0 (- z t)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -1e-41) {
tmp = (a * 120.0) + (60.0 * (y / (t - z)));
} else if ((a * 120.0) <= 5e-106) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = (a * 120.0) + (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 * 120.0d0) <= (-1d-41)) then
tmp = (a * 120.0d0) + (60.0d0 * (y / (t - z)))
else if ((a * 120.0d0) <= 5d-106) then
tmp = 60.0d0 * ((x - y) / (z - t))
else
tmp = (a * 120.0d0) + (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 * 120.0) <= -1e-41) {
tmp = (a * 120.0) + (60.0 * (y / (t - z)));
} else if ((a * 120.0) <= 5e-106) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = (a * 120.0) + (y * (-60.0 / (z - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -1e-41: tmp = (a * 120.0) + (60.0 * (y / (t - z))) elif (a * 120.0) <= 5e-106: tmp = 60.0 * ((x - y) / (z - t)) else: tmp = (a * 120.0) + (y * (-60.0 / (z - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -1e-41) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(y / Float64(t - z)))); elseif (Float64(a * 120.0) <= 5e-106) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); else tmp = Float64(Float64(a * 120.0) + Float64(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 * 120.0) <= -1e-41) tmp = (a * 120.0) + (60.0 * (y / (t - z))); elseif ((a * 120.0) <= 5e-106) tmp = 60.0 * ((x - y) / (z - t)); else tmp = (a * 120.0) + (y * (-60.0 / (z - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -1e-41], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 5e-106], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(y * 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^{-41}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t - z}\\
\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-106}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + y \cdot \frac{-60}{z - t}\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -1.00000000000000001e-41Initial program 98.5%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 89.3%
neg-mul-189.3%
distribute-neg-frac289.3%
neg-sub089.3%
sub-neg89.3%
+-commutative89.3%
associate--r+89.3%
neg-sub089.3%
remove-double-neg89.3%
Simplified89.3%
if -1.00000000000000001e-41 < (*.f64 a #s(literal 120 binary64)) < 4.99999999999999983e-106Initial program 99.6%
*-commutative99.6%
associate-/l*99.7%
Applied egg-rr99.7%
clear-num99.6%
un-div-inv99.7%
div-inv99.7%
metadata-eval99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 88.6%
if 4.99999999999999983e-106 < (*.f64 a #s(literal 120 binary64)) Initial program 98.7%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 83.1%
associate-*r/83.2%
Simplified83.2%
*-commutative83.2%
associate-/l*83.2%
Applied egg-rr83.2%
Final simplification87.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= (* a 120.0) -2e-32) (not (<= (* a 120.0) 5e-44))) (* 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) <= -2e-32) || !((a * 120.0) <= 5e-44)) {
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) <= (-2d-32)) .or. (.not. ((a * 120.0d0) <= 5d-44))) 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) <= -2e-32) || !((a * 120.0) <= 5e-44)) {
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) <= -2e-32) or not ((a * 120.0) <= 5e-44): 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) <= -2e-32) || !(Float64(a * 120.0) <= 5e-44)) 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) <= -2e-32) || ~(((a * 120.0) <= 5e-44))) 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], -2e-32], N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 5e-44]], $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 -2 \cdot 10^{-32} \lor \neg \left(a \cdot 120 \leq 5 \cdot 10^{-44}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -2.00000000000000011e-32 or 5.00000000000000039e-44 < (*.f64 a #s(literal 120 binary64)) Initial program 98.5%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 74.7%
if -2.00000000000000011e-32 < (*.f64 a #s(literal 120 binary64)) < 5.00000000000000039e-44Initial program 99.6%
*-commutative99.6%
associate-/l*99.7%
Applied egg-rr99.7%
clear-num99.7%
un-div-inv99.7%
div-inv99.7%
metadata-eval99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 85.4%
Final simplification79.2%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -2e-32)
(* a 120.0)
(if (<= (* a 120.0) 1e-44)
(* 60.0 (/ (- x y) (- z t)))
(+ (* a 120.0) (* 60.0 (/ x z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -2e-32) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 1e-44) {
tmp = 60.0 * ((x - y) / (z - t));
} 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) :: tmp
if ((a * 120.0d0) <= (-2d-32)) then
tmp = a * 120.0d0
else if ((a * 120.0d0) <= 1d-44) then
tmp = 60.0d0 * ((x - y) / (z - t))
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 tmp;
if ((a * 120.0) <= -2e-32) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 1e-44) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = (a * 120.0) + (60.0 * (x / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -2e-32: tmp = a * 120.0 elif (a * 120.0) <= 1e-44: tmp = 60.0 * ((x - y) / (z - t)) else: tmp = (a * 120.0) + (60.0 * (x / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -2e-32) tmp = Float64(a * 120.0); elseif (Float64(a * 120.0) <= 1e-44) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); else tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(x / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a * 120.0) <= -2e-32) tmp = a * 120.0; elseif ((a * 120.0) <= 1e-44) tmp = 60.0 * ((x - y) / (z - t)); else tmp = (a * 120.0) + (60.0 * (x / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -2e-32], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 1e-44], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -2 \cdot 10^{-32}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq 10^{-44}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{x}{z}\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -2.00000000000000011e-32Initial program 98.5%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 74.6%
if -2.00000000000000011e-32 < (*.f64 a #s(literal 120 binary64)) < 9.99999999999999953e-45Initial program 99.6%
*-commutative99.6%
associate-/l*99.7%
Applied egg-rr99.7%
clear-num99.7%
un-div-inv99.7%
div-inv99.7%
metadata-eval99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 85.2%
if 9.99999999999999953e-45 < (*.f64 a #s(literal 120 binary64)) Initial program 98.6%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 74.7%
Taylor expanded in x around inf 75.2%
Final simplification79.3%
(FPCore (x y z t a)
:precision binary64
(if (<= a -1.12e-36)
(* a 120.0)
(if (<= a -6.5e-248)
(* -60.0 (/ y (- z t)))
(if (<= a 1.32e-105) (* 60.0 (/ x (- z t))) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.12e-36) {
tmp = a * 120.0;
} else if (a <= -6.5e-248) {
tmp = -60.0 * (y / (z - t));
} else if (a <= 1.32e-105) {
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 (a <= (-1.12d-36)) then
tmp = a * 120.0d0
else if (a <= (-6.5d-248)) then
tmp = (-60.0d0) * (y / (z - t))
else if (a <= 1.32d-105) 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 (a <= -1.12e-36) {
tmp = a * 120.0;
} else if (a <= -6.5e-248) {
tmp = -60.0 * (y / (z - t));
} else if (a <= 1.32e-105) {
tmp = 60.0 * (x / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.12e-36: tmp = a * 120.0 elif a <= -6.5e-248: tmp = -60.0 * (y / (z - t)) elif a <= 1.32e-105: tmp = 60.0 * (x / (z - t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.12e-36) tmp = Float64(a * 120.0); elseif (a <= -6.5e-248) tmp = Float64(-60.0 * Float64(y / Float64(z - t))); elseif (a <= 1.32e-105) 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 (a <= -1.12e-36) tmp = a * 120.0; elseif (a <= -6.5e-248) tmp = -60.0 * (y / (z - t)); elseif (a <= 1.32e-105) tmp = 60.0 * (x / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.12e-36], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -6.5e-248], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.32e-105], N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.12 \cdot 10^{-36}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -6.5 \cdot 10^{-248}:\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\mathbf{elif}\;a \leq 1.32 \cdot 10^{-105}:\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -1.12e-36 or 1.32000000000000006e-105 < a Initial program 98.6%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 72.6%
if -1.12e-36 < a < -6.5e-248Initial program 99.7%
*-commutative99.7%
associate-/l*99.6%
Applied egg-rr99.6%
Taylor expanded in a around inf 78.8%
associate-*r/78.8%
*-commutative78.8%
Simplified78.8%
Taylor expanded in y around inf 53.0%
if -6.5e-248 < a < 1.32000000000000006e-105Initial program 99.6%
*-commutative99.6%
associate-/l*99.8%
Applied egg-rr99.8%
Taylor expanded in a around inf 67.3%
associate-*r/67.4%
*-commutative67.4%
Simplified67.4%
Taylor expanded in x around inf 54.9%
Final simplification65.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -6.3e+81) (not (<= x 1.65e+89))) (+ (* a 120.0) (/ x (* (- z t) 0.016666666666666666))) (+ (* a 120.0) (* 60.0 (/ y (- t z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -6.3e+81) || !(x <= 1.65e+89)) {
tmp = (a * 120.0) + (x / ((z - t) * 0.016666666666666666));
} else {
tmp = (a * 120.0) + (60.0 * (y / (t - z)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((x <= (-6.3d+81)) .or. (.not. (x <= 1.65d+89))) then
tmp = (a * 120.0d0) + (x / ((z - t) * 0.016666666666666666d0))
else
tmp = (a * 120.0d0) + (60.0d0 * (y / (t - z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -6.3e+81) || !(x <= 1.65e+89)) {
tmp = (a * 120.0) + (x / ((z - t) * 0.016666666666666666));
} else {
tmp = (a * 120.0) + (60.0 * (y / (t - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -6.3e+81) or not (x <= 1.65e+89): tmp = (a * 120.0) + (x / ((z - t) * 0.016666666666666666)) else: tmp = (a * 120.0) + (60.0 * (y / (t - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -6.3e+81) || !(x <= 1.65e+89)) tmp = Float64(Float64(a * 120.0) + Float64(x / Float64(Float64(z - t) * 0.016666666666666666))); else tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(y / Float64(t - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -6.3e+81) || ~((x <= 1.65e+89))) tmp = (a * 120.0) + (x / ((z - t) * 0.016666666666666666)); else tmp = (a * 120.0) + (60.0 * (y / (t - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -6.3e+81], N[Not[LessEqual[x, 1.65e+89]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(x / N[(N[(z - t), $MachinePrecision] * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.3 \cdot 10^{+81} \lor \neg \left(x \leq 1.65 \cdot 10^{+89}\right):\\
\;\;\;\;a \cdot 120 + \frac{x}{\left(z - t\right) \cdot 0.016666666666666666}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t - z}\\
\end{array}
\end{array}
if x < -6.3000000000000004e81 or 1.64999999999999987e89 < x Initial program 98.8%
*-commutative98.8%
associate-/l*99.8%
Applied egg-rr99.8%
clear-num99.7%
un-div-inv99.8%
div-inv99.8%
metadata-eval99.8%
Applied egg-rr99.8%
Taylor expanded in x around inf 91.6%
if -6.3000000000000004e81 < x < 1.64999999999999987e89Initial program 99.2%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 93.5%
neg-mul-193.5%
distribute-neg-frac293.5%
neg-sub093.5%
sub-neg93.5%
+-commutative93.5%
associate--r+93.5%
neg-sub093.5%
remove-double-neg93.5%
Simplified93.5%
Final simplification92.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -7e+82) (not (<= x 4.3e+89))) (+ (* a 120.0) (/ 60.0 (/ (- z t) x))) (+ (* a 120.0) (* 60.0 (/ y (- t z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -7e+82) || !(x <= 4.3e+89)) {
tmp = (a * 120.0) + (60.0 / ((z - t) / x));
} else {
tmp = (a * 120.0) + (60.0 * (y / (t - z)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((x <= (-7d+82)) .or. (.not. (x <= 4.3d+89))) then
tmp = (a * 120.0d0) + (60.0d0 / ((z - t) / x))
else
tmp = (a * 120.0d0) + (60.0d0 * (y / (t - z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -7e+82) || !(x <= 4.3e+89)) {
tmp = (a * 120.0) + (60.0 / ((z - t) / x));
} else {
tmp = (a * 120.0) + (60.0 * (y / (t - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -7e+82) or not (x <= 4.3e+89): tmp = (a * 120.0) + (60.0 / ((z - t) / x)) else: tmp = (a * 120.0) + (60.0 * (y / (t - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -7e+82) || !(x <= 4.3e+89)) tmp = Float64(Float64(a * 120.0) + Float64(60.0 / Float64(Float64(z - t) / x))); else tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(y / Float64(t - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -7e+82) || ~((x <= 4.3e+89))) tmp = (a * 120.0) + (60.0 / ((z - t) / x)); else tmp = (a * 120.0) + (60.0 * (y / (t - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -7e+82], N[Not[LessEqual[x, 4.3e+89]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 / N[(N[(z - t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7 \cdot 10^{+82} \lor \neg \left(x \leq 4.3 \cdot 10^{+89}\right):\\
\;\;\;\;a \cdot 120 + \frac{60}{\frac{z - t}{x}}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t - z}\\
\end{array}
\end{array}
if x < -7.0000000000000001e82 or 4.3000000000000002e89 < x Initial program 98.8%
associate-/l*99.7%
Simplified99.7%
clear-num99.6%
un-div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in x around inf 91.6%
if -7.0000000000000001e82 < x < 4.3000000000000002e89Initial program 99.2%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 93.5%
neg-mul-193.5%
distribute-neg-frac293.5%
neg-sub093.5%
sub-neg93.5%
+-commutative93.5%
associate--r+93.5%
neg-sub093.5%
remove-double-neg93.5%
Simplified93.5%
Final simplification92.8%
(FPCore (x y z t a)
:precision binary64
(if (<= x -1.65e+81)
(+ (* a 120.0) (/ x (* (- z t) 0.016666666666666666)))
(if (<= x 1.75e+89)
(+ (* a 120.0) (* 60.0 (/ y (- t z))))
(+ (* a 120.0) (/ (* x 60.0) (- z t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -1.65e+81) {
tmp = (a * 120.0) + (x / ((z - t) * 0.016666666666666666));
} else if (x <= 1.75e+89) {
tmp = (a * 120.0) + (60.0 * (y / (t - z)));
} 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 (x <= (-1.65d+81)) then
tmp = (a * 120.0d0) + (x / ((z - t) * 0.016666666666666666d0))
else if (x <= 1.75d+89) then
tmp = (a * 120.0d0) + (60.0d0 * (y / (t - z)))
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 (x <= -1.65e+81) {
tmp = (a * 120.0) + (x / ((z - t) * 0.016666666666666666));
} else if (x <= 1.75e+89) {
tmp = (a * 120.0) + (60.0 * (y / (t - z)));
} else {
tmp = (a * 120.0) + ((x * 60.0) / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -1.65e+81: tmp = (a * 120.0) + (x / ((z - t) * 0.016666666666666666)) elif x <= 1.75e+89: tmp = (a * 120.0) + (60.0 * (y / (t - z))) else: tmp = (a * 120.0) + ((x * 60.0) / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -1.65e+81) tmp = Float64(Float64(a * 120.0) + Float64(x / Float64(Float64(z - t) * 0.016666666666666666))); elseif (x <= 1.75e+89) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(y / Float64(t - z)))); else tmp = Float64(Float64(a * 120.0) + Float64(Float64(x * 60.0) / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -1.65e+81) tmp = (a * 120.0) + (x / ((z - t) * 0.016666666666666666)); elseif (x <= 1.75e+89) tmp = (a * 120.0) + (60.0 * (y / (t - z))); else tmp = (a * 120.0) + ((x * 60.0) / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -1.65e+81], N[(N[(a * 120.0), $MachinePrecision] + N[(x / N[(N[(z - t), $MachinePrecision] * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.75e+89], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(x * 60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.65 \cdot 10^{+81}:\\
\;\;\;\;a \cdot 120 + \frac{x}{\left(z - t\right) \cdot 0.016666666666666666}\\
\mathbf{elif}\;x \leq 1.75 \cdot 10^{+89}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t - z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{x \cdot 60}{z - t}\\
\end{array}
\end{array}
if x < -1.65e81Initial program 97.8%
*-commutative97.8%
associate-/l*99.8%
Applied egg-rr99.8%
clear-num99.7%
un-div-inv99.8%
div-inv99.8%
metadata-eval99.8%
Applied egg-rr99.8%
Taylor expanded in x around inf 92.2%
if -1.65e81 < x < 1.75e89Initial program 99.2%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 93.5%
neg-mul-193.5%
distribute-neg-frac293.5%
neg-sub093.5%
sub-neg93.5%
+-commutative93.5%
associate--r+93.5%
neg-sub093.5%
remove-double-neg93.5%
Simplified93.5%
if 1.75e89 < x Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 91.0%
associate-*r/91.1%
Simplified91.1%
Final simplification92.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -2.45e-37) (not (<= a 1.65e-63))) (* a 120.0) (* -60.0 (/ y (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.45e-37) || !(a <= 1.65e-63)) {
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 <= (-2.45d-37)) .or. (.not. (a <= 1.65d-63))) 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 <= -2.45e-37) || !(a <= 1.65e-63)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (y / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -2.45e-37) or not (a <= 1.65e-63): 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 <= -2.45e-37) || !(a <= 1.65e-63)) 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 <= -2.45e-37) || ~((a <= 1.65e-63))) 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, -2.45e-37], N[Not[LessEqual[a, 1.65e-63]], $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.45 \cdot 10^{-37} \lor \neg \left(a \leq 1.65 \cdot 10^{-63}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\end{array}
\end{array}
if a < -2.45000000000000009e-37 or 1.64999999999999997e-63 < a Initial program 98.6%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 74.1%
if -2.45000000000000009e-37 < a < 1.64999999999999997e-63Initial program 99.6%
*-commutative99.6%
associate-/l*99.7%
Applied egg-rr99.7%
Taylor expanded in a around inf 74.5%
associate-*r/74.6%
*-commutative74.6%
Simplified74.6%
Taylor expanded in y around inf 45.0%
Final simplification62.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -5.6e-46) (not (<= a 1.85e-137))) (* a 120.0) (* x (/ -60.0 t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -5.6e-46) || !(a <= 1.85e-137)) {
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 ((a <= (-5.6d-46)) .or. (.not. (a <= 1.85d-137))) 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 ((a <= -5.6e-46) || !(a <= 1.85e-137)) {
tmp = a * 120.0;
} else {
tmp = x * (-60.0 / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -5.6e-46) or not (a <= 1.85e-137): tmp = a * 120.0 else: tmp = x * (-60.0 / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -5.6e-46) || !(a <= 1.85e-137)) 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 ((a <= -5.6e-46) || ~((a <= 1.85e-137))) tmp = a * 120.0; else tmp = x * (-60.0 / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -5.6e-46], N[Not[LessEqual[a, 1.85e-137]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(x * N[(-60.0 / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.6 \cdot 10^{-46} \lor \neg \left(a \leq 1.85 \cdot 10^{-137}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-60}{t}\\
\end{array}
\end{array}
if a < -5.5999999999999997e-46 or 1.85e-137 < a Initial program 98.7%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 70.6%
if -5.5999999999999997e-46 < a < 1.85e-137Initial program 99.6%
associate-/l*99.7%
Simplified99.7%
clear-num99.6%
un-div-inv99.6%
Applied egg-rr99.6%
Taylor expanded in x around inf 54.7%
Taylor expanded in z around 0 33.2%
Taylor expanded in x around inf 26.7%
associate-*r/26.7%
*-commutative26.7%
associate-/l*26.7%
Simplified26.7%
Final simplification55.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -2.1e-45) (not (<= a 1.05e-141))) (* a 120.0) (* -60.0 (/ x t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.1e-45) || !(a <= 1.05e-141)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (x / 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 <= (-2.1d-45)) .or. (.not. (a <= 1.05d-141))) then
tmp = a * 120.0d0
else
tmp = (-60.0d0) * (x / 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 <= -2.1e-45) || !(a <= 1.05e-141)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (x / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -2.1e-45) or not (a <= 1.05e-141): tmp = a * 120.0 else: tmp = -60.0 * (x / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -2.1e-45) || !(a <= 1.05e-141)) tmp = Float64(a * 120.0); else tmp = Float64(-60.0 * Float64(x / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -2.1e-45) || ~((a <= 1.05e-141))) tmp = a * 120.0; else tmp = -60.0 * (x / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -2.1e-45], N[Not[LessEqual[a, 1.05e-141]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.1 \cdot 10^{-45} \lor \neg \left(a \leq 1.05 \cdot 10^{-141}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{x}{t}\\
\end{array}
\end{array}
if a < -2.09999999999999995e-45 or 1.05e-141 < a Initial program 98.7%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 70.6%
if -2.09999999999999995e-45 < a < 1.05e-141Initial program 99.6%
associate-/l*99.7%
Simplified99.7%
clear-num99.6%
un-div-inv99.6%
Applied egg-rr99.6%
Taylor expanded in x around inf 54.7%
Taylor expanded in z around 0 33.2%
Taylor expanded in x around inf 26.7%
Final simplification55.1%
(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.0%
*-commutative99.0%
associate-/l*99.8%
Applied egg-rr99.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.0%
associate-/l*99.7%
Simplified99.7%
Final simplification99.7%
(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.0%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in z around inf 50.0%
Final simplification50.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 2024135
(FPCore (x y z t a)
:name "Data.Colour.RGB:hslsv from colour-2.3.3, B"
:precision binary64
:alt
(! :herbie-platform default (+ (/ 60 (/ (- z t) (- x y))) (* a 120)))
(+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))