
(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 19 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) (* (- z t) 0.016666666666666666))))
double code(double x, double y, double z, double t, double a) {
return fma(a, 120.0, ((x - y) / ((z - t) * 0.016666666666666666)));
}
function code(x, y, z, t, a) return fma(a, 120.0, Float64(Float64(x - y) / Float64(Float64(z - t) * 0.016666666666666666))) end
code[x_, y_, z_, t_, a_] := N[(a * 120.0 + N[(N[(x - y), $MachinePrecision] / N[(N[(z - t), $MachinePrecision] * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(a, 120, \frac{x - y}{\left(z - t\right) \cdot 0.016666666666666666}\right)
\end{array}
Initial program 99.8%
+-commutative99.8%
fma-def99.8%
associate-*l/99.8%
Simplified99.8%
*-commutative99.8%
clear-num99.8%
un-div-inv99.8%
div-inv99.8%
metadata-eval99.8%
Applied egg-rr99.8%
Final simplification99.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* x 60.0) (- z t))))
(if (<= a -6.5e-105)
(* a 120.0)
(if (<= a -4.5e-252)
t_1
(if (<= a -1.16e-290)
(/ -60.0 (/ (- z t) y))
(if (<= a 7.6e-288)
t_1
(if (<= a 3.1e-223)
(* 60.0 (/ (- x y) z))
(if (<= a 2.7e-122) (/ (* (- x y) -60.0) t) (* a 120.0)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (x * 60.0) / (z - t);
double tmp;
if (a <= -6.5e-105) {
tmp = a * 120.0;
} else if (a <= -4.5e-252) {
tmp = t_1;
} else if (a <= -1.16e-290) {
tmp = -60.0 / ((z - t) / y);
} else if (a <= 7.6e-288) {
tmp = t_1;
} else if (a <= 3.1e-223) {
tmp = 60.0 * ((x - y) / z);
} else if (a <= 2.7e-122) {
tmp = ((x - y) * -60.0) / 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) :: t_1
real(8) :: tmp
t_1 = (x * 60.0d0) / (z - t)
if (a <= (-6.5d-105)) then
tmp = a * 120.0d0
else if (a <= (-4.5d-252)) then
tmp = t_1
else if (a <= (-1.16d-290)) then
tmp = (-60.0d0) / ((z - t) / y)
else if (a <= 7.6d-288) then
tmp = t_1
else if (a <= 3.1d-223) then
tmp = 60.0d0 * ((x - y) / z)
else if (a <= 2.7d-122) then
tmp = ((x - y) * (-60.0d0)) / 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 t_1 = (x * 60.0) / (z - t);
double tmp;
if (a <= -6.5e-105) {
tmp = a * 120.0;
} else if (a <= -4.5e-252) {
tmp = t_1;
} else if (a <= -1.16e-290) {
tmp = -60.0 / ((z - t) / y);
} else if (a <= 7.6e-288) {
tmp = t_1;
} else if (a <= 3.1e-223) {
tmp = 60.0 * ((x - y) / z);
} else if (a <= 2.7e-122) {
tmp = ((x - y) * -60.0) / t;
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (x * 60.0) / (z - t) tmp = 0 if a <= -6.5e-105: tmp = a * 120.0 elif a <= -4.5e-252: tmp = t_1 elif a <= -1.16e-290: tmp = -60.0 / ((z - t) / y) elif a <= 7.6e-288: tmp = t_1 elif a <= 3.1e-223: tmp = 60.0 * ((x - y) / z) elif a <= 2.7e-122: tmp = ((x - y) * -60.0) / t else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(x * 60.0) / Float64(z - t)) tmp = 0.0 if (a <= -6.5e-105) tmp = Float64(a * 120.0); elseif (a <= -4.5e-252) tmp = t_1; elseif (a <= -1.16e-290) tmp = Float64(-60.0 / Float64(Float64(z - t) / y)); elseif (a <= 7.6e-288) tmp = t_1; elseif (a <= 3.1e-223) tmp = Float64(60.0 * Float64(Float64(x - y) / z)); elseif (a <= 2.7e-122) tmp = Float64(Float64(Float64(x - y) * -60.0) / t); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (x * 60.0) / (z - t); tmp = 0.0; if (a <= -6.5e-105) tmp = a * 120.0; elseif (a <= -4.5e-252) tmp = t_1; elseif (a <= -1.16e-290) tmp = -60.0 / ((z - t) / y); elseif (a <= 7.6e-288) tmp = t_1; elseif (a <= 3.1e-223) tmp = 60.0 * ((x - y) / z); elseif (a <= 2.7e-122) tmp = ((x - y) * -60.0) / t; else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x * 60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -6.5e-105], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -4.5e-252], t$95$1, If[LessEqual[a, -1.16e-290], N[(-60.0 / N[(N[(z - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 7.6e-288], t$95$1, If[LessEqual[a, 3.1e-223], N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.7e-122], N[(N[(N[(x - y), $MachinePrecision] * -60.0), $MachinePrecision] / t), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot 60}{z - t}\\
\mathbf{if}\;a \leq -6.5 \cdot 10^{-105}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -4.5 \cdot 10^{-252}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq -1.16 \cdot 10^{-290}:\\
\;\;\;\;\frac{-60}{\frac{z - t}{y}}\\
\mathbf{elif}\;a \leq 7.6 \cdot 10^{-288}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 3.1 \cdot 10^{-223}:\\
\;\;\;\;60 \cdot \frac{x - y}{z}\\
\mathbf{elif}\;a \leq 2.7 \cdot 10^{-122}:\\
\;\;\;\;\frac{\left(x - y\right) \cdot -60}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -6.50000000000000006e-105 or 2.70000000000000009e-122 < a Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 67.3%
if -6.50000000000000006e-105 < a < -4.5000000000000002e-252 or -1.16000000000000001e-290 < a < 7.5999999999999996e-288Initial program 99.6%
associate-/l*99.5%
Simplified99.5%
associate-/r/99.6%
Applied egg-rr99.6%
*-commutative99.6%
clear-num99.5%
un-div-inv99.7%
div-inv99.6%
metadata-eval99.6%
Applied egg-rr99.6%
Taylor expanded in x around inf 59.0%
associate-*r/58.9%
Simplified58.9%
if -4.5000000000000002e-252 < a < -1.16000000000000001e-290Initial program 99.6%
associate-/l*99.8%
Simplified99.8%
associate-/r/99.6%
Applied egg-rr99.6%
*-commutative99.6%
clear-num99.4%
un-div-inv99.8%
div-inv99.8%
metadata-eval99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 87.6%
associate-*r/87.6%
associate-/l*88.0%
Simplified88.0%
if 7.5999999999999996e-288 < a < 3.10000000000000018e-223Initial program 99.9%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 86.0%
Taylor expanded in z around inf 71.7%
if 3.10000000000000018e-223 < a < 2.70000000000000009e-122Initial program 99.8%
associate-/l*99.2%
Simplified99.2%
Taylor expanded in a around 0 92.4%
Taylor expanded in z around 0 92.4%
associate-*r/92.6%
Simplified92.6%
Final simplification67.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* x 60.0) (- z t))))
(if (<= a -8.2e-105)
(* a 120.0)
(if (<= a -1.05e-253)
t_1
(if (<= a -1.25e-290)
(/ -60.0 (/ (- z t) y))
(if (<= a 4e-288)
t_1
(if (<= a 5.9e-224)
(/ (* (- x y) 60.0) z)
(if (<= a 7.5e-126) (/ (* (- x y) -60.0) t) (* a 120.0)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (x * 60.0) / (z - t);
double tmp;
if (a <= -8.2e-105) {
tmp = a * 120.0;
} else if (a <= -1.05e-253) {
tmp = t_1;
} else if (a <= -1.25e-290) {
tmp = -60.0 / ((z - t) / y);
} else if (a <= 4e-288) {
tmp = t_1;
} else if (a <= 5.9e-224) {
tmp = ((x - y) * 60.0) / z;
} else if (a <= 7.5e-126) {
tmp = ((x - y) * -60.0) / 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) :: t_1
real(8) :: tmp
t_1 = (x * 60.0d0) / (z - t)
if (a <= (-8.2d-105)) then
tmp = a * 120.0d0
else if (a <= (-1.05d-253)) then
tmp = t_1
else if (a <= (-1.25d-290)) then
tmp = (-60.0d0) / ((z - t) / y)
else if (a <= 4d-288) then
tmp = t_1
else if (a <= 5.9d-224) then
tmp = ((x - y) * 60.0d0) / z
else if (a <= 7.5d-126) then
tmp = ((x - y) * (-60.0d0)) / 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 t_1 = (x * 60.0) / (z - t);
double tmp;
if (a <= -8.2e-105) {
tmp = a * 120.0;
} else if (a <= -1.05e-253) {
tmp = t_1;
} else if (a <= -1.25e-290) {
tmp = -60.0 / ((z - t) / y);
} else if (a <= 4e-288) {
tmp = t_1;
} else if (a <= 5.9e-224) {
tmp = ((x - y) * 60.0) / z;
} else if (a <= 7.5e-126) {
tmp = ((x - y) * -60.0) / t;
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (x * 60.0) / (z - t) tmp = 0 if a <= -8.2e-105: tmp = a * 120.0 elif a <= -1.05e-253: tmp = t_1 elif a <= -1.25e-290: tmp = -60.0 / ((z - t) / y) elif a <= 4e-288: tmp = t_1 elif a <= 5.9e-224: tmp = ((x - y) * 60.0) / z elif a <= 7.5e-126: tmp = ((x - y) * -60.0) / t else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(x * 60.0) / Float64(z - t)) tmp = 0.0 if (a <= -8.2e-105) tmp = Float64(a * 120.0); elseif (a <= -1.05e-253) tmp = t_1; elseif (a <= -1.25e-290) tmp = Float64(-60.0 / Float64(Float64(z - t) / y)); elseif (a <= 4e-288) tmp = t_1; elseif (a <= 5.9e-224) tmp = Float64(Float64(Float64(x - y) * 60.0) / z); elseif (a <= 7.5e-126) tmp = Float64(Float64(Float64(x - y) * -60.0) / t); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (x * 60.0) / (z - t); tmp = 0.0; if (a <= -8.2e-105) tmp = a * 120.0; elseif (a <= -1.05e-253) tmp = t_1; elseif (a <= -1.25e-290) tmp = -60.0 / ((z - t) / y); elseif (a <= 4e-288) tmp = t_1; elseif (a <= 5.9e-224) tmp = ((x - y) * 60.0) / z; elseif (a <= 7.5e-126) tmp = ((x - y) * -60.0) / t; else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x * 60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -8.2e-105], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -1.05e-253], t$95$1, If[LessEqual[a, -1.25e-290], N[(-60.0 / N[(N[(z - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4e-288], t$95$1, If[LessEqual[a, 5.9e-224], N[(N[(N[(x - y), $MachinePrecision] * 60.0), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[a, 7.5e-126], N[(N[(N[(x - y), $MachinePrecision] * -60.0), $MachinePrecision] / t), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot 60}{z - t}\\
\mathbf{if}\;a \leq -8.2 \cdot 10^{-105}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -1.05 \cdot 10^{-253}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq -1.25 \cdot 10^{-290}:\\
\;\;\;\;\frac{-60}{\frac{z - t}{y}}\\
\mathbf{elif}\;a \leq 4 \cdot 10^{-288}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 5.9 \cdot 10^{-224}:\\
\;\;\;\;\frac{\left(x - y\right) \cdot 60}{z}\\
\mathbf{elif}\;a \leq 7.5 \cdot 10^{-126}:\\
\;\;\;\;\frac{\left(x - y\right) \cdot -60}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -8.20000000000000061e-105 or 7.49999999999999976e-126 < a Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 67.3%
if -8.20000000000000061e-105 < a < -1.0499999999999999e-253 or -1.25e-290 < a < 4.00000000000000023e-288Initial program 99.6%
associate-/l*99.5%
Simplified99.5%
associate-/r/99.6%
Applied egg-rr99.6%
*-commutative99.6%
clear-num99.5%
un-div-inv99.7%
div-inv99.6%
metadata-eval99.6%
Applied egg-rr99.6%
Taylor expanded in x around inf 59.0%
associate-*r/58.9%
Simplified58.9%
if -1.0499999999999999e-253 < a < -1.25e-290Initial program 99.6%
associate-/l*99.8%
Simplified99.8%
associate-/r/99.6%
Applied egg-rr99.6%
*-commutative99.6%
clear-num99.4%
un-div-inv99.8%
div-inv99.8%
metadata-eval99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 87.6%
associate-*r/87.6%
associate-/l*88.0%
Simplified88.0%
if 4.00000000000000023e-288 < a < 5.9000000000000003e-224Initial program 99.9%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 86.0%
Taylor expanded in z around inf 71.7%
associate-*r/71.8%
Simplified71.8%
if 5.9000000000000003e-224 < a < 7.49999999999999976e-126Initial program 99.8%
associate-/l*99.2%
Simplified99.2%
Taylor expanded in a around 0 92.4%
Taylor expanded in z around 0 92.4%
associate-*r/92.6%
Simplified92.6%
Final simplification67.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= (* a 120.0) -1e-101) (not (<= (* a 120.0) 5e-77))) (+ (* a 120.0) (* -60.0 (/ y (- z t)))) (* 60.0 (/ (- x y) (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((a * 120.0) <= -1e-101) || !((a * 120.0) <= 5e-77)) {
tmp = (a * 120.0) + (-60.0 * (y / (z - t)));
} else {
tmp = 60.0 * ((x - y) / (z - t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (((a * 120.0d0) <= (-1d-101)) .or. (.not. ((a * 120.0d0) <= 5d-77))) then
tmp = (a * 120.0d0) + ((-60.0d0) * (y / (z - t)))
else
tmp = 60.0d0 * ((x - y) / (z - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (((a * 120.0) <= -1e-101) || !((a * 120.0) <= 5e-77)) {
tmp = (a * 120.0) + (-60.0 * (y / (z - t)));
} else {
tmp = 60.0 * ((x - y) / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if ((a * 120.0) <= -1e-101) or not ((a * 120.0) <= 5e-77): tmp = (a * 120.0) + (-60.0 * (y / (z - t))) else: tmp = 60.0 * ((x - y) / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((Float64(a * 120.0) <= -1e-101) || !(Float64(a * 120.0) <= 5e-77)) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / Float64(z - t)))); else tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (((a * 120.0) <= -1e-101) || ~(((a * 120.0) <= 5e-77))) tmp = (a * 120.0) + (-60.0 * (y / (z - t))); else tmp = 60.0 * ((x - y) / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[N[(a * 120.0), $MachinePrecision], -1e-101], N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 5e-77]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -1 \cdot 10^{-101} \lor \neg \left(a \cdot 120 \leq 5 \cdot 10^{-77}\right):\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\end{array}
\end{array}
if (*.f64 a 120) < -1.00000000000000005e-101 or 4.99999999999999963e-77 < (*.f64 a 120) Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 87.5%
if -1.00000000000000005e-101 < (*.f64 a 120) < 4.99999999999999963e-77Initial program 99.7%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 85.4%
Final simplification86.8%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -1e-101)
(+ (* a 120.0) (* -60.0 (/ y (- z t))))
(if (<= (* a 120.0) 5e-77)
(* 60.0 (/ (- x y) (- z t)))
(+ (/ (* y -60.0) (- z t)) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -1e-101) {
tmp = (a * 120.0) + (-60.0 * (y / (z - t)));
} else if ((a * 120.0) <= 5e-77) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = ((y * -60.0) / (z - t)) + (a * 120.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a * 120.0d0) <= (-1d-101)) then
tmp = (a * 120.0d0) + ((-60.0d0) * (y / (z - t)))
else if ((a * 120.0d0) <= 5d-77) then
tmp = 60.0d0 * ((x - y) / (z - t))
else
tmp = ((y * (-60.0d0)) / (z - t)) + (a * 120.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -1e-101) {
tmp = (a * 120.0) + (-60.0 * (y / (z - t)));
} else if ((a * 120.0) <= 5e-77) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = ((y * -60.0) / (z - t)) + (a * 120.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -1e-101: tmp = (a * 120.0) + (-60.0 * (y / (z - t))) elif (a * 120.0) <= 5e-77: tmp = 60.0 * ((x - y) / (z - t)) else: tmp = ((y * -60.0) / (z - t)) + (a * 120.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -1e-101) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / Float64(z - t)))); elseif (Float64(a * 120.0) <= 5e-77) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); else tmp = Float64(Float64(Float64(y * -60.0) / Float64(z - t)) + Float64(a * 120.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a * 120.0) <= -1e-101) tmp = (a * 120.0) + (-60.0 * (y / (z - t))); elseif ((a * 120.0) <= 5e-77) tmp = 60.0 * ((x - y) / (z - t)); else tmp = ((y * -60.0) / (z - t)) + (a * 120.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -1e-101], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 5e-77], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -1 \cdot 10^{-101}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z - t}\\
\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-77}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot -60}{z - t} + a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a 120) < -1.00000000000000005e-101Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 87.1%
if -1.00000000000000005e-101 < (*.f64 a 120) < 4.99999999999999963e-77Initial program 99.7%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 85.4%
if 4.99999999999999963e-77 < (*.f64 a 120) Initial program 99.9%
Taylor expanded in x around 0 87.9%
Final simplification86.8%
(FPCore (x y z t a)
:precision binary64
(if (<= a -1.38e+41)
(* a 120.0)
(if (<= a 1.4e-44)
(* 60.0 (/ (- x y) (- z t)))
(if (<= a 8.4e+105)
(+ (* a 120.0) (* 60.0 (/ x z)))
(+ (* a 120.0) (* 60.0 (/ y t)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.38e+41) {
tmp = a * 120.0;
} else if (a <= 1.4e-44) {
tmp = 60.0 * ((x - y) / (z - t));
} else if (a <= 8.4e+105) {
tmp = (a * 120.0) + (60.0 * (x / z));
} else {
tmp = (a * 120.0) + (60.0 * (y / t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-1.38d+41)) then
tmp = a * 120.0d0
else if (a <= 1.4d-44) then
tmp = 60.0d0 * ((x - y) / (z - t))
else if (a <= 8.4d+105) then
tmp = (a * 120.0d0) + (60.0d0 * (x / z))
else
tmp = (a * 120.0d0) + (60.0d0 * (y / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.38e+41) {
tmp = a * 120.0;
} else if (a <= 1.4e-44) {
tmp = 60.0 * ((x - y) / (z - t));
} else if (a <= 8.4e+105) {
tmp = (a * 120.0) + (60.0 * (x / z));
} else {
tmp = (a * 120.0) + (60.0 * (y / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.38e+41: tmp = a * 120.0 elif a <= 1.4e-44: tmp = 60.0 * ((x - y) / (z - t)) elif a <= 8.4e+105: tmp = (a * 120.0) + (60.0 * (x / z)) else: tmp = (a * 120.0) + (60.0 * (y / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.38e+41) tmp = Float64(a * 120.0); elseif (a <= 1.4e-44) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); elseif (a <= 8.4e+105) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(x / z))); else tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(y / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.38e+41) tmp = a * 120.0; elseif (a <= 1.4e-44) tmp = 60.0 * ((x - y) / (z - t)); elseif (a <= 8.4e+105) tmp = (a * 120.0) + (60.0 * (x / z)); else tmp = (a * 120.0) + (60.0 * (y / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.38e+41], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 1.4e-44], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 8.4e+105], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.38 \cdot 10^{+41}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq 1.4 \cdot 10^{-44}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{elif}\;a \leq 8.4 \cdot 10^{+105}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t}\\
\end{array}
\end{array}
if a < -1.3800000000000001e41Initial program 100.0%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 83.4%
if -1.3800000000000001e41 < a < 1.4e-44Initial program 99.7%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 78.2%
if 1.4e-44 < a < 8.4000000000000004e105Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 75.2%
Taylor expanded in x around inf 71.1%
if 8.4000000000000004e105 < a Initial program 99.9%
Taylor expanded in x around 0 95.2%
Taylor expanded in z around 0 91.1%
Final simplification80.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -7.8e+67) (not (<= x 6.8e+68))) (+ (* a 120.0) (/ (* x 60.0) (- z t))) (+ (/ (* y -60.0) (- z t)) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -7.8e+67) || !(x <= 6.8e+68)) {
tmp = (a * 120.0) + ((x * 60.0) / (z - t));
} else {
tmp = ((y * -60.0) / (z - t)) + (a * 120.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((x <= (-7.8d+67)) .or. (.not. (x <= 6.8d+68))) then
tmp = (a * 120.0d0) + ((x * 60.0d0) / (z - t))
else
tmp = ((y * (-60.0d0)) / (z - t)) + (a * 120.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -7.8e+67) || !(x <= 6.8e+68)) {
tmp = (a * 120.0) + ((x * 60.0) / (z - t));
} else {
tmp = ((y * -60.0) / (z - t)) + (a * 120.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -7.8e+67) or not (x <= 6.8e+68): tmp = (a * 120.0) + ((x * 60.0) / (z - t)) else: tmp = ((y * -60.0) / (z - t)) + (a * 120.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -7.8e+67) || !(x <= 6.8e+68)) tmp = Float64(Float64(a * 120.0) + Float64(Float64(x * 60.0) / Float64(z - t))); else tmp = Float64(Float64(Float64(y * -60.0) / Float64(z - t)) + Float64(a * 120.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -7.8e+67) || ~((x <= 6.8e+68))) tmp = (a * 120.0) + ((x * 60.0) / (z - t)); else tmp = ((y * -60.0) / (z - t)) + (a * 120.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -7.8e+67], N[Not[LessEqual[x, 6.8e+68]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(x * 60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.8 \cdot 10^{+67} \lor \neg \left(x \leq 6.8 \cdot 10^{+68}\right):\\
\;\;\;\;a \cdot 120 + \frac{x \cdot 60}{z - t}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot -60}{z - t} + a \cdot 120\\
\end{array}
\end{array}
if x < -7.80000000000000013e67 or 6.8000000000000003e68 < x Initial program 99.8%
Taylor expanded in x around inf 88.4%
*-commutative88.4%
Simplified88.4%
if -7.80000000000000013e67 < x < 6.8000000000000003e68Initial program 99.8%
Taylor expanded in x around 0 94.6%
Final simplification92.0%
(FPCore (x y z t a) :precision binary64 (+ (/ (- x y) (- (/ z 60.0) (/ t 60.0))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return ((x - y) / ((z / 60.0) - (t / 60.0))) + (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 = ((x - y) / ((z / 60.0d0) - (t / 60.0d0))) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return ((x - y) / ((z / 60.0) - (t / 60.0))) + (a * 120.0);
}
def code(x, y, z, t, a): return ((x - y) / ((z / 60.0) - (t / 60.0))) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(Float64(x - y) / Float64(Float64(z / 60.0) - Float64(t / 60.0))) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = ((x - y) / ((z / 60.0) - (t / 60.0))) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(x - y), $MachinePrecision] / N[(N[(z / 60.0), $MachinePrecision] - N[(t / 60.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x - y}{\frac{z}{60} - \frac{t}{60}} + a \cdot 120
\end{array}
Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
associate-/r/99.8%
Applied egg-rr99.8%
*-commutative99.8%
clear-num99.8%
un-div-inv99.8%
div-inv99.8%
metadata-eval99.8%
Applied egg-rr99.8%
metadata-eval99.8%
div-inv99.8%
div-sub99.8%
Applied egg-rr99.8%
Final simplification99.8%
(FPCore (x y z t a)
:precision binary64
(if (<= a -1.8e-71)
(* a 120.0)
(if (<= a 4.9e-222)
(* 60.0 (/ (- x y) z))
(if (<= a 5.1e-123) (* -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.8e-71) {
tmp = a * 120.0;
} else if (a <= 4.9e-222) {
tmp = 60.0 * ((x - y) / z);
} else if (a <= 5.1e-123) {
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.8d-71)) then
tmp = a * 120.0d0
else if (a <= 4.9d-222) then
tmp = 60.0d0 * ((x - y) / z)
else if (a <= 5.1d-123) 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.8e-71) {
tmp = a * 120.0;
} else if (a <= 4.9e-222) {
tmp = 60.0 * ((x - y) / z);
} else if (a <= 5.1e-123) {
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.8e-71: tmp = a * 120.0 elif a <= 4.9e-222: tmp = 60.0 * ((x - y) / z) elif a <= 5.1e-123: 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.8e-71) tmp = Float64(a * 120.0); elseif (a <= 4.9e-222) tmp = Float64(60.0 * Float64(Float64(x - y) / z)); elseif (a <= 5.1e-123) 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.8e-71) tmp = a * 120.0; elseif (a <= 4.9e-222) tmp = 60.0 * ((x - y) / z); elseif (a <= 5.1e-123) 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.8e-71], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 4.9e-222], N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 5.1e-123], 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.8 \cdot 10^{-71}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq 4.9 \cdot 10^{-222}:\\
\;\;\;\;60 \cdot \frac{x - y}{z}\\
\mathbf{elif}\;a \leq 5.1 \cdot 10^{-123}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -1.8e-71 or 5.1000000000000001e-123 < a Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 68.0%
if -1.8e-71 < a < 4.9e-222Initial program 99.6%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 86.0%
Taylor expanded in z around inf 49.8%
if 4.9e-222 < a < 5.1000000000000001e-123Initial program 99.8%
associate-/l*99.2%
Simplified99.2%
Taylor expanded in a around 0 92.4%
Taylor expanded in z around 0 92.4%
Final simplification64.3%
(FPCore (x y z t a)
:precision binary64
(if (<= a -2e-71)
(* a 120.0)
(if (<= a 1.35e-222)
(* 60.0 (/ (- x y) z))
(if (<= a 2.05e-122) (/ (* (- x y) -60.0) t) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2e-71) {
tmp = a * 120.0;
} else if (a <= 1.35e-222) {
tmp = 60.0 * ((x - y) / z);
} else if (a <= 2.05e-122) {
tmp = ((x - y) * -60.0) / 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 <= (-2d-71)) then
tmp = a * 120.0d0
else if (a <= 1.35d-222) then
tmp = 60.0d0 * ((x - y) / z)
else if (a <= 2.05d-122) then
tmp = ((x - y) * (-60.0d0)) / 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 <= -2e-71) {
tmp = a * 120.0;
} else if (a <= 1.35e-222) {
tmp = 60.0 * ((x - y) / z);
} else if (a <= 2.05e-122) {
tmp = ((x - y) * -60.0) / t;
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -2e-71: tmp = a * 120.0 elif a <= 1.35e-222: tmp = 60.0 * ((x - y) / z) elif a <= 2.05e-122: tmp = ((x - y) * -60.0) / t else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2e-71) tmp = Float64(a * 120.0); elseif (a <= 1.35e-222) tmp = Float64(60.0 * Float64(Float64(x - y) / z)); elseif (a <= 2.05e-122) tmp = Float64(Float64(Float64(x - y) * -60.0) / 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 <= -2e-71) tmp = a * 120.0; elseif (a <= 1.35e-222) tmp = 60.0 * ((x - y) / z); elseif (a <= 2.05e-122) tmp = ((x - y) * -60.0) / t; else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2e-71], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 1.35e-222], N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.05e-122], N[(N[(N[(x - y), $MachinePrecision] * -60.0), $MachinePrecision] / t), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2 \cdot 10^{-71}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq 1.35 \cdot 10^{-222}:\\
\;\;\;\;60 \cdot \frac{x - y}{z}\\
\mathbf{elif}\;a \leq 2.05 \cdot 10^{-122}:\\
\;\;\;\;\frac{\left(x - y\right) \cdot -60}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -1.9999999999999998e-71 or 2.05e-122 < a Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 68.0%
if -1.9999999999999998e-71 < a < 1.35e-222Initial program 99.6%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 86.0%
Taylor expanded in z around inf 49.8%
if 1.35e-222 < a < 2.05e-122Initial program 99.8%
associate-/l*99.2%
Simplified99.2%
Taylor expanded in a around 0 92.4%
Taylor expanded in z around 0 92.4%
associate-*r/92.6%
Simplified92.6%
Final simplification64.3%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.38e+41) (* a 120.0) (if (<= a 2.2e-44) (* 60.0 (/ (- x y) (- z t))) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.38e+41) {
tmp = a * 120.0;
} else if (a <= 2.2e-44) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-1.38d+41)) then
tmp = a * 120.0d0
else if (a <= 2.2d-44) then
tmp = 60.0d0 * ((x - y) / (z - t))
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.38e+41) {
tmp = a * 120.0;
} else if (a <= 2.2e-44) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.38e+41: tmp = a * 120.0 elif a <= 2.2e-44: tmp = 60.0 * ((x - y) / (z - t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.38e+41) tmp = Float64(a * 120.0); elseif (a <= 2.2e-44) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.38e+41) tmp = a * 120.0; elseif (a <= 2.2e-44) tmp = 60.0 * ((x - y) / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.38e+41], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 2.2e-44], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.38 \cdot 10^{+41}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq 2.2 \cdot 10^{-44}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -1.3800000000000001e41 or 2.20000000000000012e-44 < a Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 77.7%
if -1.3800000000000001e41 < a < 2.20000000000000012e-44Initial program 99.7%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 78.2%
Final simplification78.0%
(FPCore (x y z t a) :precision binary64 (+ (* (- x y) (/ 60.0 (- z t))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return ((x - y) * (60.0 / (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 = ((x - y) * (60.0d0 / (z - t))) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return ((x - y) * (60.0 / (z - t))) + (a * 120.0);
}
def code(x, y, z, t, a): return ((x - y) * (60.0 / (z - t))) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(Float64(x - y) * Float64(60.0 / Float64(z - t))) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = ((x - y) * (60.0 / (z - t))) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x - y\right) \cdot \frac{60}{z - t} + a \cdot 120
\end{array}
Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
associate-/r/99.8%
Applied egg-rr99.8%
Final simplification99.8%
(FPCore (x y z t a) :precision binary64 (+ (/ (* (- x y) 60.0) (- z t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return (((x - y) * 60.0) / (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 = (((x - y) * 60.0d0) / (z - t)) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return (((x - y) * 60.0) / (z - t)) + (a * 120.0);
}
def code(x, y, z, t, a): return (((x - y) * 60.0) / (z - t)) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(Float64(Float64(x - y) * 60.0) / Float64(z - t)) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = (((x - y) * 60.0) / (z - t)) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(N[(x - y), $MachinePrecision] * 60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(x - y\right) \cdot 60}{z - t} + a \cdot 120
\end{array}
Initial program 99.8%
Final simplification99.8%
(FPCore (x y z t a) :precision binary64 (+ (/ (- x y) (* (- z t) 0.016666666666666666)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return ((x - y) / ((z - t) * 0.016666666666666666)) + (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 = ((x - y) / ((z - t) * 0.016666666666666666d0)) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return ((x - y) / ((z - t) * 0.016666666666666666)) + (a * 120.0);
}
def code(x, y, z, t, a): return ((x - y) / ((z - t) * 0.016666666666666666)) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(Float64(x - y) / Float64(Float64(z - t) * 0.016666666666666666)) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = ((x - y) / ((z - t) * 0.016666666666666666)) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(x - y), $MachinePrecision] / N[(N[(z - t), $MachinePrecision] * 0.016666666666666666), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x - y}{\left(z - t\right) \cdot 0.016666666666666666} + a \cdot 120
\end{array}
Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
associate-/r/99.8%
Applied egg-rr99.8%
*-commutative99.8%
clear-num99.8%
un-div-inv99.8%
div-inv99.8%
metadata-eval99.8%
Applied egg-rr99.8%
Final simplification99.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -5e+186) (and (not (<= x 3.2e+153)) (<= x 7.3e+183))) (* -60.0 (/ x t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -5e+186) || (!(x <= 3.2e+153) && (x <= 7.3e+183))) {
tmp = -60.0 * (x / 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 ((x <= (-5d+186)) .or. (.not. (x <= 3.2d+153)) .and. (x <= 7.3d+183)) then
tmp = (-60.0d0) * (x / 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 ((x <= -5e+186) || (!(x <= 3.2e+153) && (x <= 7.3e+183))) {
tmp = -60.0 * (x / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -5e+186) or (not (x <= 3.2e+153) and (x <= 7.3e+183)): tmp = -60.0 * (x / t) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -5e+186) || (!(x <= 3.2e+153) && (x <= 7.3e+183))) tmp = Float64(-60.0 * Float64(x / t)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -5e+186) || (~((x <= 3.2e+153)) && (x <= 7.3e+183))) tmp = -60.0 * (x / t); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -5e+186], And[N[Not[LessEqual[x, 3.2e+153]], $MachinePrecision], LessEqual[x, 7.3e+183]]], N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5 \cdot 10^{+186} \lor \neg \left(x \leq 3.2 \cdot 10^{+153}\right) \land x \leq 7.3 \cdot 10^{+183}:\\
\;\;\;\;-60 \cdot \frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if x < -4.99999999999999954e186 or 3.2000000000000001e153 < x < 7.2999999999999999e183Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 88.6%
Taylor expanded in z around 0 61.2%
Taylor expanded in x around inf 49.2%
if -4.99999999999999954e186 < x < 3.2000000000000001e153 or 7.2999999999999999e183 < x Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in z around inf 57.9%
Final simplification56.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -8e+198) (and (not (<= x 8.2e+139)) (<= x 9.2e+173))) (* 60.0 (/ x z)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -8e+198) || (!(x <= 8.2e+139) && (x <= 9.2e+173))) {
tmp = 60.0 * (x / z);
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((x <= (-8d+198)) .or. (.not. (x <= 8.2d+139)) .and. (x <= 9.2d+173)) then
tmp = 60.0d0 * (x / z)
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -8e+198) || (!(x <= 8.2e+139) && (x <= 9.2e+173))) {
tmp = 60.0 * (x / z);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -8e+198) or (not (x <= 8.2e+139) and (x <= 9.2e+173)): tmp = 60.0 * (x / z) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -8e+198) || (!(x <= 8.2e+139) && (x <= 9.2e+173))) tmp = Float64(60.0 * Float64(x / z)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -8e+198) || (~((x <= 8.2e+139)) && (x <= 9.2e+173))) tmp = 60.0 * (x / z); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -8e+198], And[N[Not[LessEqual[x, 8.2e+139]], $MachinePrecision], LessEqual[x, 9.2e+173]]], N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -8 \cdot 10^{+198} \lor \neg \left(x \leq 8.2 \cdot 10^{+139}\right) \land x \leq 9.2 \cdot 10^{+173}:\\
\;\;\;\;60 \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if x < -8.00000000000000014e198 or 8.2000000000000004e139 < x < 9.1999999999999998e173Initial program 99.7%
associate-/l*99.6%
Simplified99.6%
associate-/r/99.7%
Applied egg-rr99.7%
*-commutative99.7%
clear-num99.6%
un-div-inv99.6%
div-inv99.6%
metadata-eval99.6%
Applied egg-rr99.6%
Taylor expanded in x around inf 77.0%
associate-*r/76.9%
Simplified76.9%
Taylor expanded in z around inf 52.0%
if -8.00000000000000014e198 < x < 8.2000000000000004e139 or 9.1999999999999998e173 < x Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 57.5%
Final simplification56.9%
(FPCore (x y z t a) :precision binary64 (if (<= a -5.5e-89) (* a 120.0) (if (<= a 1.45e-138) (* -60.0 (/ (- x y) t)) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -5.5e-89) {
tmp = a * 120.0;
} else if (a <= 1.45e-138) {
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 <= (-5.5d-89)) then
tmp = a * 120.0d0
else if (a <= 1.45d-138) 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 <= -5.5e-89) {
tmp = a * 120.0;
} else if (a <= 1.45e-138) {
tmp = -60.0 * ((x - y) / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -5.5e-89: tmp = a * 120.0 elif a <= 1.45e-138: 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 <= -5.5e-89) tmp = Float64(a * 120.0); elseif (a <= 1.45e-138) 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 <= -5.5e-89) tmp = a * 120.0; elseif (a <= 1.45e-138) 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, -5.5e-89], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 1.45e-138], 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 -5.5 \cdot 10^{-89}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq 1.45 \cdot 10^{-138}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -5.50000000000000012e-89 or 1.44999999999999987e-138 < a Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 67.5%
if -5.50000000000000012e-89 < a < 1.44999999999999987e-138Initial program 99.7%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 87.7%
Taylor expanded in z around 0 46.7%
Final simplification61.6%
(FPCore (x y z t a) :precision binary64 (if (<= y -6.8e+195) (* 60.0 (/ y t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -6.8e+195) {
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 <= (-6.8d+195)) 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 <= -6.8e+195) {
tmp = 60.0 * (y / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -6.8e+195: tmp = 60.0 * (y / t) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -6.8e+195) tmp = Float64(60.0 * Float64(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 (y <= -6.8e+195) tmp = 60.0 * (y / t); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -6.8e+195], N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.8 \cdot 10^{+195}:\\
\;\;\;\;60 \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if y < -6.80000000000000021e195Initial program 99.8%
associate-/l*99.5%
Simplified99.5%
Taylor expanded in a around 0 76.8%
Taylor expanded in z around 0 50.6%
Taylor expanded in x around 0 50.9%
if -6.80000000000000021e195 < y Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 56.4%
Final simplification55.6%
(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.7%
Simplified99.7%
Taylor expanded in z around inf 52.0%
Final simplification52.0%
(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 2023195
(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)))