
(FPCore (x y z t a) :precision binary64 (+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((60.0d0 * (x - y)) / (z - t)) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
def code(x, y, z, t, a): return ((60.0 * (x - y)) / (z - t)) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = ((60.0 * (x - y)) / (z - t)) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((60.0d0 * (x - y)) / (z - t)) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
def code(x, y, z, t, a): return ((60.0 * (x - y)) / (z - t)) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = ((60.0 * (x - y)) / (z - t)) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120
\end{array}
(FPCore (x y z t a) :precision binary64 (fma a 120.0 (* (/ 60.0 (- z t)) (- x y))))
double code(double x, double y, double z, double t, double a) {
return fma(a, 120.0, ((60.0 / (z - t)) * (x - y)));
}
function code(x, y, z, t, a) return fma(a, 120.0, Float64(Float64(60.0 / Float64(z - t)) * Float64(x - y))) end
code[x_, y_, z_, t_, a_] := N[(a * 120.0 + N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(a, 120, \frac{60}{z - t} \cdot \left(x - y\right)\right)
\end{array}
Initial program 99.8%
+-commutative99.8%
fma-def99.8%
associate-*l/99.9%
Simplified99.9%
Final simplification99.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* 60.0 (- x y)) (- z t))))
(if (<= t_1 -5e+119)
(* 60.0 (/ (- x y) (- z t)))
(if (<= t_1 5e+53) (+ (* (/ 60.0 (- z t)) x) (* a 120.0)) t_1))))
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+119) {
tmp = 60.0 * ((x - y) / (z - t));
} else if (t_1 <= 5e+53) {
tmp = ((60.0 / (z - t)) * x) + (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 * (x - y)) / (z - t)
if (t_1 <= (-5d+119)) then
tmp = 60.0d0 * ((x - y) / (z - t))
else if (t_1 <= 5d+53) then
tmp = ((60.0d0 / (z - t)) * x) + (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 * (x - y)) / (z - t);
double tmp;
if (t_1 <= -5e+119) {
tmp = 60.0 * ((x - y) / (z - t));
} else if (t_1 <= 5e+53) {
tmp = ((60.0 / (z - t)) * x) + (a * 120.0);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (60.0 * (x - y)) / (z - t) tmp = 0 if t_1 <= -5e+119: tmp = 60.0 * ((x - y) / (z - t)) elif t_1 <= 5e+53: tmp = ((60.0 / (z - t)) * x) + (a * 120.0) else: tmp = t_1 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+119) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); elseif (t_1 <= 5e+53) tmp = Float64(Float64(Float64(60.0 / Float64(z - t)) * x) + 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 * (x - y)) / (z - t); tmp = 0.0; if (t_1 <= -5e+119) tmp = 60.0 * ((x - y) / (z - t)); elseif (t_1 <= 5e+53) tmp = ((60.0 / (z - t)) * x) + (a * 120.0); else tmp = t_1; 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+119], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+53], N[(N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\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^{+119}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+53}:\\
\;\;\;\;\frac{60}{z - t} \cdot x + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < -4.9999999999999999e119Initial program 99.5%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 97.5%
if -4.9999999999999999e119 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < 5.0000000000000004e53Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 89.7%
associate-*r/89.7%
associate-*l/89.8%
*-commutative89.8%
Simplified89.8%
if 5.0000000000000004e53 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
associate-/r/99.6%
Applied egg-rr99.6%
Taylor expanded in a around 0 77.1%
associate-*r/77.4%
Simplified77.4%
Final simplification88.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* 60.0 (/ (- x y) z))) (t_2 (* -60.0 (/ (- x y) t))))
(if (<= (- z t) -2e+50)
(* a 120.0)
(if (<= (- z t) -5e+28)
t_1
(if (<= (- z t) -5e-59)
t_2
(if (<= (- z t) 1e-94)
t_1
(if (<= (- z t) 1e-18) t_2 (* a 120.0))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * ((x - y) / z);
double t_2 = -60.0 * ((x - y) / t);
double tmp;
if ((z - t) <= -2e+50) {
tmp = a * 120.0;
} else if ((z - t) <= -5e+28) {
tmp = t_1;
} else if ((z - t) <= -5e-59) {
tmp = t_2;
} else if ((z - t) <= 1e-94) {
tmp = t_1;
} else if ((z - t) <= 1e-18) {
tmp = t_2;
} 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) :: t_2
real(8) :: tmp
t_1 = 60.0d0 * ((x - y) / z)
t_2 = (-60.0d0) * ((x - y) / t)
if ((z - t) <= (-2d+50)) then
tmp = a * 120.0d0
else if ((z - t) <= (-5d+28)) then
tmp = t_1
else if ((z - t) <= (-5d-59)) then
tmp = t_2
else if ((z - t) <= 1d-94) then
tmp = t_1
else if ((z - t) <= 1d-18) then
tmp = t_2
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 - y) / z);
double t_2 = -60.0 * ((x - y) / t);
double tmp;
if ((z - t) <= -2e+50) {
tmp = a * 120.0;
} else if ((z - t) <= -5e+28) {
tmp = t_1;
} else if ((z - t) <= -5e-59) {
tmp = t_2;
} else if ((z - t) <= 1e-94) {
tmp = t_1;
} else if ((z - t) <= 1e-18) {
tmp = t_2;
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = 60.0 * ((x - y) / z) t_2 = -60.0 * ((x - y) / t) tmp = 0 if (z - t) <= -2e+50: tmp = a * 120.0 elif (z - t) <= -5e+28: tmp = t_1 elif (z - t) <= -5e-59: tmp = t_2 elif (z - t) <= 1e-94: tmp = t_1 elif (z - t) <= 1e-18: tmp = t_2 else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) t_1 = Float64(60.0 * Float64(Float64(x - y) / z)) t_2 = Float64(-60.0 * Float64(Float64(x - y) / t)) tmp = 0.0 if (Float64(z - t) <= -2e+50) tmp = Float64(a * 120.0); elseif (Float64(z - t) <= -5e+28) tmp = t_1; elseif (Float64(z - t) <= -5e-59) tmp = t_2; elseif (Float64(z - t) <= 1e-94) tmp = t_1; elseif (Float64(z - t) <= 1e-18) tmp = t_2; else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = 60.0 * ((x - y) / z); t_2 = -60.0 * ((x - y) / t); tmp = 0.0; if ((z - t) <= -2e+50) tmp = a * 120.0; elseif ((z - t) <= -5e+28) tmp = t_1; elseif ((z - t) <= -5e-59) tmp = t_2; elseif ((z - t) <= 1e-94) tmp = t_1; elseif ((z - t) <= 1e-18) tmp = t_2; else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(z - t), $MachinePrecision], -2e+50], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(z - t), $MachinePrecision], -5e+28], t$95$1, If[LessEqual[N[(z - t), $MachinePrecision], -5e-59], t$95$2, If[LessEqual[N[(z - t), $MachinePrecision], 1e-94], t$95$1, If[LessEqual[N[(z - t), $MachinePrecision], 1e-18], t$95$2, N[(a * 120.0), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 60 \cdot \frac{x - y}{z}\\
t_2 := -60 \cdot \frac{x - y}{t}\\
\mathbf{if}\;z - t \leq -2 \cdot 10^{+50}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;z - t \leq -5 \cdot 10^{+28}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z - t \leq -5 \cdot 10^{-59}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z - t \leq 10^{-94}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z - t \leq 10^{-18}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (-.f64 z t) < -2.0000000000000002e50 or 1.0000000000000001e-18 < (-.f64 z t) Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 67.8%
if -2.0000000000000002e50 < (-.f64 z t) < -4.99999999999999957e28 or -5.0000000000000001e-59 < (-.f64 z t) < 9.9999999999999996e-95Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
associate-/r/99.8%
Applied egg-rr99.8%
Taylor expanded in a around 0 88.0%
associate-*r/88.0%
associate-/l*88.1%
Simplified88.1%
Taylor expanded in z around inf 70.3%
if -4.99999999999999957e28 < (-.f64 z t) < -5.0000000000000001e-59 or 9.9999999999999996e-95 < (-.f64 z t) < 1.0000000000000001e-18Initial program 99.7%
associate-/l*99.5%
Simplified99.5%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 84.7%
associate-*r/84.8%
associate-/l*84.7%
Simplified84.7%
Taylor expanded in z around 0 63.6%
Final simplification67.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* -60.0 (/ (- x y) t))))
(if (<= (- z t) -2e+50)
(* a 120.0)
(if (<= (- z t) -5e+28)
(* 60.0 (/ (- x y) z))
(if (<= (- z t) -5e-59)
t_1
(if (<= (- z t) 1e-94)
(/ (- x y) (/ z 60.0))
(if (<= (- z t) 1e-18) t_1 (* a 120.0))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -60.0 * ((x - y) / t);
double tmp;
if ((z - t) <= -2e+50) {
tmp = a * 120.0;
} else if ((z - t) <= -5e+28) {
tmp = 60.0 * ((x - y) / z);
} else if ((z - t) <= -5e-59) {
tmp = t_1;
} else if ((z - t) <= 1e-94) {
tmp = (x - y) / (z / 60.0);
} else if ((z - t) <= 1e-18) {
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 - y) / t)
if ((z - t) <= (-2d+50)) then
tmp = a * 120.0d0
else if ((z - t) <= (-5d+28)) then
tmp = 60.0d0 * ((x - y) / z)
else if ((z - t) <= (-5d-59)) then
tmp = t_1
else if ((z - t) <= 1d-94) then
tmp = (x - y) / (z / 60.0d0)
else if ((z - t) <= 1d-18) 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 - y) / t);
double tmp;
if ((z - t) <= -2e+50) {
tmp = a * 120.0;
} else if ((z - t) <= -5e+28) {
tmp = 60.0 * ((x - y) / z);
} else if ((z - t) <= -5e-59) {
tmp = t_1;
} else if ((z - t) <= 1e-94) {
tmp = (x - y) / (z / 60.0);
} else if ((z - t) <= 1e-18) {
tmp = t_1;
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -60.0 * ((x - y) / t) tmp = 0 if (z - t) <= -2e+50: tmp = a * 120.0 elif (z - t) <= -5e+28: tmp = 60.0 * ((x - y) / z) elif (z - t) <= -5e-59: tmp = t_1 elif (z - t) <= 1e-94: tmp = (x - y) / (z / 60.0) elif (z - t) <= 1e-18: tmp = t_1 else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) t_1 = Float64(-60.0 * Float64(Float64(x - y) / t)) tmp = 0.0 if (Float64(z - t) <= -2e+50) tmp = Float64(a * 120.0); elseif (Float64(z - t) <= -5e+28) tmp = Float64(60.0 * Float64(Float64(x - y) / z)); elseif (Float64(z - t) <= -5e-59) tmp = t_1; elseif (Float64(z - t) <= 1e-94) tmp = Float64(Float64(x - y) / Float64(z / 60.0)); elseif (Float64(z - t) <= 1e-18) 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 - y) / t); tmp = 0.0; if ((z - t) <= -2e+50) tmp = a * 120.0; elseif ((z - t) <= -5e+28) tmp = 60.0 * ((x - y) / z); elseif ((z - t) <= -5e-59) tmp = t_1; elseif ((z - t) <= 1e-94) tmp = (x - y) / (z / 60.0); elseif ((z - t) <= 1e-18) 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[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(z - t), $MachinePrecision], -2e+50], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(z - t), $MachinePrecision], -5e+28], N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z - t), $MachinePrecision], -5e-59], t$95$1, If[LessEqual[N[(z - t), $MachinePrecision], 1e-94], N[(N[(x - y), $MachinePrecision] / N[(z / 60.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z - t), $MachinePrecision], 1e-18], t$95$1, N[(a * 120.0), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -60 \cdot \frac{x - y}{t}\\
\mathbf{if}\;z - t \leq -2 \cdot 10^{+50}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;z - t \leq -5 \cdot 10^{+28}:\\
\;\;\;\;60 \cdot \frac{x - y}{z}\\
\mathbf{elif}\;z - t \leq -5 \cdot 10^{-59}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z - t \leq 10^{-94}:\\
\;\;\;\;\frac{x - y}{\frac{z}{60}}\\
\mathbf{elif}\;z - t \leq 10^{-18}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (-.f64 z t) < -2.0000000000000002e50 or 1.0000000000000001e-18 < (-.f64 z t) Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 67.8%
if -2.0000000000000002e50 < (-.f64 z t) < -4.99999999999999957e28Initial program 100.0%
associate-/l*99.8%
Simplified99.8%
associate-/r/99.8%
Applied egg-rr99.8%
Taylor expanded in a around 0 85.8%
associate-*r/86.0%
associate-/l*85.8%
Simplified85.8%
Taylor expanded in z around inf 86.2%
if -4.99999999999999957e28 < (-.f64 z t) < -5.0000000000000001e-59 or 9.9999999999999996e-95 < (-.f64 z t) < 1.0000000000000001e-18Initial program 99.7%
associate-/l*99.5%
Simplified99.5%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 84.7%
associate-*r/84.8%
associate-/l*84.7%
Simplified84.7%
Taylor expanded in z around 0 63.6%
if -5.0000000000000001e-59 < (-.f64 z t) < 9.9999999999999996e-95Initial program 99.7%
associate-/l*99.9%
Simplified99.9%
associate-/r/99.8%
Applied egg-rr99.8%
Taylor expanded in a around 0 88.4%
associate-*r/88.4%
associate-/l*88.5%
Simplified88.5%
Taylor expanded in z around inf 67.0%
associate-*r/67.0%
*-commutative67.0%
associate-/l*67.1%
Simplified67.1%
Final simplification67.7%
(FPCore (x y z t a)
:precision binary64
(if (<= (- z t) -2e+50)
(* a 120.0)
(if (<= (- z t) 2e-122)
(* -60.0 (/ y (- z t)))
(if (<= (- z t) 1e-18) (* -60.0 (/ (- x y) t)) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z - t) <= -2e+50) {
tmp = a * 120.0;
} else if ((z - t) <= 2e-122) {
tmp = -60.0 * (y / (z - t));
} else if ((z - t) <= 1e-18) {
tmp = -60.0 * ((x - y) / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z - t) <= (-2d+50)) then
tmp = a * 120.0d0
else if ((z - t) <= 2d-122) then
tmp = (-60.0d0) * (y / (z - t))
else if ((z - t) <= 1d-18) then
tmp = (-60.0d0) * ((x - y) / t)
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z - t) <= -2e+50) {
tmp = a * 120.0;
} else if ((z - t) <= 2e-122) {
tmp = -60.0 * (y / (z - t));
} else if ((z - t) <= 1e-18) {
tmp = -60.0 * ((x - y) / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z - t) <= -2e+50: tmp = a * 120.0 elif (z - t) <= 2e-122: tmp = -60.0 * (y / (z - t)) elif (z - t) <= 1e-18: tmp = -60.0 * ((x - y) / t) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(z - t) <= -2e+50) tmp = Float64(a * 120.0); elseif (Float64(z - t) <= 2e-122) tmp = Float64(-60.0 * Float64(y / Float64(z - t))); elseif (Float64(z - t) <= 1e-18) tmp = Float64(-60.0 * Float64(Float64(x - y) / t)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z - t) <= -2e+50) tmp = a * 120.0; elseif ((z - t) <= 2e-122) tmp = -60.0 * (y / (z - t)); elseif ((z - t) <= 1e-18) tmp = -60.0 * ((x - y) / t); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(z - t), $MachinePrecision], -2e+50], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(z - t), $MachinePrecision], 2e-122], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z - t), $MachinePrecision], 1e-18], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z - t \leq -2 \cdot 10^{+50}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;z - t \leq 2 \cdot 10^{-122}:\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\mathbf{elif}\;z - t \leq 10^{-18}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (-.f64 z t) < -2.0000000000000002e50 or 1.0000000000000001e-18 < (-.f64 z t) Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 67.8%
if -2.0000000000000002e50 < (-.f64 z t) < 2.00000000000000012e-122Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
associate-/r/99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 54.1%
if 2.00000000000000012e-122 < (-.f64 z t) < 1.0000000000000001e-18Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
associate-/r/99.6%
Applied egg-rr99.6%
Taylor expanded in a around 0 81.5%
associate-*r/81.7%
associate-/l*81.7%
Simplified81.7%
Taylor expanded in z around 0 55.0%
Final simplification64.1%
(FPCore (x y z t a) :precision binary64 (if (<= (* a 120.0) -5e-59) (+ (* a 120.0) (/ -60.0 (/ t x))) (if (<= (* a 120.0) 5e-51) (* 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) <= -5e-59) {
tmp = (a * 120.0) + (-60.0 / (t / x));
} else if ((a * 120.0) <= 5e-51) {
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) <= (-5d-59)) then
tmp = (a * 120.0d0) + ((-60.0d0) / (t / x))
else if ((a * 120.0d0) <= 5d-51) 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) <= -5e-59) {
tmp = (a * 120.0) + (-60.0 / (t / x));
} else if ((a * 120.0) <= 5e-51) {
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) <= -5e-59: tmp = (a * 120.0) + (-60.0 / (t / x)) elif (a * 120.0) <= 5e-51: 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) <= -5e-59) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 / Float64(t / x))); elseif (Float64(a * 120.0) <= 5e-51) 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) <= -5e-59) tmp = (a * 120.0) + (-60.0 / (t / x)); elseif ((a * 120.0) <= 5e-51) 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], -5e-59], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 / N[(t / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 5e-51], 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 -5 \cdot 10^{-59}:\\
\;\;\;\;a \cdot 120 + \frac{-60}{\frac{t}{x}}\\
\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-51}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a 120) < -5.0000000000000001e-59Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 82.4%
associate-*r/82.4%
associate-*l/82.4%
*-commutative82.4%
Simplified82.4%
Taylor expanded in z around 0 70.6%
associate-*r/70.6%
associate-/l*70.6%
Simplified70.6%
if -5.0000000000000001e-59 < (*.f64 a 120) < 5.00000000000000004e-51Initial program 99.6%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 81.5%
if 5.00000000000000004e-51 < (*.f64 a 120) Initial program 100.0%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 79.6%
Final simplification77.5%
(FPCore (x y z t a) :precision binary64 (if (<= (* a 120.0) -5e-59) (+ (/ (* x -60.0) t) (* a 120.0)) (if (<= (* a 120.0) 5e-51) (* 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) <= -5e-59) {
tmp = ((x * -60.0) / t) + (a * 120.0);
} else if ((a * 120.0) <= 5e-51) {
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) <= (-5d-59)) then
tmp = ((x * (-60.0d0)) / t) + (a * 120.0d0)
else if ((a * 120.0d0) <= 5d-51) 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) <= -5e-59) {
tmp = ((x * -60.0) / t) + (a * 120.0);
} else if ((a * 120.0) <= 5e-51) {
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) <= -5e-59: tmp = ((x * -60.0) / t) + (a * 120.0) elif (a * 120.0) <= 5e-51: 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) <= -5e-59) tmp = Float64(Float64(Float64(x * -60.0) / t) + Float64(a * 120.0)); elseif (Float64(a * 120.0) <= 5e-51) 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) <= -5e-59) tmp = ((x * -60.0) / t) + (a * 120.0); elseif ((a * 120.0) <= 5e-51) 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], -5e-59], N[(N[(N[(x * -60.0), $MachinePrecision] / t), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 5e-51], 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 -5 \cdot 10^{-59}:\\
\;\;\;\;\frac{x \cdot -60}{t} + a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-51}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a 120) < -5.0000000000000001e-59Initial program 99.9%
Taylor expanded in x around inf 82.4%
*-commutative82.4%
Simplified82.4%
Taylor expanded in z around 0 70.6%
associate-*r/70.6%
*-commutative70.6%
Simplified70.6%
if -5.0000000000000001e-59 < (*.f64 a 120) < 5.00000000000000004e-51Initial program 99.6%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 81.5%
if 5.00000000000000004e-51 < (*.f64 a 120) Initial program 100.0%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 79.6%
Final simplification77.5%
(FPCore (x y z t a) :precision binary64 (if (<= (* a 120.0) -5e-59) (+ (/ (* x -60.0) t) (* a 120.0)) (if (<= (* a 120.0) 5e-51) (/ (* 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) <= -5e-59) {
tmp = ((x * -60.0) / t) + (a * 120.0);
} else if ((a * 120.0) <= 5e-51) {
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) <= (-5d-59)) then
tmp = ((x * (-60.0d0)) / t) + (a * 120.0d0)
else if ((a * 120.0d0) <= 5d-51) 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) <= -5e-59) {
tmp = ((x * -60.0) / t) + (a * 120.0);
} else if ((a * 120.0) <= 5e-51) {
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) <= -5e-59: tmp = ((x * -60.0) / t) + (a * 120.0) elif (a * 120.0) <= 5e-51: 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) <= -5e-59) tmp = Float64(Float64(Float64(x * -60.0) / t) + Float64(a * 120.0)); elseif (Float64(a * 120.0) <= 5e-51) tmp = Float64(Float64(60.0 * 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) <= -5e-59) tmp = ((x * -60.0) / t) + (a * 120.0); elseif ((a * 120.0) <= 5e-51) 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], -5e-59], N[(N[(N[(x * -60.0), $MachinePrecision] / t), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 5e-51], N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -5 \cdot 10^{-59}:\\
\;\;\;\;\frac{x \cdot -60}{t} + a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-51}:\\
\;\;\;\;\frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a 120) < -5.0000000000000001e-59Initial program 99.9%
Taylor expanded in x around inf 82.4%
*-commutative82.4%
Simplified82.4%
Taylor expanded in z around 0 70.6%
associate-*r/70.6%
*-commutative70.6%
Simplified70.6%
if -5.0000000000000001e-59 < (*.f64 a 120) < 5.00000000000000004e-51Initial program 99.6%
associate-/l*99.6%
Simplified99.6%
associate-/r/99.8%
Applied egg-rr99.8%
Taylor expanded in a around 0 81.5%
associate-*r/81.5%
Simplified81.5%
if 5.00000000000000004e-51 < (*.f64 a 120) Initial program 100.0%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 79.6%
Final simplification77.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -2.6e+123) (not (<= y 4e+110))) (+ (/ -60.0 (/ (- z t) y)) (* a 120.0)) (+ (* (/ 60.0 (- z t)) x) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -2.6e+123) || !(y <= 4e+110)) {
tmp = (-60.0 / ((z - t) / y)) + (a * 120.0);
} else {
tmp = ((60.0 / (z - t)) * x) + (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 <= (-2.6d+123)) .or. (.not. (y <= 4d+110))) then
tmp = ((-60.0d0) / ((z - t) / y)) + (a * 120.0d0)
else
tmp = ((60.0d0 / (z - t)) * x) + (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 <= -2.6e+123) || !(y <= 4e+110)) {
tmp = (-60.0 / ((z - t) / y)) + (a * 120.0);
} else {
tmp = ((60.0 / (z - t)) * x) + (a * 120.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -2.6e+123) or not (y <= 4e+110): tmp = (-60.0 / ((z - t) / y)) + (a * 120.0) else: tmp = ((60.0 / (z - t)) * x) + (a * 120.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -2.6e+123) || !(y <= 4e+110)) tmp = Float64(Float64(-60.0 / Float64(Float64(z - t) / y)) + Float64(a * 120.0)); else tmp = Float64(Float64(Float64(60.0 / Float64(z - t)) * x) + Float64(a * 120.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -2.6e+123) || ~((y <= 4e+110))) tmp = (-60.0 / ((z - t) / y)) + (a * 120.0); else tmp = ((60.0 / (z - t)) * x) + (a * 120.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -2.6e+123], N[Not[LessEqual[y, 4e+110]], $MachinePrecision]], N[(N[(-60.0 / N[(N[(z - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.6 \cdot 10^{+123} \lor \neg \left(y \leq 4 \cdot 10^{+110}\right):\\
\;\;\;\;\frac{-60}{\frac{z - t}{y}} + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{60}{z - t} \cdot x + a \cdot 120\\
\end{array}
\end{array}
if y < -2.59999999999999985e123 or 4.0000000000000001e110 < y Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 91.9%
associate-*r/91.8%
associate-/l*91.9%
Simplified91.9%
if -2.59999999999999985e123 < y < 4.0000000000000001e110Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 92.8%
associate-*r/92.9%
associate-*l/92.9%
*-commutative92.9%
Simplified92.9%
Final simplification92.6%
(FPCore (x y z t a) :precision binary64 (if (<= (- z t) -2e+50) (* a 120.0) (if (<= (- z t) 1e-18) (* -60.0 (/ y (- z t))) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z - t) <= -2e+50) {
tmp = a * 120.0;
} else if ((z - t) <= 1e-18) {
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 ((z - t) <= (-2d+50)) then
tmp = a * 120.0d0
else if ((z - t) <= 1d-18) 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 ((z - t) <= -2e+50) {
tmp = a * 120.0;
} else if ((z - t) <= 1e-18) {
tmp = -60.0 * (y / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z - t) <= -2e+50: tmp = a * 120.0 elif (z - t) <= 1e-18: tmp = -60.0 * (y / (z - t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(z - t) <= -2e+50) tmp = Float64(a * 120.0); elseif (Float64(z - t) <= 1e-18) 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 ((z - t) <= -2e+50) tmp = a * 120.0; elseif ((z - t) <= 1e-18) tmp = -60.0 * (y / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(z - t), $MachinePrecision], -2e+50], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(z - t), $MachinePrecision], 1e-18], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z - t \leq -2 \cdot 10^{+50}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;z - t \leq 10^{-18}:\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (-.f64 z t) < -2.0000000000000002e50 or 1.0000000000000001e-18 < (-.f64 z t) Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 67.8%
if -2.0000000000000002e50 < (-.f64 z t) < 1.0000000000000001e-18Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 48.5%
Final simplification62.4%
(FPCore (x y z t a) :precision binary64 (if (<= a -4.6e-61) (* a 120.0) (if (<= a 1e-52) (* 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 <= -4.6e-61) {
tmp = a * 120.0;
} else if (a <= 1e-52) {
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 <= (-4.6d-61)) then
tmp = a * 120.0d0
else if (a <= 1d-52) 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 <= -4.6e-61) {
tmp = a * 120.0;
} else if (a <= 1e-52) {
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 <= -4.6e-61: tmp = a * 120.0 elif a <= 1e-52: tmp = 60.0 * ((x - y) / (z - t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -4.6e-61) tmp = Float64(a * 120.0); elseif (a <= 1e-52) 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 <= -4.6e-61) tmp = a * 120.0; elseif (a <= 1e-52) tmp = 60.0 * ((x - y) / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -4.6e-61], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 1e-52], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.6 \cdot 10^{-61}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq 10^{-52}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -4.59999999999999984e-61 or 1e-52 < a Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 74.3%
if -4.59999999999999984e-61 < a < 1e-52Initial program 99.6%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 81.5%
Final simplification77.3%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.95e-18) (+ (* a 120.0) (* -60.0 (/ y z))) (if (<= a 9.6e-52) (* 60.0 (/ (- x y) (- z t))) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.95e-18) {
tmp = (a * 120.0) + (-60.0 * (y / z));
} else if (a <= 9.6e-52) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-1.95d-18)) then
tmp = (a * 120.0d0) + ((-60.0d0) * (y / z))
else if (a <= 9.6d-52) then
tmp = 60.0d0 * ((x - y) / (z - t))
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.95e-18) {
tmp = (a * 120.0) + (-60.0 * (y / z));
} else if (a <= 9.6e-52) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.95e-18: tmp = (a * 120.0) + (-60.0 * (y / z)) elif a <= 9.6e-52: tmp = 60.0 * ((x - y) / (z - t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.95e-18) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / z))); elseif (a <= 9.6e-52) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.95e-18) tmp = (a * 120.0) + (-60.0 * (y / z)); elseif (a <= 9.6e-52) tmp = 60.0 * ((x - y) / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.95e-18], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 9.6e-52], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.95 \cdot 10^{-18}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\
\mathbf{elif}\;a \leq 9.6 \cdot 10^{-52}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -1.95000000000000002e-18Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 77.2%
associate-*r/20.3%
*-commutative20.3%
associate-/l*20.3%
Simplified77.2%
Taylor expanded in x around 0 73.7%
if -1.95000000000000002e-18 < a < 9.6000000000000007e-52Initial program 99.6%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 78.5%
if 9.6000000000000007e-52 < a Initial program 100.0%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 79.6%
Final simplification77.3%
(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(Float64(60.0 / 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[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60}{z - t} \cdot \left(x - y\right) + a \cdot 120
\end{array}
Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
associate-/r/99.8%
Applied egg-rr99.8%
Final simplification99.8%
(FPCore (x y z t a) :precision binary64 (if (<= x -2e+204) (* x (/ -60.0 t)) (if (<= x 3.2e+262) (* a 120.0) (/ 60.0 (/ (- t) x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -2e+204) {
tmp = x * (-60.0 / t);
} else if (x <= 3.2e+262) {
tmp = a * 120.0;
} else {
tmp = 60.0 / (-t / x);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (x <= (-2d+204)) then
tmp = x * ((-60.0d0) / t)
else if (x <= 3.2d+262) then
tmp = a * 120.0d0
else
tmp = 60.0d0 / (-t / x)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -2e+204) {
tmp = x * (-60.0 / t);
} else if (x <= 3.2e+262) {
tmp = a * 120.0;
} else {
tmp = 60.0 / (-t / x);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -2e+204: tmp = x * (-60.0 / t) elif x <= 3.2e+262: tmp = a * 120.0 else: tmp = 60.0 / (-t / x) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -2e+204) tmp = Float64(x * Float64(-60.0 / t)); elseif (x <= 3.2e+262) tmp = Float64(a * 120.0); else tmp = Float64(60.0 / Float64(Float64(-t) / x)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -2e+204) tmp = x * (-60.0 / t); elseif (x <= 3.2e+262) tmp = a * 120.0; else tmp = 60.0 / (-t / x); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -2e+204], N[(x * N[(-60.0 / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.2e+262], N[(a * 120.0), $MachinePrecision], N[(60.0 / N[((-t) / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2 \cdot 10^{+204}:\\
\;\;\;\;x \cdot \frac{-60}{t}\\
\mathbf{elif}\;x \leq 3.2 \cdot 10^{+262}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{60}{\frac{-t}{x}}\\
\end{array}
\end{array}
if x < -1.99999999999999998e204Initial program 99.6%
associate-/l*99.3%
Simplified99.3%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in x around inf 77.7%
associate-*r/77.6%
associate-/l*77.3%
Simplified77.3%
Taylor expanded in z around 0 61.6%
neg-mul-161.6%
distribute-neg-frac61.6%
Simplified61.6%
associate-/r/61.9%
frac-2neg61.9%
metadata-eval61.9%
remove-double-neg61.9%
Applied egg-rr61.9%
if -1.99999999999999998e204 < x < 3.1999999999999998e262Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 56.7%
if 3.1999999999999998e262 < x Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
associate-/r/99.6%
Applied egg-rr99.6%
Taylor expanded in x around inf 83.9%
associate-*r/83.9%
associate-/l*83.9%
Simplified83.9%
Taylor expanded in z around 0 56.3%
neg-mul-156.3%
distribute-neg-frac56.3%
Simplified56.3%
Final simplification57.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -1.82e+205) (not (<= x 3.5e+262))) (* -60.0 (/ x t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -1.82e+205) || !(x <= 3.5e+262)) {
tmp = -60.0 * (x / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((x <= (-1.82d+205)) .or. (.not. (x <= 3.5d+262))) then
tmp = (-60.0d0) * (x / t)
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -1.82e+205) || !(x <= 3.5e+262)) {
tmp = -60.0 * (x / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -1.82e+205) or not (x <= 3.5e+262): tmp = -60.0 * (x / t) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -1.82e+205) || !(x <= 3.5e+262)) tmp = Float64(-60.0 * Float64(x / t)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -1.82e+205) || ~((x <= 3.5e+262))) tmp = -60.0 * (x / t); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -1.82e+205], N[Not[LessEqual[x, 3.5e+262]], $MachinePrecision]], N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.82 \cdot 10^{+205} \lor \neg \left(x \leq 3.5 \cdot 10^{+262}\right):\\
\;\;\;\;-60 \cdot \frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if x < -1.81999999999999997e205 or 3.4999999999999997e262 < x Initial program 99.6%
associate-/l*99.5%
Simplified99.5%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in x around inf 80.1%
associate-*r/80.1%
associate-/l*79.9%
Simplified79.9%
Taylor expanded in z around 0 59.5%
neg-mul-159.5%
distribute-neg-frac59.5%
Simplified59.5%
Taylor expanded in t around 0 59.6%
if -1.81999999999999997e205 < x < 3.4999999999999997e262Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 56.7%
Final simplification57.1%
(FPCore (x y z t a) :precision binary64 (if (<= x -8.8e+204) (* x (/ -60.0 t)) (if (<= x 3.1e+262) (* a 120.0) (* -60.0 (/ x t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -8.8e+204) {
tmp = x * (-60.0 / t);
} else if (x <= 3.1e+262) {
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 <= (-8.8d+204)) then
tmp = x * ((-60.0d0) / t)
else if (x <= 3.1d+262) 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 <= -8.8e+204) {
tmp = x * (-60.0 / t);
} else if (x <= 3.1e+262) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (x / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -8.8e+204: tmp = x * (-60.0 / t) elif x <= 3.1e+262: tmp = a * 120.0 else: tmp = -60.0 * (x / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -8.8e+204) tmp = Float64(x * Float64(-60.0 / t)); elseif (x <= 3.1e+262) 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 <= -8.8e+204) tmp = x * (-60.0 / t); elseif (x <= 3.1e+262) tmp = a * 120.0; else tmp = -60.0 * (x / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -8.8e+204], N[(x * N[(-60.0 / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.1e+262], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -8.8 \cdot 10^{+204}:\\
\;\;\;\;x \cdot \frac{-60}{t}\\
\mathbf{elif}\;x \leq 3.1 \cdot 10^{+262}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{x}{t}\\
\end{array}
\end{array}
if x < -8.80000000000000046e204Initial program 99.6%
associate-/l*99.3%
Simplified99.3%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in x around inf 77.7%
associate-*r/77.6%
associate-/l*77.3%
Simplified77.3%
Taylor expanded in z around 0 61.6%
neg-mul-161.6%
distribute-neg-frac61.6%
Simplified61.6%
associate-/r/61.9%
frac-2neg61.9%
metadata-eval61.9%
remove-double-neg61.9%
Applied egg-rr61.9%
if -8.80000000000000046e204 < x < 3.09999999999999991e262Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 56.7%
if 3.09999999999999991e262 < x Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
associate-/r/99.6%
Applied egg-rr99.6%
Taylor expanded in x around inf 83.9%
associate-*r/83.9%
associate-/l*83.9%
Simplified83.9%
Taylor expanded in z around 0 56.3%
neg-mul-156.3%
distribute-neg-frac56.3%
Simplified56.3%
Taylor expanded in t around 0 56.3%
Final simplification57.1%
(FPCore (x y z t a) :precision binary64 (* a 120.0))
double code(double x, double y, double z, double t, double a) {
return a * 120.0;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = a * 120.0d0
end function
public static double code(double x, double y, double z, double t, double a) {
return a * 120.0;
}
def code(x, y, z, t, a): return a * 120.0
function code(x, y, z, t, a) return Float64(a * 120.0) end
function tmp = code(x, y, z, t, a) tmp = a * 120.0; end
code[x_, y_, z_, t_, a_] := N[(a * 120.0), $MachinePrecision]
\begin{array}{l}
\\
a \cdot 120
\end{array}
Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 52.1%
Final simplification52.1%
(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 2023185
(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)))