
(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 (* (/ 60.0 (- z t)) (- x y))))
double code(double x, double y, double z, double t, double a) {
return fma(a, 120.0, ((60.0 / (z - t)) * (x - y)));
}
function code(x, y, z, t, a) return fma(a, 120.0, Float64(Float64(60.0 / Float64(z - t)) * Float64(x - y))) end
code[x_, y_, z_, t_, a_] := N[(a * 120.0 + N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(a, 120, \frac{60}{z - t} \cdot \left(x - y\right)\right)
\end{array}
Initial program 99.8%
+-commutative99.8%
fma-def99.8%
associate-*l/99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* 60.0 (- x y)) (- z t)))
(t_2 (+ (* a 120.0) (/ 60.0 (/ (- z t) x)))))
(if (<= t_1 -5e+221)
(* 60.0 (* (- x y) (/ 1.0 (- z t))))
(if (<= t_1 -5e+94)
t_2
(if (<= t_1 -5e-17)
t_1
(if (<= t_1 5e+71) t_2 (* 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 t_2 = (a * 120.0) + (60.0 / ((z - t) / x));
double tmp;
if (t_1 <= -5e+221) {
tmp = 60.0 * ((x - y) * (1.0 / (z - t)));
} else if (t_1 <= -5e+94) {
tmp = t_2;
} else if (t_1 <= -5e-17) {
tmp = t_1;
} else if (t_1 <= 5e+71) {
tmp = t_2;
} 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) :: t_2
real(8) :: tmp
t_1 = (60.0d0 * (x - y)) / (z - t)
t_2 = (a * 120.0d0) + (60.0d0 / ((z - t) / x))
if (t_1 <= (-5d+221)) then
tmp = 60.0d0 * ((x - y) * (1.0d0 / (z - t)))
else if (t_1 <= (-5d+94)) then
tmp = t_2
else if (t_1 <= (-5d-17)) then
tmp = t_1
else if (t_1 <= 5d+71) then
tmp = t_2
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 t_2 = (a * 120.0) + (60.0 / ((z - t) / x));
double tmp;
if (t_1 <= -5e+221) {
tmp = 60.0 * ((x - y) * (1.0 / (z - t)));
} else if (t_1 <= -5e+94) {
tmp = t_2;
} else if (t_1 <= -5e-17) {
tmp = t_1;
} else if (t_1 <= 5e+71) {
tmp = t_2;
} 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) t_2 = (a * 120.0) + (60.0 / ((z - t) / x)) tmp = 0 if t_1 <= -5e+221: tmp = 60.0 * ((x - y) * (1.0 / (z - t))) elif t_1 <= -5e+94: tmp = t_2 elif t_1 <= -5e-17: tmp = t_1 elif t_1 <= 5e+71: tmp = t_2 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)) t_2 = Float64(Float64(a * 120.0) + Float64(60.0 / Float64(Float64(z - t) / x))) tmp = 0.0 if (t_1 <= -5e+221) tmp = Float64(60.0 * Float64(Float64(x - y) * Float64(1.0 / Float64(z - t)))); elseif (t_1 <= -5e+94) tmp = t_2; elseif (t_1 <= -5e-17) tmp = t_1; elseif (t_1 <= 5e+71) tmp = t_2; 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); t_2 = (a * 120.0) + (60.0 / ((z - t) / x)); tmp = 0.0; if (t_1 <= -5e+221) tmp = 60.0 * ((x - y) * (1.0 / (z - t))); elseif (t_1 <= -5e+94) tmp = t_2; elseif (t_1 <= -5e-17) tmp = t_1; elseif (t_1 <= 5e+71) tmp = t_2; 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]}, Block[{t$95$2 = N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 / N[(N[(z - t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+221], N[(60.0 * N[(N[(x - y), $MachinePrecision] * N[(1.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -5e+94], t$95$2, If[LessEqual[t$95$1, -5e-17], t$95$1, If[LessEqual[t$95$1, 5e+71], t$95$2, 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}\\
t_2 := a \cdot 120 + \frac{60}{\frac{z - t}{x}}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+221}:\\
\;\;\;\;60 \cdot \left(\left(x - y\right) \cdot \frac{1}{z - t}\right)\\
\mathbf{elif}\;t\_1 \leq -5 \cdot 10^{+94}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq -5 \cdot 10^{-17}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+71}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\end{array}
\end{array}
if (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < -5.0000000000000002e221Initial program 99.6%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 99.8%
div-inv100.0%
Applied egg-rr100.0%
if -5.0000000000000002e221 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < -5.0000000000000001e94 or -4.9999999999999999e-17 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < 4.99999999999999972e71Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 88.9%
if -5.0000000000000001e94 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < -4.9999999999999999e-17Initial program 100.0%
associate-/l*99.9%
Simplified99.9%
associate-/l*100.0%
add-cube-cbrt97.9%
pow397.9%
*-un-lft-identity97.9%
times-frac98.3%
metadata-eval98.3%
Applied egg-rr98.3%
Taylor expanded in a around 0 86.7%
pow-base-186.7%
*-lft-identity86.7%
associate-*r/87.0%
Simplified87.0%
if 4.99999999999999972e71 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 86.1%
Final simplification88.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* 60.0 (- x y)) (- z t))))
(if (<= t_1 -5e+221)
(* 60.0 (* (- x y) (/ 1.0 (- z t))))
(if (<= t_1 -5e+94)
(+ (* a 120.0) (/ x (/ (- z t) 60.0)))
(if (<= t_1 -5e-17)
t_1
(if (<= t_1 5e+71)
(+ (* 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 <= -5e+221) {
tmp = 60.0 * ((x - y) * (1.0 / (z - t)));
} else if (t_1 <= -5e+94) {
tmp = (a * 120.0) + (x / ((z - t) / 60.0));
} else if (t_1 <= -5e-17) {
tmp = t_1;
} else if (t_1 <= 5e+71) {
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 <= (-5d+221)) then
tmp = 60.0d0 * ((x - y) * (1.0d0 / (z - t)))
else if (t_1 <= (-5d+94)) then
tmp = (a * 120.0d0) + (x / ((z - t) / 60.0d0))
else if (t_1 <= (-5d-17)) then
tmp = t_1
else if (t_1 <= 5d+71) 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 <= -5e+221) {
tmp = 60.0 * ((x - y) * (1.0 / (z - t)));
} else if (t_1 <= -5e+94) {
tmp = (a * 120.0) + (x / ((z - t) / 60.0));
} else if (t_1 <= -5e-17) {
tmp = t_1;
} else if (t_1 <= 5e+71) {
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 <= -5e+221: tmp = 60.0 * ((x - y) * (1.0 / (z - t))) elif t_1 <= -5e+94: tmp = (a * 120.0) + (x / ((z - t) / 60.0)) elif t_1 <= -5e-17: tmp = t_1 elif t_1 <= 5e+71: 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 <= -5e+221) tmp = Float64(60.0 * Float64(Float64(x - y) * Float64(1.0 / Float64(z - t)))); elseif (t_1 <= -5e+94) tmp = Float64(Float64(a * 120.0) + Float64(x / Float64(Float64(z - t) / 60.0))); elseif (t_1 <= -5e-17) tmp = t_1; elseif (t_1 <= 5e+71) 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 <= -5e+221) tmp = 60.0 * ((x - y) * (1.0 / (z - t))); elseif (t_1 <= -5e+94) tmp = (a * 120.0) + (x / ((z - t) / 60.0)); elseif (t_1 <= -5e-17) tmp = t_1; elseif (t_1 <= 5e+71) 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, -5e+221], N[(60.0 * N[(N[(x - y), $MachinePrecision] * N[(1.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -5e+94], N[(N[(a * 120.0), $MachinePrecision] + N[(x / N[(N[(z - t), $MachinePrecision] / 60.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -5e-17], t$95$1, If[LessEqual[t$95$1, 5e+71], 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 -5 \cdot 10^{+221}:\\
\;\;\;\;60 \cdot \left(\left(x - y\right) \cdot \frac{1}{z - t}\right)\\
\mathbf{elif}\;t\_1 \leq -5 \cdot 10^{+94}:\\
\;\;\;\;a \cdot 120 + \frac{x}{\frac{z - t}{60}}\\
\mathbf{elif}\;t\_1 \leq -5 \cdot 10^{-17}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+71}:\\
\;\;\;\;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)) < -5.0000000000000002e221Initial program 99.6%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 99.8%
div-inv100.0%
Applied egg-rr100.0%
if -5.0000000000000002e221 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < -5.0000000000000001e94Initial program 99.7%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in x around inf 83.9%
associate-*r/83.9%
*-commutative83.9%
associate-/l*84.0%
Simplified84.0%
if -5.0000000000000001e94 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < -4.9999999999999999e-17Initial program 100.0%
associate-/l*99.9%
Simplified99.9%
associate-/l*100.0%
add-cube-cbrt97.9%
pow397.9%
*-un-lft-identity97.9%
times-frac98.3%
metadata-eval98.3%
Applied egg-rr98.3%
Taylor expanded in a around 0 86.7%
pow-base-186.7%
*-lft-identity86.7%
associate-*r/87.0%
Simplified87.0%
if -4.9999999999999999e-17 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < 4.99999999999999972e71Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 89.4%
if 4.99999999999999972e71 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 86.1%
Final simplification88.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (* a 120.0) (/ 60.0 (/ z (- x y))))))
(if (<= z -2.4e-46)
t_1
(if (<= z 1e-228)
(/ (* 60.0 (- x y)) (- z t))
(if (<= z 2.5e-205)
(+ (* a 120.0) (/ (* x -60.0) t))
(if (<= z 4.5e-26) (* 60.0 (/ (- x y) (- z t))) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (a * 120.0) + (60.0 / (z / (x - y)));
double tmp;
if (z <= -2.4e-46) {
tmp = t_1;
} else if (z <= 1e-228) {
tmp = (60.0 * (x - y)) / (z - t);
} else if (z <= 2.5e-205) {
tmp = (a * 120.0) + ((x * -60.0) / t);
} else if (z <= 4.5e-26) {
tmp = 60.0 * ((x - y) / (z - 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 / (z / (x - y)))
if (z <= (-2.4d-46)) then
tmp = t_1
else if (z <= 1d-228) then
tmp = (60.0d0 * (x - y)) / (z - t)
else if (z <= 2.5d-205) then
tmp = (a * 120.0d0) + ((x * (-60.0d0)) / t)
else if (z <= 4.5d-26) then
tmp = 60.0d0 * ((x - y) / (z - 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 / (z / (x - y)));
double tmp;
if (z <= -2.4e-46) {
tmp = t_1;
} else if (z <= 1e-228) {
tmp = (60.0 * (x - y)) / (z - t);
} else if (z <= 2.5e-205) {
tmp = (a * 120.0) + ((x * -60.0) / t);
} else if (z <= 4.5e-26) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (a * 120.0) + (60.0 / (z / (x - y))) tmp = 0 if z <= -2.4e-46: tmp = t_1 elif z <= 1e-228: tmp = (60.0 * (x - y)) / (z - t) elif z <= 2.5e-205: tmp = (a * 120.0) + ((x * -60.0) / t) elif z <= 4.5e-26: tmp = 60.0 * ((x - y) / (z - 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(z / Float64(x - y)))) tmp = 0.0 if (z <= -2.4e-46) tmp = t_1; elseif (z <= 1e-228) tmp = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)); elseif (z <= 2.5e-205) tmp = Float64(Float64(a * 120.0) + Float64(Float64(x * -60.0) / t)); elseif (z <= 4.5e-26) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - 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 / (z / (x - y))); tmp = 0.0; if (z <= -2.4e-46) tmp = t_1; elseif (z <= 1e-228) tmp = (60.0 * (x - y)) / (z - t); elseif (z <= 2.5e-205) tmp = (a * 120.0) + ((x * -60.0) / t); elseif (z <= 4.5e-26) tmp = 60.0 * ((x - y) / (z - 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[(z / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.4e-46], t$95$1, If[LessEqual[z, 1e-228], N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.5e-205], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(x * -60.0), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.5e-26], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot 120 + \frac{60}{\frac{z}{x - y}}\\
\mathbf{if}\;z \leq -2.4 \cdot 10^{-46}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 10^{-228}:\\
\;\;\;\;\frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{-205}:\\
\;\;\;\;a \cdot 120 + \frac{x \cdot -60}{t}\\
\mathbf{elif}\;z \leq 4.5 \cdot 10^{-26}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.40000000000000013e-46 or 4.4999999999999999e-26 < z Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 87.6%
if -2.40000000000000013e-46 < z < 1.00000000000000003e-228Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
associate-/l*99.9%
add-cube-cbrt99.0%
pow399.0%
*-un-lft-identity99.0%
times-frac99.1%
metadata-eval99.1%
Applied egg-rr99.1%
Taylor expanded in a around 0 76.4%
pow-base-176.4%
*-lft-identity76.4%
associate-*r/76.4%
Simplified76.4%
if 1.00000000000000003e-228 < z < 2.5e-205Initial program 100.0%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in x around inf 99.8%
associate-*r/100.0%
*-commutative100.0%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around 0 99.8%
associate-*r/100.0%
metadata-eval100.0%
distribute-lft-neg-in100.0%
*-commutative100.0%
distribute-rgt-neg-in100.0%
metadata-eval100.0%
Simplified100.0%
if 2.5e-205 < z < 4.4999999999999999e-26Initial program 99.7%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 77.4%
Final simplification83.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* 60.0 (/ (- x y) (- z t)))))
(if (<= z -2.9e-46)
(+ (* a 120.0) (/ x (* z 0.016666666666666666)))
(if (<= z 5e-236)
t_1
(if (<= z 2.25e-206)
(+ (* a 120.0) (* 60.0 (/ y t)))
(if (<= z 2.6e-25) t_1 (+ (* a 120.0) (* -60.0 (/ y z)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * ((x - y) / (z - t));
double tmp;
if (z <= -2.9e-46) {
tmp = (a * 120.0) + (x / (z * 0.016666666666666666));
} else if (z <= 5e-236) {
tmp = t_1;
} else if (z <= 2.25e-206) {
tmp = (a * 120.0) + (60.0 * (y / t));
} else if (z <= 2.6e-25) {
tmp = t_1;
} else {
tmp = (a * 120.0) + (-60.0 * (y / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = 60.0d0 * ((x - y) / (z - t))
if (z <= (-2.9d-46)) then
tmp = (a * 120.0d0) + (x / (z * 0.016666666666666666d0))
else if (z <= 5d-236) then
tmp = t_1
else if (z <= 2.25d-206) then
tmp = (a * 120.0d0) + (60.0d0 * (y / t))
else if (z <= 2.6d-25) then
tmp = t_1
else
tmp = (a * 120.0d0) + ((-60.0d0) * (y / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * ((x - y) / (z - t));
double tmp;
if (z <= -2.9e-46) {
tmp = (a * 120.0) + (x / (z * 0.016666666666666666));
} else if (z <= 5e-236) {
tmp = t_1;
} else if (z <= 2.25e-206) {
tmp = (a * 120.0) + (60.0 * (y / t));
} else if (z <= 2.6e-25) {
tmp = t_1;
} else {
tmp = (a * 120.0) + (-60.0 * (y / z));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = 60.0 * ((x - y) / (z - t)) tmp = 0 if z <= -2.9e-46: tmp = (a * 120.0) + (x / (z * 0.016666666666666666)) elif z <= 5e-236: tmp = t_1 elif z <= 2.25e-206: tmp = (a * 120.0) + (60.0 * (y / t)) elif z <= 2.6e-25: tmp = t_1 else: tmp = (a * 120.0) + (-60.0 * (y / z)) return tmp
function code(x, y, z, t, a) t_1 = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))) tmp = 0.0 if (z <= -2.9e-46) tmp = Float64(Float64(a * 120.0) + Float64(x / Float64(z * 0.016666666666666666))); elseif (z <= 5e-236) tmp = t_1; elseif (z <= 2.25e-206) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(y / t))); elseif (z <= 2.6e-25) tmp = t_1; else tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = 60.0 * ((x - y) / (z - t)); tmp = 0.0; if (z <= -2.9e-46) tmp = (a * 120.0) + (x / (z * 0.016666666666666666)); elseif (z <= 5e-236) tmp = t_1; elseif (z <= 2.25e-206) tmp = (a * 120.0) + (60.0 * (y / t)); elseif (z <= 2.6e-25) tmp = t_1; else tmp = (a * 120.0) + (-60.0 * (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.9e-46], N[(N[(a * 120.0), $MachinePrecision] + N[(x / N[(z * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5e-236], t$95$1, If[LessEqual[z, 2.25e-206], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.6e-25], t$95$1, N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 60 \cdot \frac{x - y}{z - t}\\
\mathbf{if}\;z \leq -2.9 \cdot 10^{-46}:\\
\;\;\;\;a \cdot 120 + \frac{x}{z \cdot 0.016666666666666666}\\
\mathbf{elif}\;z \leq 5 \cdot 10^{-236}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.25 \cdot 10^{-206}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t}\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{-25}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if z < -2.90000000000000005e-46Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around inf 85.1%
associate-*r/85.1%
*-commutative85.1%
associate-/l*85.3%
Simplified85.3%
Taylor expanded in z around inf 80.3%
*-commutative80.3%
Simplified80.3%
if -2.90000000000000005e-46 < z < 4.9999999999999998e-236 or 2.2499999999999999e-206 < z < 2.6e-25Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 76.8%
if 4.9999999999999998e-236 < z < 2.2499999999999999e-206Initial program 100.0%
Taylor expanded in x around 0 100.0%
fma-def100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in x around 0 100.0%
+-commutative100.0%
fma-def100.0%
associate-*r/100.0%
Simplified100.0%
Taylor expanded in z around 0 100.0%
if 2.6e-25 < z Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 88.3%
Taylor expanded in x around 0 80.4%
Final simplification79.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* 60.0 (/ (- x y) (- z t)))))
(if (<= z -2.9e-46)
(+ (* a 120.0) (/ x (* z 0.016666666666666666)))
(if (<= z 9.5e-234)
t_1
(if (<= z 2.1e-206)
(+ (* a 120.0) (* 60.0 (/ y t)))
(if (<= z 4.4e-26) t_1 (+ (* a 120.0) (/ y (/ z -60.0)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * ((x - y) / (z - t));
double tmp;
if (z <= -2.9e-46) {
tmp = (a * 120.0) + (x / (z * 0.016666666666666666));
} else if (z <= 9.5e-234) {
tmp = t_1;
} else if (z <= 2.1e-206) {
tmp = (a * 120.0) + (60.0 * (y / t));
} else if (z <= 4.4e-26) {
tmp = t_1;
} else {
tmp = (a * 120.0) + (y / (z / -60.0));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = 60.0d0 * ((x - y) / (z - t))
if (z <= (-2.9d-46)) then
tmp = (a * 120.0d0) + (x / (z * 0.016666666666666666d0))
else if (z <= 9.5d-234) then
tmp = t_1
else if (z <= 2.1d-206) then
tmp = (a * 120.0d0) + (60.0d0 * (y / t))
else if (z <= 4.4d-26) then
tmp = t_1
else
tmp = (a * 120.0d0) + (y / (z / (-60.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * ((x - y) / (z - t));
double tmp;
if (z <= -2.9e-46) {
tmp = (a * 120.0) + (x / (z * 0.016666666666666666));
} else if (z <= 9.5e-234) {
tmp = t_1;
} else if (z <= 2.1e-206) {
tmp = (a * 120.0) + (60.0 * (y / t));
} else if (z <= 4.4e-26) {
tmp = t_1;
} else {
tmp = (a * 120.0) + (y / (z / -60.0));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = 60.0 * ((x - y) / (z - t)) tmp = 0 if z <= -2.9e-46: tmp = (a * 120.0) + (x / (z * 0.016666666666666666)) elif z <= 9.5e-234: tmp = t_1 elif z <= 2.1e-206: tmp = (a * 120.0) + (60.0 * (y / t)) elif z <= 4.4e-26: tmp = t_1 else: tmp = (a * 120.0) + (y / (z / -60.0)) return tmp
function code(x, y, z, t, a) t_1 = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))) tmp = 0.0 if (z <= -2.9e-46) tmp = Float64(Float64(a * 120.0) + Float64(x / Float64(z * 0.016666666666666666))); elseif (z <= 9.5e-234) tmp = t_1; elseif (z <= 2.1e-206) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(y / t))); elseif (z <= 4.4e-26) tmp = t_1; else tmp = Float64(Float64(a * 120.0) + Float64(y / Float64(z / -60.0))); 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 (z <= -2.9e-46) tmp = (a * 120.0) + (x / (z * 0.016666666666666666)); elseif (z <= 9.5e-234) tmp = t_1; elseif (z <= 2.1e-206) tmp = (a * 120.0) + (60.0 * (y / t)); elseif (z <= 4.4e-26) tmp = t_1; else tmp = (a * 120.0) + (y / (z / -60.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.9e-46], N[(N[(a * 120.0), $MachinePrecision] + N[(x / N[(z * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.5e-234], t$95$1, If[LessEqual[z, 2.1e-206], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.4e-26], t$95$1, N[(N[(a * 120.0), $MachinePrecision] + N[(y / N[(z / -60.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 60 \cdot \frac{x - y}{z - t}\\
\mathbf{if}\;z \leq -2.9 \cdot 10^{-46}:\\
\;\;\;\;a \cdot 120 + \frac{x}{z \cdot 0.016666666666666666}\\
\mathbf{elif}\;z \leq 9.5 \cdot 10^{-234}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{-206}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t}\\
\mathbf{elif}\;z \leq 4.4 \cdot 10^{-26}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{y}{\frac{z}{-60}}\\
\end{array}
\end{array}
if z < -2.90000000000000005e-46Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around inf 85.1%
associate-*r/85.1%
*-commutative85.1%
associate-/l*85.3%
Simplified85.3%
Taylor expanded in z around inf 80.3%
*-commutative80.3%
Simplified80.3%
if -2.90000000000000005e-46 < z < 9.4999999999999999e-234 or 2.1000000000000001e-206 < z < 4.4000000000000002e-26Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 76.8%
if 9.4999999999999999e-234 < z < 2.1000000000000001e-206Initial program 100.0%
Taylor expanded in x around 0 100.0%
fma-def100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in x around 0 100.0%
+-commutative100.0%
fma-def100.0%
associate-*r/100.0%
Simplified100.0%
Taylor expanded in z around 0 100.0%
if 4.4000000000000002e-26 < z Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 88.3%
Taylor expanded in x around 0 80.4%
associate-*r/80.4%
*-commutative80.4%
associate-/l*80.4%
Applied egg-rr80.4%
Final simplification79.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* 60.0 (/ (- x y) (- z t)))))
(if (<= z -1.5e-46)
(+ (* a 120.0) (/ x (* z 0.016666666666666666)))
(if (<= z 6e-231)
t_1
(if (<= z 1.32e-201)
(+ (* a 120.0) (/ (* x -60.0) t))
(if (<= z 1.9e-24) t_1 (+ (* a 120.0) (/ y (/ z -60.0)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * ((x - y) / (z - t));
double tmp;
if (z <= -1.5e-46) {
tmp = (a * 120.0) + (x / (z * 0.016666666666666666));
} else if (z <= 6e-231) {
tmp = t_1;
} else if (z <= 1.32e-201) {
tmp = (a * 120.0) + ((x * -60.0) / t);
} else if (z <= 1.9e-24) {
tmp = t_1;
} else {
tmp = (a * 120.0) + (y / (z / -60.0));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = 60.0d0 * ((x - y) / (z - t))
if (z <= (-1.5d-46)) then
tmp = (a * 120.0d0) + (x / (z * 0.016666666666666666d0))
else if (z <= 6d-231) then
tmp = t_1
else if (z <= 1.32d-201) then
tmp = (a * 120.0d0) + ((x * (-60.0d0)) / t)
else if (z <= 1.9d-24) then
tmp = t_1
else
tmp = (a * 120.0d0) + (y / (z / (-60.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * ((x - y) / (z - t));
double tmp;
if (z <= -1.5e-46) {
tmp = (a * 120.0) + (x / (z * 0.016666666666666666));
} else if (z <= 6e-231) {
tmp = t_1;
} else if (z <= 1.32e-201) {
tmp = (a * 120.0) + ((x * -60.0) / t);
} else if (z <= 1.9e-24) {
tmp = t_1;
} else {
tmp = (a * 120.0) + (y / (z / -60.0));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = 60.0 * ((x - y) / (z - t)) tmp = 0 if z <= -1.5e-46: tmp = (a * 120.0) + (x / (z * 0.016666666666666666)) elif z <= 6e-231: tmp = t_1 elif z <= 1.32e-201: tmp = (a * 120.0) + ((x * -60.0) / t) elif z <= 1.9e-24: tmp = t_1 else: tmp = (a * 120.0) + (y / (z / -60.0)) return tmp
function code(x, y, z, t, a) t_1 = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))) tmp = 0.0 if (z <= -1.5e-46) tmp = Float64(Float64(a * 120.0) + Float64(x / Float64(z * 0.016666666666666666))); elseif (z <= 6e-231) tmp = t_1; elseif (z <= 1.32e-201) tmp = Float64(Float64(a * 120.0) + Float64(Float64(x * -60.0) / t)); elseif (z <= 1.9e-24) tmp = t_1; else tmp = Float64(Float64(a * 120.0) + Float64(y / Float64(z / -60.0))); 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 (z <= -1.5e-46) tmp = (a * 120.0) + (x / (z * 0.016666666666666666)); elseif (z <= 6e-231) tmp = t_1; elseif (z <= 1.32e-201) tmp = (a * 120.0) + ((x * -60.0) / t); elseif (z <= 1.9e-24) tmp = t_1; else tmp = (a * 120.0) + (y / (z / -60.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.5e-46], N[(N[(a * 120.0), $MachinePrecision] + N[(x / N[(z * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6e-231], t$95$1, If[LessEqual[z, 1.32e-201], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(x * -60.0), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.9e-24], t$95$1, N[(N[(a * 120.0), $MachinePrecision] + N[(y / N[(z / -60.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 60 \cdot \frac{x - y}{z - t}\\
\mathbf{if}\;z \leq -1.5 \cdot 10^{-46}:\\
\;\;\;\;a \cdot 120 + \frac{x}{z \cdot 0.016666666666666666}\\
\mathbf{elif}\;z \leq 6 \cdot 10^{-231}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.32 \cdot 10^{-201}:\\
\;\;\;\;a \cdot 120 + \frac{x \cdot -60}{t}\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{-24}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{y}{\frac{z}{-60}}\\
\end{array}
\end{array}
if z < -1.49999999999999994e-46Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around inf 85.1%
associate-*r/85.1%
*-commutative85.1%
associate-/l*85.3%
Simplified85.3%
Taylor expanded in z around inf 80.3%
*-commutative80.3%
Simplified80.3%
if -1.49999999999999994e-46 < z < 6.0000000000000005e-231 or 1.31999999999999996e-201 < z < 1.90000000000000013e-24Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 76.8%
if 6.0000000000000005e-231 < z < 1.31999999999999996e-201Initial program 100.0%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in x around inf 99.8%
associate-*r/100.0%
*-commutative100.0%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around 0 99.8%
associate-*r/100.0%
metadata-eval100.0%
distribute-lft-neg-in100.0%
*-commutative100.0%
distribute-rgt-neg-in100.0%
metadata-eval100.0%
Simplified100.0%
if 1.90000000000000013e-24 < z Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 88.3%
Taylor expanded in x around 0 80.4%
associate-*r/80.4%
*-commutative80.4%
associate-/l*80.4%
Applied egg-rr80.4%
Final simplification79.6%
(FPCore (x y z t a)
:precision binary64
(if (<= z -2.9e-46)
(+ (* a 120.0) (/ x (* z 0.016666666666666666)))
(if (<= z 9.5e-228)
(/ (* 60.0 (- x y)) (- z t))
(if (<= z 2.4e-205)
(+ (* a 120.0) (/ (* x -60.0) t))
(if (<= z 1.75e-25)
(* 60.0 (/ (- x y) (- z t)))
(+ (* a 120.0) (/ y (/ z -60.0))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.9e-46) {
tmp = (a * 120.0) + (x / (z * 0.016666666666666666));
} else if (z <= 9.5e-228) {
tmp = (60.0 * (x - y)) / (z - t);
} else if (z <= 2.4e-205) {
tmp = (a * 120.0) + ((x * -60.0) / t);
} else if (z <= 1.75e-25) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = (a * 120.0) + (y / (z / -60.0));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-2.9d-46)) then
tmp = (a * 120.0d0) + (x / (z * 0.016666666666666666d0))
else if (z <= 9.5d-228) then
tmp = (60.0d0 * (x - y)) / (z - t)
else if (z <= 2.4d-205) then
tmp = (a * 120.0d0) + ((x * (-60.0d0)) / t)
else if (z <= 1.75d-25) then
tmp = 60.0d0 * ((x - y) / (z - t))
else
tmp = (a * 120.0d0) + (y / (z / (-60.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.9e-46) {
tmp = (a * 120.0) + (x / (z * 0.016666666666666666));
} else if (z <= 9.5e-228) {
tmp = (60.0 * (x - y)) / (z - t);
} else if (z <= 2.4e-205) {
tmp = (a * 120.0) + ((x * -60.0) / t);
} else if (z <= 1.75e-25) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = (a * 120.0) + (y / (z / -60.0));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.9e-46: tmp = (a * 120.0) + (x / (z * 0.016666666666666666)) elif z <= 9.5e-228: tmp = (60.0 * (x - y)) / (z - t) elif z <= 2.4e-205: tmp = (a * 120.0) + ((x * -60.0) / t) elif z <= 1.75e-25: tmp = 60.0 * ((x - y) / (z - t)) else: tmp = (a * 120.0) + (y / (z / -60.0)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.9e-46) tmp = Float64(Float64(a * 120.0) + Float64(x / Float64(z * 0.016666666666666666))); elseif (z <= 9.5e-228) tmp = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)); elseif (z <= 2.4e-205) tmp = Float64(Float64(a * 120.0) + Float64(Float64(x * -60.0) / t)); elseif (z <= 1.75e-25) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); else tmp = Float64(Float64(a * 120.0) + Float64(y / Float64(z / -60.0))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.9e-46) tmp = (a * 120.0) + (x / (z * 0.016666666666666666)); elseif (z <= 9.5e-228) tmp = (60.0 * (x - y)) / (z - t); elseif (z <= 2.4e-205) tmp = (a * 120.0) + ((x * -60.0) / t); elseif (z <= 1.75e-25) tmp = 60.0 * ((x - y) / (z - t)); else tmp = (a * 120.0) + (y / (z / -60.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.9e-46], N[(N[(a * 120.0), $MachinePrecision] + N[(x / N[(z * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.5e-228], N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.4e-205], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(x * -60.0), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.75e-25], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(y / N[(z / -60.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.9 \cdot 10^{-46}:\\
\;\;\;\;a \cdot 120 + \frac{x}{z \cdot 0.016666666666666666}\\
\mathbf{elif}\;z \leq 9.5 \cdot 10^{-228}:\\
\;\;\;\;\frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{elif}\;z \leq 2.4 \cdot 10^{-205}:\\
\;\;\;\;a \cdot 120 + \frac{x \cdot -60}{t}\\
\mathbf{elif}\;z \leq 1.75 \cdot 10^{-25}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{y}{\frac{z}{-60}}\\
\end{array}
\end{array}
if z < -2.90000000000000005e-46Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around inf 85.1%
associate-*r/85.1%
*-commutative85.1%
associate-/l*85.3%
Simplified85.3%
Taylor expanded in z around inf 80.3%
*-commutative80.3%
Simplified80.3%
if -2.90000000000000005e-46 < z < 9.50000000000000024e-228Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
associate-/l*99.9%
add-cube-cbrt99.0%
pow399.0%
*-un-lft-identity99.0%
times-frac99.1%
metadata-eval99.1%
Applied egg-rr99.1%
Taylor expanded in a around 0 76.4%
pow-base-176.4%
*-lft-identity76.4%
associate-*r/76.4%
Simplified76.4%
if 9.50000000000000024e-228 < z < 2.4000000000000002e-205Initial program 100.0%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in x around inf 99.8%
associate-*r/100.0%
*-commutative100.0%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around 0 99.8%
associate-*r/100.0%
metadata-eval100.0%
distribute-lft-neg-in100.0%
*-commutative100.0%
distribute-rgt-neg-in100.0%
metadata-eval100.0%
Simplified100.0%
if 2.4000000000000002e-205 < z < 1.7500000000000001e-25Initial program 99.7%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 77.4%
if 1.7500000000000001e-25 < z Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 88.3%
Taylor expanded in x around 0 80.4%
associate-*r/80.4%
*-commutative80.4%
associate-/l*80.4%
Applied egg-rr80.4%
Final simplification79.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* 60.0 (/ x (- z t)))))
(if (<= a -1.45e-39)
(* a 120.0)
(if (<= a -3.1e-205)
t_1
(if (<= a -4.6e-258)
(* -60.0 (/ (- x y) t))
(if (<= a 7.2e-111) t_1 (* a 120.0)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * (x / (z - t));
double tmp;
if (a <= -1.45e-39) {
tmp = a * 120.0;
} else if (a <= -3.1e-205) {
tmp = t_1;
} else if (a <= -4.6e-258) {
tmp = -60.0 * ((x - y) / t);
} else if (a <= 7.2e-111) {
tmp = t_1;
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = 60.0d0 * (x / (z - t))
if (a <= (-1.45d-39)) then
tmp = a * 120.0d0
else if (a <= (-3.1d-205)) then
tmp = t_1
else if (a <= (-4.6d-258)) then
tmp = (-60.0d0) * ((x - y) / t)
else if (a <= 7.2d-111) then
tmp = t_1
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * (x / (z - t));
double tmp;
if (a <= -1.45e-39) {
tmp = a * 120.0;
} else if (a <= -3.1e-205) {
tmp = t_1;
} else if (a <= -4.6e-258) {
tmp = -60.0 * ((x - y) / t);
} else if (a <= 7.2e-111) {
tmp = t_1;
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = 60.0 * (x / (z - t)) tmp = 0 if a <= -1.45e-39: tmp = a * 120.0 elif a <= -3.1e-205: tmp = t_1 elif a <= -4.6e-258: tmp = -60.0 * ((x - y) / t) elif a <= 7.2e-111: tmp = t_1 else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) t_1 = Float64(60.0 * Float64(x / Float64(z - t))) tmp = 0.0 if (a <= -1.45e-39) tmp = Float64(a * 120.0); elseif (a <= -3.1e-205) tmp = t_1; elseif (a <= -4.6e-258) tmp = Float64(-60.0 * Float64(Float64(x - y) / t)); elseif (a <= 7.2e-111) tmp = t_1; else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = 60.0 * (x / (z - t)); tmp = 0.0; if (a <= -1.45e-39) tmp = a * 120.0; elseif (a <= -3.1e-205) tmp = t_1; elseif (a <= -4.6e-258) tmp = -60.0 * ((x - y) / t); elseif (a <= 7.2e-111) tmp = t_1; else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.45e-39], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -3.1e-205], t$95$1, If[LessEqual[a, -4.6e-258], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 7.2e-111], t$95$1, N[(a * 120.0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 60 \cdot \frac{x}{z - t}\\
\mathbf{if}\;a \leq -1.45 \cdot 10^{-39}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -3.1 \cdot 10^{-205}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -4.6 \cdot 10^{-258}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\
\mathbf{elif}\;a \leq 7.2 \cdot 10^{-111}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -1.44999999999999994e-39 or 7.20000000000000019e-111 < a Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 69.0%
if -1.44999999999999994e-39 < a < -3.09999999999999983e-205 or -4.59999999999999986e-258 < a < 7.20000000000000019e-111Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 85.5%
Taylor expanded in x around inf 50.6%
if -3.09999999999999983e-205 < a < -4.59999999999999986e-258Initial program 99.6%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in a around 0 79.0%
Taylor expanded in z around 0 79.2%
Final simplification62.8%
(FPCore (x y z t a)
:precision binary64
(if (<= a -1.05e-30)
(* a 120.0)
(if (<= a -2.05e-201)
(* 60.0 (/ (- x y) z))
(if (<= a -1.16e-252)
(* -60.0 (/ (- x y) t))
(if (<= a 1.06e-110) (* 60.0 (/ x (- z t))) (* a 120.0))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.05e-30) {
tmp = a * 120.0;
} else if (a <= -2.05e-201) {
tmp = 60.0 * ((x - y) / z);
} else if (a <= -1.16e-252) {
tmp = -60.0 * ((x - y) / t);
} else if (a <= 1.06e-110) {
tmp = 60.0 * (x / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-1.05d-30)) then
tmp = a * 120.0d0
else if (a <= (-2.05d-201)) then
tmp = 60.0d0 * ((x - y) / z)
else if (a <= (-1.16d-252)) then
tmp = (-60.0d0) * ((x - y) / t)
else if (a <= 1.06d-110) then
tmp = 60.0d0 * (x / (z - t))
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.05e-30) {
tmp = a * 120.0;
} else if (a <= -2.05e-201) {
tmp = 60.0 * ((x - y) / z);
} else if (a <= -1.16e-252) {
tmp = -60.0 * ((x - y) / t);
} else if (a <= 1.06e-110) {
tmp = 60.0 * (x / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.05e-30: tmp = a * 120.0 elif a <= -2.05e-201: tmp = 60.0 * ((x - y) / z) elif a <= -1.16e-252: tmp = -60.0 * ((x - y) / t) elif a <= 1.06e-110: tmp = 60.0 * (x / (z - t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.05e-30) tmp = Float64(a * 120.0); elseif (a <= -2.05e-201) tmp = Float64(60.0 * Float64(Float64(x - y) / z)); elseif (a <= -1.16e-252) tmp = Float64(-60.0 * Float64(Float64(x - y) / t)); elseif (a <= 1.06e-110) tmp = Float64(60.0 * Float64(x / Float64(z - t))); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.05e-30) tmp = a * 120.0; elseif (a <= -2.05e-201) tmp = 60.0 * ((x - y) / z); elseif (a <= -1.16e-252) tmp = -60.0 * ((x - y) / t); elseif (a <= 1.06e-110) tmp = 60.0 * (x / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.05e-30], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -2.05e-201], N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -1.16e-252], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.06e-110], N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.05 \cdot 10^{-30}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -2.05 \cdot 10^{-201}:\\
\;\;\;\;60 \cdot \frac{x - y}{z}\\
\mathbf{elif}\;a \leq -1.16 \cdot 10^{-252}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\
\mathbf{elif}\;a \leq 1.06 \cdot 10^{-110}:\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -1.0500000000000001e-30 or 1.0599999999999999e-110 < a Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 69.4%
if -1.0500000000000001e-30 < a < -2.05000000000000001e-201Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 80.7%
Taylor expanded in z around inf 54.8%
if -2.05000000000000001e-201 < a < -1.1599999999999999e-252Initial program 99.6%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in a around 0 79.0%
Taylor expanded in z around 0 79.2%
if -1.1599999999999999e-252 < a < 1.0599999999999999e-110Initial program 99.8%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 89.4%
Taylor expanded in x around inf 57.4%
Final simplification65.1%
(FPCore (x y z t a) :precision binary64 (if (<= (* a 120.0) -1e-23) (+ (* a 120.0) (* -60.0 (/ y z))) (if (<= (* a 120.0) 4e-39) (* 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 * 120.0) <= -1e-23) {
tmp = (a * 120.0) + (-60.0 * (y / z));
} else if ((a * 120.0) <= 4e-39) {
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 * 120.0d0) <= (-1d-23)) then
tmp = (a * 120.0d0) + ((-60.0d0) * (y / z))
else if ((a * 120.0d0) <= 4d-39) 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 * 120.0) <= -1e-23) {
tmp = (a * 120.0) + (-60.0 * (y / z));
} else if ((a * 120.0) <= 4e-39) {
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 * 120.0) <= -1e-23: tmp = (a * 120.0) + (-60.0 * (y / z)) elif (a * 120.0) <= 4e-39: 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 (Float64(a * 120.0) <= -1e-23) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / z))); elseif (Float64(a * 120.0) <= 4e-39) 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 * 120.0) <= -1e-23) tmp = (a * 120.0) + (-60.0 * (y / z)); elseif ((a * 120.0) <= 4e-39) 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[N[(a * 120.0), $MachinePrecision], -1e-23], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 4e-39], 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 \cdot 120 \leq -1 \cdot 10^{-23}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\
\mathbf{elif}\;a \cdot 120 \leq 4 \cdot 10^{-39}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a 120) < -9.9999999999999996e-24Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 76.5%
Taylor expanded in x around 0 77.9%
if -9.9999999999999996e-24 < (*.f64 a 120) < 3.99999999999999972e-39Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 82.3%
if 3.99999999999999972e-39 < (*.f64 a 120) Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 71.4%
Final simplification78.1%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -1e-23)
(+ (* a 120.0) (* -60.0 (/ y z)))
(if (<= (* a 120.0) 5e-62)
(* 60.0 (/ (- x y) (- z t)))
(+ (* a 120.0) (* x (/ 60.0 z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -1e-23) {
tmp = (a * 120.0) + (-60.0 * (y / z));
} else if ((a * 120.0) <= 5e-62) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = (a * 120.0) + (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 ((a * 120.0d0) <= (-1d-23)) then
tmp = (a * 120.0d0) + ((-60.0d0) * (y / z))
else if ((a * 120.0d0) <= 5d-62) then
tmp = 60.0d0 * ((x - y) / (z - t))
else
tmp = (a * 120.0d0) + (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 ((a * 120.0) <= -1e-23) {
tmp = (a * 120.0) + (-60.0 * (y / z));
} else if ((a * 120.0) <= 5e-62) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = (a * 120.0) + (x * (60.0 / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -1e-23: tmp = (a * 120.0) + (-60.0 * (y / z)) elif (a * 120.0) <= 5e-62: tmp = 60.0 * ((x - y) / (z - t)) else: tmp = (a * 120.0) + (x * (60.0 / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -1e-23) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / z))); elseif (Float64(a * 120.0) <= 5e-62) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); else tmp = Float64(Float64(a * 120.0) + Float64(x * Float64(60.0 / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a * 120.0) <= -1e-23) tmp = (a * 120.0) + (-60.0 * (y / z)); elseif ((a * 120.0) <= 5e-62) tmp = 60.0 * ((x - y) / (z - t)); else tmp = (a * 120.0) + (x * (60.0 / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -1e-23], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 5e-62], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(x * N[(60.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -1 \cdot 10^{-23}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\
\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-62}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + x \cdot \frac{60}{z}\\
\end{array}
\end{array}
if (*.f64 a 120) < -9.9999999999999996e-24Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 76.5%
Taylor expanded in x around 0 77.9%
if -9.9999999999999996e-24 < (*.f64 a 120) < 5.0000000000000002e-62Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 82.9%
if 5.0000000000000002e-62 < (*.f64 a 120) Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 87.8%
associate-*r/87.7%
*-commutative87.7%
associate-/l*87.7%
Simplified87.7%
Taylor expanded in z around inf 71.6%
*-commutative71.6%
Simplified71.6%
Taylor expanded in x around 0 71.5%
associate-*r/71.5%
associate-*l/71.5%
*-commutative71.5%
Simplified71.5%
Final simplification78.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -2.7e+53) (not (<= y 1.35e+101))) (+ (* a 120.0) (/ (* y -60.0) (- z t))) (+ (* a 120.0) (/ x (/ (- z t) 60.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -2.7e+53) || !(y <= 1.35e+101)) {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
} else {
tmp = (a * 120.0) + (x / ((z - 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 ((y <= (-2.7d+53)) .or. (.not. (y <= 1.35d+101))) then
tmp = (a * 120.0d0) + ((y * (-60.0d0)) / (z - t))
else
tmp = (a * 120.0d0) + (x / ((z - 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 ((y <= -2.7e+53) || !(y <= 1.35e+101)) {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
} else {
tmp = (a * 120.0) + (x / ((z - t) / 60.0));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -2.7e+53) or not (y <= 1.35e+101): tmp = (a * 120.0) + ((y * -60.0) / (z - t)) else: tmp = (a * 120.0) + (x / ((z - t) / 60.0)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -2.7e+53) || !(y <= 1.35e+101)) tmp = Float64(Float64(a * 120.0) + Float64(Float64(y * -60.0) / Float64(z - t))); else tmp = Float64(Float64(a * 120.0) + Float64(x / Float64(Float64(z - t) / 60.0))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -2.7e+53) || ~((y <= 1.35e+101))) tmp = (a * 120.0) + ((y * -60.0) / (z - t)); else tmp = (a * 120.0) + (x / ((z - t) / 60.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -2.7e+53], N[Not[LessEqual[y, 1.35e+101]], $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[(N[(z - t), $MachinePrecision] / 60.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.7 \cdot 10^{+53} \lor \neg \left(y \leq 1.35 \cdot 10^{+101}\right):\\
\;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{x}{\frac{z - t}{60}}\\
\end{array}
\end{array}
if y < -2.70000000000000019e53 or 1.35000000000000003e101 < y Initial program 99.8%
Taylor expanded in x around 0 88.1%
if -2.70000000000000019e53 < y < 1.35000000000000003e101Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 94.0%
associate-*r/94.0%
*-commutative94.0%
associate-/l*94.0%
Simplified94.0%
Final simplification91.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.85e-20) (not (<= a 8.2e-36))) (* a 120.0) (* 60.0 (/ (- x y) (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.85e-20) || !(a <= 8.2e-36)) {
tmp = a * 120.0;
} else {
tmp = 60.0 * ((x - y) / (z - t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-1.85d-20)) .or. (.not. (a <= 8.2d-36))) then
tmp = a * 120.0d0
else
tmp = 60.0d0 * ((x - y) / (z - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.85e-20) || !(a <= 8.2e-36)) {
tmp = a * 120.0;
} else {
tmp = 60.0 * ((x - y) / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.85e-20) or not (a <= 8.2e-36): tmp = a * 120.0 else: tmp = 60.0 * ((x - y) / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.85e-20) || !(a <= 8.2e-36)) tmp = Float64(a * 120.0); else tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1.85e-20) || ~((a <= 8.2e-36))) tmp = a * 120.0; else tmp = 60.0 * ((x - y) / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.85e-20], N[Not[LessEqual[a, 8.2e-36]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.85 \cdot 10^{-20} \lor \neg \left(a \leq 8.2 \cdot 10^{-36}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\end{array}
\end{array}
if a < -1.85e-20 or 8.20000000000000025e-36 < a Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 73.1%
if -1.85e-20 < a < 8.20000000000000025e-36Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 81.8%
Final simplification77.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -5.8e-30) (not (<= a 5.6e-73))) (* a 120.0) (* -60.0 (/ (- x y) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -5.8e-30) || !(a <= 5.6e-73)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * ((x - y) / t);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-5.8d-30)) .or. (.not. (a <= 5.6d-73))) then
tmp = a * 120.0d0
else
tmp = (-60.0d0) * ((x - y) / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -5.8e-30) || !(a <= 5.6e-73)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * ((x - y) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -5.8e-30) or not (a <= 5.6e-73): tmp = a * 120.0 else: tmp = -60.0 * ((x - y) / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -5.8e-30) || !(a <= 5.6e-73)) tmp = Float64(a * 120.0); else tmp = Float64(-60.0 * Float64(Float64(x - y) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -5.8e-30) || ~((a <= 5.6e-73))) tmp = a * 120.0; else tmp = -60.0 * ((x - y) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -5.8e-30], N[Not[LessEqual[a, 5.6e-73]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.8 \cdot 10^{-30} \lor \neg \left(a \leq 5.6 \cdot 10^{-73}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\
\end{array}
\end{array}
if a < -5.79999999999999978e-30 or 5.60000000000000023e-73 < a Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 71.2%
if -5.79999999999999978e-30 < a < 5.60000000000000023e-73Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 83.3%
Taylor expanded in z around 0 41.9%
Final simplification58.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -9.2e-142) (not (<= a 6e-176))) (* a 120.0) (* -60.0 (/ x t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -9.2e-142) || !(a <= 6e-176)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (x / t);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-9.2d-142)) .or. (.not. (a <= 6d-176))) then
tmp = a * 120.0d0
else
tmp = (-60.0d0) * (x / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -9.2e-142) || !(a <= 6e-176)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (x / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -9.2e-142) or not (a <= 6e-176): tmp = a * 120.0 else: tmp = -60.0 * (x / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -9.2e-142) || !(a <= 6e-176)) tmp = Float64(a * 120.0); else tmp = Float64(-60.0 * Float64(x / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -9.2e-142) || ~((a <= 6e-176))) tmp = a * 120.0; else tmp = -60.0 * (x / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -9.2e-142], N[Not[LessEqual[a, 6e-176]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -9.2 \cdot 10^{-142} \lor \neg \left(a \leq 6 \cdot 10^{-176}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{x}{t}\\
\end{array}
\end{array}
if a < -9.20000000000000009e-142 or 6e-176 < a Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 59.1%
if -9.20000000000000009e-142 < a < 6e-176Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 88.5%
Taylor expanded in z around 0 46.2%
Taylor expanded in x around inf 34.5%
Final simplification53.0%
(FPCore (x y z t a) :precision binary64 (+ (* a 120.0) (/ 60.0 (/ (- z t) (- x y)))))
double code(double x, double y, double z, double t, double a) {
return (a * 120.0) + (60.0 / ((z - t) / (x - y)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (a * 120.0d0) + (60.0d0 / ((z - t) / (x - y)))
end function
public static double code(double x, double y, double z, double t, double a) {
return (a * 120.0) + (60.0 / ((z - t) / (x - y)));
}
def code(x, y, z, t, a): return (a * 120.0) + (60.0 / ((z - t) / (x - y)))
function code(x, y, z, t, a) return Float64(Float64(a * 120.0) + Float64(60.0 / Float64(Float64(z - t) / Float64(x - y)))) end
function tmp = code(x, y, z, t, a) tmp = (a * 120.0) + (60.0 / ((z - t) / (x - y))); end
code[x_, y_, z_, t_, a_] := N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
a \cdot 120 + \frac{60}{\frac{z - t}{x - y}}
\end{array}
Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Final simplification99.8%
(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}
Initial program 99.8%
Final simplification99.8%
(FPCore (x y z t a) :precision binary64 (* a 120.0))
double code(double x, double y, double z, double t, double a) {
return a * 120.0;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = a * 120.0d0
end function
public static double code(double x, double y, double z, double t, double a) {
return a * 120.0;
}
def code(x, y, z, t, a): return a * 120.0
function code(x, y, z, t, a) return Float64(a * 120.0) end
function tmp = code(x, y, z, t, a) tmp = a * 120.0; end
code[x_, y_, z_, t_, a_] := N[(a * 120.0), $MachinePrecision]
\begin{array}{l}
\\
a \cdot 120
\end{array}
Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 47.5%
Final simplification47.5%
(FPCore (x y z t a) :precision binary64 (+ (/ 60.0 (/ (- z t) (- x y))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (60.0d0 / ((z - t) / (x - y))) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
def code(x, y, z, t, a): return (60.0 / ((z - t) / (x - y))) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = (60.0 / ((z - t) / (x - y))) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60}{\frac{z - t}{x - y}} + a \cdot 120
\end{array}
herbie shell --seed 2024031
(FPCore (x y z t a)
:name "Data.Colour.RGB:hslsv from colour-2.3.3, B"
:precision binary64
:herbie-target
(+ (/ 60.0 (/ (- z t) (- x y))) (* a 120.0))
(+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))