
(FPCore (x y z t a) :precision binary64 (+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((60.0d0 * (x - y)) / (z - t)) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
def code(x, y, z, t, a): return ((60.0 * (x - y)) / (z - t)) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = ((60.0 * (x - y)) / (z - t)) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((60.0d0 * (x - y)) / (z - t)) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
def code(x, y, z, t, a): return ((60.0 * (x - y)) / (z - t)) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = ((60.0 * (x - y)) / (z - t)) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120
\end{array}
(FPCore (x y z t a) :precision binary64 (- (* a 120.0) (* 60.0 (/ (- x y) (- t z)))))
double code(double x, double y, double z, double t, double a) {
return (a * 120.0) - (60.0 * ((x - y) / (t - z)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (a * 120.0d0) - (60.0d0 * ((x - y) / (t - z)))
end function
public static double code(double x, double y, double z, double t, double a) {
return (a * 120.0) - (60.0 * ((x - y) / (t - z)));
}
def code(x, y, z, t, a): return (a * 120.0) - (60.0 * ((x - y) / (t - z)))
function code(x, y, z, t, a) return Float64(Float64(a * 120.0) - Float64(60.0 * Float64(Float64(x - y) / Float64(t - z)))) end
function tmp = code(x, y, z, t, a) tmp = (a * 120.0) - (60.0 * ((x - y) / (t - z))); end
code[x_, y_, z_, t_, a_] := N[(N[(a * 120.0), $MachinePrecision] - N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
a \cdot 120 - 60 \cdot \frac{x - y}{t - z}
\end{array}
Initial program 99.0%
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 (/ y z))))
(t_2 (+ (* a 120.0) (* x (/ -60.0 t)))))
(if (<= (* a 120.0) -2e-18)
t_1
(if (<= (* a 120.0) -5e-107)
(* (- x y) (/ 60.0 (- z t)))
(if (<= (* a 120.0) -2e-134)
t_2
(if (<= (* a 120.0) 5e-107)
(* 60.0 (/ (- x y) (- z t)))
(if (<= (* a 120.0) 2e-63)
t_2
(if (<= (* a 120.0) 2e+42) t_1 (* a 120.0)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (a * 120.0) + (-60.0 * (y / z));
double t_2 = (a * 120.0) + (x * (-60.0 / t));
double tmp;
if ((a * 120.0) <= -2e-18) {
tmp = t_1;
} else if ((a * 120.0) <= -5e-107) {
tmp = (x - y) * (60.0 / (z - t));
} else if ((a * 120.0) <= -2e-134) {
tmp = t_2;
} else if ((a * 120.0) <= 5e-107) {
tmp = 60.0 * ((x - y) / (z - t));
} else if ((a * 120.0) <= 2e-63) {
tmp = t_2;
} else if ((a * 120.0) <= 2e+42) {
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 = (a * 120.0d0) + ((-60.0d0) * (y / z))
t_2 = (a * 120.0d0) + (x * ((-60.0d0) / t))
if ((a * 120.0d0) <= (-2d-18)) then
tmp = t_1
else if ((a * 120.0d0) <= (-5d-107)) then
tmp = (x - y) * (60.0d0 / (z - t))
else if ((a * 120.0d0) <= (-2d-134)) then
tmp = t_2
else if ((a * 120.0d0) <= 5d-107) then
tmp = 60.0d0 * ((x - y) / (z - t))
else if ((a * 120.0d0) <= 2d-63) then
tmp = t_2
else if ((a * 120.0d0) <= 2d+42) 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 = (a * 120.0) + (-60.0 * (y / z));
double t_2 = (a * 120.0) + (x * (-60.0 / t));
double tmp;
if ((a * 120.0) <= -2e-18) {
tmp = t_1;
} else if ((a * 120.0) <= -5e-107) {
tmp = (x - y) * (60.0 / (z - t));
} else if ((a * 120.0) <= -2e-134) {
tmp = t_2;
} else if ((a * 120.0) <= 5e-107) {
tmp = 60.0 * ((x - y) / (z - t));
} else if ((a * 120.0) <= 2e-63) {
tmp = t_2;
} else if ((a * 120.0) <= 2e+42) {
tmp = t_1;
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (a * 120.0) + (-60.0 * (y / z)) t_2 = (a * 120.0) + (x * (-60.0 / t)) tmp = 0 if (a * 120.0) <= -2e-18: tmp = t_1 elif (a * 120.0) <= -5e-107: tmp = (x - y) * (60.0 / (z - t)) elif (a * 120.0) <= -2e-134: tmp = t_2 elif (a * 120.0) <= 5e-107: tmp = 60.0 * ((x - y) / (z - t)) elif (a * 120.0) <= 2e-63: tmp = t_2 elif (a * 120.0) <= 2e+42: tmp = t_1 else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / z))) t_2 = Float64(Float64(a * 120.0) + Float64(x * Float64(-60.0 / t))) tmp = 0.0 if (Float64(a * 120.0) <= -2e-18) tmp = t_1; elseif (Float64(a * 120.0) <= -5e-107) tmp = Float64(Float64(x - y) * Float64(60.0 / Float64(z - t))); elseif (Float64(a * 120.0) <= -2e-134) tmp = t_2; elseif (Float64(a * 120.0) <= 5e-107) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); elseif (Float64(a * 120.0) <= 2e-63) tmp = t_2; elseif (Float64(a * 120.0) <= 2e+42) tmp = t_1; else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (a * 120.0) + (-60.0 * (y / z)); t_2 = (a * 120.0) + (x * (-60.0 / t)); tmp = 0.0; if ((a * 120.0) <= -2e-18) tmp = t_1; elseif ((a * 120.0) <= -5e-107) tmp = (x - y) * (60.0 / (z - t)); elseif ((a * 120.0) <= -2e-134) tmp = t_2; elseif ((a * 120.0) <= 5e-107) tmp = 60.0 * ((x - y) / (z - t)); elseif ((a * 120.0) <= 2e-63) tmp = t_2; elseif ((a * 120.0) <= 2e+42) tmp = t_1; else tmp = a * 120.0; 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[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(a * 120.0), $MachinePrecision] + N[(x * N[(-60.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * 120.0), $MachinePrecision], -2e-18], t$95$1, If[LessEqual[N[(a * 120.0), $MachinePrecision], -5e-107], N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], -2e-134], t$95$2, If[LessEqual[N[(a * 120.0), $MachinePrecision], 5e-107], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 2e-63], t$95$2, If[LessEqual[N[(a * 120.0), $MachinePrecision], 2e+42], t$95$1, N[(a * 120.0), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot 120 + -60 \cdot \frac{y}{z}\\
t_2 := a \cdot 120 + x \cdot \frac{-60}{t}\\
\mathbf{if}\;a \cdot 120 \leq -2 \cdot 10^{-18}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \cdot 120 \leq -5 \cdot 10^{-107}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{60}{z - t}\\
\mathbf{elif}\;a \cdot 120 \leq -2 \cdot 10^{-134}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-107}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{-63}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{+42}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -2.0000000000000001e-18 or 2.00000000000000013e-63 < (*.f64 a #s(literal 120 binary64)) < 2.00000000000000009e42Initial program 99.7%
*-commutative99.7%
associate-/l*99.7%
Applied egg-rr99.7%
Taylor expanded in z around inf 72.2%
Taylor expanded in x around 0 71.6%
if -2.0000000000000001e-18 < (*.f64 a #s(literal 120 binary64)) < -4.99999999999999971e-107Initial program 94.6%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 69.9%
clear-num69.6%
associate-/r/69.6%
Applied egg-rr69.6%
Taylor expanded in x around 0 69.9%
+-commutative69.9%
associate-*r/69.8%
associate-*l/69.9%
*-commutative69.9%
associate-*r/64.8%
metadata-eval64.8%
distribute-lft-neg-in64.8%
*-commutative64.8%
distribute-lft-neg-in64.8%
associate-*r/70.0%
distribute-rgt-out70.0%
sub-neg70.0%
Simplified70.0%
if -4.99999999999999971e-107 < (*.f64 a #s(literal 120 binary64)) < -2.00000000000000008e-134 or 4.99999999999999971e-107 < (*.f64 a #s(literal 120 binary64)) < 2.00000000000000013e-63Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 83.2%
associate-*r/83.2%
*-commutative83.2%
associate-*r/83.2%
Simplified83.2%
Taylor expanded in z around 0 83.2%
if -2.00000000000000008e-134 < (*.f64 a #s(literal 120 binary64)) < 4.99999999999999971e-107Initial program 99.7%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 90.3%
if 2.00000000000000009e42 < (*.f64 a #s(literal 120 binary64)) Initial program 98.2%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 87.1%
Final simplification81.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* 60.0 (/ (- x y) (- z t))))
(t_2 (+ (* a 120.0) (* -60.0 (/ y z)))))
(if (<= (* a 120.0) -2e-18)
t_2
(if (<= (* a 120.0) 5e-107)
t_1
(if (<= (* a 120.0) 2e-90)
(* a 120.0)
(if (<= (* a 120.0) 1e-61)
t_1
(if (<= (* a 120.0) 0.002)
t_2
(if (<= (* a 120.0) 5e+29) 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 * (y / z));
double tmp;
if ((a * 120.0) <= -2e-18) {
tmp = t_2;
} else if ((a * 120.0) <= 5e-107) {
tmp = t_1;
} else if ((a * 120.0) <= 2e-90) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 1e-61) {
tmp = t_1;
} else if ((a * 120.0) <= 0.002) {
tmp = t_2;
} else if ((a * 120.0) <= 5e+29) {
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) * (y / z))
if ((a * 120.0d0) <= (-2d-18)) then
tmp = t_2
else if ((a * 120.0d0) <= 5d-107) then
tmp = t_1
else if ((a * 120.0d0) <= 2d-90) then
tmp = a * 120.0d0
else if ((a * 120.0d0) <= 1d-61) then
tmp = t_1
else if ((a * 120.0d0) <= 0.002d0) then
tmp = t_2
else if ((a * 120.0d0) <= 5d+29) 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 * (y / z));
double tmp;
if ((a * 120.0) <= -2e-18) {
tmp = t_2;
} else if ((a * 120.0) <= 5e-107) {
tmp = t_1;
} else if ((a * 120.0) <= 2e-90) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 1e-61) {
tmp = t_1;
} else if ((a * 120.0) <= 0.002) {
tmp = t_2;
} else if ((a * 120.0) <= 5e+29) {
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 * (y / z)) tmp = 0 if (a * 120.0) <= -2e-18: tmp = t_2 elif (a * 120.0) <= 5e-107: tmp = t_1 elif (a * 120.0) <= 2e-90: tmp = a * 120.0 elif (a * 120.0) <= 1e-61: tmp = t_1 elif (a * 120.0) <= 0.002: tmp = t_2 elif (a * 120.0) <= 5e+29: 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(y / z))) tmp = 0.0 if (Float64(a * 120.0) <= -2e-18) tmp = t_2; elseif (Float64(a * 120.0) <= 5e-107) tmp = t_1; elseif (Float64(a * 120.0) <= 2e-90) tmp = Float64(a * 120.0); elseif (Float64(a * 120.0) <= 1e-61) tmp = t_1; elseif (Float64(a * 120.0) <= 0.002) tmp = t_2; elseif (Float64(a * 120.0) <= 5e+29) 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 * (y / z)); tmp = 0.0; if ((a * 120.0) <= -2e-18) tmp = t_2; elseif ((a * 120.0) <= 5e-107) tmp = t_1; elseif ((a * 120.0) <= 2e-90) tmp = a * 120.0; elseif ((a * 120.0) <= 1e-61) tmp = t_1; elseif ((a * 120.0) <= 0.002) tmp = t_2; elseif ((a * 120.0) <= 5e+29) 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[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * 120.0), $MachinePrecision], -2e-18], t$95$2, If[LessEqual[N[(a * 120.0), $MachinePrecision], 5e-107], t$95$1, If[LessEqual[N[(a * 120.0), $MachinePrecision], 2e-90], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 1e-61], t$95$1, If[LessEqual[N[(a * 120.0), $MachinePrecision], 0.002], t$95$2, If[LessEqual[N[(a * 120.0), $MachinePrecision], 5e+29], 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{y}{z}\\
\mathbf{if}\;a \cdot 120 \leq -2 \cdot 10^{-18}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-107}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{-90}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq 10^{-61}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \cdot 120 \leq 0.002:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{+29}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -2.0000000000000001e-18 or 1e-61 < (*.f64 a #s(literal 120 binary64)) < 2e-3Initial program 99.7%
*-commutative99.7%
associate-/l*99.7%
Applied egg-rr99.7%
Taylor expanded in z around inf 73.0%
Taylor expanded in x around 0 73.9%
if -2.0000000000000001e-18 < (*.f64 a #s(literal 120 binary64)) < 4.99999999999999971e-107 or 1.99999999999999999e-90 < (*.f64 a #s(literal 120 binary64)) < 1e-61 or 2e-3 < (*.f64 a #s(literal 120 binary64)) < 5.0000000000000001e29Initial program 98.9%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 83.6%
if 4.99999999999999971e-107 < (*.f64 a #s(literal 120 binary64)) < 1.99999999999999999e-90 or 5.0000000000000001e29 < (*.f64 a #s(literal 120 binary64)) Initial program 98.4%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 85.8%
Final simplification81.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (* a 120.0) (* x (/ 60.0 (- z t)))))
(t_2 (* 60.0 (/ (- x y) (- z t)))))
(if (<= y -1.3e+87)
t_2
(if (<= y 3.5e+39)
t_1
(if (<= y 1.25e+87)
(+ (* a 120.0) (* -60.0 (/ y z)))
(if (<= y 1.7e+137) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (a * 120.0) + (x * (60.0 / (z - t)));
double t_2 = 60.0 * ((x - y) / (z - t));
double tmp;
if (y <= -1.3e+87) {
tmp = t_2;
} else if (y <= 3.5e+39) {
tmp = t_1;
} else if (y <= 1.25e+87) {
tmp = (a * 120.0) + (-60.0 * (y / z));
} else if (y <= 1.7e+137) {
tmp = t_1;
} else {
tmp = t_2;
}
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) + (x * (60.0d0 / (z - t)))
t_2 = 60.0d0 * ((x - y) / (z - t))
if (y <= (-1.3d+87)) then
tmp = t_2
else if (y <= 3.5d+39) then
tmp = t_1
else if (y <= 1.25d+87) then
tmp = (a * 120.0d0) + ((-60.0d0) * (y / z))
else if (y <= 1.7d+137) then
tmp = t_1
else
tmp = t_2
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) + (x * (60.0 / (z - t)));
double t_2 = 60.0 * ((x - y) / (z - t));
double tmp;
if (y <= -1.3e+87) {
tmp = t_2;
} else if (y <= 3.5e+39) {
tmp = t_1;
} else if (y <= 1.25e+87) {
tmp = (a * 120.0) + (-60.0 * (y / z));
} else if (y <= 1.7e+137) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (a * 120.0) + (x * (60.0 / (z - t))) t_2 = 60.0 * ((x - y) / (z - t)) tmp = 0 if y <= -1.3e+87: tmp = t_2 elif y <= 3.5e+39: tmp = t_1 elif y <= 1.25e+87: tmp = (a * 120.0) + (-60.0 * (y / z)) elif y <= 1.7e+137: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(a * 120.0) + Float64(x * Float64(60.0 / Float64(z - t)))) t_2 = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))) tmp = 0.0 if (y <= -1.3e+87) tmp = t_2; elseif (y <= 3.5e+39) tmp = t_1; elseif (y <= 1.25e+87) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / z))); elseif (y <= 1.7e+137) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (a * 120.0) + (x * (60.0 / (z - t))); t_2 = 60.0 * ((x - y) / (z - t)); tmp = 0.0; if (y <= -1.3e+87) tmp = t_2; elseif (y <= 3.5e+39) tmp = t_1; elseif (y <= 1.25e+87) tmp = (a * 120.0) + (-60.0 * (y / z)); elseif (y <= 1.7e+137) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(a * 120.0), $MachinePrecision] + N[(x * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.3e+87], t$95$2, If[LessEqual[y, 3.5e+39], t$95$1, If[LessEqual[y, 1.25e+87], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.7e+137], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot 120 + x \cdot \frac{60}{z - t}\\
t_2 := 60 \cdot \frac{x - y}{z - t}\\
\mathbf{if}\;y \leq -1.3 \cdot 10^{+87}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 3.5 \cdot 10^{+39}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.25 \cdot 10^{+87}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\
\mathbf{elif}\;y \leq 1.7 \cdot 10^{+137}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -1.29999999999999999e87 or 1.69999999999999993e137 < y Initial program 97.3%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 76.6%
if -1.29999999999999999e87 < y < 3.5000000000000002e39 or 1.24999999999999995e87 < y < 1.69999999999999993e137Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 92.1%
associate-*r/92.2%
*-commutative92.2%
associate-*r/92.1%
Simplified92.1%
if 3.5000000000000002e39 < y < 1.24999999999999995e87Initial program 99.4%
*-commutative99.4%
associate-/l*99.7%
Applied egg-rr99.7%
Taylor expanded in z around inf 99.7%
Taylor expanded in x around 0 90.8%
Final simplification87.0%
(FPCore (x y z t a)
:precision binary64
(if (or (<= a -3.7e+66)
(not (or (<= a 4.8e-108) (and (not (<= a 1.5e-92)) (<= a 1.96e+28)))))
(* 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 <= -3.7e+66) || !((a <= 4.8e-108) || (!(a <= 1.5e-92) && (a <= 1.96e+28)))) {
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 <= (-3.7d+66)) .or. (.not. (a <= 4.8d-108) .or. (.not. (a <= 1.5d-92)) .and. (a <= 1.96d+28))) 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 <= -3.7e+66) || !((a <= 4.8e-108) || (!(a <= 1.5e-92) && (a <= 1.96e+28)))) {
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 <= -3.7e+66) or not ((a <= 4.8e-108) or (not (a <= 1.5e-92) and (a <= 1.96e+28))): 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 <= -3.7e+66) || !((a <= 4.8e-108) || (!(a <= 1.5e-92) && (a <= 1.96e+28)))) 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 <= -3.7e+66) || ~(((a <= 4.8e-108) || (~((a <= 1.5e-92)) && (a <= 1.96e+28))))) 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, -3.7e+66], N[Not[Or[LessEqual[a, 4.8e-108], And[N[Not[LessEqual[a, 1.5e-92]], $MachinePrecision], LessEqual[a, 1.96e+28]]]], $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 -3.7 \cdot 10^{+66} \lor \neg \left(a \leq 4.8 \cdot 10^{-108} \lor \neg \left(a \leq 1.5 \cdot 10^{-92}\right) \land a \leq 1.96 \cdot 10^{+28}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\end{array}
\end{array}
if a < -3.7e66 or 4.80000000000000034e-108 < a < 1.50000000000000007e-92 or 1.96000000000000006e28 < a Initial program 98.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 82.4%
if -3.7e66 < a < 4.80000000000000034e-108 or 1.50000000000000007e-92 < a < 1.96000000000000006e28Initial program 99.1%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 76.7%
Final simplification79.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* -60.0 (/ y (- z t)))))
(if (<= y -9.5e+87)
t_1
(if (<= y -2.1e-81)
(* a 120.0)
(if (<= y -1.02e-169)
(/ (* 60.0 x) (- z t))
(if (<= y 6e+52) (* a 120.0) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -60.0 * (y / (z - t));
double tmp;
if (y <= -9.5e+87) {
tmp = t_1;
} else if (y <= -2.1e-81) {
tmp = a * 120.0;
} else if (y <= -1.02e-169) {
tmp = (60.0 * x) / (z - t);
} else if (y <= 6e+52) {
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) :: tmp
t_1 = (-60.0d0) * (y / (z - t))
if (y <= (-9.5d+87)) then
tmp = t_1
else if (y <= (-2.1d-81)) then
tmp = a * 120.0d0
else if (y <= (-1.02d-169)) then
tmp = (60.0d0 * x) / (z - t)
else if (y <= 6d+52) 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 = -60.0 * (y / (z - t));
double tmp;
if (y <= -9.5e+87) {
tmp = t_1;
} else if (y <= -2.1e-81) {
tmp = a * 120.0;
} else if (y <= -1.02e-169) {
tmp = (60.0 * x) / (z - t);
} else if (y <= 6e+52) {
tmp = a * 120.0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -60.0 * (y / (z - t)) tmp = 0 if y <= -9.5e+87: tmp = t_1 elif y <= -2.1e-81: tmp = a * 120.0 elif y <= -1.02e-169: tmp = (60.0 * x) / (z - t) elif y <= 6e+52: tmp = a * 120.0 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(-60.0 * Float64(y / Float64(z - t))) tmp = 0.0 if (y <= -9.5e+87) tmp = t_1; elseif (y <= -2.1e-81) tmp = Float64(a * 120.0); elseif (y <= -1.02e-169) tmp = Float64(Float64(60.0 * x) / Float64(z - t)); elseif (y <= 6e+52) tmp = Float64(a * 120.0); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = -60.0 * (y / (z - t)); tmp = 0.0; if (y <= -9.5e+87) tmp = t_1; elseif (y <= -2.1e-81) tmp = a * 120.0; elseif (y <= -1.02e-169) tmp = (60.0 * x) / (z - t); elseif (y <= 6e+52) tmp = a * 120.0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -9.5e+87], t$95$1, If[LessEqual[y, -2.1e-81], N[(a * 120.0), $MachinePrecision], If[LessEqual[y, -1.02e-169], N[(N[(60.0 * x), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6e+52], N[(a * 120.0), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -60 \cdot \frac{y}{z - t}\\
\mathbf{if}\;y \leq -9.5 \cdot 10^{+87}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -2.1 \cdot 10^{-81}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;y \leq -1.02 \cdot 10^{-169}:\\
\;\;\;\;\frac{60 \cdot x}{z - t}\\
\mathbf{elif}\;y \leq 6 \cdot 10^{+52}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -9.4999999999999992e87 or 6e52 < y Initial program 97.7%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 73.5%
Taylor expanded in x around 0 63.8%
if -9.4999999999999992e87 < y < -2.0999999999999999e-81 or -1.01999999999999996e-169 < y < 6e52Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 67.7%
if -2.0999999999999999e-81 < y < -1.01999999999999996e-169Initial program 99.9%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 68.7%
Taylor expanded in x around inf 68.5%
associate-*r/99.9%
Simplified68.7%
Final simplification66.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* -60.0 (/ y (- z t)))))
(if (<= y -9.5e+83)
t_1
(if (<= y -7.5e-81)
(* a 120.0)
(if (<= y -1.02e-169)
(* x (/ 60.0 (- z t)))
(if (<= y 3.5e+53) (* a 120.0) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -60.0 * (y / (z - t));
double tmp;
if (y <= -9.5e+83) {
tmp = t_1;
} else if (y <= -7.5e-81) {
tmp = a * 120.0;
} else if (y <= -1.02e-169) {
tmp = x * (60.0 / (z - t));
} else if (y <= 3.5e+53) {
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) :: tmp
t_1 = (-60.0d0) * (y / (z - t))
if (y <= (-9.5d+83)) then
tmp = t_1
else if (y <= (-7.5d-81)) then
tmp = a * 120.0d0
else if (y <= (-1.02d-169)) then
tmp = x * (60.0d0 / (z - t))
else if (y <= 3.5d+53) 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 = -60.0 * (y / (z - t));
double tmp;
if (y <= -9.5e+83) {
tmp = t_1;
} else if (y <= -7.5e-81) {
tmp = a * 120.0;
} else if (y <= -1.02e-169) {
tmp = x * (60.0 / (z - t));
} else if (y <= 3.5e+53) {
tmp = a * 120.0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -60.0 * (y / (z - t)) tmp = 0 if y <= -9.5e+83: tmp = t_1 elif y <= -7.5e-81: tmp = a * 120.0 elif y <= -1.02e-169: tmp = x * (60.0 / (z - t)) elif y <= 3.5e+53: tmp = a * 120.0 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(-60.0 * Float64(y / Float64(z - t))) tmp = 0.0 if (y <= -9.5e+83) tmp = t_1; elseif (y <= -7.5e-81) tmp = Float64(a * 120.0); elseif (y <= -1.02e-169) tmp = Float64(x * Float64(60.0 / Float64(z - t))); elseif (y <= 3.5e+53) tmp = Float64(a * 120.0); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = -60.0 * (y / (z - t)); tmp = 0.0; if (y <= -9.5e+83) tmp = t_1; elseif (y <= -7.5e-81) tmp = a * 120.0; elseif (y <= -1.02e-169) tmp = x * (60.0 / (z - t)); elseif (y <= 3.5e+53) tmp = a * 120.0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -9.5e+83], t$95$1, If[LessEqual[y, -7.5e-81], N[(a * 120.0), $MachinePrecision], If[LessEqual[y, -1.02e-169], N[(x * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.5e+53], N[(a * 120.0), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -60 \cdot \frac{y}{z - t}\\
\mathbf{if}\;y \leq -9.5 \cdot 10^{+83}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -7.5 \cdot 10^{-81}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;y \leq -1.02 \cdot 10^{-169}:\\
\;\;\;\;x \cdot \frac{60}{z - t}\\
\mathbf{elif}\;y \leq 3.5 \cdot 10^{+53}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -9.5000000000000002e83 or 3.50000000000000019e53 < y Initial program 97.7%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 73.5%
Taylor expanded in x around 0 63.8%
if -9.5000000000000002e83 < y < -7.50000000000000018e-81 or -1.01999999999999996e-169 < y < 3.50000000000000019e53Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 67.7%
if -7.50000000000000018e-81 < y < -1.01999999999999996e-169Initial program 99.9%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 68.7%
Taylor expanded in x around inf 68.5%
associate-*r/99.9%
*-commutative99.9%
associate-*r/99.8%
Simplified68.6%
Final simplification66.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -2.5e+82) (not (<= y 2.2e-28))) (+ (* a 120.0) (/ (* y -60.0) (- 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 <= -2.5e+82) || !(y <= 2.2e-28)) {
tmp = (a * 120.0) + ((y * -60.0) / (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 <= (-2.5d+82)) .or. (.not. (y <= 2.2d-28))) then
tmp = (a * 120.0d0) + ((y * (-60.0d0)) / (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 <= -2.5e+82) || !(y <= 2.2e-28)) {
tmp = (a * 120.0) + ((y * -60.0) / (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 <= -2.5e+82) or not (y <= 2.2e-28): tmp = (a * 120.0) + ((y * -60.0) / (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 <= -2.5e+82) || !(y <= 2.2e-28)) tmp = Float64(Float64(a * 120.0) + Float64(Float64(y * -60.0) / Float64(z - t))); else tmp = Float64(Float64(a * 120.0) + Float64(Float64(60.0 * x) / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -2.5e+82) || ~((y <= 2.2e-28))) tmp = (a * 120.0) + ((y * -60.0) / (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, -2.5e+82], N[Not[LessEqual[y, 2.2e-28]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(60.0 * x), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.5 \cdot 10^{+82} \lor \neg \left(y \leq 2.2 \cdot 10^{-28}\right):\\
\;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{60 \cdot x}{z - t}\\
\end{array}
\end{array}
if y < -2.50000000000000008e82 or 2.19999999999999996e-28 < y Initial program 98.1%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 87.7%
associate-*r/86.0%
Simplified86.0%
if -2.50000000000000008e82 < y < 2.19999999999999996e-28Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 96.8%
associate-*r/96.8%
Simplified96.8%
Final simplification91.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -1.55e+82) (not (<= y 3.3e-28))) (+ (* a 120.0) (/ (* y -60.0) (- z t))) (+ (* a 120.0) (* x (/ 60.0 (- z t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.55e+82) || !(y <= 3.3e-28)) {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
} else {
tmp = (a * 120.0) + (x * (60.0 / (z - t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((y <= (-1.55d+82)) .or. (.not. (y <= 3.3d-28))) then
tmp = (a * 120.0d0) + ((y * (-60.0d0)) / (z - t))
else
tmp = (a * 120.0d0) + (x * (60.0d0 / (z - t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.55e+82) || !(y <= 3.3e-28)) {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
} else {
tmp = (a * 120.0) + (x * (60.0 / (z - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -1.55e+82) or not (y <= 3.3e-28): tmp = (a * 120.0) + ((y * -60.0) / (z - t)) else: tmp = (a * 120.0) + (x * (60.0 / (z - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -1.55e+82) || !(y <= 3.3e-28)) tmp = Float64(Float64(a * 120.0) + Float64(Float64(y * -60.0) / Float64(z - t))); else tmp = Float64(Float64(a * 120.0) + Float64(x * Float64(60.0 / Float64(z - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -1.55e+82) || ~((y <= 3.3e-28))) tmp = (a * 120.0) + ((y * -60.0) / (z - t)); else tmp = (a * 120.0) + (x * (60.0 / (z - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -1.55e+82], N[Not[LessEqual[y, 3.3e-28]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(x * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.55 \cdot 10^{+82} \lor \neg \left(y \leq 3.3 \cdot 10^{-28}\right):\\
\;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + x \cdot \frac{60}{z - t}\\
\end{array}
\end{array}
if y < -1.55000000000000016e82 or 3.3000000000000002e-28 < y Initial program 98.1%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 87.7%
associate-*r/86.0%
Simplified86.0%
if -1.55000000000000016e82 < y < 3.3000000000000002e-28Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 96.8%
associate-*r/96.8%
*-commutative96.8%
associate-*r/96.8%
Simplified96.8%
Final simplification91.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -8.6e-14) (not (<= z 1.12e-66))) (- (* a 120.0) (* (/ 60.0 z) (- y x))) (+ (* a 120.0) (* (- x y) (/ -60.0 t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -8.6e-14) || !(z <= 1.12e-66)) {
tmp = (a * 120.0) - ((60.0 / z) * (y - x));
} else {
tmp = (a * 120.0) + ((x - y) * (-60.0 / t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-8.6d-14)) .or. (.not. (z <= 1.12d-66))) then
tmp = (a * 120.0d0) - ((60.0d0 / z) * (y - x))
else
tmp = (a * 120.0d0) + ((x - y) * ((-60.0d0) / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -8.6e-14) || !(z <= 1.12e-66)) {
tmp = (a * 120.0) - ((60.0 / z) * (y - x));
} else {
tmp = (a * 120.0) + ((x - y) * (-60.0 / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -8.6e-14) or not (z <= 1.12e-66): tmp = (a * 120.0) - ((60.0 / z) * (y - x)) else: tmp = (a * 120.0) + ((x - y) * (-60.0 / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -8.6e-14) || !(z <= 1.12e-66)) tmp = Float64(Float64(a * 120.0) - Float64(Float64(60.0 / z) * Float64(y - x))); else tmp = Float64(Float64(a * 120.0) + Float64(Float64(x - y) * Float64(-60.0 / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -8.6e-14) || ~((z <= 1.12e-66))) tmp = (a * 120.0) - ((60.0 / z) * (y - x)); else tmp = (a * 120.0) + ((x - y) * (-60.0 / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -8.6e-14], N[Not[LessEqual[z, 1.12e-66]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] - N[(N[(60.0 / z), $MachinePrecision] * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(x - y), $MachinePrecision] * N[(-60.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.6 \cdot 10^{-14} \lor \neg \left(z \leq 1.12 \cdot 10^{-66}\right):\\
\;\;\;\;a \cdot 120 - \frac{60}{z} \cdot \left(y - x\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \left(x - y\right) \cdot \frac{-60}{t}\\
\end{array}
\end{array}
if z < -8.59999999999999996e-14 or 1.12000000000000004e-66 < z Initial program 99.2%
*-commutative99.2%
associate-/l*99.7%
Applied egg-rr99.7%
Taylor expanded in z around inf 87.0%
if -8.59999999999999996e-14 < z < 1.12000000000000004e-66Initial program 98.8%
*-commutative98.8%
associate-/l*99.7%
Applied egg-rr99.7%
Taylor expanded in z around 0 87.0%
Final simplification87.0%
(FPCore (x y z t a)
:precision binary64
(if (<= y -4.5e+81)
(* y (+ (* 120.0 (/ a y)) (/ 60.0 (- t z))))
(if (<= y 9.2e-29)
(+ (* a 120.0) (/ (* 60.0 x) (- z t)))
(+ (* a 120.0) (/ (* y -60.0) (- z t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -4.5e+81) {
tmp = y * ((120.0 * (a / y)) + (60.0 / (t - z)));
} else if (y <= 9.2e-29) {
tmp = (a * 120.0) + ((60.0 * x) / (z - t));
} else {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (y <= (-4.5d+81)) then
tmp = y * ((120.0d0 * (a / y)) + (60.0d0 / (t - z)))
else if (y <= 9.2d-29) then
tmp = (a * 120.0d0) + ((60.0d0 * x) / (z - t))
else
tmp = (a * 120.0d0) + ((y * (-60.0d0)) / (z - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -4.5e+81) {
tmp = y * ((120.0 * (a / y)) + (60.0 / (t - z)));
} else if (y <= 9.2e-29) {
tmp = (a * 120.0) + ((60.0 * x) / (z - t));
} else {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -4.5e+81: tmp = y * ((120.0 * (a / y)) + (60.0 / (t - z))) elif y <= 9.2e-29: tmp = (a * 120.0) + ((60.0 * x) / (z - t)) else: tmp = (a * 120.0) + ((y * -60.0) / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -4.5e+81) tmp = Float64(y * Float64(Float64(120.0 * Float64(a / y)) + Float64(60.0 / Float64(t - z)))); elseif (y <= 9.2e-29) tmp = Float64(Float64(a * 120.0) + Float64(Float64(60.0 * x) / Float64(z - t))); else tmp = Float64(Float64(a * 120.0) + Float64(Float64(y * -60.0) / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -4.5e+81) tmp = y * ((120.0 * (a / y)) + (60.0 / (t - z))); elseif (y <= 9.2e-29) tmp = (a * 120.0) + ((60.0 * x) / (z - t)); else tmp = (a * 120.0) + ((y * -60.0) / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -4.5e+81], N[(y * N[(N[(120.0 * N[(a / y), $MachinePrecision]), $MachinePrecision] + N[(60.0 / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9.2e-29], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(60.0 * x), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.5 \cdot 10^{+81}:\\
\;\;\;\;y \cdot \left(120 \cdot \frac{a}{y} + \frac{60}{t - z}\right)\\
\mathbf{elif}\;y \leq 9.2 \cdot 10^{-29}:\\
\;\;\;\;a \cdot 120 + \frac{60 \cdot x}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z - t}\\
\end{array}
\end{array}
if y < -4.50000000000000017e81Initial program 94.9%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around 0 91.1%
associate-*r/86.3%
Simplified86.3%
Taylor expanded in y around inf 90.9%
associate-*r/90.9%
metadata-eval90.9%
Simplified90.9%
if -4.50000000000000017e81 < y < 9.19999999999999965e-29Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 96.8%
associate-*r/96.8%
Simplified96.8%
if 9.19999999999999965e-29 < y Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 86.0%
associate-*r/85.9%
Simplified85.9%
Final simplification92.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -8e+86) (not (<= y 3.7e+53))) (* -60.0 (/ y (- z t))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -8e+86) || !(y <= 3.7e+53)) {
tmp = -60.0 * (y / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((y <= (-8d+86)) .or. (.not. (y <= 3.7d+53))) then
tmp = (-60.0d0) * (y / (z - t))
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -8e+86) || !(y <= 3.7e+53)) {
tmp = -60.0 * (y / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -8e+86) or not (y <= 3.7e+53): tmp = -60.0 * (y / (z - t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -8e+86) || !(y <= 3.7e+53)) tmp = Float64(-60.0 * Float64(y / Float64(z - t))); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -8e+86) || ~((y <= 3.7e+53))) tmp = -60.0 * (y / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -8e+86], N[Not[LessEqual[y, 3.7e+53]], $MachinePrecision]], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8 \cdot 10^{+86} \lor \neg \left(y \leq 3.7 \cdot 10^{+53}\right):\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if y < -8.0000000000000001e86 or 3.7e53 < y Initial program 97.7%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 73.5%
Taylor expanded in x around 0 63.8%
if -8.0000000000000001e86 < y < 3.7e53Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 62.5%
Final simplification63.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -1.8e+164) (not (<= y 1.4e+133))) (* -60.0 (/ y z)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.8e+164) || !(y <= 1.4e+133)) {
tmp = -60.0 * (y / z);
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((y <= (-1.8d+164)) .or. (.not. (y <= 1.4d+133))) then
tmp = (-60.0d0) * (y / z)
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.8e+164) || !(y <= 1.4e+133)) {
tmp = -60.0 * (y / z);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -1.8e+164) or not (y <= 1.4e+133): tmp = -60.0 * (y / z) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -1.8e+164) || !(y <= 1.4e+133)) tmp = Float64(-60.0 * Float64(y / z)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -1.8e+164) || ~((y <= 1.4e+133))) tmp = -60.0 * (y / z); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -1.8e+164], N[Not[LessEqual[y, 1.4e+133]], $MachinePrecision]], N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.8 \cdot 10^{+164} \lor \neg \left(y \leq 1.4 \cdot 10^{+133}\right):\\
\;\;\;\;-60 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if y < -1.79999999999999995e164 or 1.40000000000000008e133 < y Initial program 96.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 78.9%
Taylor expanded in x around 0 71.9%
Taylor expanded in z around inf 49.8%
if -1.79999999999999995e164 < y < 1.40000000000000008e133Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 58.5%
Final simplification56.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -6.6e-251) (not (<= a 2.5e-109))) (* a 120.0) (* -60.0 (/ x t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -6.6e-251) || !(a <= 2.5e-109)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (x / t);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-6.6d-251)) .or. (.not. (a <= 2.5d-109))) then
tmp = a * 120.0d0
else
tmp = (-60.0d0) * (x / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -6.6e-251) || !(a <= 2.5e-109)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (x / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -6.6e-251) or not (a <= 2.5e-109): tmp = a * 120.0 else: tmp = -60.0 * (x / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -6.6e-251) || !(a <= 2.5e-109)) tmp = Float64(a * 120.0); else tmp = Float64(-60.0 * Float64(x / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -6.6e-251) || ~((a <= 2.5e-109))) tmp = a * 120.0; else tmp = -60.0 * (x / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -6.6e-251], N[Not[LessEqual[a, 2.5e-109]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -6.6 \cdot 10^{-251} \lor \neg \left(a \leq 2.5 \cdot 10^{-109}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{x}{t}\\
\end{array}
\end{array}
if a < -6.6e-251 or 2.5000000000000001e-109 < a Initial program 98.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 61.3%
if -6.6e-251 < a < 2.5000000000000001e-109Initial program 99.7%
associate-/l*99.5%
Simplified99.5%
Taylor expanded in a around 0 96.2%
Taylor expanded in x around inf 50.8%
associate-*r/54.3%
*-commutative54.3%
associate-*r/54.2%
Simplified50.9%
Taylor expanded in z around 0 27.6%
Final simplification53.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.0%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 49.1%
Final simplification49.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 2024100
(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)))