
(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 18 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%
clear-num99.8%
un-div-inv99.9%
Applied egg-rr99.9%
Final simplification99.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* -60.0 (/ y (- z t)))))
(if (<= y -9.5e+182)
t_1
(if (<= y 2.2e-177)
(* a 120.0)
(if (<= y 2.8e-22)
(* x (/ 60.0 (- z t)))
(if (<= y 2.6e+171) (* a 120.0) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -60.0 * (y / (z - t));
double tmp;
if (y <= -9.5e+182) {
tmp = t_1;
} else if (y <= 2.2e-177) {
tmp = a * 120.0;
} else if (y <= 2.8e-22) {
tmp = x * (60.0 / (z - t));
} else if (y <= 2.6e+171) {
tmp = a * 120.0;
} 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 = (-60.0d0) * (y / (z - t))
if (y <= (-9.5d+182)) then
tmp = t_1
else if (y <= 2.2d-177) then
tmp = a * 120.0d0
else if (y <= 2.8d-22) then
tmp = x * (60.0d0 / (z - t))
else if (y <= 2.6d+171) then
tmp = a * 120.0d0
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 = -60.0 * (y / (z - t));
double tmp;
if (y <= -9.5e+182) {
tmp = t_1;
} else if (y <= 2.2e-177) {
tmp = a * 120.0;
} else if (y <= 2.8e-22) {
tmp = x * (60.0 / (z - t));
} else if (y <= 2.6e+171) {
tmp = a * 120.0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -60.0 * (y / (z - t)) tmp = 0 if y <= -9.5e+182: tmp = t_1 elif y <= 2.2e-177: tmp = a * 120.0 elif y <= 2.8e-22: tmp = x * (60.0 / (z - t)) elif y <= 2.6e+171: tmp = a * 120.0 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(-60.0 * Float64(y / Float64(z - t))) tmp = 0.0 if (y <= -9.5e+182) tmp = t_1; elseif (y <= 2.2e-177) tmp = Float64(a * 120.0); elseif (y <= 2.8e-22) tmp = Float64(x * Float64(60.0 / Float64(z - t))); elseif (y <= 2.6e+171) tmp = Float64(a * 120.0); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = -60.0 * (y / (z - t)); tmp = 0.0; if (y <= -9.5e+182) tmp = t_1; elseif (y <= 2.2e-177) tmp = a * 120.0; elseif (y <= 2.8e-22) tmp = x * (60.0 / (z - t)); elseif (y <= 2.6e+171) tmp = a * 120.0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -9.5e+182], t$95$1, If[LessEqual[y, 2.2e-177], N[(a * 120.0), $MachinePrecision], If[LessEqual[y, 2.8e-22], N[(x * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.6e+171], N[(a * 120.0), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -60 \cdot \frac{y}{z - t}\\
\mathbf{if}\;y \leq -9.5 \cdot 10^{+182}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2.2 \cdot 10^{-177}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;y \leq 2.8 \cdot 10^{-22}:\\
\;\;\;\;x \cdot \frac{60}{z - t}\\
\mathbf{elif}\;y \leq 2.6 \cdot 10^{+171}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -9.50000000000000002e182 or 2.6e171 < y Initial program 98.2%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 77.8%
Taylor expanded in x around 0 71.5%
if -9.50000000000000002e182 < y < 2.20000000000000011e-177 or 2.79999999999999995e-22 < y < 2.6e171Initial program 98.7%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 68.4%
if 2.20000000000000011e-177 < y < 2.79999999999999995e-22Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 60.9%
Taylor expanded in x around inf 61.0%
associate-*r/61.0%
*-commutative61.0%
associate-*r/61.0%
Simplified61.0%
Final simplification68.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ -60.0 (/ (- z t) y))))
(if (<= y -1.02e+186)
t_1
(if (<= y 2.3e-177)
(* a 120.0)
(if (<= y 3.15e-22)
(* x (/ 60.0 (- z t)))
(if (<= y 1.95e+171) (* a 120.0) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -60.0 / ((z - t) / y);
double tmp;
if (y <= -1.02e+186) {
tmp = t_1;
} else if (y <= 2.3e-177) {
tmp = a * 120.0;
} else if (y <= 3.15e-22) {
tmp = x * (60.0 / (z - t));
} else if (y <= 1.95e+171) {
tmp = a * 120.0;
} 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 = (-60.0d0) / ((z - t) / y)
if (y <= (-1.02d+186)) then
tmp = t_1
else if (y <= 2.3d-177) then
tmp = a * 120.0d0
else if (y <= 3.15d-22) then
tmp = x * (60.0d0 / (z - t))
else if (y <= 1.95d+171) then
tmp = a * 120.0d0
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 = -60.0 / ((z - t) / y);
double tmp;
if (y <= -1.02e+186) {
tmp = t_1;
} else if (y <= 2.3e-177) {
tmp = a * 120.0;
} else if (y <= 3.15e-22) {
tmp = x * (60.0 / (z - t));
} else if (y <= 1.95e+171) {
tmp = a * 120.0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -60.0 / ((z - t) / y) tmp = 0 if y <= -1.02e+186: tmp = t_1 elif y <= 2.3e-177: tmp = a * 120.0 elif y <= 3.15e-22: tmp = x * (60.0 / (z - t)) elif y <= 1.95e+171: tmp = a * 120.0 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(-60.0 / Float64(Float64(z - t) / y)) tmp = 0.0 if (y <= -1.02e+186) tmp = t_1; elseif (y <= 2.3e-177) tmp = Float64(a * 120.0); elseif (y <= 3.15e-22) tmp = Float64(x * Float64(60.0 / Float64(z - t))); elseif (y <= 1.95e+171) tmp = Float64(a * 120.0); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = -60.0 / ((z - t) / y); tmp = 0.0; if (y <= -1.02e+186) tmp = t_1; elseif (y <= 2.3e-177) tmp = a * 120.0; elseif (y <= 3.15e-22) tmp = x * (60.0 / (z - t)); elseif (y <= 1.95e+171) tmp = a * 120.0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(-60.0 / N[(N[(z - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.02e+186], t$95$1, If[LessEqual[y, 2.3e-177], N[(a * 120.0), $MachinePrecision], If[LessEqual[y, 3.15e-22], N[(x * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.95e+171], N[(a * 120.0), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{-60}{\frac{z - t}{y}}\\
\mathbf{if}\;y \leq -1.02 \cdot 10^{+186}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2.3 \cdot 10^{-177}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;y \leq 3.15 \cdot 10^{-22}:\\
\;\;\;\;x \cdot \frac{60}{z - t}\\
\mathbf{elif}\;y \leq 1.95 \cdot 10^{+171}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.01999999999999999e186 or 1.95e171 < y Initial program 98.2%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 77.8%
Taylor expanded in x around 0 71.5%
clear-num71.5%
un-div-inv71.7%
Applied egg-rr71.7%
if -1.01999999999999999e186 < y < 2.30000000000000022e-177 or 3.15e-22 < y < 1.95e171Initial program 98.7%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 68.4%
if 2.30000000000000022e-177 < y < 3.15e-22Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 60.9%
Taylor expanded in x around inf 61.0%
associate-*r/61.0%
*-commutative61.0%
associate-*r/61.0%
Simplified61.0%
Final simplification68.2%
(FPCore (x y z t a) :precision binary64 (if (<= (* a 120.0) -2e+51) (+ (* a 120.0) (* 60.0 (/ y t))) (if (<= (* a 120.0) 2e+76) (* 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) <= -2e+51) {
tmp = (a * 120.0) + (60.0 * (y / t));
} else if ((a * 120.0) <= 2e+76) {
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) <= (-2d+51)) then
tmp = (a * 120.0d0) + (60.0d0 * (y / t))
else if ((a * 120.0d0) <= 2d+76) 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) <= -2e+51) {
tmp = (a * 120.0) + (60.0 * (y / t));
} else if ((a * 120.0) <= 2e+76) {
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) <= -2e+51: tmp = (a * 120.0) + (60.0 * (y / t)) elif (a * 120.0) <= 2e+76: 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) <= -2e+51) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(y / t))); elseif (Float64(a * 120.0) <= 2e+76) 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) <= -2e+51) tmp = (a * 120.0) + (60.0 * (y / t)); elseif ((a * 120.0) <= 2e+76) 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], -2e+51], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 2e+76], 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 -2 \cdot 10^{+51}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t}\\
\mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{+76}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -2e51Initial program 99.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around 0 93.7%
associate-*r/93.7%
Simplified93.7%
Taylor expanded in z around 0 85.0%
if -2e51 < (*.f64 a #s(literal 120 binary64)) < 2.0000000000000001e76Initial program 98.5%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 71.1%
if 2.0000000000000001e76 < (*.f64 a #s(literal 120 binary64)) Initial program 98.3%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 92.3%
Final simplification78.5%
(FPCore (x y z t a) :precision binary64 (if (<= (* a 120.0) -2e+51) (+ (* a 120.0) (* 60.0 (/ y t))) (if (<= (* a 120.0) 2e+76) (/ 60.0 (/ (- z t) (- x y))) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -2e+51) {
tmp = (a * 120.0) + (60.0 * (y / t));
} else if ((a * 120.0) <= 2e+76) {
tmp = 60.0 / ((z - t) / (x - y));
} 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) <= (-2d+51)) then
tmp = (a * 120.0d0) + (60.0d0 * (y / t))
else if ((a * 120.0d0) <= 2d+76) then
tmp = 60.0d0 / ((z - t) / (x - y))
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) <= -2e+51) {
tmp = (a * 120.0) + (60.0 * (y / t));
} else if ((a * 120.0) <= 2e+76) {
tmp = 60.0 / ((z - t) / (x - y));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -2e+51: tmp = (a * 120.0) + (60.0 * (y / t)) elif (a * 120.0) <= 2e+76: tmp = 60.0 / ((z - t) / (x - y)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -2e+51) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(y / t))); elseif (Float64(a * 120.0) <= 2e+76) tmp = Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))); 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) <= -2e+51) tmp = (a * 120.0) + (60.0 * (y / t)); elseif ((a * 120.0) <= 2e+76) tmp = 60.0 / ((z - t) / (x - y)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -2e+51], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 2e+76], N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -2 \cdot 10^{+51}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t}\\
\mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{+76}:\\
\;\;\;\;\frac{60}{\frac{z - t}{x - y}}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -2e51Initial program 99.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around 0 93.7%
associate-*r/93.7%
Simplified93.7%
Taylor expanded in z around 0 85.0%
if -2e51 < (*.f64 a #s(literal 120 binary64)) < 2.0000000000000001e76Initial program 98.5%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 71.1%
clear-num99.7%
un-div-inv99.8%
Applied egg-rr71.3%
if 2.0000000000000001e76 < (*.f64 a #s(literal 120 binary64)) Initial program 98.3%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 92.3%
Final simplification78.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -9.5e+182) (not (<= y 1.85e+171))) (/ 60.0 (/ (- z t) (- x y))) (- (* a 120.0) (* x (/ 60.0 (- t z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -9.5e+182) || !(y <= 1.85e+171)) {
tmp = 60.0 / ((z - t) / (x - y));
} else {
tmp = (a * 120.0) - (x * (60.0 / (t - z)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((y <= (-9.5d+182)) .or. (.not. (y <= 1.85d+171))) then
tmp = 60.0d0 / ((z - t) / (x - y))
else
tmp = (a * 120.0d0) - (x * (60.0d0 / (t - z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -9.5e+182) || !(y <= 1.85e+171)) {
tmp = 60.0 / ((z - t) / (x - y));
} else {
tmp = (a * 120.0) - (x * (60.0 / (t - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -9.5e+182) or not (y <= 1.85e+171): tmp = 60.0 / ((z - t) / (x - y)) else: tmp = (a * 120.0) - (x * (60.0 / (t - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -9.5e+182) || !(y <= 1.85e+171)) tmp = Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))); else tmp = Float64(Float64(a * 120.0) - Float64(x * Float64(60.0 / Float64(t - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -9.5e+182) || ~((y <= 1.85e+171))) tmp = 60.0 / ((z - t) / (x - y)); else tmp = (a * 120.0) - (x * (60.0 / (t - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -9.5e+182], N[Not[LessEqual[y, 1.85e+171]], $MachinePrecision]], N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] - N[(x * N[(60.0 / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.5 \cdot 10^{+182} \lor \neg \left(y \leq 1.85 \cdot 10^{+171}\right):\\
\;\;\;\;\frac{60}{\frac{z - t}{x - y}}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 - x \cdot \frac{60}{t - z}\\
\end{array}
\end{array}
if y < -9.50000000000000002e182 or 1.84999999999999999e171 < y Initial program 98.2%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 77.8%
clear-num99.7%
un-div-inv99.8%
Applied egg-rr78.0%
if -9.50000000000000002e182 < y < 1.84999999999999999e171Initial program 98.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 90.6%
associate-*r/27.9%
*-commutative27.9%
associate-*r/28.8%
Simplified90.6%
Final simplification87.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -62000000.0) (not (<= y 1.25e+32))) (+ (* a 120.0) (* y (/ -60.0 (- z t)))) (- (* a 120.0) (* x (/ 60.0 (- t z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -62000000.0) || !(y <= 1.25e+32)) {
tmp = (a * 120.0) + (y * (-60.0 / (z - t)));
} else {
tmp = (a * 120.0) - (x * (60.0 / (t - z)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((y <= (-62000000.0d0)) .or. (.not. (y <= 1.25d+32))) then
tmp = (a * 120.0d0) + (y * ((-60.0d0) / (z - t)))
else
tmp = (a * 120.0d0) - (x * (60.0d0 / (t - z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -62000000.0) || !(y <= 1.25e+32)) {
tmp = (a * 120.0) + (y * (-60.0 / (z - t)));
} else {
tmp = (a * 120.0) - (x * (60.0 / (t - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -62000000.0) or not (y <= 1.25e+32): tmp = (a * 120.0) + (y * (-60.0 / (z - t))) else: tmp = (a * 120.0) - (x * (60.0 / (t - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -62000000.0) || !(y <= 1.25e+32)) tmp = Float64(Float64(a * 120.0) + Float64(y * Float64(-60.0 / Float64(z - t)))); else tmp = Float64(Float64(a * 120.0) - Float64(x * Float64(60.0 / Float64(t - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -62000000.0) || ~((y <= 1.25e+32))) tmp = (a * 120.0) + (y * (-60.0 / (z - t))); else tmp = (a * 120.0) - (x * (60.0 / (t - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -62000000.0], N[Not[LessEqual[y, 1.25e+32]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(y * N[(-60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] - N[(x * N[(60.0 / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -62000000 \lor \neg \left(y \leq 1.25 \cdot 10^{+32}\right):\\
\;\;\;\;a \cdot 120 + y \cdot \frac{-60}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 - x \cdot \frac{60}{t - z}\\
\end{array}
\end{array}
if y < -6.2e7 or 1.2499999999999999e32 < y Initial program 98.9%
associate-/l*99.7%
Simplified99.7%
clear-num99.8%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in x around 0 91.3%
*-commutative91.3%
associate-*l/91.4%
associate-*r/91.3%
Simplified91.3%
if -6.2e7 < y < 1.2499999999999999e32Initial program 98.6%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 97.9%
associate-*r/33.2%
*-commutative33.2%
associate-*r/34.4%
Simplified97.9%
Final simplification95.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -7600000.0) (not (<= y 1.26e+32))) (+ (* a 120.0) (/ (* y -60.0) (- z t))) (- (* a 120.0) (* x (/ 60.0 (- t z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -7600000.0) || !(y <= 1.26e+32)) {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
} else {
tmp = (a * 120.0) - (x * (60.0 / (t - z)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((y <= (-7600000.0d0)) .or. (.not. (y <= 1.26d+32))) then
tmp = (a * 120.0d0) + ((y * (-60.0d0)) / (z - t))
else
tmp = (a * 120.0d0) - (x * (60.0d0 / (t - z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -7600000.0) || !(y <= 1.26e+32)) {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
} else {
tmp = (a * 120.0) - (x * (60.0 / (t - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -7600000.0) or not (y <= 1.26e+32): tmp = (a * 120.0) + ((y * -60.0) / (z - t)) else: tmp = (a * 120.0) - (x * (60.0 / (t - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -7600000.0) || !(y <= 1.26e+32)) 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(t - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -7600000.0) || ~((y <= 1.26e+32))) tmp = (a * 120.0) + ((y * -60.0) / (z - t)); else tmp = (a * 120.0) - (x * (60.0 / (t - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -7600000.0], N[Not[LessEqual[y, 1.26e+32]], $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[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7600000 \lor \neg \left(y \leq 1.26 \cdot 10^{+32}\right):\\
\;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 - x \cdot \frac{60}{t - z}\\
\end{array}
\end{array}
if y < -7.6e6 or 1.26e32 < y Initial program 98.9%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around 0 91.3%
associate-*r/91.4%
Simplified91.4%
if -7.6e6 < y < 1.26e32Initial program 98.6%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 97.9%
associate-*r/33.2%
*-commutative33.2%
associate-*r/34.4%
Simplified97.9%
Final simplification95.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -3100000000.0) (not (<= y 9e+31))) (+ (* a 120.0) (/ 60.0 (/ (- t z) y))) (- (* a 120.0) (* x (/ 60.0 (- t z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -3100000000.0) || !(y <= 9e+31)) {
tmp = (a * 120.0) + (60.0 / ((t - z) / y));
} else {
tmp = (a * 120.0) - (x * (60.0 / (t - z)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((y <= (-3100000000.0d0)) .or. (.not. (y <= 9d+31))) then
tmp = (a * 120.0d0) + (60.0d0 / ((t - z) / y))
else
tmp = (a * 120.0d0) - (x * (60.0d0 / (t - z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -3100000000.0) || !(y <= 9e+31)) {
tmp = (a * 120.0) + (60.0 / ((t - z) / y));
} else {
tmp = (a * 120.0) - (x * (60.0 / (t - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -3100000000.0) or not (y <= 9e+31): tmp = (a * 120.0) + (60.0 / ((t - z) / y)) else: tmp = (a * 120.0) - (x * (60.0 / (t - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -3100000000.0) || !(y <= 9e+31)) tmp = Float64(Float64(a * 120.0) + Float64(60.0 / Float64(Float64(t - z) / y))); else tmp = Float64(Float64(a * 120.0) - Float64(x * Float64(60.0 / Float64(t - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -3100000000.0) || ~((y <= 9e+31))) tmp = (a * 120.0) + (60.0 / ((t - z) / y)); else tmp = (a * 120.0) - (x * (60.0 / (t - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -3100000000.0], N[Not[LessEqual[y, 9e+31]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 / N[(N[(t - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] - N[(x * N[(60.0 / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3100000000 \lor \neg \left(y \leq 9 \cdot 10^{+31}\right):\\
\;\;\;\;a \cdot 120 + \frac{60}{\frac{t - z}{y}}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 - x \cdot \frac{60}{t - z}\\
\end{array}
\end{array}
if y < -3.1e9 or 8.9999999999999992e31 < y Initial program 98.9%
associate-/l*99.7%
Simplified99.7%
clear-num99.8%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in x around 0 91.4%
mul-1-neg91.4%
distribute-neg-frac291.4%
Simplified91.4%
if -3.1e9 < y < 8.9999999999999992e31Initial program 98.6%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 97.9%
associate-*r/33.2%
*-commutative33.2%
associate-*r/34.4%
Simplified97.9%
Final simplification95.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -8.5e+48) (not (<= a 1.5e+74))) (* 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 <= -8.5e+48) || !(a <= 1.5e+74)) {
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 <= (-8.5d+48)) .or. (.not. (a <= 1.5d+74))) 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 <= -8.5e+48) || !(a <= 1.5e+74)) {
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 <= -8.5e+48) or not (a <= 1.5e+74): 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 <= -8.5e+48) || !(a <= 1.5e+74)) 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 <= -8.5e+48) || ~((a <= 1.5e+74))) 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, -8.5e+48], N[Not[LessEqual[a, 1.5e+74]], $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 -8.5 \cdot 10^{+48} \lor \neg \left(a \leq 1.5 \cdot 10^{+74}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\end{array}
\end{array}
if a < -8.5000000000000001e48 or 1.5e74 < a Initial program 99.0%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 88.9%
if -8.5000000000000001e48 < a < 1.5e74Initial program 98.5%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 71.1%
Final simplification78.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -1.65e+184) (not (<= y 7.8e+171))) (* -60.0 (/ y (- z t))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.65e+184) || !(y <= 7.8e+171)) {
tmp = -60.0 * (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 ((y <= (-1.65d+184)) .or. (.not. (y <= 7.8d+171))) then
tmp = (-60.0d0) * (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 ((y <= -1.65e+184) || !(y <= 7.8e+171)) {
tmp = -60.0 * (y / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -1.65e+184) or not (y <= 7.8e+171): tmp = -60.0 * (y / (z - t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -1.65e+184) || !(y <= 7.8e+171)) tmp = Float64(-60.0 * Float64(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 ((y <= -1.65e+184) || ~((y <= 7.8e+171))) tmp = -60.0 * (y / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -1.65e+184], N[Not[LessEqual[y, 7.8e+171]], $MachinePrecision]], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.65 \cdot 10^{+184} \lor \neg \left(y \leq 7.8 \cdot 10^{+171}\right):\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if y < -1.6499999999999999e184 or 7.8e171 < y Initial program 98.2%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 77.8%
Taylor expanded in x around 0 71.5%
if -1.6499999999999999e184 < y < 7.8e171Initial program 98.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 63.9%
Final simplification65.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -1.02e+184) (not (<= y 1.22e+246))) (* y (/ 60.0 t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.02e+184) || !(y <= 1.22e+246)) {
tmp = y * (60.0 / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((y <= (-1.02d+184)) .or. (.not. (y <= 1.22d+246))) then
tmp = y * (60.0d0 / t)
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.02e+184) || !(y <= 1.22e+246)) {
tmp = y * (60.0 / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -1.02e+184) or not (y <= 1.22e+246): tmp = y * (60.0 / t) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -1.02e+184) || !(y <= 1.22e+246)) tmp = Float64(y * Float64(60.0 / t)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -1.02e+184) || ~((y <= 1.22e+246))) tmp = y * (60.0 / t); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -1.02e+184], N[Not[LessEqual[y, 1.22e+246]], $MachinePrecision]], N[(y * N[(60.0 / t), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.02 \cdot 10^{+184} \lor \neg \left(y \leq 1.22 \cdot 10^{+246}\right):\\
\;\;\;\;y \cdot \frac{60}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if y < -1.02000000000000009e184 or 1.22e246 < y Initial program 99.8%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in x around 0 95.6%
associate-*r/95.8%
Simplified95.8%
Taylor expanded in z around 0 62.6%
Taylor expanded in y around inf 54.3%
associate-*r/54.4%
*-commutative54.4%
associate-*r/54.3%
Simplified54.3%
if -1.02000000000000009e184 < y < 1.22e246Initial program 98.5%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 62.0%
Final simplification60.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -5.5e+184) (not (<= y 1.2e+246))) (/ (* 60.0 y) t) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -5.5e+184) || !(y <= 1.2e+246)) {
tmp = (60.0 * y) / t;
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((y <= (-5.5d+184)) .or. (.not. (y <= 1.2d+246))) then
tmp = (60.0d0 * y) / t
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -5.5e+184) || !(y <= 1.2e+246)) {
tmp = (60.0 * y) / t;
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -5.5e+184) or not (y <= 1.2e+246): tmp = (60.0 * y) / t else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -5.5e+184) || !(y <= 1.2e+246)) tmp = Float64(Float64(60.0 * y) / t); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -5.5e+184) || ~((y <= 1.2e+246))) tmp = (60.0 * y) / t; else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -5.5e+184], N[Not[LessEqual[y, 1.2e+246]], $MachinePrecision]], N[(N[(60.0 * y), $MachinePrecision] / t), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.5 \cdot 10^{+184} \lor \neg \left(y \leq 1.2 \cdot 10^{+246}\right):\\
\;\;\;\;\frac{60 \cdot y}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if y < -5.5000000000000002e184 or 1.2e246 < y Initial program 99.8%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in x around 0 95.6%
associate-*r/95.8%
Simplified95.8%
Taylor expanded in z around 0 62.6%
Taylor expanded in y around inf 54.3%
associate-*r/54.4%
Simplified54.4%
if -5.5000000000000002e184 < y < 1.2e246Initial program 98.5%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 62.0%
Final simplification60.7%
(FPCore (x y z t a) :precision binary64 (+ (* a 120.0) (* 60.0 (/ (- x y) (- z t)))))
double code(double x, double y, double z, double t, double a) {
return (a * 120.0) + (60.0 * ((x - y) / (z - t)));
}
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 * ((x - y) / (z - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return (a * 120.0) + (60.0 * ((x - y) / (z - t)));
}
def code(x, y, z, t, a): return (a * 120.0) + (60.0 * ((x - y) / (z - t)))
function code(x, y, z, t, a) return Float64(Float64(a * 120.0) + Float64(60.0 * Float64(Float64(x - y) / Float64(z - t)))) end
function tmp = code(x, y, z, t, a) tmp = (a * 120.0) + (60.0 * ((x - y) / (z - t))); end
code[x_, y_, z_, t_, a_] := N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
a \cdot 120 + 60 \cdot \frac{x - y}{z - t}
\end{array}
Initial program 98.7%
associate-/l*99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t a) :precision binary64 (- (* a 120.0) (* (- x y) (/ 60.0 (- t z)))))
double code(double x, double y, double z, double t, double a) {
return (a * 120.0) - ((x - y) * (60.0 / (t - z)));
}
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) - ((x - y) * (60.0d0 / (t - z)))
end function
public static double code(double x, double y, double z, double t, double a) {
return (a * 120.0) - ((x - y) * (60.0 / (t - z)));
}
def code(x, y, z, t, a): return (a * 120.0) - ((x - y) * (60.0 / (t - z)))
function code(x, y, z, t, a) return Float64(Float64(a * 120.0) - Float64(Float64(x - y) * Float64(60.0 / Float64(t - z)))) end
function tmp = code(x, y, z, t, a) tmp = (a * 120.0) - ((x - y) * (60.0 / (t - z))); end
code[x_, y_, z_, t_, a_] := N[(N[(a * 120.0), $MachinePrecision] - N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
a \cdot 120 - \left(x - y\right) \cdot \frac{60}{t - z}
\end{array}
Initial program 98.7%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 99.0%
associate-*r/99.0%
remove-double-neg99.0%
neg-mul-199.0%
times-frac99.0%
metadata-eval99.0%
distribute-neg-frac299.0%
distribute-lft-in99.0%
+-commutative99.0%
sub-neg99.0%
div-sub99.8%
associate-*r/98.7%
associate-*l/99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t a) :precision binary64 (if (<= x 3.6e+216) (* a 120.0) (* -60.0 (/ x t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= 3.6e+216) {
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 (x <= 3.6d+216) 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 (x <= 3.6e+216) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (x / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= 3.6e+216: tmp = a * 120.0 else: tmp = -60.0 * (x / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= 3.6e+216) 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 (x <= 3.6e+216) tmp = a * 120.0; else tmp = -60.0 * (x / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, 3.6e+216], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 3.6 \cdot 10^{+216}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{x}{t}\\
\end{array}
\end{array}
if x < 3.6000000000000002e216Initial program 99.4%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 58.8%
if 3.6000000000000002e216 < x Initial program 91.3%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 91.0%
Taylor expanded in x around inf 77.1%
associate-*r/68.7%
*-commutative68.7%
associate-*r/77.2%
Simplified77.2%
Taylor expanded in z around 0 54.9%
Final simplification58.4%
(FPCore (x y z t a) :precision binary64 (if (<= x 4.9e+216) (* a 120.0) (* x (/ -60.0 t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= 4.9e+216) {
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 <= 4.9d+216) 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 <= 4.9e+216) {
tmp = a * 120.0;
} else {
tmp = x * (-60.0 / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= 4.9e+216: tmp = a * 120.0 else: tmp = x * (-60.0 / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= 4.9e+216) tmp = Float64(a * 120.0); else tmp = Float64(x * Float64(-60.0 / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= 4.9e+216) tmp = a * 120.0; else tmp = x * (-60.0 / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, 4.9e+216], N[(a * 120.0), $MachinePrecision], N[(x * N[(-60.0 / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 4.9 \cdot 10^{+216}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-60}{t}\\
\end{array}
\end{array}
if x < 4.90000000000000014e216Initial program 99.4%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 58.8%
if 4.90000000000000014e216 < x Initial program 91.3%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 91.0%
Taylor expanded in x around inf 77.1%
associate-*r/68.7%
*-commutative68.7%
associate-*r/77.2%
Simplified77.2%
Taylor expanded in z around 0 54.9%
Final simplification58.4%
(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 54.8%
Final simplification54.8%
(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 2024079
(FPCore (x y z t a)
:name "Data.Colour.RGB:hslsv from colour-2.3.3, B"
:precision binary64
:alt
(+ (/ 60.0 (/ (- z t) (- x y))) (* a 120.0))
(+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))