
(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 17 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 (* (/ 60.0 (- z t)) (- x y))))
double code(double x, double y, double z, double t, double a) {
return fma(a, 120.0, ((60.0 / (z - t)) * (x - y)));
}
function code(x, y, z, t, a) return fma(a, 120.0, Float64(Float64(60.0 / Float64(z - t)) * Float64(x - y))) end
code[x_, y_, z_, t_, a_] := N[(a * 120.0 + N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(a, 120, \frac{60}{z - t} \cdot \left(x - y\right)\right)
\end{array}
Initial program 99.8%
+-commutative99.8%
fma-def99.8%
associate-*l/99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* 60.0 (/ x (- z t)))))
(if (<= a -2.45e-6)
(* a 120.0)
(if (<= a -1.4e-90)
(* -60.0 (/ y (- z t)))
(if (<= a -5.1e-104)
t_1
(if (<= a -4.6e-181)
(* 60.0 (/ (- x y) z))
(if (<= a -1.05e-228)
(* -60.0 (/ (- x y) t))
(if (<= a 1.1e-138) t_1 (* a 120.0)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * (x / (z - t));
double tmp;
if (a <= -2.45e-6) {
tmp = a * 120.0;
} else if (a <= -1.4e-90) {
tmp = -60.0 * (y / (z - t));
} else if (a <= -5.1e-104) {
tmp = t_1;
} else if (a <= -4.6e-181) {
tmp = 60.0 * ((x - y) / z);
} else if (a <= -1.05e-228) {
tmp = -60.0 * ((x - y) / t);
} else if (a <= 1.1e-138) {
tmp = t_1;
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = 60.0d0 * (x / (z - t))
if (a <= (-2.45d-6)) then
tmp = a * 120.0d0
else if (a <= (-1.4d-90)) then
tmp = (-60.0d0) * (y / (z - t))
else if (a <= (-5.1d-104)) then
tmp = t_1
else if (a <= (-4.6d-181)) then
tmp = 60.0d0 * ((x - y) / z)
else if (a <= (-1.05d-228)) then
tmp = (-60.0d0) * ((x - y) / t)
else if (a <= 1.1d-138) 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 / (z - t));
double tmp;
if (a <= -2.45e-6) {
tmp = a * 120.0;
} else if (a <= -1.4e-90) {
tmp = -60.0 * (y / (z - t));
} else if (a <= -5.1e-104) {
tmp = t_1;
} else if (a <= -4.6e-181) {
tmp = 60.0 * ((x - y) / z);
} else if (a <= -1.05e-228) {
tmp = -60.0 * ((x - y) / t);
} else if (a <= 1.1e-138) {
tmp = t_1;
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = 60.0 * (x / (z - t)) tmp = 0 if a <= -2.45e-6: tmp = a * 120.0 elif a <= -1.4e-90: tmp = -60.0 * (y / (z - t)) elif a <= -5.1e-104: tmp = t_1 elif a <= -4.6e-181: tmp = 60.0 * ((x - y) / z) elif a <= -1.05e-228: tmp = -60.0 * ((x - y) / t) elif a <= 1.1e-138: tmp = t_1 else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) t_1 = Float64(60.0 * Float64(x / Float64(z - t))) tmp = 0.0 if (a <= -2.45e-6) tmp = Float64(a * 120.0); elseif (a <= -1.4e-90) tmp = Float64(-60.0 * Float64(y / Float64(z - t))); elseif (a <= -5.1e-104) tmp = t_1; elseif (a <= -4.6e-181) tmp = Float64(60.0 * Float64(Float64(x - y) / z)); elseif (a <= -1.05e-228) tmp = Float64(-60.0 * Float64(Float64(x - y) / t)); elseif (a <= 1.1e-138) 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 / (z - t)); tmp = 0.0; if (a <= -2.45e-6) tmp = a * 120.0; elseif (a <= -1.4e-90) tmp = -60.0 * (y / (z - t)); elseif (a <= -5.1e-104) tmp = t_1; elseif (a <= -4.6e-181) tmp = 60.0 * ((x - y) / z); elseif (a <= -1.05e-228) tmp = -60.0 * ((x - y) / t); elseif (a <= 1.1e-138) tmp = t_1; else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.45e-6], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -1.4e-90], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -5.1e-104], t$95$1, If[LessEqual[a, -4.6e-181], N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -1.05e-228], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.1e-138], t$95$1, N[(a * 120.0), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 60 \cdot \frac{x}{z - t}\\
\mathbf{if}\;a \leq -2.45 \cdot 10^{-6}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -1.4 \cdot 10^{-90}:\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\mathbf{elif}\;a \leq -5.1 \cdot 10^{-104}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -4.6 \cdot 10^{-181}:\\
\;\;\;\;60 \cdot \frac{x - y}{z}\\
\mathbf{elif}\;a \leq -1.05 \cdot 10^{-228}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\
\mathbf{elif}\;a \leq 1.1 \cdot 10^{-138}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -2.44999999999999984e-6 or 1.0999999999999999e-138 < a Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 73.9%
if -2.44999999999999984e-6 < a < -1.3999999999999999e-90Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
associate-/r/99.9%
Applied egg-rr99.9%
Taylor expanded in y around inf 49.6%
if -1.3999999999999999e-90 < a < -5.09999999999999992e-104 or -1.04999999999999995e-228 < a < 1.0999999999999999e-138Initial program 99.7%
associate-/l*99.6%
Simplified99.6%
associate-/r/99.6%
Applied egg-rr99.6%
Taylor expanded in x around inf 58.6%
if -5.09999999999999992e-104 < a < -4.59999999999999982e-181Initial program 99.6%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in a around 0 87.6%
Taylor expanded in z around inf 75.5%
if -4.59999999999999982e-181 < a < -1.04999999999999995e-228Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 71.6%
Taylor expanded in z around 0 63.4%
Final simplification68.2%
(FPCore (x y z t a)
:precision binary64
(if (<= a -1.85e-6)
(* a 120.0)
(if (<= a -1.55e-90)
(* -60.0 (/ y (- z t)))
(if (<= a -3.2e-123)
(/ 60.0 (/ (- z t) x))
(if (<= a -7.5e-182)
(* 60.0 (/ (- x y) z))
(if (<= a -1.12e-228)
(* -60.0 (/ (- x y) t))
(if (<= a 2.9e-139) (* 60.0 (/ x (- z t))) (* a 120.0))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.85e-6) {
tmp = a * 120.0;
} else if (a <= -1.55e-90) {
tmp = -60.0 * (y / (z - t));
} else if (a <= -3.2e-123) {
tmp = 60.0 / ((z - t) / x);
} else if (a <= -7.5e-182) {
tmp = 60.0 * ((x - y) / z);
} else if (a <= -1.12e-228) {
tmp = -60.0 * ((x - y) / t);
} else if (a <= 2.9e-139) {
tmp = 60.0 * (x / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-1.85d-6)) then
tmp = a * 120.0d0
else if (a <= (-1.55d-90)) then
tmp = (-60.0d0) * (y / (z - t))
else if (a <= (-3.2d-123)) then
tmp = 60.0d0 / ((z - t) / x)
else if (a <= (-7.5d-182)) then
tmp = 60.0d0 * ((x - y) / z)
else if (a <= (-1.12d-228)) then
tmp = (-60.0d0) * ((x - y) / t)
else if (a <= 2.9d-139) then
tmp = 60.0d0 * (x / (z - t))
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.85e-6) {
tmp = a * 120.0;
} else if (a <= -1.55e-90) {
tmp = -60.0 * (y / (z - t));
} else if (a <= -3.2e-123) {
tmp = 60.0 / ((z - t) / x);
} else if (a <= -7.5e-182) {
tmp = 60.0 * ((x - y) / z);
} else if (a <= -1.12e-228) {
tmp = -60.0 * ((x - y) / t);
} else if (a <= 2.9e-139) {
tmp = 60.0 * (x / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.85e-6: tmp = a * 120.0 elif a <= -1.55e-90: tmp = -60.0 * (y / (z - t)) elif a <= -3.2e-123: tmp = 60.0 / ((z - t) / x) elif a <= -7.5e-182: tmp = 60.0 * ((x - y) / z) elif a <= -1.12e-228: tmp = -60.0 * ((x - y) / t) elif a <= 2.9e-139: tmp = 60.0 * (x / (z - t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.85e-6) tmp = Float64(a * 120.0); elseif (a <= -1.55e-90) tmp = Float64(-60.0 * Float64(y / Float64(z - t))); elseif (a <= -3.2e-123) tmp = Float64(60.0 / Float64(Float64(z - t) / x)); elseif (a <= -7.5e-182) tmp = Float64(60.0 * Float64(Float64(x - y) / z)); elseif (a <= -1.12e-228) tmp = Float64(-60.0 * Float64(Float64(x - y) / t)); elseif (a <= 2.9e-139) tmp = Float64(60.0 * Float64(x / Float64(z - t))); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.85e-6) tmp = a * 120.0; elseif (a <= -1.55e-90) tmp = -60.0 * (y / (z - t)); elseif (a <= -3.2e-123) tmp = 60.0 / ((z - t) / x); elseif (a <= -7.5e-182) tmp = 60.0 * ((x - y) / z); elseif (a <= -1.12e-228) tmp = -60.0 * ((x - y) / t); elseif (a <= 2.9e-139) tmp = 60.0 * (x / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.85e-6], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -1.55e-90], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -3.2e-123], N[(60.0 / N[(N[(z - t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -7.5e-182], N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -1.12e-228], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.9e-139], N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.85 \cdot 10^{-6}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -1.55 \cdot 10^{-90}:\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\mathbf{elif}\;a \leq -3.2 \cdot 10^{-123}:\\
\;\;\;\;\frac{60}{\frac{z - t}{x}}\\
\mathbf{elif}\;a \leq -7.5 \cdot 10^{-182}:\\
\;\;\;\;60 \cdot \frac{x - y}{z}\\
\mathbf{elif}\;a \leq -1.12 \cdot 10^{-228}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\
\mathbf{elif}\;a \leq 2.9 \cdot 10^{-139}:\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -1.8500000000000001e-6 or 2.8999999999999999e-139 < a Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 73.9%
if -1.8500000000000001e-6 < a < -1.5500000000000001e-90Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
associate-/r/99.9%
Applied egg-rr99.9%
Taylor expanded in y around inf 49.6%
if -1.5500000000000001e-90 < a < -3.19999999999999979e-123Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
associate-/r/99.3%
Applied egg-rr99.3%
Taylor expanded in x around inf 72.8%
associate-*r/73.0%
associate-/l*73.0%
Simplified73.0%
if -3.19999999999999979e-123 < a < -7.49999999999999935e-182Initial program 99.5%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in a around 0 92.3%
Taylor expanded in z around inf 77.5%
if -7.49999999999999935e-182 < a < -1.11999999999999996e-228Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 71.6%
Taylor expanded in z around 0 63.4%
if -1.11999999999999996e-228 < a < 2.8999999999999999e-139Initial program 99.7%
associate-/l*99.6%
Simplified99.6%
associate-/r/99.6%
Applied egg-rr99.6%
Taylor expanded in x around inf 57.1%
Final simplification68.2%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -2000000000.0)
(* a 120.0)
(if (<= (* a 120.0) 5e-28)
(* (/ 60.0 (- z t)) (- x y))
(if (<= (* a 120.0) 4e+130)
(+ (* a 120.0) (* -60.0 (/ x t)))
(+ (* a 120.0) (/ x (/ z 60.0)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -2000000000.0) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 5e-28) {
tmp = (60.0 / (z - t)) * (x - y);
} else if ((a * 120.0) <= 4e+130) {
tmp = (a * 120.0) + (-60.0 * (x / t));
} else {
tmp = (a * 120.0) + (x / (z / 60.0));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a * 120.0d0) <= (-2000000000.0d0)) then
tmp = a * 120.0d0
else if ((a * 120.0d0) <= 5d-28) then
tmp = (60.0d0 / (z - t)) * (x - y)
else if ((a * 120.0d0) <= 4d+130) then
tmp = (a * 120.0d0) + ((-60.0d0) * (x / t))
else
tmp = (a * 120.0d0) + (x / (z / 60.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -2000000000.0) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 5e-28) {
tmp = (60.0 / (z - t)) * (x - y);
} else if ((a * 120.0) <= 4e+130) {
tmp = (a * 120.0) + (-60.0 * (x / t));
} else {
tmp = (a * 120.0) + (x / (z / 60.0));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -2000000000.0: tmp = a * 120.0 elif (a * 120.0) <= 5e-28: tmp = (60.0 / (z - t)) * (x - y) elif (a * 120.0) <= 4e+130: tmp = (a * 120.0) + (-60.0 * (x / t)) else: tmp = (a * 120.0) + (x / (z / 60.0)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -2000000000.0) tmp = Float64(a * 120.0); elseif (Float64(a * 120.0) <= 5e-28) tmp = Float64(Float64(60.0 / Float64(z - t)) * Float64(x - y)); elseif (Float64(a * 120.0) <= 4e+130) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(x / t))); else tmp = Float64(Float64(a * 120.0) + Float64(x / Float64(z / 60.0))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a * 120.0) <= -2000000000.0) tmp = a * 120.0; elseif ((a * 120.0) <= 5e-28) tmp = (60.0 / (z - t)) * (x - y); elseif ((a * 120.0) <= 4e+130) tmp = (a * 120.0) + (-60.0 * (x / t)); else tmp = (a * 120.0) + (x / (z / 60.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -2000000000.0], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 5e-28], N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 4e+130], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(x / N[(z / 60.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -2000000000:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-28}:\\
\;\;\;\;\frac{60}{z - t} \cdot \left(x - y\right)\\
\mathbf{elif}\;a \cdot 120 \leq 4 \cdot 10^{+130}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{x}{\frac{z}{60}}\\
\end{array}
\end{array}
if (*.f64 a 120) < -2e9Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 87.2%
if -2e9 < (*.f64 a 120) < 5.0000000000000002e-28Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 76.0%
associate-*r/76.0%
*-commutative76.0%
associate-*r/76.0%
Simplified76.0%
if 5.0000000000000002e-28 < (*.f64 a 120) < 4.0000000000000002e130Initial program 99.9%
Taylor expanded in x around inf 83.2%
*-commutative83.2%
Simplified83.2%
Taylor expanded in z around 0 76.9%
if 4.0000000000000002e130 < (*.f64 a 120) Initial program 100.0%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in z around inf 84.4%
Taylor expanded in x around inf 87.5%
*-commutative87.5%
associate-/r/87.5%
Simplified87.5%
Final simplification80.3%
(FPCore (x y z t a)
:precision binary64
(if (or (<= a -1.7)
(and (not (<= a 5.2e-31)) (or (<= a 1.85e+27) (not (<= a 2.4e+72)))))
(* 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 <= -1.7) || (!(a <= 5.2e-31) && ((a <= 1.85e+27) || !(a <= 2.4e+72)))) {
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 <= (-1.7d0)) .or. (.not. (a <= 5.2d-31)) .and. (a <= 1.85d+27) .or. (.not. (a <= 2.4d+72))) 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 <= -1.7) || (!(a <= 5.2e-31) && ((a <= 1.85e+27) || !(a <= 2.4e+72)))) {
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 <= -1.7) or (not (a <= 5.2e-31) and ((a <= 1.85e+27) or not (a <= 2.4e+72))): 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 <= -1.7) || (!(a <= 5.2e-31) && ((a <= 1.85e+27) || !(a <= 2.4e+72)))) 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 <= -1.7) || (~((a <= 5.2e-31)) && ((a <= 1.85e+27) || ~((a <= 2.4e+72))))) 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, -1.7], And[N[Not[LessEqual[a, 5.2e-31]], $MachinePrecision], Or[LessEqual[a, 1.85e+27], N[Not[LessEqual[a, 2.4e+72]], $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 -1.7 \lor \neg \left(a \leq 5.2 \cdot 10^{-31}\right) \land \left(a \leq 1.85 \cdot 10^{+27} \lor \neg \left(a \leq 2.4 \cdot 10^{+72}\right)\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\end{array}
\end{array}
if a < -1.69999999999999996 or 5.19999999999999991e-31 < a < 1.85000000000000001e27 or 2.4000000000000001e72 < a Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 84.6%
if -1.69999999999999996 < a < 5.19999999999999991e-31 or 1.85000000000000001e27 < a < 2.4000000000000001e72Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 76.9%
Final simplification80.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= (* a 120.0) -2000000000.0) (not (<= (* a 120.0) 5e-129))) (+ (* a 120.0) (* (/ 60.0 (- z t)) x)) (/ (* 60.0 (- x y)) (- z t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((a * 120.0) <= -2000000000.0) || !((a * 120.0) <= 5e-129)) {
tmp = (a * 120.0) + ((60.0 / (z - t)) * x);
} else {
tmp = (60.0 * (x - y)) / (z - t);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (((a * 120.0d0) <= (-2000000000.0d0)) .or. (.not. ((a * 120.0d0) <= 5d-129))) then
tmp = (a * 120.0d0) + ((60.0d0 / (z - t)) * x)
else
tmp = (60.0d0 * (x - y)) / (z - t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (((a * 120.0) <= -2000000000.0) || !((a * 120.0) <= 5e-129)) {
tmp = (a * 120.0) + ((60.0 / (z - t)) * x);
} else {
tmp = (60.0 * (x - y)) / (z - t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if ((a * 120.0) <= -2000000000.0) or not ((a * 120.0) <= 5e-129): tmp = (a * 120.0) + ((60.0 / (z - t)) * x) else: tmp = (60.0 * (x - y)) / (z - t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((Float64(a * 120.0) <= -2000000000.0) || !(Float64(a * 120.0) <= 5e-129)) tmp = Float64(Float64(a * 120.0) + Float64(Float64(60.0 / Float64(z - t)) * x)); else tmp = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (((a * 120.0) <= -2000000000.0) || ~(((a * 120.0) <= 5e-129))) tmp = (a * 120.0) + ((60.0 / (z - t)) * x); else tmp = (60.0 * (x - y)) / (z - t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[N[(a * 120.0), $MachinePrecision], -2000000000.0], N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 5e-129]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision], N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -2000000000 \lor \neg \left(a \cdot 120 \leq 5 \cdot 10^{-129}\right):\\
\;\;\;\;a \cdot 120 + \frac{60}{z - t} \cdot x\\
\mathbf{else}:\\
\;\;\;\;\frac{60 \cdot \left(x - y\right)}{z - t}\\
\end{array}
\end{array}
if (*.f64 a 120) < -2e9 or 5.00000000000000027e-129 < (*.f64 a 120) Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 89.0%
associate-*r/89.0%
associate-*l/89.0%
*-commutative89.0%
Simplified89.0%
if -2e9 < (*.f64 a 120) < 5.00000000000000027e-129Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 80.9%
*-commutative80.9%
associate-*l/80.9%
Applied egg-rr80.9%
Final simplification85.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= (* a 120.0) -2000000000.0) (not (<= (* a 120.0) 2e-31))) (* a 120.0) (* (/ 60.0 (- z t)) (- x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((a * 120.0) <= -2000000000.0) || !((a * 120.0) <= 2e-31)) {
tmp = a * 120.0;
} 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 (((a * 120.0d0) <= (-2000000000.0d0)) .or. (.not. ((a * 120.0d0) <= 2d-31))) then
tmp = a * 120.0d0
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 (((a * 120.0) <= -2000000000.0) || !((a * 120.0) <= 2e-31)) {
tmp = a * 120.0;
} else {
tmp = (60.0 / (z - t)) * (x - y);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if ((a * 120.0) <= -2000000000.0) or not ((a * 120.0) <= 2e-31): tmp = a * 120.0 else: tmp = (60.0 / (z - t)) * (x - y) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((Float64(a * 120.0) <= -2000000000.0) || !(Float64(a * 120.0) <= 2e-31)) tmp = Float64(a * 120.0); else tmp = Float64(Float64(60.0 / Float64(z - t)) * Float64(x - y)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (((a * 120.0) <= -2000000000.0) || ~(((a * 120.0) <= 2e-31))) tmp = a * 120.0; else tmp = (60.0 / (z - t)) * (x - y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[N[(a * 120.0), $MachinePrecision], -2000000000.0], N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 2e-31]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -2000000000 \lor \neg \left(a \cdot 120 \leq 2 \cdot 10^{-31}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{60}{z - t} \cdot \left(x - y\right)\\
\end{array}
\end{array}
if (*.f64 a 120) < -2e9 or 2e-31 < (*.f64 a 120) Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 79.8%
if -2e9 < (*.f64 a 120) < 2e-31Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 76.6%
associate-*r/76.6%
*-commutative76.6%
associate-*r/76.6%
Simplified76.6%
Final simplification78.2%
(FPCore (x y z t a)
:precision binary64
(if (<= a -1.25e-5)
(* a 120.0)
(if (<= a -2.9e-176)
(* -60.0 (/ y (- z t)))
(if (<= a 1.95e-67) (* -60.0 (/ (- x y) t)) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.25e-5) {
tmp = a * 120.0;
} else if (a <= -2.9e-176) {
tmp = -60.0 * (y / (z - t));
} else if (a <= 1.95e-67) {
tmp = -60.0 * ((x - y) / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-1.25d-5)) then
tmp = a * 120.0d0
else if (a <= (-2.9d-176)) then
tmp = (-60.0d0) * (y / (z - t))
else if (a <= 1.95d-67) then
tmp = (-60.0d0) * ((x - y) / t)
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.25e-5) {
tmp = a * 120.0;
} else if (a <= -2.9e-176) {
tmp = -60.0 * (y / (z - t));
} else if (a <= 1.95e-67) {
tmp = -60.0 * ((x - y) / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.25e-5: tmp = a * 120.0 elif a <= -2.9e-176: tmp = -60.0 * (y / (z - t)) elif a <= 1.95e-67: tmp = -60.0 * ((x - y) / t) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.25e-5) tmp = Float64(a * 120.0); elseif (a <= -2.9e-176) tmp = Float64(-60.0 * Float64(y / Float64(z - t))); elseif (a <= 1.95e-67) tmp = Float64(-60.0 * Float64(Float64(x - y) / t)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.25e-5) tmp = a * 120.0; elseif (a <= -2.9e-176) tmp = -60.0 * (y / (z - t)); elseif (a <= 1.95e-67) tmp = -60.0 * ((x - y) / t); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.25e-5], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -2.9e-176], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.95e-67], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.25 \cdot 10^{-5}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -2.9 \cdot 10^{-176}:\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\mathbf{elif}\;a \leq 1.95 \cdot 10^{-67}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -1.25000000000000006e-5 or 1.9499999999999999e-67 < a Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 77.6%
if -1.25000000000000006e-5 < a < -2.90000000000000006e-176Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
associate-/r/99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 42.6%
if -2.90000000000000006e-176 < a < 1.9499999999999999e-67Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 79.3%
Taylor expanded in z around 0 44.9%
Final simplification62.0%
(FPCore (x y z t a)
:precision binary64
(if (<= a -1.85e-6)
(* a 120.0)
(if (<= a -1.75e-91)
(* -60.0 (/ y (- z t)))
(if (<= a 2.6e-148) (* 60.0 (/ x (- z t))) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.85e-6) {
tmp = a * 120.0;
} else if (a <= -1.75e-91) {
tmp = -60.0 * (y / (z - t));
} else if (a <= 2.6e-148) {
tmp = 60.0 * (x / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-1.85d-6)) then
tmp = a * 120.0d0
else if (a <= (-1.75d-91)) then
tmp = (-60.0d0) * (y / (z - t))
else if (a <= 2.6d-148) then
tmp = 60.0d0 * (x / (z - t))
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.85e-6) {
tmp = a * 120.0;
} else if (a <= -1.75e-91) {
tmp = -60.0 * (y / (z - t));
} else if (a <= 2.6e-148) {
tmp = 60.0 * (x / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.85e-6: tmp = a * 120.0 elif a <= -1.75e-91: tmp = -60.0 * (y / (z - t)) elif a <= 2.6e-148: tmp = 60.0 * (x / (z - t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.85e-6) tmp = Float64(a * 120.0); elseif (a <= -1.75e-91) tmp = Float64(-60.0 * Float64(y / Float64(z - t))); elseif (a <= 2.6e-148) tmp = Float64(60.0 * Float64(x / Float64(z - t))); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.85e-6) tmp = a * 120.0; elseif (a <= -1.75e-91) tmp = -60.0 * (y / (z - t)); elseif (a <= 2.6e-148) tmp = 60.0 * (x / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.85e-6], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -1.75e-91], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.6e-148], N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.85 \cdot 10^{-6}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -1.75 \cdot 10^{-91}:\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\mathbf{elif}\;a \leq 2.6 \cdot 10^{-148}:\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -1.8500000000000001e-6 or 2.60000000000000008e-148 < a Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 73.9%
if -1.8500000000000001e-6 < a < -1.7499999999999999e-91Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
associate-/r/99.9%
Applied egg-rr99.9%
Taylor expanded in y around inf 49.6%
if -1.7499999999999999e-91 < a < 2.60000000000000008e-148Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
associate-/r/99.6%
Applied egg-rr99.6%
Taylor expanded in x around inf 56.3%
Final simplification66.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -3.6e-150) (not (<= t 1.9e-79))) (+ (* a 120.0) (* (/ 60.0 (- z t)) x)) (+ (* a 120.0) (/ 60.0 (/ z (- x y))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -3.6e-150) || !(t <= 1.9e-79)) {
tmp = (a * 120.0) + ((60.0 / (z - t)) * x);
} else {
tmp = (a * 120.0) + (60.0 / (z / (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 ((t <= (-3.6d-150)) .or. (.not. (t <= 1.9d-79))) then
tmp = (a * 120.0d0) + ((60.0d0 / (z - t)) * x)
else
tmp = (a * 120.0d0) + (60.0d0 / (z / (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 ((t <= -3.6e-150) || !(t <= 1.9e-79)) {
tmp = (a * 120.0) + ((60.0 / (z - t)) * x);
} else {
tmp = (a * 120.0) + (60.0 / (z / (x - y)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -3.6e-150) or not (t <= 1.9e-79): tmp = (a * 120.0) + ((60.0 / (z - t)) * x) else: tmp = (a * 120.0) + (60.0 / (z / (x - y))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -3.6e-150) || !(t <= 1.9e-79)) tmp = Float64(Float64(a * 120.0) + Float64(Float64(60.0 / Float64(z - t)) * x)); else tmp = Float64(Float64(a * 120.0) + Float64(60.0 / Float64(z / Float64(x - y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -3.6e-150) || ~((t <= 1.9e-79))) tmp = (a * 120.0) + ((60.0 / (z - t)) * x); else tmp = (a * 120.0) + (60.0 / (z / (x - y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -3.6e-150], N[Not[LessEqual[t, 1.9e-79]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 / N[(z / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.6 \cdot 10^{-150} \lor \neg \left(t \leq 1.9 \cdot 10^{-79}\right):\\
\;\;\;\;a \cdot 120 + \frac{60}{z - t} \cdot x\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{60}{\frac{z}{x - y}}\\
\end{array}
\end{array}
if t < -3.6000000000000002e-150 or 1.9000000000000001e-79 < t Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 83.6%
associate-*r/83.6%
associate-*l/83.6%
*-commutative83.6%
Simplified83.6%
if -3.6000000000000002e-150 < t < 1.9000000000000001e-79Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in z around inf 93.2%
Final simplification86.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -400000000.0) (not (<= x 2.1e-36))) (+ (* a 120.0) (* (/ 60.0 (- z t)) x)) (+ (* a 120.0) (/ (* y -60.0) (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -400000000.0) || !(x <= 2.1e-36)) {
tmp = (a * 120.0) + ((60.0 / (z - t)) * x);
} 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 ((x <= (-400000000.0d0)) .or. (.not. (x <= 2.1d-36))) then
tmp = (a * 120.0d0) + ((60.0d0 / (z - t)) * x)
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 ((x <= -400000000.0) || !(x <= 2.1e-36)) {
tmp = (a * 120.0) + ((60.0 / (z - t)) * x);
} else {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -400000000.0) or not (x <= 2.1e-36): tmp = (a * 120.0) + ((60.0 / (z - t)) * x) else: tmp = (a * 120.0) + ((y * -60.0) / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -400000000.0) || !(x <= 2.1e-36)) tmp = Float64(Float64(a * 120.0) + Float64(Float64(60.0 / Float64(z - t)) * x)); 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 ((x <= -400000000.0) || ~((x <= 2.1e-36))) tmp = (a * 120.0) + ((60.0 / (z - t)) * x); else tmp = (a * 120.0) + ((y * -60.0) / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -400000000.0], N[Not[LessEqual[x, 2.1e-36]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * x), $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}\;x \leq -400000000 \lor \neg \left(x \leq 2.1 \cdot 10^{-36}\right):\\
\;\;\;\;a \cdot 120 + \frac{60}{z - t} \cdot x\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z - t}\\
\end{array}
\end{array}
if x < -4e8 or 2.09999999999999991e-36 < x Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around inf 88.7%
associate-*r/88.7%
associate-*l/88.7%
*-commutative88.7%
Simplified88.7%
if -4e8 < x < 2.09999999999999991e-36Initial program 99.9%
Taylor expanded in x around 0 95.2%
Final simplification91.8%
(FPCore (x y z t a)
:precision binary64
(if (<= x -270000.0)
(+ (* a 120.0) (/ (* 60.0 x) (- z t)))
(if (<= x 4e-36)
(+ (* a 120.0) (/ (* y -60.0) (- z t)))
(+ (* a 120.0) (* (/ 60.0 (- z t)) x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -270000.0) {
tmp = (a * 120.0) + ((60.0 * x) / (z - t));
} else if (x <= 4e-36) {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
} else {
tmp = (a * 120.0) + ((60.0 / (z - t)) * 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 (x <= (-270000.0d0)) then
tmp = (a * 120.0d0) + ((60.0d0 * x) / (z - t))
else if (x <= 4d-36) then
tmp = (a * 120.0d0) + ((y * (-60.0d0)) / (z - t))
else
tmp = (a * 120.0d0) + ((60.0d0 / (z - t)) * x)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -270000.0) {
tmp = (a * 120.0) + ((60.0 * x) / (z - t));
} else if (x <= 4e-36) {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
} else {
tmp = (a * 120.0) + ((60.0 / (z - t)) * x);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -270000.0: tmp = (a * 120.0) + ((60.0 * x) / (z - t)) elif x <= 4e-36: tmp = (a * 120.0) + ((y * -60.0) / (z - t)) else: tmp = (a * 120.0) + ((60.0 / (z - t)) * x) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -270000.0) tmp = Float64(Float64(a * 120.0) + Float64(Float64(60.0 * x) / Float64(z - t))); elseif (x <= 4e-36) 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 / Float64(z - t)) * x)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -270000.0) tmp = (a * 120.0) + ((60.0 * x) / (z - t)); elseif (x <= 4e-36) tmp = (a * 120.0) + ((y * -60.0) / (z - t)); else tmp = (a * 120.0) + ((60.0 / (z - t)) * x); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -270000.0], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(60.0 * x), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4e-36], 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 / N[(z - t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -270000:\\
\;\;\;\;a \cdot 120 + \frac{60 \cdot x}{z - t}\\
\mathbf{elif}\;x \leq 4 \cdot 10^{-36}:\\
\;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{60}{z - t} \cdot x\\
\end{array}
\end{array}
if x < -2.7e5Initial program 99.8%
Taylor expanded in x around inf 91.0%
*-commutative91.0%
Simplified91.0%
if -2.7e5 < x < 3.9999999999999998e-36Initial program 99.9%
Taylor expanded in x around 0 95.2%
if 3.9999999999999998e-36 < x Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around inf 86.8%
associate-*r/86.7%
associate-*l/86.7%
*-commutative86.7%
Simplified86.7%
Final simplification91.8%
(FPCore (x y z t a)
:precision binary64
(if (<= x -3100.0)
(+ (* a 120.0) (/ (* 60.0 x) (- z t)))
(if (<= x 2.25e-38)
(+ (* a 120.0) (/ 60.0 (/ (- t z) y)))
(+ (* a 120.0) (* (/ 60.0 (- z t)) x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -3100.0) {
tmp = (a * 120.0) + ((60.0 * x) / (z - t));
} else if (x <= 2.25e-38) {
tmp = (a * 120.0) + (60.0 / ((t - z) / y));
} else {
tmp = (a * 120.0) + ((60.0 / (z - t)) * 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 (x <= (-3100.0d0)) then
tmp = (a * 120.0d0) + ((60.0d0 * x) / (z - t))
else if (x <= 2.25d-38) then
tmp = (a * 120.0d0) + (60.0d0 / ((t - z) / y))
else
tmp = (a * 120.0d0) + ((60.0d0 / (z - t)) * x)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -3100.0) {
tmp = (a * 120.0) + ((60.0 * x) / (z - t));
} else if (x <= 2.25e-38) {
tmp = (a * 120.0) + (60.0 / ((t - z) / y));
} else {
tmp = (a * 120.0) + ((60.0 / (z - t)) * x);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -3100.0: tmp = (a * 120.0) + ((60.0 * x) / (z - t)) elif x <= 2.25e-38: tmp = (a * 120.0) + (60.0 / ((t - z) / y)) else: tmp = (a * 120.0) + ((60.0 / (z - t)) * x) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -3100.0) tmp = Float64(Float64(a * 120.0) + Float64(Float64(60.0 * x) / Float64(z - t))); elseif (x <= 2.25e-38) tmp = Float64(Float64(a * 120.0) + Float64(60.0 / Float64(Float64(t - z) / y))); else tmp = Float64(Float64(a * 120.0) + Float64(Float64(60.0 / Float64(z - t)) * x)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -3100.0) tmp = (a * 120.0) + ((60.0 * x) / (z - t)); elseif (x <= 2.25e-38) tmp = (a * 120.0) + (60.0 / ((t - z) / y)); else tmp = (a * 120.0) + ((60.0 / (z - t)) * x); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -3100.0], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(60.0 * x), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.25e-38], 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[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3100:\\
\;\;\;\;a \cdot 120 + \frac{60 \cdot x}{z - t}\\
\mathbf{elif}\;x \leq 2.25 \cdot 10^{-38}:\\
\;\;\;\;a \cdot 120 + \frac{60}{\frac{t - z}{y}}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{60}{z - t} \cdot x\\
\end{array}
\end{array}
if x < -3100Initial program 99.8%
Taylor expanded in x around inf 91.0%
*-commutative91.0%
Simplified91.0%
if -3100 < x < 2.25000000000000004e-38Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around 0 95.2%
associate-*r/95.2%
neg-mul-195.2%
Simplified95.2%
if 2.25000000000000004e-38 < x Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around inf 86.8%
associate-*r/86.7%
associate-*l/86.7%
*-commutative86.7%
Simplified86.7%
Final simplification91.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -2.45e-6) (not (<= a 2.35e-155))) (* a 120.0) (* -60.0 (/ y (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.45e-6) || !(a <= 2.35e-155)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (y / (z - t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-2.45d-6)) .or. (.not. (a <= 2.35d-155))) then
tmp = a * 120.0d0
else
tmp = (-60.0d0) * (y / (z - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.45e-6) || !(a <= 2.35e-155)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (y / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -2.45e-6) or not (a <= 2.35e-155): tmp = a * 120.0 else: tmp = -60.0 * (y / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -2.45e-6) || !(a <= 2.35e-155)) tmp = Float64(a * 120.0); else tmp = Float64(-60.0 * Float64(y / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -2.45e-6) || ~((a <= 2.35e-155))) tmp = a * 120.0; else tmp = -60.0 * (y / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -2.45e-6], N[Not[LessEqual[a, 2.35e-155]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.45 \cdot 10^{-6} \lor \neg \left(a \leq 2.35 \cdot 10^{-155}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\end{array}
\end{array}
if a < -2.44999999999999984e-6 or 2.3499999999999999e-155 < a Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 73.4%
if -2.44999999999999984e-6 < a < 2.3499999999999999e-155Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 35.7%
Final simplification58.5%
(FPCore (x y z t a) :precision binary64 (+ (* a 120.0) (* (/ 60.0 (- z t)) (- x y))))
double code(double x, double y, double z, double t, double a) {
return (a * 120.0) + ((60.0 / (z - t)) * (x - y));
}
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 / (z - t)) * (x - y))
end function
public static double code(double x, double y, double z, double t, double a) {
return (a * 120.0) + ((60.0 / (z - t)) * (x - y));
}
def code(x, y, z, t, a): return (a * 120.0) + ((60.0 / (z - t)) * (x - y))
function code(x, y, z, t, a) return Float64(Float64(a * 120.0) + Float64(Float64(60.0 / Float64(z - t)) * Float64(x - y))) end
function tmp = code(x, y, z, t, a) tmp = (a * 120.0) + ((60.0 / (z - t)) * (x - y)); end
code[x_, y_, z_, t_, a_] := N[(N[(a * 120.0), $MachinePrecision] + N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
a \cdot 120 + \frac{60}{z - t} \cdot \left(x - y\right)
\end{array}
Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
associate-/r/99.8%
Applied egg-rr99.8%
Final simplification99.8%
(FPCore (x y z t a) :precision binary64 (if (<= y 1e+241) (* a 120.0) (* -60.0 (/ y z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= 1e+241) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (y / z);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (y <= 1d+241) then
tmp = a * 120.0d0
else
tmp = (-60.0d0) * (y / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= 1e+241) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (y / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= 1e+241: tmp = a * 120.0 else: tmp = -60.0 * (y / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= 1e+241) tmp = Float64(a * 120.0); else tmp = Float64(-60.0 * Float64(y / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= 1e+241) tmp = a * 120.0; else tmp = -60.0 * (y / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, 1e+241], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 10^{+241}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if y < 1.0000000000000001e241Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 54.3%
if 1.0000000000000001e241 < y Initial program 99.5%
associate-/l*99.8%
Simplified99.8%
associate-/r/99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 89.9%
Taylor expanded in z around inf 68.0%
Final simplification54.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.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 52.6%
Final simplification52.6%
(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 2024031
(FPCore (x y z t a)
:name "Data.Colour.RGB:hslsv from colour-2.3.3, B"
:precision binary64
:herbie-target
(+ (/ 60.0 (/ (- z t) (- x y))) (* a 120.0))
(+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))