
(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 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((60.0d0 * (x - y)) / (z - t)) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
def code(x, y, z, t, a): return ((60.0 * (x - y)) / (z - t)) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = ((60.0 * (x - y)) / (z - t)) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120
\end{array}
(FPCore (x y z t a) :precision binary64 (+ (* 60.0 (/ (- x y) (- z t))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return (60.0 * ((x - y) / (z - t))) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (60.0d0 * ((x - y) / (z - t))) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return (60.0 * ((x - y) / (z - t))) + (a * 120.0);
}
def code(x, y, z, t, a): return (60.0 * ((x - y) / (z - t))) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(60.0 * Float64(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[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
60 \cdot \frac{x - y}{z - t} + a \cdot 120
\end{array}
Initial program 99.4%
associate-/l*99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (* a 120.0) (* -60.0 (/ x t))))
(t_2 (* -60.0 (/ (- x y) (- t z)))))
(if (<= (* a 120.0) -1e+44)
(* a 120.0)
(if (<= (* a 120.0) -1e-17)
t_2
(if (<= (* a 120.0) -5e-22)
(* a 120.0)
(if (<= (* a 120.0) -2e-176)
t_1
(if (<= (* a 120.0) 1e-37)
t_2
(if (or (<= (* a 120.0) 10000000000000.0)
(not (<= (* a 120.0) 5e+164)))
(* a 120.0)
t_1))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (a * 120.0) + (-60.0 * (x / t));
double t_2 = -60.0 * ((x - y) / (t - z));
double tmp;
if ((a * 120.0) <= -1e+44) {
tmp = a * 120.0;
} else if ((a * 120.0) <= -1e-17) {
tmp = t_2;
} else if ((a * 120.0) <= -5e-22) {
tmp = a * 120.0;
} else if ((a * 120.0) <= -2e-176) {
tmp = t_1;
} else if ((a * 120.0) <= 1e-37) {
tmp = t_2;
} else if (((a * 120.0) <= 10000000000000.0) || !((a * 120.0) <= 5e+164)) {
tmp = a * 120.0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (a * 120.0d0) + ((-60.0d0) * (x / t))
t_2 = (-60.0d0) * ((x - y) / (t - z))
if ((a * 120.0d0) <= (-1d+44)) then
tmp = a * 120.0d0
else if ((a * 120.0d0) <= (-1d-17)) then
tmp = t_2
else if ((a * 120.0d0) <= (-5d-22)) then
tmp = a * 120.0d0
else if ((a * 120.0d0) <= (-2d-176)) then
tmp = t_1
else if ((a * 120.0d0) <= 1d-37) then
tmp = t_2
else if (((a * 120.0d0) <= 10000000000000.0d0) .or. (.not. ((a * 120.0d0) <= 5d+164))) then
tmp = a * 120.0d0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (a * 120.0) + (-60.0 * (x / t));
double t_2 = -60.0 * ((x - y) / (t - z));
double tmp;
if ((a * 120.0) <= -1e+44) {
tmp = a * 120.0;
} else if ((a * 120.0) <= -1e-17) {
tmp = t_2;
} else if ((a * 120.0) <= -5e-22) {
tmp = a * 120.0;
} else if ((a * 120.0) <= -2e-176) {
tmp = t_1;
} else if ((a * 120.0) <= 1e-37) {
tmp = t_2;
} else if (((a * 120.0) <= 10000000000000.0) || !((a * 120.0) <= 5e+164)) {
tmp = a * 120.0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (a * 120.0) + (-60.0 * (x / t)) t_2 = -60.0 * ((x - y) / (t - z)) tmp = 0 if (a * 120.0) <= -1e+44: tmp = a * 120.0 elif (a * 120.0) <= -1e-17: tmp = t_2 elif (a * 120.0) <= -5e-22: tmp = a * 120.0 elif (a * 120.0) <= -2e-176: tmp = t_1 elif (a * 120.0) <= 1e-37: tmp = t_2 elif ((a * 120.0) <= 10000000000000.0) or not ((a * 120.0) <= 5e+164): tmp = a * 120.0 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(x / t))) t_2 = Float64(-60.0 * Float64(Float64(x - y) / Float64(t - z))) tmp = 0.0 if (Float64(a * 120.0) <= -1e+44) tmp = Float64(a * 120.0); elseif (Float64(a * 120.0) <= -1e-17) tmp = t_2; elseif (Float64(a * 120.0) <= -5e-22) tmp = Float64(a * 120.0); elseif (Float64(a * 120.0) <= -2e-176) tmp = t_1; elseif (Float64(a * 120.0) <= 1e-37) tmp = t_2; elseif ((Float64(a * 120.0) <= 10000000000000.0) || !(Float64(a * 120.0) <= 5e+164)) tmp = Float64(a * 120.0); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (a * 120.0) + (-60.0 * (x / t)); t_2 = -60.0 * ((x - y) / (t - z)); tmp = 0.0; if ((a * 120.0) <= -1e+44) tmp = a * 120.0; elseif ((a * 120.0) <= -1e-17) tmp = t_2; elseif ((a * 120.0) <= -5e-22) tmp = a * 120.0; elseif ((a * 120.0) <= -2e-176) tmp = t_1; elseif ((a * 120.0) <= 1e-37) tmp = t_2; elseif (((a * 120.0) <= 10000000000000.0) || ~(((a * 120.0) <= 5e+164))) tmp = a * 120.0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-60.0 * N[(N[(x - y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * 120.0), $MachinePrecision], -1e+44], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], -1e-17], t$95$2, If[LessEqual[N[(a * 120.0), $MachinePrecision], -5e-22], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], -2e-176], t$95$1, If[LessEqual[N[(a * 120.0), $MachinePrecision], 1e-37], t$95$2, If[Or[LessEqual[N[(a * 120.0), $MachinePrecision], 10000000000000.0], N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 5e+164]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot 120 + -60 \cdot \frac{x}{t}\\
t_2 := -60 \cdot \frac{x - y}{t - z}\\
\mathbf{if}\;a \cdot 120 \leq -1 \cdot 10^{+44}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq -1 \cdot 10^{-17}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \cdot 120 \leq -5 \cdot 10^{-22}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq -2 \cdot 10^{-176}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \cdot 120 \leq 10^{-37}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \cdot 120 \leq 10000000000000 \lor \neg \left(a \cdot 120 \leq 5 \cdot 10^{+164}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -1.0000000000000001e44 or -1.00000000000000007e-17 < (*.f64 a #s(literal 120 binary64)) < -4.99999999999999954e-22 or 1.00000000000000007e-37 < (*.f64 a #s(literal 120 binary64)) < 1e13 or 4.9999999999999995e164 < (*.f64 a #s(literal 120 binary64)) Initial program 98.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 85.6%
if -1.0000000000000001e44 < (*.f64 a #s(literal 120 binary64)) < -1.00000000000000007e-17 or -2e-176 < (*.f64 a #s(literal 120 binary64)) < 1.00000000000000007e-37Initial program 99.6%
*-commutative99.6%
associate-/l*99.7%
fma-define99.7%
sub-neg99.7%
+-commutative99.7%
neg-sub099.7%
associate-+l-99.7%
sub0-neg99.7%
distribute-frac-neg299.7%
distribute-neg-frac99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in a around 0 79.7%
if -4.99999999999999954e-22 < (*.f64 a #s(literal 120 binary64)) < -2e-176 or 1e13 < (*.f64 a #s(literal 120 binary64)) < 4.9999999999999995e164Initial program 99.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 80.4%
Taylor expanded in z around 0 71.8%
Final simplification80.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (* a 120.0) (* -60.0 (/ x t))))
(t_2 (* -60.0 (/ (- x y) (- t z)))))
(if (<= (* a 120.0) -1e+44)
(* a 120.0)
(if (<= (* a 120.0) -1e-17)
t_2
(if (<= (* a 120.0) -2e-73)
(+ (* a 120.0) (* 60.0 (/ x z)))
(if (<= (* a 120.0) -2e-176)
t_1
(if (<= (* a 120.0) 1e-37)
t_2
(if (or (<= (* a 120.0) 10000000000000.0)
(not (<= (* a 120.0) 5e+164)))
(* a 120.0)
t_1))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (a * 120.0) + (-60.0 * (x / t));
double t_2 = -60.0 * ((x - y) / (t - z));
double tmp;
if ((a * 120.0) <= -1e+44) {
tmp = a * 120.0;
} else if ((a * 120.0) <= -1e-17) {
tmp = t_2;
} else if ((a * 120.0) <= -2e-73) {
tmp = (a * 120.0) + (60.0 * (x / z));
} else if ((a * 120.0) <= -2e-176) {
tmp = t_1;
} else if ((a * 120.0) <= 1e-37) {
tmp = t_2;
} else if (((a * 120.0) <= 10000000000000.0) || !((a * 120.0) <= 5e+164)) {
tmp = a * 120.0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (a * 120.0d0) + ((-60.0d0) * (x / t))
t_2 = (-60.0d0) * ((x - y) / (t - z))
if ((a * 120.0d0) <= (-1d+44)) then
tmp = a * 120.0d0
else if ((a * 120.0d0) <= (-1d-17)) then
tmp = t_2
else if ((a * 120.0d0) <= (-2d-73)) then
tmp = (a * 120.0d0) + (60.0d0 * (x / z))
else if ((a * 120.0d0) <= (-2d-176)) then
tmp = t_1
else if ((a * 120.0d0) <= 1d-37) then
tmp = t_2
else if (((a * 120.0d0) <= 10000000000000.0d0) .or. (.not. ((a * 120.0d0) <= 5d+164))) then
tmp = a * 120.0d0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (a * 120.0) + (-60.0 * (x / t));
double t_2 = -60.0 * ((x - y) / (t - z));
double tmp;
if ((a * 120.0) <= -1e+44) {
tmp = a * 120.0;
} else if ((a * 120.0) <= -1e-17) {
tmp = t_2;
} else if ((a * 120.0) <= -2e-73) {
tmp = (a * 120.0) + (60.0 * (x / z));
} else if ((a * 120.0) <= -2e-176) {
tmp = t_1;
} else if ((a * 120.0) <= 1e-37) {
tmp = t_2;
} else if (((a * 120.0) <= 10000000000000.0) || !((a * 120.0) <= 5e+164)) {
tmp = a * 120.0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (a * 120.0) + (-60.0 * (x / t)) t_2 = -60.0 * ((x - y) / (t - z)) tmp = 0 if (a * 120.0) <= -1e+44: tmp = a * 120.0 elif (a * 120.0) <= -1e-17: tmp = t_2 elif (a * 120.0) <= -2e-73: tmp = (a * 120.0) + (60.0 * (x / z)) elif (a * 120.0) <= -2e-176: tmp = t_1 elif (a * 120.0) <= 1e-37: tmp = t_2 elif ((a * 120.0) <= 10000000000000.0) or not ((a * 120.0) <= 5e+164): tmp = a * 120.0 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(x / t))) t_2 = Float64(-60.0 * Float64(Float64(x - y) / Float64(t - z))) tmp = 0.0 if (Float64(a * 120.0) <= -1e+44) tmp = Float64(a * 120.0); elseif (Float64(a * 120.0) <= -1e-17) tmp = t_2; elseif (Float64(a * 120.0) <= -2e-73) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(x / z))); elseif (Float64(a * 120.0) <= -2e-176) tmp = t_1; elseif (Float64(a * 120.0) <= 1e-37) tmp = t_2; elseif ((Float64(a * 120.0) <= 10000000000000.0) || !(Float64(a * 120.0) <= 5e+164)) tmp = Float64(a * 120.0); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (a * 120.0) + (-60.0 * (x / t)); t_2 = -60.0 * ((x - y) / (t - z)); tmp = 0.0; if ((a * 120.0) <= -1e+44) tmp = a * 120.0; elseif ((a * 120.0) <= -1e-17) tmp = t_2; elseif ((a * 120.0) <= -2e-73) tmp = (a * 120.0) + (60.0 * (x / z)); elseif ((a * 120.0) <= -2e-176) tmp = t_1; elseif ((a * 120.0) <= 1e-37) tmp = t_2; elseif (((a * 120.0) <= 10000000000000.0) || ~(((a * 120.0) <= 5e+164))) tmp = a * 120.0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-60.0 * N[(N[(x - y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * 120.0), $MachinePrecision], -1e+44], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], -1e-17], t$95$2, If[LessEqual[N[(a * 120.0), $MachinePrecision], -2e-73], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], -2e-176], t$95$1, If[LessEqual[N[(a * 120.0), $MachinePrecision], 1e-37], t$95$2, If[Or[LessEqual[N[(a * 120.0), $MachinePrecision], 10000000000000.0], N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 5e+164]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot 120 + -60 \cdot \frac{x}{t}\\
t_2 := -60 \cdot \frac{x - y}{t - z}\\
\mathbf{if}\;a \cdot 120 \leq -1 \cdot 10^{+44}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq -1 \cdot 10^{-17}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \cdot 120 \leq -2 \cdot 10^{-73}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{x}{z}\\
\mathbf{elif}\;a \cdot 120 \leq -2 \cdot 10^{-176}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \cdot 120 \leq 10^{-37}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \cdot 120 \leq 10000000000000 \lor \neg \left(a \cdot 120 \leq 5 \cdot 10^{+164}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -1.0000000000000001e44 or 1.00000000000000007e-37 < (*.f64 a #s(literal 120 binary64)) < 1e13 or 4.9999999999999995e164 < (*.f64 a #s(literal 120 binary64)) Initial program 98.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 85.2%
if -1.0000000000000001e44 < (*.f64 a #s(literal 120 binary64)) < -1.00000000000000007e-17 or -2e-176 < (*.f64 a #s(literal 120 binary64)) < 1.00000000000000007e-37Initial program 99.6%
*-commutative99.6%
associate-/l*99.7%
fma-define99.7%
sub-neg99.7%
+-commutative99.7%
neg-sub099.7%
associate-+l-99.7%
sub0-neg99.7%
distribute-frac-neg299.7%
distribute-neg-frac99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in a around 0 79.7%
if -1.00000000000000007e-17 < (*.f64 a #s(literal 120 binary64)) < -1.99999999999999999e-73Initial program 99.5%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around inf 84.3%
Taylor expanded in z around inf 78.6%
if -1.99999999999999999e-73 < (*.f64 a #s(literal 120 binary64)) < -2e-176 or 1e13 < (*.f64 a #s(literal 120 binary64)) < 4.9999999999999995e164Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 80.5%
Taylor expanded in z around 0 74.5%
Final simplification80.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* -60.0 (/ (- x y) (- t z)))))
(if (<= (* a 120.0) -1e+44)
(* a 120.0)
(if (<= (* a 120.0) -1e-17)
t_1
(if (<= (* a 120.0) -2e-73)
(+ (* a 120.0) (* 60.0 (/ x z)))
(if (<= (* a 120.0) -2e-176)
(+ (* a 120.0) (* -60.0 (/ x t)))
(if (<= (* a 120.0) 1e-37)
t_1
(if (<= (* a 120.0) 2e+95)
(+ (* a 120.0) (* y (/ 60.0 t)))
(if (<= (* a 120.0) 8e+238)
(+ (* a 120.0) (/ (* y -60.0) z))
(* a 120.0))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -60.0 * ((x - y) / (t - z));
double tmp;
if ((a * 120.0) <= -1e+44) {
tmp = a * 120.0;
} else if ((a * 120.0) <= -1e-17) {
tmp = t_1;
} else if ((a * 120.0) <= -2e-73) {
tmp = (a * 120.0) + (60.0 * (x / z));
} else if ((a * 120.0) <= -2e-176) {
tmp = (a * 120.0) + (-60.0 * (x / t));
} else if ((a * 120.0) <= 1e-37) {
tmp = t_1;
} else if ((a * 120.0) <= 2e+95) {
tmp = (a * 120.0) + (y * (60.0 / t));
} else if ((a * 120.0) <= 8e+238) {
tmp = (a * 120.0) + ((y * -60.0) / 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) :: t_1
real(8) :: tmp
t_1 = (-60.0d0) * ((x - y) / (t - z))
if ((a * 120.0d0) <= (-1d+44)) then
tmp = a * 120.0d0
else if ((a * 120.0d0) <= (-1d-17)) then
tmp = t_1
else if ((a * 120.0d0) <= (-2d-73)) then
tmp = (a * 120.0d0) + (60.0d0 * (x / z))
else if ((a * 120.0d0) <= (-2d-176)) then
tmp = (a * 120.0d0) + ((-60.0d0) * (x / t))
else if ((a * 120.0d0) <= 1d-37) then
tmp = t_1
else if ((a * 120.0d0) <= 2d+95) then
tmp = (a * 120.0d0) + (y * (60.0d0 / t))
else if ((a * 120.0d0) <= 8d+238) then
tmp = (a * 120.0d0) + ((y * (-60.0d0)) / 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 t_1 = -60.0 * ((x - y) / (t - z));
double tmp;
if ((a * 120.0) <= -1e+44) {
tmp = a * 120.0;
} else if ((a * 120.0) <= -1e-17) {
tmp = t_1;
} else if ((a * 120.0) <= -2e-73) {
tmp = (a * 120.0) + (60.0 * (x / z));
} else if ((a * 120.0) <= -2e-176) {
tmp = (a * 120.0) + (-60.0 * (x / t));
} else if ((a * 120.0) <= 1e-37) {
tmp = t_1;
} else if ((a * 120.0) <= 2e+95) {
tmp = (a * 120.0) + (y * (60.0 / t));
} else if ((a * 120.0) <= 8e+238) {
tmp = (a * 120.0) + ((y * -60.0) / z);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -60.0 * ((x - y) / (t - z)) tmp = 0 if (a * 120.0) <= -1e+44: tmp = a * 120.0 elif (a * 120.0) <= -1e-17: tmp = t_1 elif (a * 120.0) <= -2e-73: tmp = (a * 120.0) + (60.0 * (x / z)) elif (a * 120.0) <= -2e-176: tmp = (a * 120.0) + (-60.0 * (x / t)) elif (a * 120.0) <= 1e-37: tmp = t_1 elif (a * 120.0) <= 2e+95: tmp = (a * 120.0) + (y * (60.0 / t)) elif (a * 120.0) <= 8e+238: tmp = (a * 120.0) + ((y * -60.0) / z) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) t_1 = Float64(-60.0 * Float64(Float64(x - y) / Float64(t - z))) tmp = 0.0 if (Float64(a * 120.0) <= -1e+44) tmp = Float64(a * 120.0); elseif (Float64(a * 120.0) <= -1e-17) tmp = t_1; elseif (Float64(a * 120.0) <= -2e-73) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(x / z))); elseif (Float64(a * 120.0) <= -2e-176) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(x / t))); elseif (Float64(a * 120.0) <= 1e-37) tmp = t_1; elseif (Float64(a * 120.0) <= 2e+95) tmp = Float64(Float64(a * 120.0) + Float64(y * Float64(60.0 / t))); elseif (Float64(a * 120.0) <= 8e+238) tmp = Float64(Float64(a * 120.0) + Float64(Float64(y * -60.0) / z)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = -60.0 * ((x - y) / (t - z)); tmp = 0.0; if ((a * 120.0) <= -1e+44) tmp = a * 120.0; elseif ((a * 120.0) <= -1e-17) tmp = t_1; elseif ((a * 120.0) <= -2e-73) tmp = (a * 120.0) + (60.0 * (x / z)); elseif ((a * 120.0) <= -2e-176) tmp = (a * 120.0) + (-60.0 * (x / t)); elseif ((a * 120.0) <= 1e-37) tmp = t_1; elseif ((a * 120.0) <= 2e+95) tmp = (a * 120.0) + (y * (60.0 / t)); elseif ((a * 120.0) <= 8e+238) tmp = (a * 120.0) + ((y * -60.0) / z); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(-60.0 * N[(N[(x - y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * 120.0), $MachinePrecision], -1e+44], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], -1e-17], t$95$1, If[LessEqual[N[(a * 120.0), $MachinePrecision], -2e-73], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], -2e-176], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 1e-37], t$95$1, If[LessEqual[N[(a * 120.0), $MachinePrecision], 2e+95], N[(N[(a * 120.0), $MachinePrecision] + N[(y * N[(60.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 8e+238], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(y * -60.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -60 \cdot \frac{x - y}{t - z}\\
\mathbf{if}\;a \cdot 120 \leq -1 \cdot 10^{+44}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq -1 \cdot 10^{-17}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \cdot 120 \leq -2 \cdot 10^{-73}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{x}{z}\\
\mathbf{elif}\;a \cdot 120 \leq -2 \cdot 10^{-176}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{x}{t}\\
\mathbf{elif}\;a \cdot 120 \leq 10^{-37}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{+95}:\\
\;\;\;\;a \cdot 120 + y \cdot \frac{60}{t}\\
\mathbf{elif}\;a \cdot 120 \leq 8 \cdot 10^{+238}:\\
\;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -1.0000000000000001e44 or 8.0000000000000004e238 < (*.f64 a #s(literal 120 binary64)) Initial program 98.2%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 87.6%
if -1.0000000000000001e44 < (*.f64 a #s(literal 120 binary64)) < -1.00000000000000007e-17 or -2e-176 < (*.f64 a #s(literal 120 binary64)) < 1.00000000000000007e-37Initial program 99.6%
*-commutative99.6%
associate-/l*99.7%
fma-define99.7%
sub-neg99.7%
+-commutative99.7%
neg-sub099.7%
associate-+l-99.7%
sub0-neg99.7%
distribute-frac-neg299.7%
distribute-neg-frac99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in a around 0 79.7%
if -1.00000000000000007e-17 < (*.f64 a #s(literal 120 binary64)) < -1.99999999999999999e-73Initial program 99.5%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around inf 84.3%
Taylor expanded in z around inf 78.6%
if -1.99999999999999999e-73 < (*.f64 a #s(literal 120 binary64)) < -2e-176Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 89.1%
Taylor expanded in z around 0 72.4%
if 1.00000000000000007e-37 < (*.f64 a #s(literal 120 binary64)) < 2.00000000000000004e95Initial program 99.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around 0 86.0%
associate-*r/85.9%
Simplified85.9%
Taylor expanded in z around 0 75.4%
associate-*r/75.3%
*-commutative75.3%
associate-*r/75.2%
Simplified75.2%
if 2.00000000000000004e95 < (*.f64 a #s(literal 120 binary64)) < 8.0000000000000004e238Initial program 99.9%
*-commutative99.9%
associate-/l*99.9%
Applied egg-rr99.9%
Taylor expanded in z around inf 73.5%
Taylor expanded in x around 0 89.2%
associate-*r/89.2%
Simplified89.2%
Final simplification81.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* -60.0 (/ (- x y) (- t z)))))
(if (<= (* a 120.0) -1e+44)
(* a 120.0)
(if (<= (* a 120.0) -1e-17)
t_1
(if (<= (* a 120.0) -2e-73)
(+ (* a 120.0) (* 60.0 (/ x z)))
(if (<= (* a 120.0) -2e-176)
(+ (* a 120.0) (* -60.0 (/ x t)))
(if (<= (* a 120.0) 1e-37)
t_1
(+ (* a 120.0) (* y (/ 60.0 t))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -60.0 * ((x - y) / (t - z));
double tmp;
if ((a * 120.0) <= -1e+44) {
tmp = a * 120.0;
} else if ((a * 120.0) <= -1e-17) {
tmp = t_1;
} else if ((a * 120.0) <= -2e-73) {
tmp = (a * 120.0) + (60.0 * (x / z));
} else if ((a * 120.0) <= -2e-176) {
tmp = (a * 120.0) + (-60.0 * (x / t));
} else if ((a * 120.0) <= 1e-37) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = (-60.0d0) * ((x - y) / (t - z))
if ((a * 120.0d0) <= (-1d+44)) then
tmp = a * 120.0d0
else if ((a * 120.0d0) <= (-1d-17)) then
tmp = t_1
else if ((a * 120.0d0) <= (-2d-73)) then
tmp = (a * 120.0d0) + (60.0d0 * (x / z))
else if ((a * 120.0d0) <= (-2d-176)) then
tmp = (a * 120.0d0) + ((-60.0d0) * (x / t))
else if ((a * 120.0d0) <= 1d-37) then
tmp = t_1
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 t_1 = -60.0 * ((x - y) / (t - z));
double tmp;
if ((a * 120.0) <= -1e+44) {
tmp = a * 120.0;
} else if ((a * 120.0) <= -1e-17) {
tmp = t_1;
} else if ((a * 120.0) <= -2e-73) {
tmp = (a * 120.0) + (60.0 * (x / z));
} else if ((a * 120.0) <= -2e-176) {
tmp = (a * 120.0) + (-60.0 * (x / t));
} else if ((a * 120.0) <= 1e-37) {
tmp = t_1;
} else {
tmp = (a * 120.0) + (y * (60.0 / t));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -60.0 * ((x - y) / (t - z)) tmp = 0 if (a * 120.0) <= -1e+44: tmp = a * 120.0 elif (a * 120.0) <= -1e-17: tmp = t_1 elif (a * 120.0) <= -2e-73: tmp = (a * 120.0) + (60.0 * (x / z)) elif (a * 120.0) <= -2e-176: tmp = (a * 120.0) + (-60.0 * (x / t)) elif (a * 120.0) <= 1e-37: tmp = t_1 else: tmp = (a * 120.0) + (y * (60.0 / t)) return tmp
function code(x, y, z, t, a) t_1 = Float64(-60.0 * Float64(Float64(x - y) / Float64(t - z))) tmp = 0.0 if (Float64(a * 120.0) <= -1e+44) tmp = Float64(a * 120.0); elseif (Float64(a * 120.0) <= -1e-17) tmp = t_1; elseif (Float64(a * 120.0) <= -2e-73) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(x / z))); elseif (Float64(a * 120.0) <= -2e-176) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(x / t))); elseif (Float64(a * 120.0) <= 1e-37) tmp = t_1; else tmp = Float64(Float64(a * 120.0) + Float64(y * Float64(60.0 / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = -60.0 * ((x - y) / (t - z)); tmp = 0.0; if ((a * 120.0) <= -1e+44) tmp = a * 120.0; elseif ((a * 120.0) <= -1e-17) tmp = t_1; elseif ((a * 120.0) <= -2e-73) tmp = (a * 120.0) + (60.0 * (x / z)); elseif ((a * 120.0) <= -2e-176) tmp = (a * 120.0) + (-60.0 * (x / t)); elseif ((a * 120.0) <= 1e-37) tmp = t_1; else tmp = (a * 120.0) + (y * (60.0 / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(-60.0 * N[(N[(x - y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * 120.0), $MachinePrecision], -1e+44], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], -1e-17], t$95$1, If[LessEqual[N[(a * 120.0), $MachinePrecision], -2e-73], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], -2e-176], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 1e-37], t$95$1, N[(N[(a * 120.0), $MachinePrecision] + N[(y * N[(60.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -60 \cdot \frac{x - y}{t - z}\\
\mathbf{if}\;a \cdot 120 \leq -1 \cdot 10^{+44}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq -1 \cdot 10^{-17}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \cdot 120 \leq -2 \cdot 10^{-73}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{x}{z}\\
\mathbf{elif}\;a \cdot 120 \leq -2 \cdot 10^{-176}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{x}{t}\\
\mathbf{elif}\;a \cdot 120 \leq 10^{-37}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + y \cdot \frac{60}{t}\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -1.0000000000000001e44Initial program 97.5%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 82.2%
if -1.0000000000000001e44 < (*.f64 a #s(literal 120 binary64)) < -1.00000000000000007e-17 or -2e-176 < (*.f64 a #s(literal 120 binary64)) < 1.00000000000000007e-37Initial program 99.6%
*-commutative99.6%
associate-/l*99.7%
fma-define99.7%
sub-neg99.7%
+-commutative99.7%
neg-sub099.7%
associate-+l-99.7%
sub0-neg99.7%
distribute-frac-neg299.7%
distribute-neg-frac99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in a around 0 79.7%
if -1.00000000000000007e-17 < (*.f64 a #s(literal 120 binary64)) < -1.99999999999999999e-73Initial program 99.5%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around inf 84.3%
Taylor expanded in z around inf 78.6%
if -1.99999999999999999e-73 < (*.f64 a #s(literal 120 binary64)) < -2e-176Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 89.1%
Taylor expanded in z around 0 72.4%
if 1.00000000000000007e-37 < (*.f64 a #s(literal 120 binary64)) Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around 0 91.4%
associate-*r/91.4%
Simplified91.4%
Taylor expanded in z around 0 80.6%
associate-*r/80.5%
*-commutative80.5%
associate-*r/80.5%
Simplified80.5%
Final simplification79.8%
(FPCore (x y z t a)
:precision binary64
(if (<= a -7.5e-51)
(* a 120.0)
(if (<= a -9.8e-164)
(* -60.0 (/ x (- t z)))
(if (<= a -1.7e-193)
(* a 120.0)
(if (<= a 3.9e-199)
(* (- x y) (/ 60.0 z))
(if (or (<= a 9e-169) (not (<= a 1.2e-40)))
(* a 120.0)
(* 60.0 (/ y (- t z)))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -7.5e-51) {
tmp = a * 120.0;
} else if (a <= -9.8e-164) {
tmp = -60.0 * (x / (t - z));
} else if (a <= -1.7e-193) {
tmp = a * 120.0;
} else if (a <= 3.9e-199) {
tmp = (x - y) * (60.0 / z);
} else if ((a <= 9e-169) || !(a <= 1.2e-40)) {
tmp = a * 120.0;
} else {
tmp = 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 (a <= (-7.5d-51)) then
tmp = a * 120.0d0
else if (a <= (-9.8d-164)) then
tmp = (-60.0d0) * (x / (t - z))
else if (a <= (-1.7d-193)) then
tmp = a * 120.0d0
else if (a <= 3.9d-199) then
tmp = (x - y) * (60.0d0 / z)
else if ((a <= 9d-169) .or. (.not. (a <= 1.2d-40))) then
tmp = a * 120.0d0
else
tmp = 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 (a <= -7.5e-51) {
tmp = a * 120.0;
} else if (a <= -9.8e-164) {
tmp = -60.0 * (x / (t - z));
} else if (a <= -1.7e-193) {
tmp = a * 120.0;
} else if (a <= 3.9e-199) {
tmp = (x - y) * (60.0 / z);
} else if ((a <= 9e-169) || !(a <= 1.2e-40)) {
tmp = a * 120.0;
} else {
tmp = 60.0 * (y / (t - z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -7.5e-51: tmp = a * 120.0 elif a <= -9.8e-164: tmp = -60.0 * (x / (t - z)) elif a <= -1.7e-193: tmp = a * 120.0 elif a <= 3.9e-199: tmp = (x - y) * (60.0 / z) elif (a <= 9e-169) or not (a <= 1.2e-40): tmp = a * 120.0 else: tmp = 60.0 * (y / (t - z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -7.5e-51) tmp = Float64(a * 120.0); elseif (a <= -9.8e-164) tmp = Float64(-60.0 * Float64(x / Float64(t - z))); elseif (a <= -1.7e-193) tmp = Float64(a * 120.0); elseif (a <= 3.9e-199) tmp = Float64(Float64(x - y) * Float64(60.0 / z)); elseif ((a <= 9e-169) || !(a <= 1.2e-40)) tmp = Float64(a * 120.0); else tmp = 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 (a <= -7.5e-51) tmp = a * 120.0; elseif (a <= -9.8e-164) tmp = -60.0 * (x / (t - z)); elseif (a <= -1.7e-193) tmp = a * 120.0; elseif (a <= 3.9e-199) tmp = (x - y) * (60.0 / z); elseif ((a <= 9e-169) || ~((a <= 1.2e-40))) tmp = a * 120.0; else tmp = 60.0 * (y / (t - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -7.5e-51], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -9.8e-164], N[(-60.0 * N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -1.7e-193], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 3.9e-199], N[(N[(x - y), $MachinePrecision] * N[(60.0 / z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[a, 9e-169], N[Not[LessEqual[a, 1.2e-40]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(60.0 * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -7.5 \cdot 10^{-51}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -9.8 \cdot 10^{-164}:\\
\;\;\;\;-60 \cdot \frac{x}{t - z}\\
\mathbf{elif}\;a \leq -1.7 \cdot 10^{-193}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq 3.9 \cdot 10^{-199}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{60}{z}\\
\mathbf{elif}\;a \leq 9 \cdot 10^{-169} \lor \neg \left(a \leq 1.2 \cdot 10^{-40}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{y}{t - z}\\
\end{array}
\end{array}
if a < -7.49999999999999976e-51 or -9.7999999999999993e-164 < a < -1.7000000000000001e-193 or 3.9000000000000001e-199 < a < 8.9999999999999997e-169 or 1.19999999999999996e-40 < a Initial program 99.2%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 73.1%
if -7.49999999999999976e-51 < a < -9.7999999999999993e-164Initial program 99.6%
*-commutative99.6%
associate-/l*99.4%
fma-define99.4%
sub-neg99.4%
+-commutative99.4%
neg-sub099.4%
associate-+l-99.4%
sub0-neg99.4%
distribute-frac-neg299.4%
distribute-neg-frac99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around inf 57.6%
if -1.7000000000000001e-193 < a < 3.9000000000000001e-199Initial program 99.7%
*-commutative99.7%
associate-/l*99.6%
fma-define99.6%
sub-neg99.6%
+-commutative99.6%
neg-sub099.6%
associate-+l-99.6%
sub0-neg99.6%
distribute-frac-neg299.6%
distribute-neg-frac99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in a around 0 94.4%
associate-*r/94.3%
*-commutative94.3%
associate-*r/94.3%
Simplified94.3%
Taylor expanded in t around 0 58.4%
associate-*r/58.4%
*-commutative58.4%
associate-/l*58.4%
metadata-eval58.4%
associate-*r/58.3%
*-commutative58.3%
associate-*r/58.4%
metadata-eval58.4%
Simplified58.4%
if 8.9999999999999997e-169 < a < 1.19999999999999996e-40Initial program 99.5%
*-commutative99.5%
associate-/l*99.7%
fma-define99.7%
sub-neg99.7%
+-commutative99.7%
neg-sub099.7%
associate-+l-99.7%
sub0-neg99.7%
distribute-frac-neg299.7%
distribute-neg-frac99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 48.4%
Final simplification65.7%
(FPCore (x y z t a)
:precision binary64
(if (<= a -4.4e-51)
(* a 120.0)
(if (<= a -1.05e-165)
(/ (* x -60.0) (- t z))
(if (<= a -4e-194)
(* a 120.0)
(if (<= a 3.9e-199)
(* (- x y) (/ 60.0 z))
(if (or (<= a 3.6e-170) (not (<= a 1.15e-40)))
(* a 120.0)
(* 60.0 (/ y (- t z)))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -4.4e-51) {
tmp = a * 120.0;
} else if (a <= -1.05e-165) {
tmp = (x * -60.0) / (t - z);
} else if (a <= -4e-194) {
tmp = a * 120.0;
} else if (a <= 3.9e-199) {
tmp = (x - y) * (60.0 / z);
} else if ((a <= 3.6e-170) || !(a <= 1.15e-40)) {
tmp = a * 120.0;
} else {
tmp = 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 (a <= (-4.4d-51)) then
tmp = a * 120.0d0
else if (a <= (-1.05d-165)) then
tmp = (x * (-60.0d0)) / (t - z)
else if (a <= (-4d-194)) then
tmp = a * 120.0d0
else if (a <= 3.9d-199) then
tmp = (x - y) * (60.0d0 / z)
else if ((a <= 3.6d-170) .or. (.not. (a <= 1.15d-40))) then
tmp = a * 120.0d0
else
tmp = 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 (a <= -4.4e-51) {
tmp = a * 120.0;
} else if (a <= -1.05e-165) {
tmp = (x * -60.0) / (t - z);
} else if (a <= -4e-194) {
tmp = a * 120.0;
} else if (a <= 3.9e-199) {
tmp = (x - y) * (60.0 / z);
} else if ((a <= 3.6e-170) || !(a <= 1.15e-40)) {
tmp = a * 120.0;
} else {
tmp = 60.0 * (y / (t - z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -4.4e-51: tmp = a * 120.0 elif a <= -1.05e-165: tmp = (x * -60.0) / (t - z) elif a <= -4e-194: tmp = a * 120.0 elif a <= 3.9e-199: tmp = (x - y) * (60.0 / z) elif (a <= 3.6e-170) or not (a <= 1.15e-40): tmp = a * 120.0 else: tmp = 60.0 * (y / (t - z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -4.4e-51) tmp = Float64(a * 120.0); elseif (a <= -1.05e-165) tmp = Float64(Float64(x * -60.0) / Float64(t - z)); elseif (a <= -4e-194) tmp = Float64(a * 120.0); elseif (a <= 3.9e-199) tmp = Float64(Float64(x - y) * Float64(60.0 / z)); elseif ((a <= 3.6e-170) || !(a <= 1.15e-40)) tmp = Float64(a * 120.0); else tmp = 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 (a <= -4.4e-51) tmp = a * 120.0; elseif (a <= -1.05e-165) tmp = (x * -60.0) / (t - z); elseif (a <= -4e-194) tmp = a * 120.0; elseif (a <= 3.9e-199) tmp = (x - y) * (60.0 / z); elseif ((a <= 3.6e-170) || ~((a <= 1.15e-40))) tmp = a * 120.0; else tmp = 60.0 * (y / (t - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -4.4e-51], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -1.05e-165], N[(N[(x * -60.0), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -4e-194], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 3.9e-199], N[(N[(x - y), $MachinePrecision] * N[(60.0 / z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[a, 3.6e-170], N[Not[LessEqual[a, 1.15e-40]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(60.0 * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.4 \cdot 10^{-51}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -1.05 \cdot 10^{-165}:\\
\;\;\;\;\frac{x \cdot -60}{t - z}\\
\mathbf{elif}\;a \leq -4 \cdot 10^{-194}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq 3.9 \cdot 10^{-199}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{60}{z}\\
\mathbf{elif}\;a \leq 3.6 \cdot 10^{-170} \lor \neg \left(a \leq 1.15 \cdot 10^{-40}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{y}{t - z}\\
\end{array}
\end{array}
if a < -4.4e-51 or -1.04999999999999997e-165 < a < -4.00000000000000007e-194 or 3.9000000000000001e-199 < a < 3.6000000000000003e-170 or 1.15e-40 < a Initial program 99.2%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 73.1%
if -4.4e-51 < a < -1.04999999999999997e-165Initial program 99.6%
*-commutative99.6%
associate-/l*99.4%
fma-define99.4%
sub-neg99.4%
+-commutative99.4%
neg-sub099.4%
associate-+l-99.4%
sub0-neg99.4%
distribute-frac-neg299.4%
distribute-neg-frac99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in a around 0 77.2%
associate-*r/77.1%
*-commutative77.1%
associate-*r/76.8%
Simplified76.8%
Taylor expanded in x around inf 57.6%
associate-*r/57.7%
*-commutative57.7%
Simplified57.7%
if -4.00000000000000007e-194 < a < 3.9000000000000001e-199Initial program 99.7%
*-commutative99.7%
associate-/l*99.6%
fma-define99.6%
sub-neg99.6%
+-commutative99.6%
neg-sub099.6%
associate-+l-99.6%
sub0-neg99.6%
distribute-frac-neg299.6%
distribute-neg-frac99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in a around 0 94.4%
associate-*r/94.3%
*-commutative94.3%
associate-*r/94.3%
Simplified94.3%
Taylor expanded in t around 0 58.4%
associate-*r/58.4%
*-commutative58.4%
associate-/l*58.4%
metadata-eval58.4%
associate-*r/58.3%
*-commutative58.3%
associate-*r/58.4%
metadata-eval58.4%
Simplified58.4%
if 3.6000000000000003e-170 < a < 1.15e-40Initial program 99.5%
*-commutative99.5%
associate-/l*99.7%
fma-define99.7%
sub-neg99.7%
+-commutative99.7%
neg-sub099.7%
associate-+l-99.7%
sub0-neg99.7%
distribute-frac-neg299.7%
distribute-neg-frac99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 48.4%
Final simplification65.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* 60.0 (/ y (- t z)))) (t_2 (* -60.0 (/ x (- t z)))))
(if (<= a -6.7e-49)
(* a 120.0)
(if (<= a -1.04e-165)
t_2
(if (<= a -2.3e-178)
(* a 120.0)
(if (<= a -6e-306)
t_1
(if (<= a 2.7e-160) t_2 (if (<= a 1.36e-40) t_1 (* a 120.0)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * (y / (t - z));
double t_2 = -60.0 * (x / (t - z));
double tmp;
if (a <= -6.7e-49) {
tmp = a * 120.0;
} else if (a <= -1.04e-165) {
tmp = t_2;
} else if (a <= -2.3e-178) {
tmp = a * 120.0;
} else if (a <= -6e-306) {
tmp = t_1;
} else if (a <= 2.7e-160) {
tmp = t_2;
} else if (a <= 1.36e-40) {
tmp = t_1;
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 60.0d0 * (y / (t - z))
t_2 = (-60.0d0) * (x / (t - z))
if (a <= (-6.7d-49)) then
tmp = a * 120.0d0
else if (a <= (-1.04d-165)) then
tmp = t_2
else if (a <= (-2.3d-178)) then
tmp = a * 120.0d0
else if (a <= (-6d-306)) then
tmp = t_1
else if (a <= 2.7d-160) then
tmp = t_2
else if (a <= 1.36d-40) then
tmp = t_1
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * (y / (t - z));
double t_2 = -60.0 * (x / (t - z));
double tmp;
if (a <= -6.7e-49) {
tmp = a * 120.0;
} else if (a <= -1.04e-165) {
tmp = t_2;
} else if (a <= -2.3e-178) {
tmp = a * 120.0;
} else if (a <= -6e-306) {
tmp = t_1;
} else if (a <= 2.7e-160) {
tmp = t_2;
} else if (a <= 1.36e-40) {
tmp = t_1;
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = 60.0 * (y / (t - z)) t_2 = -60.0 * (x / (t - z)) tmp = 0 if a <= -6.7e-49: tmp = a * 120.0 elif a <= -1.04e-165: tmp = t_2 elif a <= -2.3e-178: tmp = a * 120.0 elif a <= -6e-306: tmp = t_1 elif a <= 2.7e-160: tmp = t_2 elif a <= 1.36e-40: tmp = t_1 else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) t_1 = Float64(60.0 * Float64(y / Float64(t - z))) t_2 = Float64(-60.0 * Float64(x / Float64(t - z))) tmp = 0.0 if (a <= -6.7e-49) tmp = Float64(a * 120.0); elseif (a <= -1.04e-165) tmp = t_2; elseif (a <= -2.3e-178) tmp = Float64(a * 120.0); elseif (a <= -6e-306) tmp = t_1; elseif (a <= 2.7e-160) tmp = t_2; elseif (a <= 1.36e-40) tmp = t_1; else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = 60.0 * (y / (t - z)); t_2 = -60.0 * (x / (t - z)); tmp = 0.0; if (a <= -6.7e-49) tmp = a * 120.0; elseif (a <= -1.04e-165) tmp = t_2; elseif (a <= -2.3e-178) tmp = a * 120.0; elseif (a <= -6e-306) tmp = t_1; elseif (a <= 2.7e-160) tmp = t_2; elseif (a <= 1.36e-40) tmp = t_1; else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(60.0 * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-60.0 * N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -6.7e-49], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -1.04e-165], t$95$2, If[LessEqual[a, -2.3e-178], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -6e-306], t$95$1, If[LessEqual[a, 2.7e-160], t$95$2, If[LessEqual[a, 1.36e-40], t$95$1, N[(a * 120.0), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 60 \cdot \frac{y}{t - z}\\
t_2 := -60 \cdot \frac{x}{t - z}\\
\mathbf{if}\;a \leq -6.7 \cdot 10^{-49}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -1.04 \cdot 10^{-165}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq -2.3 \cdot 10^{-178}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -6 \cdot 10^{-306}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 2.7 \cdot 10^{-160}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq 1.36 \cdot 10^{-40}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -6.7e-49 or -1.03999999999999996e-165 < a < -2.29999999999999994e-178 or 1.3599999999999999e-40 < a Initial program 99.2%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 74.1%
if -6.7e-49 < a < -1.03999999999999996e-165 or -6.00000000000000048e-306 < a < 2.7000000000000001e-160Initial program 99.6%
*-commutative99.6%
associate-/l*99.6%
fma-define99.6%
sub-neg99.6%
+-commutative99.6%
neg-sub099.6%
associate-+l-99.6%
sub0-neg99.6%
distribute-frac-neg299.6%
distribute-neg-frac99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around inf 54.1%
if -2.29999999999999994e-178 < a < -6.00000000000000048e-306 or 2.7000000000000001e-160 < a < 1.3599999999999999e-40Initial program 99.7%
*-commutative99.7%
associate-/l*99.7%
fma-define99.7%
sub-neg99.7%
+-commutative99.7%
neg-sub099.7%
associate-+l-99.7%
sub0-neg99.7%
distribute-frac-neg299.7%
distribute-neg-frac99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 56.8%
Final simplification66.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= (* a 120.0) -2e-176) (not (<= (* a 120.0) 2e-38))) (+ (* 60.0 (/ x (- z t))) (* a 120.0)) (* -60.0 (/ (- x y) (- t z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((a * 120.0) <= -2e-176) || !((a * 120.0) <= 2e-38)) {
tmp = (60.0 * (x / (z - t))) + (a * 120.0);
} else {
tmp = -60.0 * ((x - 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 (((a * 120.0d0) <= (-2d-176)) .or. (.not. ((a * 120.0d0) <= 2d-38))) then
tmp = (60.0d0 * (x / (z - t))) + (a * 120.0d0)
else
tmp = (-60.0d0) * ((x - 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 (((a * 120.0) <= -2e-176) || !((a * 120.0) <= 2e-38)) {
tmp = (60.0 * (x / (z - t))) + (a * 120.0);
} else {
tmp = -60.0 * ((x - y) / (t - z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if ((a * 120.0) <= -2e-176) or not ((a * 120.0) <= 2e-38): tmp = (60.0 * (x / (z - t))) + (a * 120.0) else: tmp = -60.0 * ((x - y) / (t - z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((Float64(a * 120.0) <= -2e-176) || !(Float64(a * 120.0) <= 2e-38)) tmp = Float64(Float64(60.0 * Float64(x / Float64(z - t))) + Float64(a * 120.0)); else tmp = Float64(-60.0 * Float64(Float64(x - y) / Float64(t - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (((a * 120.0) <= -2e-176) || ~(((a * 120.0) <= 2e-38))) tmp = (60.0 * (x / (z - t))) + (a * 120.0); else tmp = -60.0 * ((x - y) / (t - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[N[(a * 120.0), $MachinePrecision], -2e-176], N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 2e-38]], $MachinePrecision]], N[(N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -2 \cdot 10^{-176} \lor \neg \left(a \cdot 120 \leq 2 \cdot 10^{-38}\right):\\
\;\;\;\;60 \cdot \frac{x}{z - t} + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t - z}\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -2e-176 or 1.9999999999999999e-38 < (*.f64 a #s(literal 120 binary64)) Initial program 99.3%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 86.3%
if -2e-176 < (*.f64 a #s(literal 120 binary64)) < 1.9999999999999999e-38Initial program 99.6%
*-commutative99.6%
associate-/l*99.7%
fma-define99.7%
sub-neg99.7%
+-commutative99.7%
neg-sub099.7%
associate-+l-99.7%
sub0-neg99.7%
distribute-frac-neg299.7%
distribute-neg-frac99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in a around 0 80.7%
Final simplification84.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -1.5e+91) (not (<= x 2.1e+93))) (+ (* 60.0 (/ x (- z t))) (* a 120.0)) (+ (/ (* y -60.0) (- z t)) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -1.5e+91) || !(x <= 2.1e+93)) {
tmp = (60.0 * (x / (z - t))) + (a * 120.0);
} else {
tmp = ((y * -60.0) / (z - t)) + (a * 120.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((x <= (-1.5d+91)) .or. (.not. (x <= 2.1d+93))) then
tmp = (60.0d0 * (x / (z - t))) + (a * 120.0d0)
else
tmp = ((y * (-60.0d0)) / (z - t)) + (a * 120.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -1.5e+91) || !(x <= 2.1e+93)) {
tmp = (60.0 * (x / (z - t))) + (a * 120.0);
} else {
tmp = ((y * -60.0) / (z - t)) + (a * 120.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -1.5e+91) or not (x <= 2.1e+93): tmp = (60.0 * (x / (z - t))) + (a * 120.0) else: tmp = ((y * -60.0) / (z - t)) + (a * 120.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -1.5e+91) || !(x <= 2.1e+93)) tmp = Float64(Float64(60.0 * Float64(x / Float64(z - t))) + Float64(a * 120.0)); else tmp = Float64(Float64(Float64(y * -60.0) / Float64(z - t)) + Float64(a * 120.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -1.5e+91) || ~((x <= 2.1e+93))) tmp = (60.0 * (x / (z - t))) + (a * 120.0); else tmp = ((y * -60.0) / (z - t)) + (a * 120.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -1.5e+91], N[Not[LessEqual[x, 2.1e+93]], $MachinePrecision]], N[(N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.5 \cdot 10^{+91} \lor \neg \left(x \leq 2.1 \cdot 10^{+93}\right):\\
\;\;\;\;60 \cdot \frac{x}{z - t} + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot -60}{z - t} + a \cdot 120\\
\end{array}
\end{array}
if x < -1.50000000000000003e91 or 2.0999999999999998e93 < x Initial program 98.4%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 95.0%
if -1.50000000000000003e91 < x < 2.0999999999999998e93Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 92.8%
associate-*r/92.7%
Simplified92.7%
Final simplification93.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -7.6e+35) (not (<= a 3.35e-37))) (* a 120.0) (* -60.0 (/ (- x y) (- t z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -7.6e+35) || !(a <= 3.35e-37)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * ((x - 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 ((a <= (-7.6d+35)) .or. (.not. (a <= 3.35d-37))) then
tmp = a * 120.0d0
else
tmp = (-60.0d0) * ((x - 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 ((a <= -7.6e+35) || !(a <= 3.35e-37)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * ((x - y) / (t - z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -7.6e+35) or not (a <= 3.35e-37): tmp = a * 120.0 else: tmp = -60.0 * ((x - y) / (t - z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -7.6e+35) || !(a <= 3.35e-37)) tmp = Float64(a * 120.0); else tmp = Float64(-60.0 * Float64(Float64(x - y) / Float64(t - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -7.6e+35) || ~((a <= 3.35e-37))) tmp = a * 120.0; else tmp = -60.0 * ((x - y) / (t - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -7.6e+35], N[Not[LessEqual[a, 3.35e-37]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -7.6 \cdot 10^{+35} \lor \neg \left(a \leq 3.35 \cdot 10^{-37}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t - z}\\
\end{array}
\end{array}
if a < -7.5999999999999999e35 or 3.35e-37 < a Initial program 99.1%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 77.8%
if -7.5999999999999999e35 < a < 3.35e-37Initial program 99.7%
*-commutative99.7%
associate-/l*99.7%
fma-define99.7%
sub-neg99.7%
+-commutative99.7%
neg-sub099.7%
associate-+l-99.7%
sub0-neg99.7%
distribute-frac-neg299.7%
distribute-neg-frac99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in a around 0 74.6%
Final simplification76.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -9.2e+132) (not (<= x 2.4e+193))) (* -60.0 (/ x (- t z))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -9.2e+132) || !(x <= 2.4e+193)) {
tmp = -60.0 * (x / (t - 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 ((x <= (-9.2d+132)) .or. (.not. (x <= 2.4d+193))) then
tmp = (-60.0d0) * (x / (t - 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 ((x <= -9.2e+132) || !(x <= 2.4e+193)) {
tmp = -60.0 * (x / (t - z));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -9.2e+132) or not (x <= 2.4e+193): tmp = -60.0 * (x / (t - z)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -9.2e+132) || !(x <= 2.4e+193)) tmp = Float64(-60.0 * Float64(x / Float64(t - z))); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -9.2e+132) || ~((x <= 2.4e+193))) tmp = -60.0 * (x / (t - z)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -9.2e+132], N[Not[LessEqual[x, 2.4e+193]], $MachinePrecision]], N[(-60.0 * N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -9.2 \cdot 10^{+132} \lor \neg \left(x \leq 2.4 \cdot 10^{+193}\right):\\
\;\;\;\;-60 \cdot \frac{x}{t - z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if x < -9.2000000000000006e132 or 2.4e193 < x Initial program 97.7%
*-commutative97.7%
associate-/l*99.6%
fma-define99.6%
sub-neg99.6%
+-commutative99.6%
neg-sub099.6%
associate-+l-99.6%
sub0-neg99.6%
distribute-frac-neg299.6%
distribute-neg-frac99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around inf 71.4%
if -9.2000000000000006e132 < x < 2.4e193Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 58.0%
Final simplification60.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -6.2e+215) (not (<= y 4.5e+166))) (* -60.0 (/ y z)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -6.2e+215) || !(y <= 4.5e+166)) {
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 <= (-6.2d+215)) .or. (.not. (y <= 4.5d+166))) 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 <= -6.2e+215) || !(y <= 4.5e+166)) {
tmp = -60.0 * (y / z);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -6.2e+215) or not (y <= 4.5e+166): tmp = -60.0 * (y / z) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -6.2e+215) || !(y <= 4.5e+166)) 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 <= -6.2e+215) || ~((y <= 4.5e+166))) 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, -6.2e+215], N[Not[LessEqual[y, 4.5e+166]], $MachinePrecision]], N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.2 \cdot 10^{+215} \lor \neg \left(y \leq 4.5 \cdot 10^{+166}\right):\\
\;\;\;\;-60 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if y < -6.1999999999999998e215 or 4.5000000000000003e166 < y Initial program 99.8%
*-commutative99.8%
associate-/l*99.7%
fma-define99.7%
sub-neg99.7%
+-commutative99.7%
neg-sub099.7%
associate-+l-99.7%
sub0-neg99.7%
distribute-frac-neg299.7%
distribute-neg-frac99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 66.2%
associate-*r/66.1%
Simplified66.1%
Taylor expanded in t around 0 43.1%
if -6.1999999999999998e215 < y < 4.5000000000000003e166Initial program 99.3%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 57.8%
Final simplification55.1%
(FPCore (x y z t a) :precision binary64 (if (<= x -1.7e+154) (* 60.0 (/ x z)) (if (<= x 2.6e+193) (* a 120.0) (* -60.0 (/ x t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -1.7e+154) {
tmp = 60.0 * (x / z);
} else if (x <= 2.6e+193) {
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 (x <= (-1.7d+154)) then
tmp = 60.0d0 * (x / z)
else if (x <= 2.6d+193) 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 (x <= -1.7e+154) {
tmp = 60.0 * (x / z);
} else if (x <= 2.6e+193) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (x / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -1.7e+154: tmp = 60.0 * (x / z) elif x <= 2.6e+193: tmp = a * 120.0 else: tmp = -60.0 * (x / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -1.7e+154) tmp = Float64(60.0 * Float64(x / z)); elseif (x <= 2.6e+193) 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 (x <= -1.7e+154) tmp = 60.0 * (x / z); elseif (x <= 2.6e+193) tmp = a * 120.0; else tmp = -60.0 * (x / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -1.7e+154], N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.6e+193], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.7 \cdot 10^{+154}:\\
\;\;\;\;60 \cdot \frac{x}{z}\\
\mathbf{elif}\;x \leq 2.6 \cdot 10^{+193}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{x}{t}\\
\end{array}
\end{array}
if x < -1.69999999999999987e154Initial program 96.7%
*-commutative96.7%
associate-/l*99.6%
fma-define99.6%
sub-neg99.6%
+-commutative99.6%
neg-sub099.6%
associate-+l-99.6%
sub0-neg99.6%
distribute-frac-neg299.6%
distribute-neg-frac99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around inf 68.9%
Taylor expanded in t around 0 47.0%
if -1.69999999999999987e154 < x < 2.60000000000000013e193Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 57.7%
if 2.60000000000000013e193 < x Initial program 99.5%
*-commutative99.5%
associate-/l*99.5%
fma-define99.5%
sub-neg99.5%
+-commutative99.5%
neg-sub099.5%
associate-+l-99.5%
sub0-neg99.5%
distribute-frac-neg299.5%
distribute-neg-frac99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 74.6%
Taylor expanded in t around inf 57.6%
Final simplification56.3%
(FPCore (x y z t a) :precision binary64 (if (<= x 1.06e+194) (* a 120.0) (* -60.0 (/ x t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= 1.06e+194) {
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 (x <= 1.06d+194) 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 (x <= 1.06e+194) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (x / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= 1.06e+194: tmp = a * 120.0 else: tmp = -60.0 * (x / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= 1.06e+194) 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 (x <= 1.06e+194) tmp = a * 120.0; else tmp = -60.0 * (x / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, 1.06e+194], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.06 \cdot 10^{+194}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{x}{t}\\
\end{array}
\end{array}
if x < 1.0599999999999999e194Initial program 99.4%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 53.0%
if 1.0599999999999999e194 < x Initial program 99.5%
*-commutative99.5%
associate-/l*99.5%
fma-define99.5%
sub-neg99.5%
+-commutative99.5%
neg-sub099.5%
associate-+l-99.5%
sub0-neg99.5%
distribute-frac-neg299.5%
distribute-neg-frac99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 74.6%
Taylor expanded in t around inf 57.6%
Final simplification53.3%
(FPCore (x y z t a) :precision binary64 (* a 120.0))
double code(double x, double y, double z, double t, double a) {
return a * 120.0;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = a * 120.0d0
end function
public static double code(double x, double y, double z, double t, double a) {
return a * 120.0;
}
def code(x, y, z, t, a): return a * 120.0
function code(x, y, z, t, a) return Float64(a * 120.0) end
function tmp = code(x, y, z, t, a) tmp = a * 120.0; end
code[x_, y_, z_, t_, a_] := N[(a * 120.0), $MachinePrecision]
\begin{array}{l}
\\
a \cdot 120
\end{array}
Initial program 99.4%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 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 2024115
(FPCore (x y z t a)
:name "Data.Colour.RGB:hslsv from colour-2.3.3, B"
:precision binary64
:alt
(+ (/ 60.0 (/ (- z t) (- x y))) (* a 120.0))
(+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))