
(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 18 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((60.0d0 * (x - y)) / (z - t)) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
def code(x, y, z, t, a): return ((60.0 * (x - y)) / (z - t)) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = ((60.0 * (x - y)) / (z - t)) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120
\end{array}
(FPCore (x y z t a) :precision binary64 (fma a 120.0 (* (- x y) (/ 60.0 (- z t)))))
double code(double x, double y, double z, double t, double a) {
return fma(a, 120.0, ((x - y) * (60.0 / (z - t))));
}
function code(x, y, z, t, a) return fma(a, 120.0, Float64(Float64(x - y) * Float64(60.0 / Float64(z - t)))) end
code[x_, y_, z_, t_, a_] := N[(a * 120.0 + N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(a, 120, \left(x - y\right) \cdot \frac{60}{z - t}\right)
\end{array}
Initial program 99.1%
associate-/l*99.8%
Simplified99.8%
+-commutative99.8%
fma-define99.8%
associate-*r/99.2%
*-commutative99.2%
associate-/l*99.8%
Applied egg-rr99.8%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -5e+142)
(+ (* a 120.0) (* 60.0 (/ x z)))
(if (<= (* a 120.0) -5e+28)
(+ (* a 120.0) (* -60.0 (/ x t)))
(if (<= (* a 120.0) 0.005)
(* 60.0 (/ (- x y) (- z t)))
(+ (* a 120.0) (/ (* y 60.0) t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -5e+142) {
tmp = (a * 120.0) + (60.0 * (x / z));
} else if ((a * 120.0) <= -5e+28) {
tmp = (a * 120.0) + (-60.0 * (x / t));
} else if ((a * 120.0) <= 0.005) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = (a * 120.0) + ((y * 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+142)) then
tmp = (a * 120.0d0) + (60.0d0 * (x / z))
else if ((a * 120.0d0) <= (-5d+28)) then
tmp = (a * 120.0d0) + ((-60.0d0) * (x / t))
else if ((a * 120.0d0) <= 0.005d0) then
tmp = 60.0d0 * ((x - y) / (z - t))
else
tmp = (a * 120.0d0) + ((y * 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+142) {
tmp = (a * 120.0) + (60.0 * (x / z));
} else if ((a * 120.0) <= -5e+28) {
tmp = (a * 120.0) + (-60.0 * (x / t));
} else if ((a * 120.0) <= 0.005) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = (a * 120.0) + ((y * 60.0) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -5e+142: tmp = (a * 120.0) + (60.0 * (x / z)) elif (a * 120.0) <= -5e+28: tmp = (a * 120.0) + (-60.0 * (x / t)) elif (a * 120.0) <= 0.005: tmp = 60.0 * ((x - y) / (z - t)) else: tmp = (a * 120.0) + ((y * 60.0) / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -5e+142) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(x / z))); elseif (Float64(a * 120.0) <= -5e+28) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(x / t))); elseif (Float64(a * 120.0) <= 0.005) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); else tmp = Float64(Float64(a * 120.0) + Float64(Float64(y * 60.0) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a * 120.0) <= -5e+142) tmp = (a * 120.0) + (60.0 * (x / z)); elseif ((a * 120.0) <= -5e+28) tmp = (a * 120.0) + (-60.0 * (x / t)); elseif ((a * 120.0) <= 0.005) tmp = 60.0 * ((x - y) / (z - t)); else tmp = (a * 120.0) + ((y * 60.0) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -5e+142], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], -5e+28], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 0.005], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(y * 60.0), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -5 \cdot 10^{+142}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{x}{z}\\
\mathbf{elif}\;a \cdot 120 \leq -5 \cdot 10^{+28}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{x}{t}\\
\mathbf{elif}\;a \cdot 120 \leq 0.005:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{y \cdot 60}{t}\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -5.0000000000000001e142Initial program 97.6%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 94.9%
Taylor expanded in x around inf 88.4%
if -5.0000000000000001e142 < (*.f64 a #s(literal 120 binary64)) < -4.99999999999999957e28Initial program 99.8%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in x around inf 93.8%
associate-*r/93.6%
Simplified93.6%
Taylor expanded in z around 0 92.4%
if -4.99999999999999957e28 < (*.f64 a #s(literal 120 binary64)) < 0.0050000000000000001Initial program 99.1%
associate-/l*99.7%
Simplified99.7%
+-commutative99.7%
fma-define99.7%
associate-*r/99.1%
*-commutative99.1%
associate-/l*99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 80.3%
if 0.0050000000000000001 < (*.f64 a #s(literal 120 binary64)) Initial program 99.9%
Taylor expanded in x around 0 89.8%
Taylor expanded in z around 0 78.9%
associate-*r/78.9%
*-commutative78.9%
Simplified78.9%
Final simplification81.9%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -5e+142)
(+ (* a 120.0) (* 60.0 (/ x z)))
(if (<= (* a 120.0) -5e+28)
(+ (* a 120.0) (* -60.0 (/ x t)))
(if (<= (* a 120.0) 5e+63) (* 60.0 (/ (- x y) (- z t))) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -5e+142) {
tmp = (a * 120.0) + (60.0 * (x / z));
} else if ((a * 120.0) <= -5e+28) {
tmp = (a * 120.0) + (-60.0 * (x / t));
} else if ((a * 120.0) <= 5e+63) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a * 120.0d0) <= (-5d+142)) then
tmp = (a * 120.0d0) + (60.0d0 * (x / z))
else if ((a * 120.0d0) <= (-5d+28)) then
tmp = (a * 120.0d0) + ((-60.0d0) * (x / t))
else if ((a * 120.0d0) <= 5d+63) then
tmp = 60.0d0 * ((x - y) / (z - t))
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -5e+142) {
tmp = (a * 120.0) + (60.0 * (x / z));
} else if ((a * 120.0) <= -5e+28) {
tmp = (a * 120.0) + (-60.0 * (x / t));
} else if ((a * 120.0) <= 5e+63) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -5e+142: tmp = (a * 120.0) + (60.0 * (x / z)) elif (a * 120.0) <= -5e+28: tmp = (a * 120.0) + (-60.0 * (x / t)) elif (a * 120.0) <= 5e+63: tmp = 60.0 * ((x - y) / (z - t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -5e+142) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(x / z))); elseif (Float64(a * 120.0) <= -5e+28) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(x / t))); elseif (Float64(a * 120.0) <= 5e+63) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a * 120.0) <= -5e+142) tmp = (a * 120.0) + (60.0 * (x / z)); elseif ((a * 120.0) <= -5e+28) tmp = (a * 120.0) + (-60.0 * (x / t)); elseif ((a * 120.0) <= 5e+63) tmp = 60.0 * ((x - y) / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -5e+142], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], -5e+28], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 5e+63], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -5 \cdot 10^{+142}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{x}{z}\\
\mathbf{elif}\;a \cdot 120 \leq -5 \cdot 10^{+28}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{x}{t}\\
\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{+63}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -5.0000000000000001e142Initial program 97.6%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 94.9%
Taylor expanded in x around inf 88.4%
if -5.0000000000000001e142 < (*.f64 a #s(literal 120 binary64)) < -4.99999999999999957e28Initial program 99.8%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in x around inf 93.8%
associate-*r/93.6%
Simplified93.6%
Taylor expanded in z around 0 92.4%
if -4.99999999999999957e28 < (*.f64 a #s(literal 120 binary64)) < 5.00000000000000011e63Initial program 99.1%
associate-/l*99.7%
Simplified99.7%
+-commutative99.7%
fma-define99.7%
associate-*r/99.1%
*-commutative99.1%
associate-/l*99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 77.3%
if 5.00000000000000011e63 < (*.f64 a #s(literal 120 binary64)) Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 84.4%
Final simplification81.8%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -5e+142)
(+ (* a 120.0) (* -60.0 (/ y z)))
(if (<= (* a 120.0) -5e+28)
(+ (* a 120.0) (* -60.0 (/ x t)))
(if (<= (* a 120.0) 5e+63) (* 60.0 (/ (- x y) (- z t))) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -5e+142) {
tmp = (a * 120.0) + (-60.0 * (y / z));
} else if ((a * 120.0) <= -5e+28) {
tmp = (a * 120.0) + (-60.0 * (x / t));
} else if ((a * 120.0) <= 5e+63) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a * 120.0d0) <= (-5d+142)) then
tmp = (a * 120.0d0) + ((-60.0d0) * (y / z))
else if ((a * 120.0d0) <= (-5d+28)) then
tmp = (a * 120.0d0) + ((-60.0d0) * (x / t))
else if ((a * 120.0d0) <= 5d+63) then
tmp = 60.0d0 * ((x - y) / (z - t))
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -5e+142) {
tmp = (a * 120.0) + (-60.0 * (y / z));
} else if ((a * 120.0) <= -5e+28) {
tmp = (a * 120.0) + (-60.0 * (x / t));
} else if ((a * 120.0) <= 5e+63) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -5e+142: tmp = (a * 120.0) + (-60.0 * (y / z)) elif (a * 120.0) <= -5e+28: tmp = (a * 120.0) + (-60.0 * (x / t)) elif (a * 120.0) <= 5e+63: tmp = 60.0 * ((x - y) / (z - t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -5e+142) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / z))); elseif (Float64(a * 120.0) <= -5e+28) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(x / t))); elseif (Float64(a * 120.0) <= 5e+63) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a * 120.0) <= -5e+142) tmp = (a * 120.0) + (-60.0 * (y / z)); elseif ((a * 120.0) <= -5e+28) tmp = (a * 120.0) + (-60.0 * (x / t)); elseif ((a * 120.0) <= 5e+63) tmp = 60.0 * ((x - y) / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -5e+142], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], -5e+28], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 5e+63], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -5 \cdot 10^{+142}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\
\mathbf{elif}\;a \cdot 120 \leq -5 \cdot 10^{+28}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{x}{t}\\
\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{+63}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -5.0000000000000001e142Initial program 97.6%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 94.9%
Taylor expanded in x around 0 86.4%
if -5.0000000000000001e142 < (*.f64 a #s(literal 120 binary64)) < -4.99999999999999957e28Initial program 99.8%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in x around inf 93.8%
associate-*r/93.6%
Simplified93.6%
Taylor expanded in z around 0 92.4%
if -4.99999999999999957e28 < (*.f64 a #s(literal 120 binary64)) < 5.00000000000000011e63Initial program 99.1%
associate-/l*99.7%
Simplified99.7%
+-commutative99.7%
fma-define99.7%
associate-*r/99.1%
*-commutative99.1%
associate-/l*99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 77.3%
if 5.00000000000000011e63 < (*.f64 a #s(literal 120 binary64)) Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 84.4%
Final simplification81.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* -60.0 (/ x t))))
(if (<= a -6e-97)
(* a 120.0)
(if (<= a -1.8e-144)
t_1
(if (<= a 4.3e-271)
(* x (/ 60.0 z))
(if (<= a 9.5e-30) t_1 (* a 120.0)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -60.0 * (x / t);
double tmp;
if (a <= -6e-97) {
tmp = a * 120.0;
} else if (a <= -1.8e-144) {
tmp = t_1;
} else if (a <= 4.3e-271) {
tmp = x * (60.0 / z);
} else if (a <= 9.5e-30) {
tmp = t_1;
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (-60.0d0) * (x / t)
if (a <= (-6d-97)) then
tmp = a * 120.0d0
else if (a <= (-1.8d-144)) then
tmp = t_1
else if (a <= 4.3d-271) then
tmp = x * (60.0d0 / z)
else if (a <= 9.5d-30) 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 / t);
double tmp;
if (a <= -6e-97) {
tmp = a * 120.0;
} else if (a <= -1.8e-144) {
tmp = t_1;
} else if (a <= 4.3e-271) {
tmp = x * (60.0 / z);
} else if (a <= 9.5e-30) {
tmp = t_1;
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -60.0 * (x / t) tmp = 0 if a <= -6e-97: tmp = a * 120.0 elif a <= -1.8e-144: tmp = t_1 elif a <= 4.3e-271: tmp = x * (60.0 / z) elif a <= 9.5e-30: tmp = t_1 else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) t_1 = Float64(-60.0 * Float64(x / t)) tmp = 0.0 if (a <= -6e-97) tmp = Float64(a * 120.0); elseif (a <= -1.8e-144) tmp = t_1; elseif (a <= 4.3e-271) tmp = Float64(x * Float64(60.0 / z)); elseif (a <= 9.5e-30) 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 / t); tmp = 0.0; if (a <= -6e-97) tmp = a * 120.0; elseif (a <= -1.8e-144) tmp = t_1; elseif (a <= 4.3e-271) tmp = x * (60.0 / z); elseif (a <= 9.5e-30) 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[(x / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -6e-97], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -1.8e-144], t$95$1, If[LessEqual[a, 4.3e-271], N[(x * N[(60.0 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 9.5e-30], t$95$1, N[(a * 120.0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -60 \cdot \frac{x}{t}\\
\mathbf{if}\;a \leq -6 \cdot 10^{-97}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -1.8 \cdot 10^{-144}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 4.3 \cdot 10^{-271}:\\
\;\;\;\;x \cdot \frac{60}{z}\\
\mathbf{elif}\;a \leq 9.5 \cdot 10^{-30}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -6.00000000000000048e-97 or 9.49999999999999939e-30 < a Initial program 99.3%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 71.9%
if -6.00000000000000048e-97 < a < -1.8e-144 or 4.3e-271 < a < 9.49999999999999939e-30Initial program 97.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around inf 71.9%
associate-*r/69.9%
Simplified69.9%
Taylor expanded in z around 0 51.4%
Taylor expanded in x around inf 42.9%
if -1.8e-144 < a < 4.3e-271Initial program 99.8%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in z around inf 64.1%
Taylor expanded in x around inf 43.2%
Taylor expanded in x around inf 36.0%
associate-*r/36.0%
*-commutative36.0%
associate-/l*36.0%
Simplified36.0%
Final simplification59.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* -60.0 (/ x t))))
(if (<= a -7e-97)
(* a 120.0)
(if (<= a -7.5e-144)
t_1
(if (<= a 2.7e-272)
(* 60.0 (/ x z))
(if (<= a 9.2e-30) t_1 (* a 120.0)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -60.0 * (x / t);
double tmp;
if (a <= -7e-97) {
tmp = a * 120.0;
} else if (a <= -7.5e-144) {
tmp = t_1;
} else if (a <= 2.7e-272) {
tmp = 60.0 * (x / z);
} else if (a <= 9.2e-30) {
tmp = t_1;
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (-60.0d0) * (x / t)
if (a <= (-7d-97)) then
tmp = a * 120.0d0
else if (a <= (-7.5d-144)) then
tmp = t_1
else if (a <= 2.7d-272) then
tmp = 60.0d0 * (x / z)
else if (a <= 9.2d-30) 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 / t);
double tmp;
if (a <= -7e-97) {
tmp = a * 120.0;
} else if (a <= -7.5e-144) {
tmp = t_1;
} else if (a <= 2.7e-272) {
tmp = 60.0 * (x / z);
} else if (a <= 9.2e-30) {
tmp = t_1;
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -60.0 * (x / t) tmp = 0 if a <= -7e-97: tmp = a * 120.0 elif a <= -7.5e-144: tmp = t_1 elif a <= 2.7e-272: tmp = 60.0 * (x / z) elif a <= 9.2e-30: tmp = t_1 else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) t_1 = Float64(-60.0 * Float64(x / t)) tmp = 0.0 if (a <= -7e-97) tmp = Float64(a * 120.0); elseif (a <= -7.5e-144) tmp = t_1; elseif (a <= 2.7e-272) tmp = Float64(60.0 * Float64(x / z)); elseif (a <= 9.2e-30) 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 / t); tmp = 0.0; if (a <= -7e-97) tmp = a * 120.0; elseif (a <= -7.5e-144) tmp = t_1; elseif (a <= 2.7e-272) tmp = 60.0 * (x / z); elseif (a <= 9.2e-30) 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[(x / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -7e-97], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -7.5e-144], t$95$1, If[LessEqual[a, 2.7e-272], N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 9.2e-30], t$95$1, N[(a * 120.0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -60 \cdot \frac{x}{t}\\
\mathbf{if}\;a \leq -7 \cdot 10^{-97}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -7.5 \cdot 10^{-144}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 2.7 \cdot 10^{-272}:\\
\;\;\;\;60 \cdot \frac{x}{z}\\
\mathbf{elif}\;a \leq 9.2 \cdot 10^{-30}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -7.00000000000000038e-97 or 9.19999999999999937e-30 < a Initial program 99.3%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 71.9%
if -7.00000000000000038e-97 < a < -7.49999999999999963e-144 or 2.69999999999999993e-272 < a < 9.19999999999999937e-30Initial program 97.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around inf 71.9%
associate-*r/69.9%
Simplified69.9%
Taylor expanded in z around 0 51.4%
Taylor expanded in x around inf 42.9%
if -7.49999999999999963e-144 < a < 2.69999999999999993e-272Initial program 99.8%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in z around inf 64.1%
Taylor expanded in x around inf 43.2%
Taylor expanded in x around inf 36.0%
Final simplification59.7%
(FPCore (x y z t a) :precision binary64 (if (<= (* a 120.0) -5e+28) (+ (* a 120.0) (* -60.0 (/ x t))) (if (<= (* a 120.0) 5e+63) (* 60.0 (/ (- x y) (- z t))) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -5e+28) {
tmp = (a * 120.0) + (-60.0 * (x / t));
} else if ((a * 120.0) <= 5e+63) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a * 120.0d0) <= (-5d+28)) then
tmp = (a * 120.0d0) + ((-60.0d0) * (x / t))
else if ((a * 120.0d0) <= 5d+63) then
tmp = 60.0d0 * ((x - y) / (z - t))
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -5e+28) {
tmp = (a * 120.0) + (-60.0 * (x / t));
} else if ((a * 120.0) <= 5e+63) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -5e+28: tmp = (a * 120.0) + (-60.0 * (x / t)) elif (a * 120.0) <= 5e+63: tmp = 60.0 * ((x - y) / (z - t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -5e+28) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(x / t))); elseif (Float64(a * 120.0) <= 5e+63) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a * 120.0) <= -5e+28) tmp = (a * 120.0) + (-60.0 * (x / t)); elseif ((a * 120.0) <= 5e+63) tmp = 60.0 * ((x - y) / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -5e+28], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 5e+63], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -5 \cdot 10^{+28}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{x}{t}\\
\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{+63}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -4.99999999999999957e28Initial program 98.3%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 89.8%
associate-*r/89.7%
Simplified89.7%
Taylor expanded in z around 0 78.7%
if -4.99999999999999957e28 < (*.f64 a #s(literal 120 binary64)) < 5.00000000000000011e63Initial program 99.1%
associate-/l*99.7%
Simplified99.7%
+-commutative99.7%
fma-define99.7%
associate-*r/99.1%
*-commutative99.1%
associate-/l*99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 77.3%
if 5.00000000000000011e63 < (*.f64 a #s(literal 120 binary64)) Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 84.4%
Final simplification79.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -3.2e+170) (not (<= y 6e+98))) (+ (* a 120.0) (* 60.0 (/ y (- t z)))) (+ (* a 120.0) (* 60.0 (/ x (- z t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -3.2e+170) || !(y <= 6e+98)) {
tmp = (a * 120.0) + (60.0 * (y / (t - z)));
} else {
tmp = (a * 120.0) + (60.0 * (x / (z - t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((y <= (-3.2d+170)) .or. (.not. (y <= 6d+98))) then
tmp = (a * 120.0d0) + (60.0d0 * (y / (t - z)))
else
tmp = (a * 120.0d0) + (60.0d0 * (x / (z - t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -3.2e+170) || !(y <= 6e+98)) {
tmp = (a * 120.0) + (60.0 * (y / (t - z)));
} else {
tmp = (a * 120.0) + (60.0 * (x / (z - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -3.2e+170) or not (y <= 6e+98): tmp = (a * 120.0) + (60.0 * (y / (t - z))) else: tmp = (a * 120.0) + (60.0 * (x / (z - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -3.2e+170) || !(y <= 6e+98)) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(y / Float64(t - z)))); else tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(x / Float64(z - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -3.2e+170) || ~((y <= 6e+98))) tmp = (a * 120.0) + (60.0 * (y / (t - z))); else tmp = (a * 120.0) + (60.0 * (x / (z - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -3.2e+170], N[Not[LessEqual[y, 6e+98]], $MachinePrecision]], 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[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.2 \cdot 10^{+170} \lor \neg \left(y \leq 6 \cdot 10^{+98}\right):\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t - z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{x}{z - t}\\
\end{array}
\end{array}
if y < -3.19999999999999979e170 or 6.0000000000000003e98 < y Initial program 98.7%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 94.0%
associate-*r/93.5%
remove-double-neg93.5%
neg-mul-193.5%
times-frac94.0%
metadata-eval94.0%
neg-sub094.0%
sub-neg94.0%
+-commutative94.0%
associate--r+94.0%
neg-sub094.0%
remove-double-neg94.0%
Simplified94.0%
if -3.19999999999999979e170 < y < 6.0000000000000003e98Initial program 99.3%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 92.6%
Final simplification93.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -2e+170) (not (<= y 9.8e+157))) (* 60.0 (/ (- x y) (- z t))) (+ (* a 120.0) (* 60.0 (/ x (- z t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -2e+170) || !(y <= 9.8e+157)) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = (a * 120.0) + (60.0 * (x / (z - t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((y <= (-2d+170)) .or. (.not. (y <= 9.8d+157))) then
tmp = 60.0d0 * ((x - y) / (z - t))
else
tmp = (a * 120.0d0) + (60.0d0 * (x / (z - t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -2e+170) || !(y <= 9.8e+157)) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = (a * 120.0) + (60.0 * (x / (z - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -2e+170) or not (y <= 9.8e+157): tmp = 60.0 * ((x - y) / (z - t)) else: tmp = (a * 120.0) + (60.0 * (x / (z - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -2e+170) || !(y <= 9.8e+157)) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); else tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(x / Float64(z - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -2e+170) || ~((y <= 9.8e+157))) tmp = 60.0 * ((x - y) / (z - t)); else tmp = (a * 120.0) + (60.0 * (x / (z - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -2e+170], N[Not[LessEqual[y, 9.8e+157]], $MachinePrecision]], 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 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2 \cdot 10^{+170} \lor \neg \left(y \leq 9.8 \cdot 10^{+157}\right):\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{x}{z - t}\\
\end{array}
\end{array}
if y < -2.00000000000000007e170 or 9.8000000000000003e157 < y Initial program 98.4%
associate-/l*99.8%
Simplified99.8%
+-commutative99.8%
fma-define99.8%
associate-*r/98.4%
*-commutative98.4%
associate-/l*99.8%
Applied egg-rr99.8%
Taylor expanded in a around 0 74.2%
if -2.00000000000000007e170 < y < 9.8000000000000003e157Initial program 99.4%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 91.2%
Final simplification87.1%
(FPCore (x y z t a)
:precision binary64
(if (<= y -9.5e+169)
(+ (* a 120.0) (/ (* y -60.0) (- z t)))
(if (<= y 3.05e+96)
(+ (* a 120.0) (* 60.0 (/ x (- z t))))
(+ (* a 120.0) (* 60.0 (/ y (- t z)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -9.5e+169) {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
} else if (y <= 3.05e+96) {
tmp = (a * 120.0) + (60.0 * (x / (z - t)));
} 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 (y <= (-9.5d+169)) then
tmp = (a * 120.0d0) + ((y * (-60.0d0)) / (z - t))
else if (y <= 3.05d+96) then
tmp = (a * 120.0d0) + (60.0d0 * (x / (z - t)))
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 (y <= -9.5e+169) {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
} else if (y <= 3.05e+96) {
tmp = (a * 120.0) + (60.0 * (x / (z - t)));
} else {
tmp = (a * 120.0) + (60.0 * (y / (t - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -9.5e+169: tmp = (a * 120.0) + ((y * -60.0) / (z - t)) elif y <= 3.05e+96: tmp = (a * 120.0) + (60.0 * (x / (z - t))) else: tmp = (a * 120.0) + (60.0 * (y / (t - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -9.5e+169) tmp = Float64(Float64(a * 120.0) + Float64(Float64(y * -60.0) / Float64(z - t))); elseif (y <= 3.05e+96) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(x / Float64(z - t)))); 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 (y <= -9.5e+169) tmp = (a * 120.0) + ((y * -60.0) / (z - t)); elseif (y <= 3.05e+96) tmp = (a * 120.0) + (60.0 * (x / (z - t))); else tmp = (a * 120.0) + (60.0 * (y / (t - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -9.5e+169], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.05e+96], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $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}\;y \leq -9.5 \cdot 10^{+169}:\\
\;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z - t}\\
\mathbf{elif}\;y \leq 3.05 \cdot 10^{+96}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{x}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t - z}\\
\end{array}
\end{array}
if y < -9.4999999999999995e169Initial program 100.0%
Taylor expanded in x around 0 92.5%
if -9.4999999999999995e169 < y < 3.04999999999999992e96Initial program 99.3%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 92.6%
if 3.04999999999999992e96 < y Initial program 98.0%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 94.8%
associate-*r/94.0%
remove-double-neg94.0%
neg-mul-194.0%
times-frac94.8%
metadata-eval94.8%
neg-sub094.8%
sub-neg94.8%
+-commutative94.8%
associate--r+94.8%
neg-sub094.8%
remove-double-neg94.8%
Simplified94.8%
Final simplification93.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -4.2e+26) (not (<= a 2.05e+62))) (* 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 <= -4.2e+26) || !(a <= 2.05e+62)) {
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 <= (-4.2d+26)) .or. (.not. (a <= 2.05d+62))) 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 <= -4.2e+26) || !(a <= 2.05e+62)) {
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 <= -4.2e+26) or not (a <= 2.05e+62): tmp = a * 120.0 else: tmp = 60.0 * ((x - y) / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -4.2e+26) || !(a <= 2.05e+62)) 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 <= -4.2e+26) || ~((a <= 2.05e+62))) tmp = a * 120.0; else tmp = 60.0 * ((x - y) / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -4.2e+26], N[Not[LessEqual[a, 2.05e+62]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.2 \cdot 10^{+26} \lor \neg \left(a \leq 2.05 \cdot 10^{+62}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\end{array}
\end{array}
if a < -4.2000000000000002e26 or 2.04999999999999992e62 < a Initial program 99.2%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 80.5%
if -4.2000000000000002e26 < a < 2.04999999999999992e62Initial program 99.1%
associate-/l*99.7%
Simplified99.7%
+-commutative99.7%
fma-define99.7%
associate-*r/99.1%
*-commutative99.1%
associate-/l*99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 77.3%
Final simplification78.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1e-85) (not (<= a 1.02e-29))) (* a 120.0) (* 60.0 (/ x (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1e-85) || !(a <= 1.02e-29)) {
tmp = a * 120.0;
} else {
tmp = 60.0 * (x / (z - t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-1d-85)) .or. (.not. (a <= 1.02d-29))) then
tmp = a * 120.0d0
else
tmp = 60.0d0 * (x / (z - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1e-85) || !(a <= 1.02e-29)) {
tmp = a * 120.0;
} else {
tmp = 60.0 * (x / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1e-85) or not (a <= 1.02e-29): tmp = a * 120.0 else: tmp = 60.0 * (x / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1e-85) || !(a <= 1.02e-29)) tmp = Float64(a * 120.0); else tmp = Float64(60.0 * Float64(x / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1e-85) || ~((a <= 1.02e-29))) tmp = a * 120.0; else tmp = 60.0 * (x / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1e-85], N[Not[LessEqual[a, 1.02e-29]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1 \cdot 10^{-85} \lor \neg \left(a \leq 1.02 \cdot 10^{-29}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\
\end{array}
\end{array}
if a < -9.9999999999999998e-86 or 1.01999999999999994e-29 < a Initial program 99.3%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 72.3%
if -9.9999999999999998e-86 < a < 1.01999999999999994e-29Initial program 98.8%
associate-/l*99.7%
Simplified99.7%
+-commutative99.7%
fma-define99.7%
associate-*r/98.8%
*-commutative98.8%
associate-/l*99.7%
Applied egg-rr99.7%
Taylor expanded in x around inf 51.2%
Final simplification64.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -1.5e+170) (not (<= y 2.2e+158))) (* -60.0 (/ y (- z t))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.5e+170) || !(y <= 2.2e+158)) {
tmp = -60.0 * (y / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((y <= (-1.5d+170)) .or. (.not. (y <= 2.2d+158))) then
tmp = (-60.0d0) * (y / (z - t))
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.5e+170) || !(y <= 2.2e+158)) {
tmp = -60.0 * (y / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -1.5e+170) or not (y <= 2.2e+158): tmp = -60.0 * (y / (z - t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -1.5e+170) || !(y <= 2.2e+158)) tmp = Float64(-60.0 * Float64(y / Float64(z - t))); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -1.5e+170) || ~((y <= 2.2e+158))) tmp = -60.0 * (y / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -1.5e+170], N[Not[LessEqual[y, 2.2e+158]], $MachinePrecision]], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.5 \cdot 10^{+170} \lor \neg \left(y \leq 2.2 \cdot 10^{+158}\right):\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if y < -1.49999999999999998e170 or 2.2000000000000001e158 < y Initial program 98.4%
associate-/l*99.8%
Simplified99.8%
+-commutative99.8%
fma-define99.8%
associate-*r/98.4%
*-commutative98.4%
associate-/l*99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 68.9%
if -1.49999999999999998e170 < y < 2.2000000000000001e158Initial program 99.4%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 58.0%
Final simplification60.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -1.95e+189) (not (<= y 4.6e+158))) (* -60.0 (/ y z)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.95e+189) || !(y <= 4.6e+158)) {
tmp = -60.0 * (y / z);
} 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 ((y <= (-1.95d+189)) .or. (.not. (y <= 4.6d+158))) then
tmp = (-60.0d0) * (y / z)
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 ((y <= -1.95e+189) || !(y <= 4.6e+158)) {
tmp = -60.0 * (y / z);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -1.95e+189) or not (y <= 4.6e+158): tmp = -60.0 * (y / z) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -1.95e+189) || !(y <= 4.6e+158)) tmp = Float64(-60.0 * Float64(y / z)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -1.95e+189) || ~((y <= 4.6e+158))) tmp = -60.0 * (y / z); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -1.95e+189], N[Not[LessEqual[y, 4.6e+158]], $MachinePrecision]], N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.95 \cdot 10^{+189} \lor \neg \left(y \leq 4.6 \cdot 10^{+158}\right):\\
\;\;\;\;-60 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if y < -1.95e189 or 4.59999999999999971e158 < y Initial program 98.4%
associate-/l*99.8%
Simplified99.8%
+-commutative99.8%
fma-define99.8%
associate-*r/98.4%
*-commutative98.4%
associate-/l*99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 68.9%
Taylor expanded in z around inf 52.9%
if -1.95e189 < y < 4.59999999999999971e158Initial program 99.4%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 57.2%
Final simplification56.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -3.3e+193) (not (<= x 9.5e+161))) (* -60.0 (/ x t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -3.3e+193) || !(x <= 9.5e+161)) {
tmp = -60.0 * (x / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((x <= (-3.3d+193)) .or. (.not. (x <= 9.5d+161))) then
tmp = (-60.0d0) * (x / t)
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -3.3e+193) || !(x <= 9.5e+161)) {
tmp = -60.0 * (x / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -3.3e+193) or not (x <= 9.5e+161): tmp = -60.0 * (x / t) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -3.3e+193) || !(x <= 9.5e+161)) tmp = Float64(-60.0 * Float64(x / t)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -3.3e+193) || ~((x <= 9.5e+161))) tmp = -60.0 * (x / t); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -3.3e+193], N[Not[LessEqual[x, 9.5e+161]], $MachinePrecision]], N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.3 \cdot 10^{+193} \lor \neg \left(x \leq 9.5 \cdot 10^{+161}\right):\\
\;\;\;\;-60 \cdot \frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if x < -3.3e193 or 9.50000000000000061e161 < x Initial program 96.6%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 96.6%
associate-*r/95.1%
Simplified95.1%
Taylor expanded in z around 0 59.9%
Taylor expanded in x around inf 44.3%
if -3.3e193 < x < 9.50000000000000061e161Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 59.4%
Final simplification56.0%
(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.1%
*-commutative99.1%
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%
(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.1%
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.1%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 51.1%
Final simplification51.1%
(FPCore (x y z t a) :precision binary64 (+ (/ 60.0 (/ (- z t) (- x y))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (60.0d0 / ((z - t) / (x - y))) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
def code(x, y, z, t, a): return (60.0 / ((z - t) / (x - y))) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = (60.0 / ((z - t) / (x - y))) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60}{\frac{z - t}{x - y}} + a \cdot 120
\end{array}
herbie shell --seed 2024143
(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)))