
(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 (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 98.3%
associate-/l*99.8%
Simplified99.8%
+-commutative99.8%
fma-define99.8%
associate-*r/98.3%
*-commutative98.3%
associate-/l*99.8%
Applied egg-rr99.8%
Final simplification99.8%
(FPCore (x y z t a)
:precision binary64
(if (or (<= (* a 120.0) -0.0004)
(not
(or (<= (* a 120.0) -2e-69)
(and (not (<= (* a 120.0) -1e-137)) (<= (* a 120.0) 2e-26)))))
(* a 120.0)
(* 60.0 (/ (- y x) (- t z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((a * 120.0) <= -0.0004) || !(((a * 120.0) <= -2e-69) || (!((a * 120.0) <= -1e-137) && ((a * 120.0) <= 2e-26)))) {
tmp = a * 120.0;
} else {
tmp = 60.0 * ((y - x) / (t - z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (((a * 120.0d0) <= (-0.0004d0)) .or. (.not. ((a * 120.0d0) <= (-2d-69)) .or. (.not. ((a * 120.0d0) <= (-1d-137))) .and. ((a * 120.0d0) <= 2d-26))) then
tmp = a * 120.0d0
else
tmp = 60.0d0 * ((y - x) / (t - z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (((a * 120.0) <= -0.0004) || !(((a * 120.0) <= -2e-69) || (!((a * 120.0) <= -1e-137) && ((a * 120.0) <= 2e-26)))) {
tmp = a * 120.0;
} else {
tmp = 60.0 * ((y - x) / (t - z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if ((a * 120.0) <= -0.0004) or not (((a * 120.0) <= -2e-69) or (not ((a * 120.0) <= -1e-137) and ((a * 120.0) <= 2e-26))): tmp = a * 120.0 else: tmp = 60.0 * ((y - x) / (t - z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((Float64(a * 120.0) <= -0.0004) || !((Float64(a * 120.0) <= -2e-69) || (!(Float64(a * 120.0) <= -1e-137) && (Float64(a * 120.0) <= 2e-26)))) tmp = Float64(a * 120.0); else tmp = Float64(60.0 * Float64(Float64(y - x) / Float64(t - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (((a * 120.0) <= -0.0004) || ~((((a * 120.0) <= -2e-69) || (~(((a * 120.0) <= -1e-137)) && ((a * 120.0) <= 2e-26))))) tmp = a * 120.0; else tmp = 60.0 * ((y - x) / (t - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[N[(a * 120.0), $MachinePrecision], -0.0004], N[Not[Or[LessEqual[N[(a * 120.0), $MachinePrecision], -2e-69], And[N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], -1e-137]], $MachinePrecision], LessEqual[N[(a * 120.0), $MachinePrecision], 2e-26]]]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(60.0 * N[(N[(y - x), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -0.0004 \lor \neg \left(a \cdot 120 \leq -2 \cdot 10^{-69} \lor \neg \left(a \cdot 120 \leq -1 \cdot 10^{-137}\right) \land a \cdot 120 \leq 2 \cdot 10^{-26}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{y - x}{t - z}\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -4.00000000000000019e-4 or -1.9999999999999999e-69 < (*.f64 a #s(literal 120 binary64)) < -9.99999999999999978e-138 or 2.0000000000000001e-26 < (*.f64 a #s(literal 120 binary64)) Initial program 97.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 70.5%
if -4.00000000000000019e-4 < (*.f64 a #s(literal 120 binary64)) < -1.9999999999999999e-69 or -9.99999999999999978e-138 < (*.f64 a #s(literal 120 binary64)) < 2.0000000000000001e-26Initial program 98.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 84.1%
Final simplification76.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* 60.0 (/ (- y x) (- t z)))))
(if (<= (* a 120.0) -0.0004)
(* a 120.0)
(if (<= (* a 120.0) -2e-69)
t_1
(if (<= (* a 120.0) -1e-137)
(* a 120.0)
(if (<= (* a 120.0) 2e-26) t_1 (+ (* a 120.0) (* -60.0 (/ y z)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * ((y - x) / (t - z));
double tmp;
if ((a * 120.0) <= -0.0004) {
tmp = a * 120.0;
} else if ((a * 120.0) <= -2e-69) {
tmp = t_1;
} else if ((a * 120.0) <= -1e-137) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 2e-26) {
tmp = t_1;
} else {
tmp = (a * 120.0) + (-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) :: t_1
real(8) :: tmp
t_1 = 60.0d0 * ((y - x) / (t - z))
if ((a * 120.0d0) <= (-0.0004d0)) then
tmp = a * 120.0d0
else if ((a * 120.0d0) <= (-2d-69)) then
tmp = t_1
else if ((a * 120.0d0) <= (-1d-137)) then
tmp = a * 120.0d0
else if ((a * 120.0d0) <= 2d-26) then
tmp = t_1
else
tmp = (a * 120.0d0) + ((-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 t_1 = 60.0 * ((y - x) / (t - z));
double tmp;
if ((a * 120.0) <= -0.0004) {
tmp = a * 120.0;
} else if ((a * 120.0) <= -2e-69) {
tmp = t_1;
} else if ((a * 120.0) <= -1e-137) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 2e-26) {
tmp = t_1;
} else {
tmp = (a * 120.0) + (-60.0 * (y / z));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = 60.0 * ((y - x) / (t - z)) tmp = 0 if (a * 120.0) <= -0.0004: tmp = a * 120.0 elif (a * 120.0) <= -2e-69: tmp = t_1 elif (a * 120.0) <= -1e-137: tmp = a * 120.0 elif (a * 120.0) <= 2e-26: tmp = t_1 else: tmp = (a * 120.0) + (-60.0 * (y / z)) return tmp
function code(x, y, z, t, a) t_1 = Float64(60.0 * Float64(Float64(y - x) / Float64(t - z))) tmp = 0.0 if (Float64(a * 120.0) <= -0.0004) tmp = Float64(a * 120.0); elseif (Float64(a * 120.0) <= -2e-69) tmp = t_1; elseif (Float64(a * 120.0) <= -1e-137) tmp = Float64(a * 120.0); elseif (Float64(a * 120.0) <= 2e-26) tmp = t_1; else tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = 60.0 * ((y - x) / (t - z)); tmp = 0.0; if ((a * 120.0) <= -0.0004) tmp = a * 120.0; elseif ((a * 120.0) <= -2e-69) tmp = t_1; elseif ((a * 120.0) <= -1e-137) tmp = a * 120.0; elseif ((a * 120.0) <= 2e-26) tmp = t_1; else tmp = (a * 120.0) + (-60.0 * (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(60.0 * N[(N[(y - x), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * 120.0), $MachinePrecision], -0.0004], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], -2e-69], t$95$1, If[LessEqual[N[(a * 120.0), $MachinePrecision], -1e-137], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 2e-26], t$95$1, N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 60 \cdot \frac{y - x}{t - z}\\
\mathbf{if}\;a \cdot 120 \leq -0.0004:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq -2 \cdot 10^{-69}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \cdot 120 \leq -1 \cdot 10^{-137}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{-26}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -4.00000000000000019e-4 or -1.9999999999999999e-69 < (*.f64 a #s(literal 120 binary64)) < -9.99999999999999978e-138Initial program 98.5%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 71.5%
if -4.00000000000000019e-4 < (*.f64 a #s(literal 120 binary64)) < -1.9999999999999999e-69 or -9.99999999999999978e-138 < (*.f64 a #s(literal 120 binary64)) < 2.0000000000000001e-26Initial program 98.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 84.1%
if 2.0000000000000001e-26 < (*.f64 a #s(literal 120 binary64)) Initial program 97.1%
associate-/l*99.9%
Simplified99.9%
clear-num99.9%
un-div-inv100.0%
Applied egg-rr100.0%
clear-num99.9%
inv-pow99.9%
Applied egg-rr99.9%
unpow-199.9%
Simplified99.9%
Taylor expanded in x around 0 82.5%
neg-mul-182.5%
distribute-neg-frac282.5%
neg-sub082.5%
associate--r-82.5%
neg-sub082.5%
Simplified82.5%
Taylor expanded in z around inf 72.5%
Final simplification77.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* 60.0 (/ (- y x) (- t z))))
(t_2 (+ (* a 120.0) (* 60.0 (/ y t)))))
(if (<= (* a 120.0) -0.0004)
t_2
(if (<= (* a 120.0) -1e-76)
t_1
(if (<= (* a 120.0) -1e-137)
t_2
(if (<= (* a 120.0) 2e-26) t_1 (+ (* a 120.0) (* -60.0 (/ y z)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * ((y - x) / (t - z));
double t_2 = (a * 120.0) + (60.0 * (y / t));
double tmp;
if ((a * 120.0) <= -0.0004) {
tmp = t_2;
} else if ((a * 120.0) <= -1e-76) {
tmp = t_1;
} else if ((a * 120.0) <= -1e-137) {
tmp = t_2;
} else if ((a * 120.0) <= 2e-26) {
tmp = t_1;
} else {
tmp = (a * 120.0) + (-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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 60.0d0 * ((y - x) / (t - z))
t_2 = (a * 120.0d0) + (60.0d0 * (y / t))
if ((a * 120.0d0) <= (-0.0004d0)) then
tmp = t_2
else if ((a * 120.0d0) <= (-1d-76)) then
tmp = t_1
else if ((a * 120.0d0) <= (-1d-137)) then
tmp = t_2
else if ((a * 120.0d0) <= 2d-26) then
tmp = t_1
else
tmp = (a * 120.0d0) + ((-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 t_1 = 60.0 * ((y - x) / (t - z));
double t_2 = (a * 120.0) + (60.0 * (y / t));
double tmp;
if ((a * 120.0) <= -0.0004) {
tmp = t_2;
} else if ((a * 120.0) <= -1e-76) {
tmp = t_1;
} else if ((a * 120.0) <= -1e-137) {
tmp = t_2;
} else if ((a * 120.0) <= 2e-26) {
tmp = t_1;
} else {
tmp = (a * 120.0) + (-60.0 * (y / z));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = 60.0 * ((y - x) / (t - z)) t_2 = (a * 120.0) + (60.0 * (y / t)) tmp = 0 if (a * 120.0) <= -0.0004: tmp = t_2 elif (a * 120.0) <= -1e-76: tmp = t_1 elif (a * 120.0) <= -1e-137: tmp = t_2 elif (a * 120.0) <= 2e-26: tmp = t_1 else: tmp = (a * 120.0) + (-60.0 * (y / z)) return tmp
function code(x, y, z, t, a) t_1 = Float64(60.0 * Float64(Float64(y - x) / Float64(t - z))) t_2 = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(y / t))) tmp = 0.0 if (Float64(a * 120.0) <= -0.0004) tmp = t_2; elseif (Float64(a * 120.0) <= -1e-76) tmp = t_1; elseif (Float64(a * 120.0) <= -1e-137) tmp = t_2; elseif (Float64(a * 120.0) <= 2e-26) tmp = t_1; else tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = 60.0 * ((y - x) / (t - z)); t_2 = (a * 120.0) + (60.0 * (y / t)); tmp = 0.0; if ((a * 120.0) <= -0.0004) tmp = t_2; elseif ((a * 120.0) <= -1e-76) tmp = t_1; elseif ((a * 120.0) <= -1e-137) tmp = t_2; elseif ((a * 120.0) <= 2e-26) tmp = t_1; else tmp = (a * 120.0) + (-60.0 * (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(60.0 * N[(N[(y - x), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * 120.0), $MachinePrecision], -0.0004], t$95$2, If[LessEqual[N[(a * 120.0), $MachinePrecision], -1e-76], t$95$1, If[LessEqual[N[(a * 120.0), $MachinePrecision], -1e-137], t$95$2, If[LessEqual[N[(a * 120.0), $MachinePrecision], 2e-26], t$95$1, N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 60 \cdot \frac{y - x}{t - z}\\
t_2 := a \cdot 120 + 60 \cdot \frac{y}{t}\\
\mathbf{if}\;a \cdot 120 \leq -0.0004:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \cdot 120 \leq -1 \cdot 10^{-76}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \cdot 120 \leq -1 \cdot 10^{-137}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{-26}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -4.00000000000000019e-4 or -9.99999999999999927e-77 < (*.f64 a #s(literal 120 binary64)) < -9.99999999999999978e-138Initial program 98.5%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around 0 75.3%
associate-*r/75.3%
*-commutative75.3%
associate-/l*75.3%
Simplified75.3%
Taylor expanded in x around 0 73.8%
if -4.00000000000000019e-4 < (*.f64 a #s(literal 120 binary64)) < -9.99999999999999927e-77 or -9.99999999999999978e-138 < (*.f64 a #s(literal 120 binary64)) < 2.0000000000000001e-26Initial program 98.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 83.4%
if 2.0000000000000001e-26 < (*.f64 a #s(literal 120 binary64)) Initial program 97.1%
associate-/l*99.9%
Simplified99.9%
clear-num99.9%
un-div-inv100.0%
Applied egg-rr100.0%
clear-num99.9%
inv-pow99.9%
Applied egg-rr99.9%
unpow-199.9%
Simplified99.9%
Taylor expanded in x around 0 82.5%
neg-mul-182.5%
distribute-neg-frac282.5%
neg-sub082.5%
associate--r-82.5%
neg-sub082.5%
Simplified82.5%
Taylor expanded in z around inf 72.5%
Final simplification77.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* 60.0 (/ (- y x) (- t z)))))
(if (<= (* a 120.0) -0.0004)
(+ (* a 120.0) (* 60.0 (/ y t)))
(if (<= (* a 120.0) -1e-76)
t_1
(if (<= (* a 120.0) -1e-137)
(+ (* a 120.0) (/ 60.0 (/ t y)))
(if (<= (* a 120.0) 2e-26) t_1 (+ (* a 120.0) (* -60.0 (/ y z)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * ((y - x) / (t - z));
double tmp;
if ((a * 120.0) <= -0.0004) {
tmp = (a * 120.0) + (60.0 * (y / t));
} else if ((a * 120.0) <= -1e-76) {
tmp = t_1;
} else if ((a * 120.0) <= -1e-137) {
tmp = (a * 120.0) + (60.0 / (t / y));
} else if ((a * 120.0) <= 2e-26) {
tmp = t_1;
} else {
tmp = (a * 120.0) + (-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) :: t_1
real(8) :: tmp
t_1 = 60.0d0 * ((y - x) / (t - z))
if ((a * 120.0d0) <= (-0.0004d0)) then
tmp = (a * 120.0d0) + (60.0d0 * (y / t))
else if ((a * 120.0d0) <= (-1d-76)) then
tmp = t_1
else if ((a * 120.0d0) <= (-1d-137)) then
tmp = (a * 120.0d0) + (60.0d0 / (t / y))
else if ((a * 120.0d0) <= 2d-26) then
tmp = t_1
else
tmp = (a * 120.0d0) + ((-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 t_1 = 60.0 * ((y - x) / (t - z));
double tmp;
if ((a * 120.0) <= -0.0004) {
tmp = (a * 120.0) + (60.0 * (y / t));
} else if ((a * 120.0) <= -1e-76) {
tmp = t_1;
} else if ((a * 120.0) <= -1e-137) {
tmp = (a * 120.0) + (60.0 / (t / y));
} else if ((a * 120.0) <= 2e-26) {
tmp = t_1;
} else {
tmp = (a * 120.0) + (-60.0 * (y / z));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = 60.0 * ((y - x) / (t - z)) tmp = 0 if (a * 120.0) <= -0.0004: tmp = (a * 120.0) + (60.0 * (y / t)) elif (a * 120.0) <= -1e-76: tmp = t_1 elif (a * 120.0) <= -1e-137: tmp = (a * 120.0) + (60.0 / (t / y)) elif (a * 120.0) <= 2e-26: tmp = t_1 else: tmp = (a * 120.0) + (-60.0 * (y / z)) return tmp
function code(x, y, z, t, a) t_1 = Float64(60.0 * Float64(Float64(y - x) / Float64(t - z))) tmp = 0.0 if (Float64(a * 120.0) <= -0.0004) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(y / t))); elseif (Float64(a * 120.0) <= -1e-76) tmp = t_1; elseif (Float64(a * 120.0) <= -1e-137) tmp = Float64(Float64(a * 120.0) + Float64(60.0 / Float64(t / y))); elseif (Float64(a * 120.0) <= 2e-26) tmp = t_1; else tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = 60.0 * ((y - x) / (t - z)); tmp = 0.0; if ((a * 120.0) <= -0.0004) tmp = (a * 120.0) + (60.0 * (y / t)); elseif ((a * 120.0) <= -1e-76) tmp = t_1; elseif ((a * 120.0) <= -1e-137) tmp = (a * 120.0) + (60.0 / (t / y)); elseif ((a * 120.0) <= 2e-26) tmp = t_1; else tmp = (a * 120.0) + (-60.0 * (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(60.0 * N[(N[(y - x), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * 120.0), $MachinePrecision], -0.0004], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], -1e-76], t$95$1, If[LessEqual[N[(a * 120.0), $MachinePrecision], -1e-137], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 2e-26], t$95$1, N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 60 \cdot \frac{y - x}{t - z}\\
\mathbf{if}\;a \cdot 120 \leq -0.0004:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t}\\
\mathbf{elif}\;a \cdot 120 \leq -1 \cdot 10^{-76}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \cdot 120 \leq -1 \cdot 10^{-137}:\\
\;\;\;\;a \cdot 120 + \frac{60}{\frac{t}{y}}\\
\mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{-26}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -4.00000000000000019e-4Initial program 98.3%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around 0 74.3%
associate-*r/74.2%
*-commutative74.2%
associate-/l*74.3%
Simplified74.3%
Taylor expanded in x around 0 73.0%
if -4.00000000000000019e-4 < (*.f64 a #s(literal 120 binary64)) < -9.99999999999999927e-77 or -9.99999999999999978e-138 < (*.f64 a #s(literal 120 binary64)) < 2.0000000000000001e-26Initial program 98.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 83.4%
if -9.99999999999999927e-77 < (*.f64 a #s(literal 120 binary64)) < -9.99999999999999978e-138Initial program 99.6%
associate-/l*99.9%
Simplified99.9%
clear-num99.9%
un-div-inv99.7%
Applied egg-rr99.7%
clear-num99.7%
inv-pow99.7%
Applied egg-rr99.7%
unpow-199.7%
Simplified99.7%
Taylor expanded in x around 0 86.9%
neg-mul-186.9%
distribute-neg-frac286.9%
neg-sub086.9%
associate--r-86.9%
neg-sub086.9%
Simplified86.9%
Taylor expanded in z around 0 78.6%
if 2.0000000000000001e-26 < (*.f64 a #s(literal 120 binary64)) Initial program 97.1%
associate-/l*99.9%
Simplified99.9%
clear-num99.9%
un-div-inv100.0%
Applied egg-rr100.0%
clear-num99.9%
inv-pow99.9%
Applied egg-rr99.9%
unpow-199.9%
Simplified99.9%
Taylor expanded in x around 0 82.5%
neg-mul-182.5%
distribute-neg-frac282.5%
neg-sub082.5%
associate--r-82.5%
neg-sub082.5%
Simplified82.5%
Taylor expanded in z around inf 72.5%
Final simplification77.6%
(FPCore (x y z t a)
:precision binary64
(if (<= (- z t) -1.2e+190)
(* a 120.0)
(if (<= (- z t) -5e+87)
(+ (* a 120.0) (/ (* x 60.0) z))
(if (<= (- z t) 2e+67)
(* 60.0 (/ (- y x) (- t z)))
(if (<= (- z t) 2e+211)
(+ (* a 120.0) (* -60.0 (/ y z)))
(+ (* a 120.0) (/ 60.0 (/ t y))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z - t) <= -1.2e+190) {
tmp = a * 120.0;
} else if ((z - t) <= -5e+87) {
tmp = (a * 120.0) + ((x * 60.0) / z);
} else if ((z - t) <= 2e+67) {
tmp = 60.0 * ((y - x) / (t - z));
} else if ((z - t) <= 2e+211) {
tmp = (a * 120.0) + (-60.0 * (y / z));
} else {
tmp = (a * 120.0) + (60.0 / (t / y));
}
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 - t) <= (-1.2d+190)) then
tmp = a * 120.0d0
else if ((z - t) <= (-5d+87)) then
tmp = (a * 120.0d0) + ((x * 60.0d0) / z)
else if ((z - t) <= 2d+67) then
tmp = 60.0d0 * ((y - x) / (t - z))
else if ((z - t) <= 2d+211) then
tmp = (a * 120.0d0) + ((-60.0d0) * (y / z))
else
tmp = (a * 120.0d0) + (60.0d0 / (t / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z - t) <= -1.2e+190) {
tmp = a * 120.0;
} else if ((z - t) <= -5e+87) {
tmp = (a * 120.0) + ((x * 60.0) / z);
} else if ((z - t) <= 2e+67) {
tmp = 60.0 * ((y - x) / (t - z));
} else if ((z - t) <= 2e+211) {
tmp = (a * 120.0) + (-60.0 * (y / z));
} else {
tmp = (a * 120.0) + (60.0 / (t / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z - t) <= -1.2e+190: tmp = a * 120.0 elif (z - t) <= -5e+87: tmp = (a * 120.0) + ((x * 60.0) / z) elif (z - t) <= 2e+67: tmp = 60.0 * ((y - x) / (t - z)) elif (z - t) <= 2e+211: tmp = (a * 120.0) + (-60.0 * (y / z)) else: tmp = (a * 120.0) + (60.0 / (t / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(z - t) <= -1.2e+190) tmp = Float64(a * 120.0); elseif (Float64(z - t) <= -5e+87) tmp = Float64(Float64(a * 120.0) + Float64(Float64(x * 60.0) / z)); elseif (Float64(z - t) <= 2e+67) tmp = Float64(60.0 * Float64(Float64(y - x) / Float64(t - z))); elseif (Float64(z - t) <= 2e+211) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / z))); else tmp = Float64(Float64(a * 120.0) + Float64(60.0 / Float64(t / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z - t) <= -1.2e+190) tmp = a * 120.0; elseif ((z - t) <= -5e+87) tmp = (a * 120.0) + ((x * 60.0) / z); elseif ((z - t) <= 2e+67) tmp = 60.0 * ((y - x) / (t - z)); elseif ((z - t) <= 2e+211) tmp = (a * 120.0) + (-60.0 * (y / z)); else tmp = (a * 120.0) + (60.0 / (t / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(z - t), $MachinePrecision], -1.2e+190], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(z - t), $MachinePrecision], -5e+87], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(x * 60.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z - t), $MachinePrecision], 2e+67], N[(60.0 * N[(N[(y - x), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z - t), $MachinePrecision], 2e+211], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z - t \leq -1.2 \cdot 10^{+190}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;z - t \leq -5 \cdot 10^{+87}:\\
\;\;\;\;a \cdot 120 + \frac{x \cdot 60}{z}\\
\mathbf{elif}\;z - t \leq 2 \cdot 10^{+67}:\\
\;\;\;\;60 \cdot \frac{y - x}{t - z}\\
\mathbf{elif}\;z - t \leq 2 \cdot 10^{+211}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{60}{\frac{t}{y}}\\
\end{array}
\end{array}
if (-.f64 z t) < -1.1999999999999999e190Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 79.2%
if -1.1999999999999999e190 < (-.f64 z t) < -4.9999999999999998e87Initial program 96.0%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 87.9%
associate-*r/87.9%
*-commutative87.9%
associate-*r/87.9%
Simplified87.9%
Taylor expanded in z around inf 84.1%
associate-*r/84.1%
*-commutative84.1%
Simplified84.1%
if -4.9999999999999998e87 < (-.f64 z t) < 1.99999999999999997e67Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 79.9%
if 1.99999999999999997e67 < (-.f64 z t) < 1.9999999999999999e211Initial program 97.7%
associate-/l*99.8%
Simplified99.8%
clear-num99.7%
un-div-inv99.7%
Applied egg-rr99.7%
clear-num99.8%
inv-pow99.8%
Applied egg-rr99.8%
unpow-199.8%
Simplified99.8%
Taylor expanded in x around 0 83.7%
neg-mul-183.7%
distribute-neg-frac283.7%
neg-sub083.7%
associate--r-83.7%
neg-sub083.7%
Simplified83.7%
Taylor expanded in z around inf 71.7%
if 1.9999999999999999e211 < (-.f64 z t) Initial program 94.3%
associate-/l*99.8%
Simplified99.8%
clear-num99.8%
un-div-inv99.8%
Applied egg-rr99.8%
clear-num99.6%
inv-pow99.6%
Applied egg-rr99.6%
unpow-199.6%
Simplified99.6%
Taylor expanded in x around 0 85.0%
neg-mul-185.0%
distribute-neg-frac285.0%
neg-sub085.0%
associate--r-85.0%
neg-sub085.0%
Simplified85.0%
Taylor expanded in z around 0 74.0%
Final simplification77.9%
(FPCore (x y z t a)
:precision binary64
(if (or (<= a -2.8e-12)
(and (not (<= a -5.2e-75)) (or (<= a -3.6e-143) (not (<= a 5e-44)))))
(* a 120.0)
(* 60.0 (/ (- x y) z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.8e-12) || (!(a <= -5.2e-75) && ((a <= -3.6e-143) || !(a <= 5e-44)))) {
tmp = a * 120.0;
} else {
tmp = 60.0 * ((x - 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 <= (-2.8d-12)) .or. (.not. (a <= (-5.2d-75))) .and. (a <= (-3.6d-143)) .or. (.not. (a <= 5d-44))) then
tmp = a * 120.0d0
else
tmp = 60.0d0 * ((x - 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 <= -2.8e-12) || (!(a <= -5.2e-75) && ((a <= -3.6e-143) || !(a <= 5e-44)))) {
tmp = a * 120.0;
} else {
tmp = 60.0 * ((x - y) / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -2.8e-12) or (not (a <= -5.2e-75) and ((a <= -3.6e-143) or not (a <= 5e-44))): tmp = a * 120.0 else: tmp = 60.0 * ((x - y) / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -2.8e-12) || (!(a <= -5.2e-75) && ((a <= -3.6e-143) || !(a <= 5e-44)))) tmp = Float64(a * 120.0); else tmp = Float64(60.0 * Float64(Float64(x - y) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -2.8e-12) || (~((a <= -5.2e-75)) && ((a <= -3.6e-143) || ~((a <= 5e-44))))) tmp = a * 120.0; else tmp = 60.0 * ((x - y) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -2.8e-12], And[N[Not[LessEqual[a, -5.2e-75]], $MachinePrecision], Or[LessEqual[a, -3.6e-143], N[Not[LessEqual[a, 5e-44]], $MachinePrecision]]]], N[(a * 120.0), $MachinePrecision], N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.8 \cdot 10^{-12} \lor \neg \left(a \leq -5.2 \cdot 10^{-75}\right) \land \left(a \leq -3.6 \cdot 10^{-143} \lor \neg \left(a \leq 5 \cdot 10^{-44}\right)\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z}\\
\end{array}
\end{array}
if a < -2.8000000000000002e-12 or -5.2e-75 < a < -3.5999999999999998e-143 or 5.00000000000000039e-44 < a Initial program 97.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 69.3%
if -2.8000000000000002e-12 < a < -5.2e-75 or -3.5999999999999998e-143 < a < 5.00000000000000039e-44Initial program 98.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 84.5%
Taylor expanded in z around inf 58.2%
Final simplification64.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2.1e+26) (not (<= z 3.75e-47))) (+ (* a 120.0) (/ 60.0 (/ z (- x y)))) (- (* a 120.0) (* (/ -60.0 t) (- y x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.1e+26) || !(z <= 3.75e-47)) {
tmp = (a * 120.0) + (60.0 / (z / (x - y)));
} else {
tmp = (a * 120.0) - ((-60.0 / t) * (y - x));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-2.1d+26)) .or. (.not. (z <= 3.75d-47))) then
tmp = (a * 120.0d0) + (60.0d0 / (z / (x - y)))
else
tmp = (a * 120.0d0) - (((-60.0d0) / t) * (y - x))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.1e+26) || !(z <= 3.75e-47)) {
tmp = (a * 120.0) + (60.0 / (z / (x - y)));
} else {
tmp = (a * 120.0) - ((-60.0 / t) * (y - x));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2.1e+26) or not (z <= 3.75e-47): tmp = (a * 120.0) + (60.0 / (z / (x - y))) else: tmp = (a * 120.0) - ((-60.0 / t) * (y - x)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2.1e+26) || !(z <= 3.75e-47)) tmp = Float64(Float64(a * 120.0) + Float64(60.0 / Float64(z / Float64(x - y)))); else tmp = Float64(Float64(a * 120.0) - Float64(Float64(-60.0 / t) * Float64(y - x))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -2.1e+26) || ~((z <= 3.75e-47))) tmp = (a * 120.0) + (60.0 / (z / (x - y))); else tmp = (a * 120.0) - ((-60.0 / t) * (y - x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.1e+26], N[Not[LessEqual[z, 3.75e-47]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 / N[(z / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] - N[(N[(-60.0 / t), $MachinePrecision] * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.1 \cdot 10^{+26} \lor \neg \left(z \leq 3.75 \cdot 10^{-47}\right):\\
\;\;\;\;a \cdot 120 + \frac{60}{\frac{z}{x - y}}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 - \frac{-60}{t} \cdot \left(y - x\right)\\
\end{array}
\end{array}
if z < -2.1000000000000001e26 or 3.74999999999999984e-47 < z Initial program 98.3%
associate-/l*99.8%
Simplified99.8%
clear-num99.7%
un-div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in z around inf 91.8%
if -2.1000000000000001e26 < z < 3.74999999999999984e-47Initial program 98.2%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around 0 84.2%
associate-*r/82.6%
*-commutative82.6%
associate-/l*84.3%
Simplified84.3%
Final simplification88.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -1.45e+94) (not (<= y 7.6e+38))) (+ (* 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.45e+94) || !(y <= 7.6e+38)) {
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.45d+94)) .or. (.not. (y <= 7.6d+38))) 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.45e+94) || !(y <= 7.6e+38)) {
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.45e+94) or not (y <= 7.6e+38): 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.45e+94) || !(y <= 7.6e+38)) 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.45e+94) || ~((y <= 7.6e+38))) 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.45e+94], N[Not[LessEqual[y, 7.6e+38]], $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.45 \cdot 10^{+94} \lor \neg \left(y \leq 7.6 \cdot 10^{+38}\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.4499999999999999e94 or 7.5999999999999996e38 < y Initial program 96.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 88.0%
associate-*r/84.9%
Simplified84.9%
if -1.4499999999999999e94 < y < 7.5999999999999996e38Initial program 99.2%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 94.5%
associate-*r/93.9%
*-commutative93.9%
associate-*r/94.5%
Simplified94.5%
Final simplification90.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -4.8e+93) (not (<= y 4.5e+37))) (+ (* a 120.0) (/ 60.0 (/ (- t z) y))) (+ (* a 120.0) (* x (/ 60.0 (- z t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -4.8e+93) || !(y <= 4.5e+37)) {
tmp = (a * 120.0) + (60.0 / ((t - z) / y));
} 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 <= (-4.8d+93)) .or. (.not. (y <= 4.5d+37))) then
tmp = (a * 120.0d0) + (60.0d0 / ((t - z) / y))
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 <= -4.8e+93) || !(y <= 4.5e+37)) {
tmp = (a * 120.0) + (60.0 / ((t - z) / y));
} else {
tmp = (a * 120.0) + (x * (60.0 / (z - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -4.8e+93) or not (y <= 4.5e+37): tmp = (a * 120.0) + (60.0 / ((t - z) / y)) else: tmp = (a * 120.0) + (x * (60.0 / (z - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -4.8e+93) || !(y <= 4.5e+37)) tmp = Float64(Float64(a * 120.0) + Float64(60.0 / Float64(Float64(t - z) / y))); 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 <= -4.8e+93) || ~((y <= 4.5e+37))) tmp = (a * 120.0) + (60.0 / ((t - z) / y)); 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, -4.8e+93], N[Not[LessEqual[y, 4.5e+37]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 / N[(N[(t - z), $MachinePrecision] / y), $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 -4.8 \cdot 10^{+93} \lor \neg \left(y \leq 4.5 \cdot 10^{+37}\right):\\
\;\;\;\;a \cdot 120 + \frac{60}{\frac{t - z}{y}}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + x \cdot \frac{60}{z - t}\\
\end{array}
\end{array}
if y < -4.80000000000000021e93 or 4.49999999999999962e37 < y Initial program 96.8%
associate-/l*99.8%
Simplified99.8%
clear-num99.7%
un-div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in x around 0 87.9%
associate-*r/87.9%
neg-mul-187.9%
Simplified87.9%
if -4.80000000000000021e93 < y < 4.49999999999999962e37Initial program 99.2%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 94.5%
associate-*r/93.9%
*-commutative93.9%
associate-*r/94.5%
Simplified94.5%
Final simplification92.0%
(FPCore (x y z t a)
:precision binary64
(if (<= y -1.7e+36)
(* 60.0 (/ (- y x) (- t z)))
(if (<= y 1.3e+123)
(+ (* a 120.0) (* x (/ 60.0 (- z t))))
(/ 60.0 (/ (- z t) (- x y))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.7e+36) {
tmp = 60.0 * ((y - x) / (t - z));
} else if (y <= 1.3e+123) {
tmp = (a * 120.0) + (x * (60.0 / (z - t)));
} else {
tmp = 60.0 / ((z - t) / (x - y));
}
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.7d+36)) then
tmp = 60.0d0 * ((y - x) / (t - z))
else if (y <= 1.3d+123) then
tmp = (a * 120.0d0) + (x * (60.0d0 / (z - t)))
else
tmp = 60.0d0 / ((z - t) / (x - y))
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.7e+36) {
tmp = 60.0 * ((y - x) / (t - z));
} else if (y <= 1.3e+123) {
tmp = (a * 120.0) + (x * (60.0 / (z - t)));
} else {
tmp = 60.0 / ((z - t) / (x - y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -1.7e+36: tmp = 60.0 * ((y - x) / (t - z)) elif y <= 1.3e+123: tmp = (a * 120.0) + (x * (60.0 / (z - t))) else: tmp = 60.0 / ((z - t) / (x - y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -1.7e+36) tmp = Float64(60.0 * Float64(Float64(y - x) / Float64(t - z))); elseif (y <= 1.3e+123) tmp = Float64(Float64(a * 120.0) + Float64(x * Float64(60.0 / Float64(z - t)))); else tmp = Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -1.7e+36) tmp = 60.0 * ((y - x) / (t - z)); elseif (y <= 1.3e+123) tmp = (a * 120.0) + (x * (60.0 / (z - t))); else tmp = 60.0 / ((z - t) / (x - y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -1.7e+36], N[(60.0 * N[(N[(y - x), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.3e+123], N[(N[(a * 120.0), $MachinePrecision] + N[(x * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.7 \cdot 10^{+36}:\\
\;\;\;\;60 \cdot \frac{y - x}{t - z}\\
\mathbf{elif}\;y \leq 1.3 \cdot 10^{+123}:\\
\;\;\;\;a \cdot 120 + x \cdot \frac{60}{z - t}\\
\mathbf{else}:\\
\;\;\;\;\frac{60}{\frac{z - t}{x - y}}\\
\end{array}
\end{array}
if y < -1.6999999999999999e36Initial program 96.3%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 75.1%
if -1.6999999999999999e36 < y < 1.29999999999999993e123Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 93.7%
associate-*r/93.7%
*-commutative93.7%
associate-*r/93.7%
Simplified93.7%
if 1.29999999999999993e123 < y Initial program 94.1%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 78.8%
clear-num99.6%
un-div-inv99.6%
Applied egg-rr78.8%
Final simplification87.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -9.5e-85) (not (<= z 2.05e-112))) (* a 120.0) (* -60.0 (/ (- x y) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -9.5e-85) || !(z <= 2.05e-112)) {
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 ((z <= (-9.5d-85)) .or. (.not. (z <= 2.05d-112))) 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 ((z <= -9.5e-85) || !(z <= 2.05e-112)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * ((x - y) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -9.5e-85) or not (z <= 2.05e-112): tmp = a * 120.0 else: tmp = -60.0 * ((x - y) / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -9.5e-85) || !(z <= 2.05e-112)) 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 ((z <= -9.5e-85) || ~((z <= 2.05e-112))) 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[z, -9.5e-85], N[Not[LessEqual[z, 2.05e-112]], $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}\;z \leq -9.5 \cdot 10^{-85} \lor \neg \left(z \leq 2.05 \cdot 10^{-112}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\
\end{array}
\end{array}
if z < -9.49999999999999964e-85 or 2.04999999999999998e-112 < z Initial program 98.7%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 58.7%
if -9.49999999999999964e-85 < z < 2.04999999999999998e-112Initial program 97.5%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 71.3%
Taylor expanded in z around 0 57.2%
Final simplification58.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -3.6e+108) (not (<= y 1.7e+217))) (* -60.0 (/ y (- t))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -3.6e+108) || !(y <= 1.7e+217)) {
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 ((y <= (-3.6d+108)) .or. (.not. (y <= 1.7d+217))) 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 ((y <= -3.6e+108) || !(y <= 1.7e+217)) {
tmp = -60.0 * (y / -t);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -3.6e+108) or not (y <= 1.7e+217): tmp = -60.0 * (y / -t) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -3.6e+108) || !(y <= 1.7e+217)) 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 ((y <= -3.6e+108) || ~((y <= 1.7e+217))) tmp = -60.0 * (y / -t); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -3.6e+108], N[Not[LessEqual[y, 1.7e+217]], $MachinePrecision]], N[(-60.0 * N[(y / (-t)), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.6 \cdot 10^{+108} \lor \neg \left(y \leq 1.7 \cdot 10^{+217}\right):\\
\;\;\;\;-60 \cdot \frac{y}{-t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if y < -3.6e108 or 1.6999999999999999e217 < y Initial program 94.7%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 78.2%
Taylor expanded in z around 0 50.6%
Taylor expanded in x around 0 46.6%
neg-mul-146.6%
distribute-neg-frac46.6%
Simplified46.6%
if -3.6e108 < y < 1.6999999999999999e217Initial program 99.3%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 55.9%
Final simplification53.8%
(FPCore (x y z t a) :precision binary64 (+ (* 60.0 (/ (- y x) (- t z))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return (60.0 * ((y - x) / (t - z))) + (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 * ((y - x) / (t - z))) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return (60.0 * ((y - x) / (t - z))) + (a * 120.0);
}
def code(x, y, z, t, a): return (60.0 * ((y - x) / (t - z))) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(60.0 * Float64(Float64(y - x) / Float64(t - z))) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = (60.0 * ((y - x) / (t - z))) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(60.0 * N[(N[(y - x), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
60 \cdot \frac{y - x}{t - z} + a \cdot 120
\end{array}
Initial program 98.3%
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 98.3%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 48.3%
Final simplification48.3%
(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 2024077
(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)))