
(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 (+ (/ 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}
Initial program 98.7%
associate-/l*99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* 60.0 (- x y)) (- z t))))
(if (<= t_1 -4e+88)
t_1
(if (<= t_1 5e+119)
(+ (* a 120.0) (* x (/ 60.0 (- z t))))
(* 60.0 (/ (- x y) (- z t)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_1 <= -4e+88) {
tmp = t_1;
} else if (t_1 <= 5e+119) {
tmp = (a * 120.0) + (x * (60.0 / (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) :: t_1
real(8) :: tmp
t_1 = (60.0d0 * (x - y)) / (z - t)
if (t_1 <= (-4d+88)) then
tmp = t_1
else if (t_1 <= 5d+119) then
tmp = (a * 120.0d0) + (x * (60.0d0 / (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 t_1 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_1 <= -4e+88) {
tmp = t_1;
} else if (t_1 <= 5e+119) {
tmp = (a * 120.0) + (x * (60.0 / (z - t)));
} else {
tmp = 60.0 * ((x - y) / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (60.0 * (x - y)) / (z - t) tmp = 0 if t_1 <= -4e+88: tmp = t_1 elif t_1 <= 5e+119: tmp = (a * 120.0) + (x * (60.0 / (z - t))) else: tmp = 60.0 * ((x - y) / (z - t)) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) tmp = 0.0 if (t_1 <= -4e+88) tmp = t_1; elseif (t_1 <= 5e+119) tmp = Float64(Float64(a * 120.0) + Float64(x * Float64(60.0 / 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) t_1 = (60.0 * (x - y)) / (z - t); tmp = 0.0; if (t_1 <= -4e+88) tmp = t_1; elseif (t_1 <= 5e+119) tmp = (a * 120.0) + (x * (60.0 / (z - t))); else tmp = 60.0 * ((x - y) / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -4e+88], t$95$1, If[LessEqual[t$95$1, 5e+119], N[(N[(a * 120.0), $MachinePrecision] + N[(x * N[(60.0 / 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}
t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t_1 \leq -4 \cdot 10^{+88}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+119}:\\
\;\;\;\;a \cdot 120 + x \cdot \frac{60}{z - t}\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\end{array}
\end{array}
if (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < -3.99999999999999984e88Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 88.0%
associate-*r/88.0%
Applied egg-rr88.0%
if -3.99999999999999984e88 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < 4.9999999999999999e119Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 88.2%
associate-*r/88.3%
*-commutative88.3%
associate-*r/88.3%
Simplified88.3%
if 4.9999999999999999e119 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) Initial program 87.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 95.9%
Final simplification88.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* 60.0 (- x y)) (- z t))))
(if (<= t_1 -4e+88)
t_1
(if (<= t_1 5e+119)
(+ (* 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 t_1 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_1 <= -4e+88) {
tmp = t_1;
} else if (t_1 <= 5e+119) {
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) :: t_1
real(8) :: tmp
t_1 = (60.0d0 * (x - y)) / (z - t)
if (t_1 <= (-4d+88)) then
tmp = t_1
else if (t_1 <= 5d+119) 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 t_1 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_1 <= -4e+88) {
tmp = t_1;
} else if (t_1 <= 5e+119) {
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): t_1 = (60.0 * (x - y)) / (z - t) tmp = 0 if t_1 <= -4e+88: tmp = t_1 elif t_1 <= 5e+119: 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) t_1 = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) tmp = 0.0 if (t_1 <= -4e+88) tmp = t_1; elseif (t_1 <= 5e+119) tmp = Float64(Float64(a * 120.0) + Float64(60.0 / Float64(Float64(z - t) / x))); 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) t_1 = (60.0 * (x - y)) / (z - t); tmp = 0.0; if (t_1 <= -4e+88) tmp = t_1; elseif (t_1 <= 5e+119) 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_] := Block[{t$95$1 = N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -4e+88], t$95$1, If[LessEqual[t$95$1, 5e+119], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 / N[(N[(z - t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t_1 \leq -4 \cdot 10^{+88}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+119}:\\
\;\;\;\;a \cdot 120 + \frac{60}{\frac{z - t}{x}}\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\end{array}
\end{array}
if (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < -3.99999999999999984e88Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 88.0%
associate-*r/88.0%
Applied egg-rr88.0%
if -3.99999999999999984e88 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < 4.9999999999999999e119Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 88.3%
if 4.9999999999999999e119 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) Initial program 87.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 95.9%
Final simplification88.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (* a 120.0) (/ 60.0 (/ z x))))
(t_2 (+ (* a 120.0) (/ -60.0 (/ t x)))))
(if (<= z -2.3e+111)
t_1
(if (<= z -9.2e-156)
(* 60.0 (/ (- x y) (- z t)))
(if (<= z 7e-174)
t_2
(if (<= z 1e-118)
(+ (* a 120.0) (/ (* 60.0 y) t))
(if (<= z 6e+49) t_2 t_1)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (a * 120.0) + (60.0 / (z / x));
double t_2 = (a * 120.0) + (-60.0 / (t / x));
double tmp;
if (z <= -2.3e+111) {
tmp = t_1;
} else if (z <= -9.2e-156) {
tmp = 60.0 * ((x - y) / (z - t));
} else if (z <= 7e-174) {
tmp = t_2;
} else if (z <= 1e-118) {
tmp = (a * 120.0) + ((60.0 * y) / t);
} else if (z <= 6e+49) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (a * 120.0d0) + (60.0d0 / (z / x))
t_2 = (a * 120.0d0) + ((-60.0d0) / (t / x))
if (z <= (-2.3d+111)) then
tmp = t_1
else if (z <= (-9.2d-156)) then
tmp = 60.0d0 * ((x - y) / (z - t))
else if (z <= 7d-174) then
tmp = t_2
else if (z <= 1d-118) then
tmp = (a * 120.0d0) + ((60.0d0 * y) / t)
else if (z <= 6d+49) then
tmp = t_2
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (a * 120.0) + (60.0 / (z / x));
double t_2 = (a * 120.0) + (-60.0 / (t / x));
double tmp;
if (z <= -2.3e+111) {
tmp = t_1;
} else if (z <= -9.2e-156) {
tmp = 60.0 * ((x - y) / (z - t));
} else if (z <= 7e-174) {
tmp = t_2;
} else if (z <= 1e-118) {
tmp = (a * 120.0) + ((60.0 * y) / t);
} else if (z <= 6e+49) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (a * 120.0) + (60.0 / (z / x)) t_2 = (a * 120.0) + (-60.0 / (t / x)) tmp = 0 if z <= -2.3e+111: tmp = t_1 elif z <= -9.2e-156: tmp = 60.0 * ((x - y) / (z - t)) elif z <= 7e-174: tmp = t_2 elif z <= 1e-118: tmp = (a * 120.0) + ((60.0 * y) / t) elif z <= 6e+49: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(a * 120.0) + Float64(60.0 / Float64(z / x))) t_2 = Float64(Float64(a * 120.0) + Float64(-60.0 / Float64(t / x))) tmp = 0.0 if (z <= -2.3e+111) tmp = t_1; elseif (z <= -9.2e-156) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); elseif (z <= 7e-174) tmp = t_2; elseif (z <= 1e-118) tmp = Float64(Float64(a * 120.0) + Float64(Float64(60.0 * y) / t)); elseif (z <= 6e+49) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (a * 120.0) + (60.0 / (z / x)); t_2 = (a * 120.0) + (-60.0 / (t / x)); tmp = 0.0; if (z <= -2.3e+111) tmp = t_1; elseif (z <= -9.2e-156) tmp = 60.0 * ((x - y) / (z - t)); elseif (z <= 7e-174) tmp = t_2; elseif (z <= 1e-118) tmp = (a * 120.0) + ((60.0 * y) / t); elseif (z <= 6e+49) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 / N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 / N[(t / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.3e+111], t$95$1, If[LessEqual[z, -9.2e-156], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7e-174], t$95$2, If[LessEqual[z, 1e-118], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(60.0 * y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6e+49], t$95$2, t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot 120 + \frac{60}{\frac{z}{x}}\\
t_2 := a \cdot 120 + \frac{-60}{\frac{t}{x}}\\
\mathbf{if}\;z \leq -2.3 \cdot 10^{+111}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -9.2 \cdot 10^{-156}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{elif}\;z \leq 7 \cdot 10^{-174}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 10^{-118}:\\
\;\;\;\;a \cdot 120 + \frac{60 \cdot y}{t}\\
\mathbf{elif}\;z \leq 6 \cdot 10^{+49}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -2.30000000000000002e111 or 6.0000000000000005e49 < z Initial program 99.0%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 89.3%
Taylor expanded in z around inf 87.9%
if -2.30000000000000002e111 < z < -9.1999999999999998e-156Initial program 96.6%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 73.0%
if -9.1999999999999998e-156 < z < 6.99999999999999975e-174 or 9.99999999999999985e-119 < z < 6.0000000000000005e49Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 82.6%
Taylor expanded in z around 0 79.0%
mul-1-neg79.0%
distribute-neg-frac79.0%
Simplified79.0%
Taylor expanded in t around 0 78.9%
associate-*r/79.0%
associate-/l*79.0%
Simplified79.0%
if 6.99999999999999975e-174 < z < 9.99999999999999985e-119Initial program 99.7%
Taylor expanded in x around 0 88.9%
Taylor expanded in z around 0 88.7%
associate-*r/88.8%
Simplified88.8%
Final simplification81.6%
(FPCore (x y z t a)
:precision binary64
(if (<= z -3.8e+111)
(* a 120.0)
(if (<= z -2.25e-156)
(* 60.0 (/ (- x y) (- z t)))
(if (<= z 3.6e+70) (+ (* a 120.0) (* -60.0 (/ x t))) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.8e+111) {
tmp = a * 120.0;
} else if (z <= -2.25e-156) {
tmp = 60.0 * ((x - y) / (z - t));
} else if (z <= 3.6e+70) {
tmp = (a * 120.0) + (-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 (z <= (-3.8d+111)) then
tmp = a * 120.0d0
else if (z <= (-2.25d-156)) then
tmp = 60.0d0 * ((x - y) / (z - t))
else if (z <= 3.6d+70) then
tmp = (a * 120.0d0) + ((-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 (z <= -3.8e+111) {
tmp = a * 120.0;
} else if (z <= -2.25e-156) {
tmp = 60.0 * ((x - y) / (z - t));
} else if (z <= 3.6e+70) {
tmp = (a * 120.0) + (-60.0 * (x / t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.8e+111: tmp = a * 120.0 elif z <= -2.25e-156: tmp = 60.0 * ((x - y) / (z - t)) elif z <= 3.6e+70: tmp = (a * 120.0) + (-60.0 * (x / t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.8e+111) tmp = Float64(a * 120.0); elseif (z <= -2.25e-156) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); elseif (z <= 3.6e+70) tmp = Float64(Float64(a * 120.0) + 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 (z <= -3.8e+111) tmp = a * 120.0; elseif (z <= -2.25e-156) tmp = 60.0 * ((x - y) / (z - t)); elseif (z <= 3.6e+70) tmp = (a * 120.0) + (-60.0 * (x / t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.8e+111], N[(a * 120.0), $MachinePrecision], If[LessEqual[z, -2.25e-156], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.6e+70], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.8 \cdot 10^{+111}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;z \leq -2.25 \cdot 10^{-156}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{elif}\;z \leq 3.6 \cdot 10^{+70}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if z < -3.79999999999999976e111 or 3.6e70 < z Initial program 99.0%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 77.4%
if -3.79999999999999976e111 < z < -2.24999999999999993e-156Initial program 96.6%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 73.0%
if -2.24999999999999993e-156 < z < 3.6e70Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 78.8%
associate-*r/78.9%
*-commutative78.9%
associate-*r/78.8%
Simplified78.8%
Taylor expanded in z around 0 72.6%
Final simplification74.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (* a 120.0) (* -60.0 (/ y z)))))
(if (<= z -4.45e+74)
t_1
(if (<= z -3e-157)
(* 60.0 (/ (- x y) (- z t)))
(if (<= z 1e-22) (+ (* a 120.0) (* -60.0 (/ x t))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (a * 120.0) + (-60.0 * (y / z));
double tmp;
if (z <= -4.45e+74) {
tmp = t_1;
} else if (z <= -3e-157) {
tmp = 60.0 * ((x - y) / (z - t));
} else if (z <= 1e-22) {
tmp = (a * 120.0) + (-60.0 * (x / t));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (a * 120.0d0) + ((-60.0d0) * (y / z))
if (z <= (-4.45d+74)) then
tmp = t_1
else if (z <= (-3d-157)) then
tmp = 60.0d0 * ((x - y) / (z - t))
else if (z <= 1d-22) then
tmp = (a * 120.0d0) + ((-60.0d0) * (x / t))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (a * 120.0) + (-60.0 * (y / z));
double tmp;
if (z <= -4.45e+74) {
tmp = t_1;
} else if (z <= -3e-157) {
tmp = 60.0 * ((x - y) / (z - t));
} else if (z <= 1e-22) {
tmp = (a * 120.0) + (-60.0 * (x / t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (a * 120.0) + (-60.0 * (y / z)) tmp = 0 if z <= -4.45e+74: tmp = t_1 elif z <= -3e-157: tmp = 60.0 * ((x - y) / (z - t)) elif z <= 1e-22: tmp = (a * 120.0) + (-60.0 * (x / t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / z))) tmp = 0.0 if (z <= -4.45e+74) tmp = t_1; elseif (z <= -3e-157) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); elseif (z <= 1e-22) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(x / t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (a * 120.0) + (-60.0 * (y / z)); tmp = 0.0; if (z <= -4.45e+74) tmp = t_1; elseif (z <= -3e-157) tmp = 60.0 * ((x - y) / (z - t)); elseif (z <= 1e-22) tmp = (a * 120.0) + (-60.0 * (x / t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.45e+74], t$95$1, If[LessEqual[z, -3e-157], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1e-22], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot 120 + -60 \cdot \frac{y}{z}\\
\mathbf{if}\;z \leq -4.45 \cdot 10^{+74}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -3 \cdot 10^{-157}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{elif}\;z \leq 10^{-22}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -4.4500000000000001e74 or 1e-22 < z Initial program 99.1%
Taylor expanded in x around 0 84.7%
Taylor expanded in z around inf 80.7%
if -4.4500000000000001e74 < z < -3e-157Initial program 96.3%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 74.1%
if -3e-157 < z < 1e-22Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 80.2%
associate-*r/80.3%
*-commutative80.3%
associate-*r/80.3%
Simplified80.3%
Taylor expanded in z around 0 77.7%
Final simplification78.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (* a 120.0) (* -60.0 (/ y z)))))
(if (<= z -5.2e+73)
t_1
(if (<= z -4.7e-158)
(* 60.0 (/ (- x y) (- z t)))
(if (<= z 7.2e-22) (+ (* a 120.0) (/ -60.0 (/ t x))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (a * 120.0) + (-60.0 * (y / z));
double tmp;
if (z <= -5.2e+73) {
tmp = t_1;
} else if (z <= -4.7e-158) {
tmp = 60.0 * ((x - y) / (z - t));
} else if (z <= 7.2e-22) {
tmp = (a * 120.0) + (-60.0 / (t / x));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (a * 120.0d0) + ((-60.0d0) * (y / z))
if (z <= (-5.2d+73)) then
tmp = t_1
else if (z <= (-4.7d-158)) then
tmp = 60.0d0 * ((x - y) / (z - t))
else if (z <= 7.2d-22) then
tmp = (a * 120.0d0) + ((-60.0d0) / (t / x))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (a * 120.0) + (-60.0 * (y / z));
double tmp;
if (z <= -5.2e+73) {
tmp = t_1;
} else if (z <= -4.7e-158) {
tmp = 60.0 * ((x - y) / (z - t));
} else if (z <= 7.2e-22) {
tmp = (a * 120.0) + (-60.0 / (t / x));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (a * 120.0) + (-60.0 * (y / z)) tmp = 0 if z <= -5.2e+73: tmp = t_1 elif z <= -4.7e-158: tmp = 60.0 * ((x - y) / (z - t)) elif z <= 7.2e-22: tmp = (a * 120.0) + (-60.0 / (t / x)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / z))) tmp = 0.0 if (z <= -5.2e+73) tmp = t_1; elseif (z <= -4.7e-158) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); elseif (z <= 7.2e-22) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 / Float64(t / x))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (a * 120.0) + (-60.0 * (y / z)); tmp = 0.0; if (z <= -5.2e+73) tmp = t_1; elseif (z <= -4.7e-158) tmp = 60.0 * ((x - y) / (z - t)); elseif (z <= 7.2e-22) tmp = (a * 120.0) + (-60.0 / (t / x)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.2e+73], t$95$1, If[LessEqual[z, -4.7e-158], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.2e-22], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 / N[(t / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot 120 + -60 \cdot \frac{y}{z}\\
\mathbf{if}\;z \leq -5.2 \cdot 10^{+73}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -4.7 \cdot 10^{-158}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{elif}\;z \leq 7.2 \cdot 10^{-22}:\\
\;\;\;\;a \cdot 120 + \frac{-60}{\frac{t}{x}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -5.2000000000000001e73 or 7.1999999999999996e-22 < z Initial program 99.1%
Taylor expanded in x around 0 84.7%
Taylor expanded in z around inf 80.7%
if -5.2000000000000001e73 < z < -4.70000000000000036e-158Initial program 96.3%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 74.1%
if -4.70000000000000036e-158 < z < 7.1999999999999996e-22Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 80.3%
Taylor expanded in z around 0 77.7%
mul-1-neg77.7%
distribute-neg-frac77.7%
Simplified77.7%
Taylor expanded in t around 0 77.7%
associate-*r/77.7%
associate-/l*77.7%
Simplified77.7%
Final simplification78.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (* a 120.0) (/ 60.0 (/ z x)))))
(if (<= z -2.9e+111)
t_1
(if (<= z -1.45e-155)
(* 60.0 (/ (- x y) (- z t)))
(if (<= z 6.2e+49) (+ (* a 120.0) (/ -60.0 (/ t x))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (a * 120.0) + (60.0 / (z / x));
double tmp;
if (z <= -2.9e+111) {
tmp = t_1;
} else if (z <= -1.45e-155) {
tmp = 60.0 * ((x - y) / (z - t));
} else if (z <= 6.2e+49) {
tmp = (a * 120.0) + (-60.0 / (t / x));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (a * 120.0d0) + (60.0d0 / (z / x))
if (z <= (-2.9d+111)) then
tmp = t_1
else if (z <= (-1.45d-155)) then
tmp = 60.0d0 * ((x - y) / (z - t))
else if (z <= 6.2d+49) then
tmp = (a * 120.0d0) + ((-60.0d0) / (t / x))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (a * 120.0) + (60.0 / (z / x));
double tmp;
if (z <= -2.9e+111) {
tmp = t_1;
} else if (z <= -1.45e-155) {
tmp = 60.0 * ((x - y) / (z - t));
} else if (z <= 6.2e+49) {
tmp = (a * 120.0) + (-60.0 / (t / x));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (a * 120.0) + (60.0 / (z / x)) tmp = 0 if z <= -2.9e+111: tmp = t_1 elif z <= -1.45e-155: tmp = 60.0 * ((x - y) / (z - t)) elif z <= 6.2e+49: tmp = (a * 120.0) + (-60.0 / (t / x)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(a * 120.0) + Float64(60.0 / Float64(z / x))) tmp = 0.0 if (z <= -2.9e+111) tmp = t_1; elseif (z <= -1.45e-155) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); elseif (z <= 6.2e+49) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 / Float64(t / x))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (a * 120.0) + (60.0 / (z / x)); tmp = 0.0; if (z <= -2.9e+111) tmp = t_1; elseif (z <= -1.45e-155) tmp = 60.0 * ((x - y) / (z - t)); elseif (z <= 6.2e+49) tmp = (a * 120.0) + (-60.0 / (t / x)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 / N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.9e+111], t$95$1, If[LessEqual[z, -1.45e-155], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.2e+49], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 / N[(t / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot 120 + \frac{60}{\frac{z}{x}}\\
\mathbf{if}\;z \leq -2.9 \cdot 10^{+111}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.45 \cdot 10^{-155}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{elif}\;z \leq 6.2 \cdot 10^{+49}:\\
\;\;\;\;a \cdot 120 + \frac{-60}{\frac{t}{x}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -2.9e111 or 6.19999999999999985e49 < z Initial program 99.0%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 89.3%
Taylor expanded in z around inf 87.9%
if -2.9e111 < z < -1.45000000000000005e-155Initial program 96.6%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 73.0%
if -1.45000000000000005e-155 < z < 6.19999999999999985e49Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 79.0%
Taylor expanded in z around 0 74.6%
mul-1-neg74.6%
distribute-neg-frac74.6%
Simplified74.6%
Taylor expanded in t around 0 74.6%
associate-*r/74.6%
associate-/l*74.6%
Simplified74.6%
Final simplification79.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= (- z t) -2e+66) (not (<= (- z t) 4e-48))) (* a 120.0) (* 60.0 (/ (- x y) z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((z - t) <= -2e+66) || !((z - t) <= 4e-48)) {
tmp = a * 120.0;
} else {
tmp = 60.0 * ((x - y) / z);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (((z - t) <= (-2d+66)) .or. (.not. ((z - t) <= 4d-48))) then
tmp = a * 120.0d0
else
tmp = 60.0d0 * ((x - y) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (((z - t) <= -2e+66) || !((z - t) <= 4e-48)) {
tmp = a * 120.0;
} else {
tmp = 60.0 * ((x - y) / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if ((z - t) <= -2e+66) or not ((z - t) <= 4e-48): tmp = a * 120.0 else: tmp = 60.0 * ((x - y) / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((Float64(z - t) <= -2e+66) || !(Float64(z - t) <= 4e-48)) tmp = Float64(a * 120.0); else tmp = Float64(60.0 * Float64(Float64(x - y) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (((z - t) <= -2e+66) || ~(((z - t) <= 4e-48))) tmp = a * 120.0; else tmp = 60.0 * ((x - y) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[N[(z - t), $MachinePrecision], -2e+66], N[Not[LessEqual[N[(z - t), $MachinePrecision], 4e-48]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z - t \leq -2 \cdot 10^{+66} \lor \neg \left(z - t \leq 4 \cdot 10^{-48}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z}\\
\end{array}
\end{array}
if (-.f64 z t) < -1.99999999999999989e66 or 3.9999999999999999e-48 < (-.f64 z t) Initial program 98.5%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 63.4%
if -1.99999999999999989e66 < (-.f64 z t) < 3.9999999999999999e-48Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 86.2%
Taylor expanded in z around inf 58.0%
Final simplification62.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -9.5e+101) (not (<= y 7.4e+56))) (+ (* a 120.0) (/ (* y -60.0) (- z t))) (+ (* a 120.0) (* x (/ 60.0 (- z t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -9.5e+101) || !(y <= 7.4e+56)) {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
} else {
tmp = (a * 120.0) + (x * (60.0 / (z - t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((y <= (-9.5d+101)) .or. (.not. (y <= 7.4d+56))) then
tmp = (a * 120.0d0) + ((y * (-60.0d0)) / (z - t))
else
tmp = (a * 120.0d0) + (x * (60.0d0 / (z - t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -9.5e+101) || !(y <= 7.4e+56)) {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
} else {
tmp = (a * 120.0) + (x * (60.0 / (z - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -9.5e+101) or not (y <= 7.4e+56): tmp = (a * 120.0) + ((y * -60.0) / (z - t)) else: tmp = (a * 120.0) + (x * (60.0 / (z - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -9.5e+101) || !(y <= 7.4e+56)) tmp = Float64(Float64(a * 120.0) + Float64(Float64(y * -60.0) / Float64(z - t))); else tmp = Float64(Float64(a * 120.0) + Float64(x * Float64(60.0 / Float64(z - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -9.5e+101) || ~((y <= 7.4e+56))) tmp = (a * 120.0) + ((y * -60.0) / (z - t)); else tmp = (a * 120.0) + (x * (60.0 / (z - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -9.5e+101], N[Not[LessEqual[y, 7.4e+56]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(x * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.5 \cdot 10^{+101} \lor \neg \left(y \leq 7.4 \cdot 10^{+56}\right):\\
\;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + x \cdot \frac{60}{z - t}\\
\end{array}
\end{array}
if y < -9.49999999999999947e101 or 7.39999999999999994e56 < y Initial program 98.8%
Taylor expanded in x around 0 87.9%
if -9.49999999999999947e101 < y < 7.39999999999999994e56Initial program 98.7%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 97.4%
associate-*r/96.3%
*-commutative96.3%
associate-*r/97.5%
Simplified97.5%
Final simplification93.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -6e-34) (not (<= a 1.8e-48))) (* 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 <= -6e-34) || !(a <= 1.8e-48)) {
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 <= (-6d-34)) .or. (.not. (a <= 1.8d-48))) 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 <= -6e-34) || !(a <= 1.8e-48)) {
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 <= -6e-34) or not (a <= 1.8e-48): 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 <= -6e-34) || !(a <= 1.8e-48)) 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 <= -6e-34) || ~((a <= 1.8e-48))) 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, -6e-34], N[Not[LessEqual[a, 1.8e-48]], $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 -6 \cdot 10^{-34} \lor \neg \left(a \leq 1.8 \cdot 10^{-48}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\end{array}
\end{array}
if a < -6e-34 or 1.8000000000000001e-48 < a Initial program 99.2%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 75.2%
if -6e-34 < a < 1.8000000000000001e-48Initial program 98.2%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 74.7%
Final simplification74.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -1.66e+264) (not (<= x 5e+182))) (* 60.0 (/ x (- z t))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -1.66e+264) || !(x <= 5e+182)) {
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 ((x <= (-1.66d+264)) .or. (.not. (x <= 5d+182))) 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 ((x <= -1.66e+264) || !(x <= 5e+182)) {
tmp = 60.0 * (x / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -1.66e+264) or not (x <= 5e+182): tmp = 60.0 * (x / (z - t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -1.66e+264) || !(x <= 5e+182)) 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 ((x <= -1.66e+264) || ~((x <= 5e+182))) tmp = 60.0 * (x / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -1.66e+264], N[Not[LessEqual[x, 5e+182]], $MachinePrecision]], N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.66 \cdot 10^{+264} \lor \neg \left(x \leq 5 \cdot 10^{+182}\right):\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if x < -1.6599999999999999e264 or 4.99999999999999973e182 < x Initial program 95.5%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 77.9%
Taylor expanded in x around inf 74.1%
if -1.6599999999999999e264 < x < 4.99999999999999973e182Initial program 99.4%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 59.4%
Final simplification61.9%
(FPCore (x y z t a) :precision binary64 (if (<= x 1.7e+214) (* a 120.0) (* (/ x t) (- 60.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= 1.7e+214) {
tmp = a * 120.0;
} else {
tmp = (x / t) * -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 (x <= 1.7d+214) then
tmp = a * 120.0d0
else
tmp = (x / t) * -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 (x <= 1.7e+214) {
tmp = a * 120.0;
} else {
tmp = (x / t) * -60.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= 1.7e+214: tmp = a * 120.0 else: tmp = (x / t) * -60.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= 1.7e+214) tmp = Float64(a * 120.0); else tmp = Float64(Float64(x / t) * Float64(-60.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= 1.7e+214) tmp = a * 120.0; else tmp = (x / t) * -60.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, 1.7e+214], N[(a * 120.0), $MachinePrecision], N[(N[(x / t), $MachinePrecision] * (-60.0)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.7 \cdot 10^{+214}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{t} \cdot \left(-60\right)\\
\end{array}
\end{array}
if x < 1.6999999999999999e214Initial program 99.0%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 57.7%
if 1.6999999999999999e214 < x Initial program 96.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 78.5%
Taylor expanded in x around inf 73.2%
Taylor expanded in z around 0 51.9%
associate-*r/51.9%
neg-mul-151.9%
Simplified51.9%
Final simplification57.0%
(FPCore (x y z t a) :precision binary64 (if (<= x 2.7e+187) (* a 120.0) (* 60.0 (/ x z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= 2.7e+187) {
tmp = a * 120.0;
} else {
tmp = 60.0 * (x / 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 (x <= 2.7d+187) then
tmp = a * 120.0d0
else
tmp = 60.0d0 * (x / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= 2.7e+187) {
tmp = a * 120.0;
} else {
tmp = 60.0 * (x / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= 2.7e+187: tmp = a * 120.0 else: tmp = 60.0 * (x / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= 2.7e+187) tmp = Float64(a * 120.0); else tmp = Float64(60.0 * Float64(x / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= 2.7e+187) tmp = a * 120.0; else tmp = 60.0 * (x / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, 2.7e+187], N[(a * 120.0), $MachinePrecision], N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 2.7 \cdot 10^{+187}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x}{z}\\
\end{array}
\end{array}
if x < 2.70000000000000008e187Initial program 99.0%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 58.0%
if 2.70000000000000008e187 < x Initial program 97.3%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 76.2%
Taylor expanded in x around inf 71.7%
Taylor expanded in z around inf 37.4%
Final simplification55.1%
(FPCore (x y z t a) :precision binary64 (if (<= x 9.8e+182) (* a 120.0) (* x (/ 60.0 z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= 9.8e+182) {
tmp = a * 120.0;
} else {
tmp = x * (60.0 / z);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (x <= 9.8d+182) then
tmp = a * 120.0d0
else
tmp = x * (60.0d0 / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= 9.8e+182) {
tmp = a * 120.0;
} else {
tmp = x * (60.0 / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= 9.8e+182: tmp = a * 120.0 else: tmp = x * (60.0 / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= 9.8e+182) tmp = Float64(a * 120.0); else tmp = Float64(x * Float64(60.0 / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= 9.8e+182) tmp = a * 120.0; else tmp = x * (60.0 / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, 9.8e+182], N[(a * 120.0), $MachinePrecision], N[(x * N[(60.0 / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 9.8 \cdot 10^{+182}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{60}{z}\\
\end{array}
\end{array}
if x < 9.7999999999999999e182Initial program 99.0%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 58.0%
if 9.7999999999999999e182 < x Initial program 97.3%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 76.2%
Taylor expanded in x around inf 71.7%
Taylor expanded in z around inf 37.4%
associate-*r/37.4%
*-commutative37.4%
associate-*r/37.5%
Simplified37.5%
Final simplification55.1%
(FPCore (x y z t a) :precision binary64 (if (<= x 3e+215) (* a 120.0) (/ (* x -60.0) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= 3e+215) {
tmp = a * 120.0;
} else {
tmp = (x * -60.0) / t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (x <= 3d+215) then
tmp = a * 120.0d0
else
tmp = (x * (-60.0d0)) / t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= 3e+215) {
tmp = a * 120.0;
} else {
tmp = (x * -60.0) / t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= 3e+215: tmp = a * 120.0 else: tmp = (x * -60.0) / t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= 3e+215) tmp = Float64(a * 120.0); else tmp = Float64(Float64(x * -60.0) / t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= 3e+215) tmp = a * 120.0; else tmp = (x * -60.0) / t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, 3e+215], N[(a * 120.0), $MachinePrecision], N[(N[(x * -60.0), $MachinePrecision] / t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 3 \cdot 10^{+215}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot -60}{t}\\
\end{array}
\end{array}
if x < 2.9999999999999999e215Initial program 99.0%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 57.7%
if 2.9999999999999999e215 < x Initial program 96.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 78.5%
Taylor expanded in z around 0 57.2%
associate-*r/54.4%
Simplified54.4%
Taylor expanded in x around inf 49.2%
Final simplification56.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 98.7%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 53.0%
Final simplification53.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 2023301
(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)))