
(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.4%
associate-/l*99.8%
Simplified99.8%
+-commutative99.8%
fma-define99.8%
associate-*r/99.5%
*-commutative99.5%
associate-/l*99.8%
Applied egg-rr99.8%
Final simplification99.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* 60.0 (/ (- x y) (- z t))))
(t_2 (+ (* a 120.0) (* -60.0 (/ x t)))))
(if (<= (* a 120.0) -2e+128)
(+ (* a 120.0) (* 60.0 (/ y t)))
(if (<= (* a 120.0) -8e+54)
(+ (* a 120.0) (/ (* y -60.0) z))
(if (<= (* a 120.0) -1e-59)
t_2
(if (<= (* a 120.0) 5e-33)
t_1
(if (<= (* a 120.0) 2e-13)
t_2
(if (<= (* a 120.0) 2e+28) t_1 (* a 120.0)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * ((x - y) / (z - t));
double t_2 = (a * 120.0) + (-60.0 * (x / t));
double tmp;
if ((a * 120.0) <= -2e+128) {
tmp = (a * 120.0) + (60.0 * (y / t));
} else if ((a * 120.0) <= -8e+54) {
tmp = (a * 120.0) + ((y * -60.0) / z);
} else if ((a * 120.0) <= -1e-59) {
tmp = t_2;
} else if ((a * 120.0) <= 5e-33) {
tmp = t_1;
} else if ((a * 120.0) <= 2e-13) {
tmp = t_2;
} else if ((a * 120.0) <= 2e+28) {
tmp = t_1;
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 60.0d0 * ((x - y) / (z - t))
t_2 = (a * 120.0d0) + ((-60.0d0) * (x / t))
if ((a * 120.0d0) <= (-2d+128)) then
tmp = (a * 120.0d0) + (60.0d0 * (y / t))
else if ((a * 120.0d0) <= (-8d+54)) then
tmp = (a * 120.0d0) + ((y * (-60.0d0)) / z)
else if ((a * 120.0d0) <= (-1d-59)) then
tmp = t_2
else if ((a * 120.0d0) <= 5d-33) then
tmp = t_1
else if ((a * 120.0d0) <= 2d-13) then
tmp = t_2
else if ((a * 120.0d0) <= 2d+28) then
tmp = t_1
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * ((x - y) / (z - t));
double t_2 = (a * 120.0) + (-60.0 * (x / t));
double tmp;
if ((a * 120.0) <= -2e+128) {
tmp = (a * 120.0) + (60.0 * (y / t));
} else if ((a * 120.0) <= -8e+54) {
tmp = (a * 120.0) + ((y * -60.0) / z);
} else if ((a * 120.0) <= -1e-59) {
tmp = t_2;
} else if ((a * 120.0) <= 5e-33) {
tmp = t_1;
} else if ((a * 120.0) <= 2e-13) {
tmp = t_2;
} else if ((a * 120.0) <= 2e+28) {
tmp = t_1;
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = 60.0 * ((x - y) / (z - t)) t_2 = (a * 120.0) + (-60.0 * (x / t)) tmp = 0 if (a * 120.0) <= -2e+128: tmp = (a * 120.0) + (60.0 * (y / t)) elif (a * 120.0) <= -8e+54: tmp = (a * 120.0) + ((y * -60.0) / z) elif (a * 120.0) <= -1e-59: tmp = t_2 elif (a * 120.0) <= 5e-33: tmp = t_1 elif (a * 120.0) <= 2e-13: tmp = t_2 elif (a * 120.0) <= 2e+28: tmp = t_1 else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) t_1 = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))) t_2 = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(x / t))) tmp = 0.0 if (Float64(a * 120.0) <= -2e+128) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(y / t))); elseif (Float64(a * 120.0) <= -8e+54) tmp = Float64(Float64(a * 120.0) + Float64(Float64(y * -60.0) / z)); elseif (Float64(a * 120.0) <= -1e-59) tmp = t_2; elseif (Float64(a * 120.0) <= 5e-33) tmp = t_1; elseif (Float64(a * 120.0) <= 2e-13) tmp = t_2; elseif (Float64(a * 120.0) <= 2e+28) tmp = t_1; else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = 60.0 * ((x - y) / (z - t)); t_2 = (a * 120.0) + (-60.0 * (x / t)); tmp = 0.0; if ((a * 120.0) <= -2e+128) tmp = (a * 120.0) + (60.0 * (y / t)); elseif ((a * 120.0) <= -8e+54) tmp = (a * 120.0) + ((y * -60.0) / z); elseif ((a * 120.0) <= -1e-59) tmp = t_2; elseif ((a * 120.0) <= 5e-33) tmp = t_1; elseif ((a * 120.0) <= 2e-13) tmp = t_2; elseif ((a * 120.0) <= 2e+28) tmp = t_1; else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * 120.0), $MachinePrecision], -2e+128], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], -8e+54], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(y * -60.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], -1e-59], t$95$2, If[LessEqual[N[(a * 120.0), $MachinePrecision], 5e-33], t$95$1, If[LessEqual[N[(a * 120.0), $MachinePrecision], 2e-13], t$95$2, If[LessEqual[N[(a * 120.0), $MachinePrecision], 2e+28], t$95$1, N[(a * 120.0), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 60 \cdot \frac{x - y}{z - t}\\
t_2 := a \cdot 120 + -60 \cdot \frac{x}{t}\\
\mathbf{if}\;a \cdot 120 \leq -2 \cdot 10^{+128}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t}\\
\mathbf{elif}\;a \cdot 120 \leq -8 \cdot 10^{+54}:\\
\;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z}\\
\mathbf{elif}\;a \cdot 120 \leq -1 \cdot 10^{-59}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-33}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{-13}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{+28}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a 120) < -2.0000000000000002e128Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around 0 82.3%
Taylor expanded in x around 0 97.0%
if -2.0000000000000002e128 < (*.f64 a 120) < -8.0000000000000006e54Initial program 100.0%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in z around inf 85.8%
associate-*r/23.2%
Simplified85.8%
Taylor expanded in x around 0 92.9%
if -8.0000000000000006e54 < (*.f64 a 120) < -1e-59 or 5.00000000000000028e-33 < (*.f64 a 120) < 2.0000000000000001e-13Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around inf 93.1%
Taylor expanded in z around 0 79.8%
if -1e-59 < (*.f64 a 120) < 5.00000000000000028e-33 or 2.0000000000000001e-13 < (*.f64 a 120) < 1.99999999999999992e28Initial program 98.8%
associate-/l*99.7%
Simplified99.7%
+-commutative99.7%
fma-define99.7%
associate-*r/98.8%
*-commutative98.8%
associate-/l*99.6%
Applied egg-rr99.6%
Taylor expanded in a around 0 82.6%
if 1.99999999999999992e28 < (*.f64 a 120) Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 86.0%
Final simplification85.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* 60.0 (/ (- x y) (- z t))))
(t_2 (+ (* a 120.0) (* -60.0 (/ x t)))))
(if (<= (* a 120.0) -2e+128)
(* a (+ 120.0 (* 60.0 (/ y (* a t)))))
(if (<= (* a 120.0) -8e+54)
(+ (* a 120.0) (/ (* y -60.0) z))
(if (<= (* a 120.0) -1e-59)
t_2
(if (<= (* a 120.0) 5e-33)
t_1
(if (<= (* a 120.0) 2e-13)
t_2
(if (<= (* a 120.0) 2e+28) t_1 (* a 120.0)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * ((x - y) / (z - t));
double t_2 = (a * 120.0) + (-60.0 * (x / t));
double tmp;
if ((a * 120.0) <= -2e+128) {
tmp = a * (120.0 + (60.0 * (y / (a * t))));
} else if ((a * 120.0) <= -8e+54) {
tmp = (a * 120.0) + ((y * -60.0) / z);
} else if ((a * 120.0) <= -1e-59) {
tmp = t_2;
} else if ((a * 120.0) <= 5e-33) {
tmp = t_1;
} else if ((a * 120.0) <= 2e-13) {
tmp = t_2;
} else if ((a * 120.0) <= 2e+28) {
tmp = t_1;
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 60.0d0 * ((x - y) / (z - t))
t_2 = (a * 120.0d0) + ((-60.0d0) * (x / t))
if ((a * 120.0d0) <= (-2d+128)) then
tmp = a * (120.0d0 + (60.0d0 * (y / (a * t))))
else if ((a * 120.0d0) <= (-8d+54)) then
tmp = (a * 120.0d0) + ((y * (-60.0d0)) / z)
else if ((a * 120.0d0) <= (-1d-59)) then
tmp = t_2
else if ((a * 120.0d0) <= 5d-33) then
tmp = t_1
else if ((a * 120.0d0) <= 2d-13) then
tmp = t_2
else if ((a * 120.0d0) <= 2d+28) then
tmp = t_1
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * ((x - y) / (z - t));
double t_2 = (a * 120.0) + (-60.0 * (x / t));
double tmp;
if ((a * 120.0) <= -2e+128) {
tmp = a * (120.0 + (60.0 * (y / (a * t))));
} else if ((a * 120.0) <= -8e+54) {
tmp = (a * 120.0) + ((y * -60.0) / z);
} else if ((a * 120.0) <= -1e-59) {
tmp = t_2;
} else if ((a * 120.0) <= 5e-33) {
tmp = t_1;
} else if ((a * 120.0) <= 2e-13) {
tmp = t_2;
} else if ((a * 120.0) <= 2e+28) {
tmp = t_1;
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = 60.0 * ((x - y) / (z - t)) t_2 = (a * 120.0) + (-60.0 * (x / t)) tmp = 0 if (a * 120.0) <= -2e+128: tmp = a * (120.0 + (60.0 * (y / (a * t)))) elif (a * 120.0) <= -8e+54: tmp = (a * 120.0) + ((y * -60.0) / z) elif (a * 120.0) <= -1e-59: tmp = t_2 elif (a * 120.0) <= 5e-33: tmp = t_1 elif (a * 120.0) <= 2e-13: tmp = t_2 elif (a * 120.0) <= 2e+28: tmp = t_1 else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) t_1 = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))) t_2 = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(x / t))) tmp = 0.0 if (Float64(a * 120.0) <= -2e+128) tmp = Float64(a * Float64(120.0 + Float64(60.0 * Float64(y / Float64(a * t))))); elseif (Float64(a * 120.0) <= -8e+54) tmp = Float64(Float64(a * 120.0) + Float64(Float64(y * -60.0) / z)); elseif (Float64(a * 120.0) <= -1e-59) tmp = t_2; elseif (Float64(a * 120.0) <= 5e-33) tmp = t_1; elseif (Float64(a * 120.0) <= 2e-13) tmp = t_2; elseif (Float64(a * 120.0) <= 2e+28) tmp = t_1; else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = 60.0 * ((x - y) / (z - t)); t_2 = (a * 120.0) + (-60.0 * (x / t)); tmp = 0.0; if ((a * 120.0) <= -2e+128) tmp = a * (120.0 + (60.0 * (y / (a * t)))); elseif ((a * 120.0) <= -8e+54) tmp = (a * 120.0) + ((y * -60.0) / z); elseif ((a * 120.0) <= -1e-59) tmp = t_2; elseif ((a * 120.0) <= 5e-33) tmp = t_1; elseif ((a * 120.0) <= 2e-13) tmp = t_2; elseif ((a * 120.0) <= 2e+28) tmp = t_1; else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * 120.0), $MachinePrecision], -2e+128], N[(a * N[(120.0 + N[(60.0 * N[(y / N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], -8e+54], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(y * -60.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], -1e-59], t$95$2, If[LessEqual[N[(a * 120.0), $MachinePrecision], 5e-33], t$95$1, If[LessEqual[N[(a * 120.0), $MachinePrecision], 2e-13], t$95$2, If[LessEqual[N[(a * 120.0), $MachinePrecision], 2e+28], t$95$1, N[(a * 120.0), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 60 \cdot \frac{x - y}{z - t}\\
t_2 := a \cdot 120 + -60 \cdot \frac{x}{t}\\
\mathbf{if}\;a \cdot 120 \leq -2 \cdot 10^{+128}:\\
\;\;\;\;a \cdot \left(120 + 60 \cdot \frac{y}{a \cdot t}\right)\\
\mathbf{elif}\;a \cdot 120 \leq -8 \cdot 10^{+54}:\\
\;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z}\\
\mathbf{elif}\;a \cdot 120 \leq -1 \cdot 10^{-59}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-33}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{-13}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{+28}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a 120) < -2.0000000000000002e128Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in a around inf 100.0%
associate-*r/100.0%
*-commutative100.0%
times-frac99.9%
Simplified99.9%
Taylor expanded in z around 0 82.4%
*-commutative82.4%
Simplified82.4%
Taylor expanded in x around 0 97.1%
*-commutative97.1%
Simplified97.1%
if -2.0000000000000002e128 < (*.f64 a 120) < -8.0000000000000006e54Initial program 100.0%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in z around inf 85.8%
associate-*r/23.2%
Simplified85.8%
Taylor expanded in x around 0 92.9%
if -8.0000000000000006e54 < (*.f64 a 120) < -1e-59 or 5.00000000000000028e-33 < (*.f64 a 120) < 2.0000000000000001e-13Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around inf 93.1%
Taylor expanded in z around 0 79.8%
if -1e-59 < (*.f64 a 120) < 5.00000000000000028e-33 or 2.0000000000000001e-13 < (*.f64 a 120) < 1.99999999999999992e28Initial program 98.8%
associate-/l*99.7%
Simplified99.7%
+-commutative99.7%
fma-define99.7%
associate-*r/98.8%
*-commutative98.8%
associate-/l*99.6%
Applied egg-rr99.6%
Taylor expanded in a around 0 82.6%
if 1.99999999999999992e28 < (*.f64 a 120) Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 86.0%
Final simplification85.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* 60.0 (/ (- x y) (- z t)))))
(if (<= (* a 120.0) -1e-58)
(* a 120.0)
(if (<= (* a 120.0) 5e-33)
t_1
(if (<= (* a 120.0) 2e-13)
(+ (* a 120.0) (* -60.0 (/ x t)))
(if (<= (* a 120.0) 2e+28) t_1 (* a 120.0)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * ((x - y) / (z - t));
double tmp;
if ((a * 120.0) <= -1e-58) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 5e-33) {
tmp = t_1;
} else if ((a * 120.0) <= 2e-13) {
tmp = (a * 120.0) + (-60.0 * (x / t));
} else if ((a * 120.0) <= 2e+28) {
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 - y) / (z - t))
if ((a * 120.0d0) <= (-1d-58)) then
tmp = a * 120.0d0
else if ((a * 120.0d0) <= 5d-33) then
tmp = t_1
else if ((a * 120.0d0) <= 2d-13) then
tmp = (a * 120.0d0) + ((-60.0d0) * (x / t))
else if ((a * 120.0d0) <= 2d+28) then
tmp = t_1
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * ((x - y) / (z - t));
double tmp;
if ((a * 120.0) <= -1e-58) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 5e-33) {
tmp = t_1;
} else if ((a * 120.0) <= 2e-13) {
tmp = (a * 120.0) + (-60.0 * (x / t));
} else if ((a * 120.0) <= 2e+28) {
tmp = t_1;
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = 60.0 * ((x - y) / (z - t)) tmp = 0 if (a * 120.0) <= -1e-58: tmp = a * 120.0 elif (a * 120.0) <= 5e-33: tmp = t_1 elif (a * 120.0) <= 2e-13: tmp = (a * 120.0) + (-60.0 * (x / t)) elif (a * 120.0) <= 2e+28: tmp = t_1 else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) t_1 = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))) tmp = 0.0 if (Float64(a * 120.0) <= -1e-58) tmp = Float64(a * 120.0); elseif (Float64(a * 120.0) <= 5e-33) tmp = t_1; elseif (Float64(a * 120.0) <= 2e-13) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(x / t))); elseif (Float64(a * 120.0) <= 2e+28) tmp = t_1; else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = 60.0 * ((x - y) / (z - t)); tmp = 0.0; if ((a * 120.0) <= -1e-58) tmp = a * 120.0; elseif ((a * 120.0) <= 5e-33) tmp = t_1; elseif ((a * 120.0) <= 2e-13) tmp = (a * 120.0) + (-60.0 * (x / t)); elseif ((a * 120.0) <= 2e+28) tmp = t_1; else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * 120.0), $MachinePrecision], -1e-58], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 5e-33], t$95$1, If[LessEqual[N[(a * 120.0), $MachinePrecision], 2e-13], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 2e+28], t$95$1, N[(a * 120.0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 60 \cdot \frac{x - y}{z - t}\\
\mathbf{if}\;a \cdot 120 \leq -1 \cdot 10^{-58}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-33}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{-13}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{x}{t}\\
\mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{+28}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a 120) < -1e-58 or 1.99999999999999992e28 < (*.f64 a 120) Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 83.7%
if -1e-58 < (*.f64 a 120) < 5.00000000000000028e-33 or 2.0000000000000001e-13 < (*.f64 a 120) < 1.99999999999999992e28Initial program 98.8%
associate-/l*99.7%
Simplified99.7%
+-commutative99.7%
fma-define99.7%
associate-*r/98.8%
*-commutative98.8%
associate-/l*99.6%
Applied egg-rr99.6%
Taylor expanded in a around 0 82.5%
if 5.00000000000000028e-33 < (*.f64 a 120) < 2.0000000000000001e-13Initial program 99.5%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around inf 99.7%
Taylor expanded in z around 0 99.7%
Final simplification83.6%
(FPCore (x y z t a)
:precision binary64
(if (<= a -7.2e-120)
(* a 120.0)
(if (<= a -6e-221)
(* -60.0 (/ (- x y) t))
(if (<= a -2.5e-295)
(/ (* (- x y) 60.0) z)
(if (<= a 6.2e-52) (* -60.0 (/ y (- z t))) (* a 120.0))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -7.2e-120) {
tmp = a * 120.0;
} else if (a <= -6e-221) {
tmp = -60.0 * ((x - y) / t);
} else if (a <= -2.5e-295) {
tmp = ((x - y) * 60.0) / z;
} else if (a <= 6.2e-52) {
tmp = -60.0 * (y / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-7.2d-120)) then
tmp = a * 120.0d0
else if (a <= (-6d-221)) then
tmp = (-60.0d0) * ((x - y) / t)
else if (a <= (-2.5d-295)) then
tmp = ((x - y) * 60.0d0) / z
else if (a <= 6.2d-52) then
tmp = (-60.0d0) * (y / (z - t))
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -7.2e-120) {
tmp = a * 120.0;
} else if (a <= -6e-221) {
tmp = -60.0 * ((x - y) / t);
} else if (a <= -2.5e-295) {
tmp = ((x - y) * 60.0) / z;
} else if (a <= 6.2e-52) {
tmp = -60.0 * (y / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -7.2e-120: tmp = a * 120.0 elif a <= -6e-221: tmp = -60.0 * ((x - y) / t) elif a <= -2.5e-295: tmp = ((x - y) * 60.0) / z elif a <= 6.2e-52: tmp = -60.0 * (y / (z - t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -7.2e-120) tmp = Float64(a * 120.0); elseif (a <= -6e-221) tmp = Float64(-60.0 * Float64(Float64(x - y) / t)); elseif (a <= -2.5e-295) tmp = Float64(Float64(Float64(x - y) * 60.0) / z); elseif (a <= 6.2e-52) tmp = Float64(-60.0 * Float64(y / Float64(z - t))); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -7.2e-120) tmp = a * 120.0; elseif (a <= -6e-221) tmp = -60.0 * ((x - y) / t); elseif (a <= -2.5e-295) tmp = ((x - y) * 60.0) / z; elseif (a <= 6.2e-52) tmp = -60.0 * (y / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -7.2e-120], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -6e-221], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -2.5e-295], N[(N[(N[(x - y), $MachinePrecision] * 60.0), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[a, 6.2e-52], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -7.2 \cdot 10^{-120}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -6 \cdot 10^{-221}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\
\mathbf{elif}\;a \leq -2.5 \cdot 10^{-295}:\\
\;\;\;\;\frac{\left(x - y\right) \cdot 60}{z}\\
\mathbf{elif}\;a \leq 6.2 \cdot 10^{-52}:\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -7.2000000000000005e-120 or 6.1999999999999998e-52 < a Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 76.6%
if -7.2000000000000005e-120 < a < -6.0000000000000003e-221Initial program 94.9%
associate-/l*99.5%
Simplified99.5%
+-commutative99.5%
fma-define99.5%
associate-*r/94.9%
*-commutative94.9%
associate-/l*99.5%
Applied egg-rr99.5%
Taylor expanded in a around 0 88.3%
Taylor expanded in z around 0 66.1%
if -6.0000000000000003e-221 < a < -2.50000000000000004e-295Initial program 99.5%
associate-/l*99.6%
Simplified99.6%
+-commutative99.6%
fma-define99.6%
associate-*r/99.5%
*-commutative99.5%
associate-/l*99.5%
Applied egg-rr99.5%
Taylor expanded in a around 0 84.1%
Taylor expanded in z around inf 76.3%
associate-*r/76.1%
Simplified76.1%
if -2.50000000000000004e-295 < a < 6.1999999999999998e-52Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
+-commutative99.8%
fma-define99.8%
associate-*r/99.8%
*-commutative99.8%
associate-/l*99.6%
Applied egg-rr99.6%
Taylor expanded in a around 0 87.1%
Taylor expanded in x around 0 57.6%
Final simplification72.1%
(FPCore (x y z t a)
:precision binary64
(if (<= a -8.5e-120)
(* a 120.0)
(if (<= a -1.04e-218)
(* x (/ 60.0 (- t)))
(if (<= a -5e-294)
(/ (* x 60.0) z)
(if (<= a 2.3e-168) (* -60.0 (/ y (- t))) (* a 120.0))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -8.5e-120) {
tmp = a * 120.0;
} else if (a <= -1.04e-218) {
tmp = x * (60.0 / -t);
} else if (a <= -5e-294) {
tmp = (x * 60.0) / z;
} else if (a <= 2.3e-168) {
tmp = -60.0 * (y / -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 <= (-8.5d-120)) then
tmp = a * 120.0d0
else if (a <= (-1.04d-218)) then
tmp = x * (60.0d0 / -t)
else if (a <= (-5d-294)) then
tmp = (x * 60.0d0) / z
else if (a <= 2.3d-168) then
tmp = (-60.0d0) * (y / -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 <= -8.5e-120) {
tmp = a * 120.0;
} else if (a <= -1.04e-218) {
tmp = x * (60.0 / -t);
} else if (a <= -5e-294) {
tmp = (x * 60.0) / z;
} else if (a <= 2.3e-168) {
tmp = -60.0 * (y / -t);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -8.5e-120: tmp = a * 120.0 elif a <= -1.04e-218: tmp = x * (60.0 / -t) elif a <= -5e-294: tmp = (x * 60.0) / z elif a <= 2.3e-168: tmp = -60.0 * (y / -t) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -8.5e-120) tmp = Float64(a * 120.0); elseif (a <= -1.04e-218) tmp = Float64(x * Float64(60.0 / Float64(-t))); elseif (a <= -5e-294) tmp = Float64(Float64(x * 60.0) / z); elseif (a <= 2.3e-168) tmp = Float64(-60.0 * Float64(y / Float64(-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 <= -8.5e-120) tmp = a * 120.0; elseif (a <= -1.04e-218) tmp = x * (60.0 / -t); elseif (a <= -5e-294) tmp = (x * 60.0) / z; elseif (a <= 2.3e-168) tmp = -60.0 * (y / -t); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -8.5e-120], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -1.04e-218], N[(x * N[(60.0 / (-t)), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -5e-294], N[(N[(x * 60.0), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[a, 2.3e-168], N[(-60.0 * N[(y / (-t)), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -8.5 \cdot 10^{-120}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -1.04 \cdot 10^{-218}:\\
\;\;\;\;x \cdot \frac{60}{-t}\\
\mathbf{elif}\;a \leq -5 \cdot 10^{-294}:\\
\;\;\;\;\frac{x \cdot 60}{z}\\
\mathbf{elif}\;a \leq 2.3 \cdot 10^{-168}:\\
\;\;\;\;-60 \cdot \frac{y}{-t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -8.50000000000000059e-120 or 2.29999999999999986e-168 < a Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 72.3%
if -8.50000000000000059e-120 < a < -1.04000000000000001e-218Initial program 94.8%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in x around inf 59.0%
Taylor expanded in x around -inf 58.9%
associate-*r*58.9%
neg-mul-158.9%
*-commutative58.9%
associate-*r/58.8%
metadata-eval58.8%
Simplified58.8%
Taylor expanded in z around 0 51.1%
Taylor expanded in a around 0 39.0%
if -1.04000000000000001e-218 < a < -5.0000000000000003e-294Initial program 99.4%
associate-/l*99.5%
Simplified99.5%
+-commutative99.5%
fma-define99.5%
associate-*r/99.4%
*-commutative99.4%
associate-/l*99.5%
Applied egg-rr99.5%
Taylor expanded in a around 0 85.2%
Taylor expanded in z around inf 70.5%
associate-*r/70.3%
Simplified70.3%
Taylor expanded in x around inf 41.6%
if -5.0000000000000003e-294 < a < 2.29999999999999986e-168Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
+-commutative99.7%
fma-define99.7%
associate-*r/99.8%
*-commutative99.8%
associate-/l*99.6%
Applied egg-rr99.6%
Taylor expanded in a around 0 91.6%
Taylor expanded in x around 0 61.4%
Taylor expanded in z around 0 41.4%
associate-*r/41.4%
neg-mul-141.4%
Simplified41.4%
Final simplification64.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= (* a 120.0) -2e-117) (not (<= (* a 120.0) 5e-33))) (+ (* a 120.0) (* -60.0 (/ y (- z t)))) (* 60.0 (/ (- x y) (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((a * 120.0) <= -2e-117) || !((a * 120.0) <= 5e-33)) {
tmp = (a * 120.0) + (-60.0 * (y / (z - t)));
} else {
tmp = 60.0 * ((x - y) / (z - t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (((a * 120.0d0) <= (-2d-117)) .or. (.not. ((a * 120.0d0) <= 5d-33))) then
tmp = (a * 120.0d0) + ((-60.0d0) * (y / (z - t)))
else
tmp = 60.0d0 * ((x - y) / (z - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (((a * 120.0) <= -2e-117) || !((a * 120.0) <= 5e-33)) {
tmp = (a * 120.0) + (-60.0 * (y / (z - t)));
} else {
tmp = 60.0 * ((x - y) / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if ((a * 120.0) <= -2e-117) or not ((a * 120.0) <= 5e-33): tmp = (a * 120.0) + (-60.0 * (y / (z - t))) else: tmp = 60.0 * ((x - y) / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((Float64(a * 120.0) <= -2e-117) || !(Float64(a * 120.0) <= 5e-33)) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / Float64(z - t)))); else tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (((a * 120.0) <= -2e-117) || ~(((a * 120.0) <= 5e-33))) tmp = (a * 120.0) + (-60.0 * (y / (z - t))); else tmp = 60.0 * ((x - y) / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[N[(a * 120.0), $MachinePrecision], -2e-117], N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 5e-33]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -2 \cdot 10^{-117} \lor \neg \left(a \cdot 120 \leq 5 \cdot 10^{-33}\right):\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\end{array}
\end{array}
if (*.f64 a 120) < -2.00000000000000006e-117 or 5.00000000000000028e-33 < (*.f64 a 120) Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 89.9%
if -2.00000000000000006e-117 < (*.f64 a 120) < 5.00000000000000028e-33Initial program 98.6%
associate-/l*99.7%
Simplified99.7%
+-commutative99.7%
fma-define99.7%
associate-*r/98.6%
*-commutative98.6%
associate-/l*99.6%
Applied egg-rr99.6%
Taylor expanded in a around 0 85.6%
Final simplification88.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.2e-46) (not (<= z 6e-41))) (+ (* a 120.0) (* -60.0 (/ y (- z t)))) (+ (* a 120.0) (* -60.0 (/ (- x y) t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.2e-46) || !(z <= 6e-41)) {
tmp = (a * 120.0) + (-60.0 * (y / (z - t)));
} else {
tmp = (a * 120.0) + (-60.0 * ((x - y) / t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-1.2d-46)) .or. (.not. (z <= 6d-41))) then
tmp = (a * 120.0d0) + ((-60.0d0) * (y / (z - t)))
else
tmp = (a * 120.0d0) + ((-60.0d0) * ((x - y) / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.2e-46) || !(z <= 6e-41)) {
tmp = (a * 120.0) + (-60.0 * (y / (z - t)));
} else {
tmp = (a * 120.0) + (-60.0 * ((x - y) / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.2e-46) or not (z <= 6e-41): tmp = (a * 120.0) + (-60.0 * (y / (z - t))) else: tmp = (a * 120.0) + (-60.0 * ((x - y) / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.2e-46) || !(z <= 6e-41)) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / Float64(z - t)))); else tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(Float64(x - y) / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.2e-46) || ~((z <= 6e-41))) tmp = (a * 120.0) + (-60.0 * (y / (z - t))); else tmp = (a * 120.0) + (-60.0 * ((x - y) / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.2e-46], N[Not[LessEqual[z, 6e-41]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.2 \cdot 10^{-46} \lor \neg \left(z \leq 6 \cdot 10^{-41}\right):\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{x - y}{t}\\
\end{array}
\end{array}
if z < -1.20000000000000007e-46 or 5.99999999999999978e-41 < z Initial program 99.2%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 87.6%
if -1.20000000000000007e-46 < z < 5.99999999999999978e-41Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in z around 0 93.3%
Final simplification90.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -1.8e-15) (not (<= y 9.2e+111))) (+ (* a 120.0) (* -60.0 (/ 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 <= -1.8e-15) || !(y <= 9.2e+111)) {
tmp = (a * 120.0) + (-60.0 * (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 <= (-1.8d-15)) .or. (.not. (y <= 9.2d+111))) then
tmp = (a * 120.0d0) + ((-60.0d0) * (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 <= -1.8e-15) || !(y <= 9.2e+111)) {
tmp = (a * 120.0) + (-60.0 * (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 <= -1.8e-15) or not (y <= 9.2e+111): tmp = (a * 120.0) + (-60.0 * (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 <= -1.8e-15) || !(y <= 9.2e+111)) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(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 <= -1.8e-15) || ~((y <= 9.2e+111))) tmp = (a * 120.0) + (-60.0 * (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, -1.8e-15], N[Not[LessEqual[y, 9.2e+111]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / N[(z - t), $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 -1.8 \cdot 10^{-15} \lor \neg \left(y \leq 9.2 \cdot 10^{+111}\right):\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{x}{z - t}\\
\end{array}
\end{array}
if y < -1.8000000000000001e-15 or 9.20000000000000008e111 < y Initial program 98.9%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around 0 91.1%
if -1.8000000000000001e-15 < y < 9.20000000000000008e111Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 93.9%
Final simplification92.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -1.8e-15) (not (<= y 3e+111))) (+ (* a 120.0) (* -60.0 (/ y (- z t)))) (+ (* a 120.0) (/ (* x 60.0) (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.8e-15) || !(y <= 3e+111)) {
tmp = (a * 120.0) + (-60.0 * (y / (z - t)));
} else {
tmp = (a * 120.0) + ((x * 60.0) / (z - t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((y <= (-1.8d-15)) .or. (.not. (y <= 3d+111))) then
tmp = (a * 120.0d0) + ((-60.0d0) * (y / (z - t)))
else
tmp = (a * 120.0d0) + ((x * 60.0d0) / (z - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.8e-15) || !(y <= 3e+111)) {
tmp = (a * 120.0) + (-60.0 * (y / (z - t)));
} else {
tmp = (a * 120.0) + ((x * 60.0) / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -1.8e-15) or not (y <= 3e+111): tmp = (a * 120.0) + (-60.0 * (y / (z - t))) else: tmp = (a * 120.0) + ((x * 60.0) / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -1.8e-15) || !(y <= 3e+111)) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / Float64(z - t)))); else tmp = Float64(Float64(a * 120.0) + Float64(Float64(x * 60.0) / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -1.8e-15) || ~((y <= 3e+111))) tmp = (a * 120.0) + (-60.0 * (y / (z - t))); else tmp = (a * 120.0) + ((x * 60.0) / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -1.8e-15], N[Not[LessEqual[y, 3e+111]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(x * 60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.8 \cdot 10^{-15} \lor \neg \left(y \leq 3 \cdot 10^{+111}\right):\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{x \cdot 60}{z - t}\\
\end{array}
\end{array}
if y < -1.8000000000000001e-15 or 3e111 < y Initial program 98.9%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around 0 91.1%
if -1.8000000000000001e-15 < y < 3e111Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 93.9%
associate-*r/93.9%
Simplified93.9%
Final simplification92.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -5.3e-61) (not (<= a 1.05e+27))) (* 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 <= -5.3e-61) || !(a <= 1.05e+27)) {
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 <= (-5.3d-61)) .or. (.not. (a <= 1.05d+27))) 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 <= -5.3e-61) || !(a <= 1.05e+27)) {
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 <= -5.3e-61) or not (a <= 1.05e+27): 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 <= -5.3e-61) || !(a <= 1.05e+27)) 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 <= -5.3e-61) || ~((a <= 1.05e+27))) 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, -5.3e-61], N[Not[LessEqual[a, 1.05e+27]], $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 -5.3 \cdot 10^{-61} \lor \neg \left(a \leq 1.05 \cdot 10^{+27}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\end{array}
\end{array}
if a < -5.3e-61 or 1.04999999999999997e27 < a Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 83.7%
if -5.3e-61 < a < 1.04999999999999997e27Initial program 98.8%
associate-/l*99.7%
Simplified99.7%
+-commutative99.7%
fma-define99.7%
associate-*r/98.9%
*-commutative98.9%
associate-/l*99.6%
Applied egg-rr99.6%
Taylor expanded in a around 0 79.1%
Final simplification81.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -7.6e-121) (not (<= a 1.1e-51))) (* a 120.0) (* -60.0 (/ y (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -7.6e-121) || !(a <= 1.1e-51)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (y / (z - t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-7.6d-121)) .or. (.not. (a <= 1.1d-51))) then
tmp = a * 120.0d0
else
tmp = (-60.0d0) * (y / (z - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -7.6e-121) || !(a <= 1.1e-51)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (y / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -7.6e-121) or not (a <= 1.1e-51): tmp = a * 120.0 else: tmp = -60.0 * (y / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -7.6e-121) || !(a <= 1.1e-51)) tmp = Float64(a * 120.0); else tmp = Float64(-60.0 * Float64(y / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -7.6e-121) || ~((a <= 1.1e-51))) tmp = a * 120.0; else tmp = -60.0 * (y / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -7.6e-121], N[Not[LessEqual[a, 1.1e-51]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -7.6 \cdot 10^{-121} \lor \neg \left(a \leq 1.1 \cdot 10^{-51}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\end{array}
\end{array}
if a < -7.6000000000000002e-121 or 1.1e-51 < a Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 76.2%
if -7.6000000000000002e-121 < a < 1.1e-51Initial program 98.5%
associate-/l*99.7%
Simplified99.7%
+-commutative99.7%
fma-define99.7%
associate-*r/98.5%
*-commutative98.5%
associate-/l*99.6%
Applied egg-rr99.6%
Taylor expanded in a around 0 87.2%
Taylor expanded in x around 0 52.4%
Final simplification68.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -7.2e-120) (not (<= a 5.9e-34))) (* a 120.0) (* -60.0 (/ (- x y) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -7.2e-120) || !(a <= 5.9e-34)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * ((x - y) / t);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-7.2d-120)) .or. (.not. (a <= 5.9d-34))) then
tmp = a * 120.0d0
else
tmp = (-60.0d0) * ((x - y) / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -7.2e-120) || !(a <= 5.9e-34)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * ((x - y) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -7.2e-120) or not (a <= 5.9e-34): tmp = a * 120.0 else: tmp = -60.0 * ((x - y) / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -7.2e-120) || !(a <= 5.9e-34)) tmp = Float64(a * 120.0); else tmp = Float64(-60.0 * Float64(Float64(x - y) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -7.2e-120) || ~((a <= 5.9e-34))) tmp = a * 120.0; else tmp = -60.0 * ((x - y) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -7.2e-120], N[Not[LessEqual[a, 5.9e-34]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -7.2 \cdot 10^{-120} \lor \neg \left(a \leq 5.9 \cdot 10^{-34}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\
\end{array}
\end{array}
if a < -7.2000000000000005e-120 or 5.9000000000000002e-34 < a Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 78.0%
if -7.2000000000000005e-120 < a < 5.9000000000000002e-34Initial program 98.6%
associate-/l*99.7%
Simplified99.7%
+-commutative99.7%
fma-define99.7%
associate-*r/98.6%
*-commutative98.6%
associate-/l*99.6%
Applied egg-rr99.6%
Taylor expanded in a around 0 85.6%
Taylor expanded in z around 0 50.8%
Final simplification68.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -8e-122) (not (<= a 1.5e-165))) (* a 120.0) (* -60.0 (/ y (- t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -8e-122) || !(a <= 1.5e-165)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (y / -t);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-8d-122)) .or. (.not. (a <= 1.5d-165))) then
tmp = a * 120.0d0
else
tmp = (-60.0d0) * (y / -t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -8e-122) || !(a <= 1.5e-165)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (y / -t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -8e-122) or not (a <= 1.5e-165): tmp = a * 120.0 else: tmp = -60.0 * (y / -t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -8e-122) || !(a <= 1.5e-165)) tmp = Float64(a * 120.0); else tmp = Float64(-60.0 * Float64(y / Float64(-t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -8e-122) || ~((a <= 1.5e-165))) tmp = a * 120.0; else tmp = -60.0 * (y / -t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -8e-122], N[Not[LessEqual[a, 1.5e-165]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[(y / (-t)), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -8 \cdot 10^{-122} \lor \neg \left(a \leq 1.5 \cdot 10^{-165}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{y}{-t}\\
\end{array}
\end{array}
if a < -8.00000000000000047e-122 or 1.49999999999999989e-165 < a Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 72.0%
if -8.00000000000000047e-122 < a < 1.49999999999999989e-165Initial program 98.2%
associate-/l*99.7%
Simplified99.7%
+-commutative99.7%
fma-define99.7%
associate-*r/98.2%
*-commutative98.2%
associate-/l*99.5%
Applied egg-rr99.5%
Taylor expanded in a around 0 89.6%
Taylor expanded in x around 0 53.2%
Taylor expanded in z around 0 34.0%
associate-*r/34.0%
neg-mul-134.0%
Simplified34.0%
Final simplification62.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.7e-251) (not (<= a 6.1e-52))) (* a 120.0) (* -60.0 (/ y z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.7e-251) || !(a <= 6.1e-52)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (y / z);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-1.7d-251)) .or. (.not. (a <= 6.1d-52))) then
tmp = a * 120.0d0
else
tmp = (-60.0d0) * (y / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.7e-251) || !(a <= 6.1e-52)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (y / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.7e-251) or not (a <= 6.1e-52): tmp = a * 120.0 else: tmp = -60.0 * (y / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.7e-251) || !(a <= 6.1e-52)) tmp = Float64(a * 120.0); else tmp = Float64(-60.0 * Float64(y / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1.7e-251) || ~((a <= 6.1e-52))) tmp = a * 120.0; else tmp = -60.0 * (y / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.7e-251], N[Not[LessEqual[a, 6.1e-52]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.7 \cdot 10^{-251} \lor \neg \left(a \leq 6.1 \cdot 10^{-52}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if a < -1.70000000000000008e-251 or 6.0999999999999999e-52 < a Initial program 99.3%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 69.0%
if -1.70000000000000008e-251 < a < 6.0999999999999999e-52Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
+-commutative99.8%
fma-define99.8%
associate-*r/99.8%
*-commutative99.8%
associate-/l*99.6%
Applied egg-rr99.6%
Taylor expanded in a around 0 88.5%
Taylor expanded in x around 0 57.0%
Taylor expanded in z around inf 33.3%
Final simplification61.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.2e-121) (not (<= a 6e-52))) (* a 120.0) (/ (* y -60.0) z)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.2e-121) || !(a <= 6e-52)) {
tmp = a * 120.0;
} else {
tmp = (y * -60.0) / z;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-1.2d-121)) .or. (.not. (a <= 6d-52))) then
tmp = a * 120.0d0
else
tmp = (y * (-60.0d0)) / z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.2e-121) || !(a <= 6e-52)) {
tmp = a * 120.0;
} else {
tmp = (y * -60.0) / z;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.2e-121) or not (a <= 6e-52): tmp = a * 120.0 else: tmp = (y * -60.0) / z return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.2e-121) || !(a <= 6e-52)) tmp = Float64(a * 120.0); else tmp = Float64(Float64(y * -60.0) / z); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1.2e-121) || ~((a <= 6e-52))) tmp = a * 120.0; else tmp = (y * -60.0) / z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.2e-121], N[Not[LessEqual[a, 6e-52]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(N[(y * -60.0), $MachinePrecision] / z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.2 \cdot 10^{-121} \lor \neg \left(a \leq 6 \cdot 10^{-52}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot -60}{z}\\
\end{array}
\end{array}
if a < -1.20000000000000002e-121 or 6e-52 < a Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 76.2%
if -1.20000000000000002e-121 < a < 6e-52Initial program 98.5%
associate-/l*99.7%
Simplified99.7%
+-commutative99.7%
fma-define99.7%
associate-*r/98.5%
*-commutative98.5%
associate-/l*99.6%
Applied egg-rr99.6%
Taylor expanded in a around 0 87.2%
Taylor expanded in x around 0 52.4%
Taylor expanded in z around inf 28.7%
associate-*r/28.8%
*-commutative28.8%
Simplified28.8%
Final simplification61.4%
(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 (* 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 57.1%
Final simplification57.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 2024055
(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)))