
(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 16 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 (+ (* (- x y) (/ 60.0 (- z t))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return ((x - y) * (60.0 / (z - t))) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((x - y) * (60.0d0 / (z - t))) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return ((x - y) * (60.0 / (z - t))) + (a * 120.0);
}
def code(x, y, z, t, a): return ((x - y) * (60.0 / (z - t))) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(Float64(x - y) * Float64(60.0 / Float64(z - t))) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = ((x - y) * (60.0 / (z - t))) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x - y\right) \cdot \frac{60}{z - t} + a \cdot 120
\end{array}
Initial program 99.0%
*-commutative99.0%
associate-/l*99.8%
Applied egg-rr99.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* 60.0 (/ (- x y) z))))
(if (<= (- z t) -1e+113)
(* a 120.0)
(if (<= (- z t) -1e-114)
(* x (/ 60.0 (- z t)))
(if (<= (- z t) -2e-257)
t_1
(if (<= (- z t) 2e-86)
(* -60.0 (/ (- x y) t))
(if (<= (- z t) 5e+38) t_1 (* a 120.0))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * ((x - y) / z);
double tmp;
if ((z - t) <= -1e+113) {
tmp = a * 120.0;
} else if ((z - t) <= -1e-114) {
tmp = x * (60.0 / (z - t));
} else if ((z - t) <= -2e-257) {
tmp = t_1;
} else if ((z - t) <= 2e-86) {
tmp = -60.0 * ((x - y) / t);
} else if ((z - t) <= 5e+38) {
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) / z)
if ((z - t) <= (-1d+113)) then
tmp = a * 120.0d0
else if ((z - t) <= (-1d-114)) then
tmp = x * (60.0d0 / (z - t))
else if ((z - t) <= (-2d-257)) then
tmp = t_1
else if ((z - t) <= 2d-86) then
tmp = (-60.0d0) * ((x - y) / t)
else if ((z - t) <= 5d+38) 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) / z);
double tmp;
if ((z - t) <= -1e+113) {
tmp = a * 120.0;
} else if ((z - t) <= -1e-114) {
tmp = x * (60.0 / (z - t));
} else if ((z - t) <= -2e-257) {
tmp = t_1;
} else if ((z - t) <= 2e-86) {
tmp = -60.0 * ((x - y) / t);
} else if ((z - t) <= 5e+38) {
tmp = t_1;
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = 60.0 * ((x - y) / z) tmp = 0 if (z - t) <= -1e+113: tmp = a * 120.0 elif (z - t) <= -1e-114: tmp = x * (60.0 / (z - t)) elif (z - t) <= -2e-257: tmp = t_1 elif (z - t) <= 2e-86: tmp = -60.0 * ((x - y) / t) elif (z - t) <= 5e+38: 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) / z)) tmp = 0.0 if (Float64(z - t) <= -1e+113) tmp = Float64(a * 120.0); elseif (Float64(z - t) <= -1e-114) tmp = Float64(x * Float64(60.0 / Float64(z - t))); elseif (Float64(z - t) <= -2e-257) tmp = t_1; elseif (Float64(z - t) <= 2e-86) tmp = Float64(-60.0 * Float64(Float64(x - y) / t)); elseif (Float64(z - t) <= 5e+38) 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) / z); tmp = 0.0; if ((z - t) <= -1e+113) tmp = a * 120.0; elseif ((z - t) <= -1e-114) tmp = x * (60.0 / (z - t)); elseif ((z - t) <= -2e-257) tmp = t_1; elseif ((z - t) <= 2e-86) tmp = -60.0 * ((x - y) / t); elseif ((z - t) <= 5e+38) 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] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(z - t), $MachinePrecision], -1e+113], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(z - t), $MachinePrecision], -1e-114], N[(x * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z - t), $MachinePrecision], -2e-257], t$95$1, If[LessEqual[N[(z - t), $MachinePrecision], 2e-86], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z - t), $MachinePrecision], 5e+38], t$95$1, N[(a * 120.0), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 60 \cdot \frac{x - y}{z}\\
\mathbf{if}\;z - t \leq -1 \cdot 10^{+113}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;z - t \leq -1 \cdot 10^{-114}:\\
\;\;\;\;x \cdot \frac{60}{z - t}\\
\mathbf{elif}\;z - t \leq -2 \cdot 10^{-257}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z - t \leq 2 \cdot 10^{-86}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\
\mathbf{elif}\;z - t \leq 5 \cdot 10^{+38}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (-.f64 z t) < -1e113 or 4.9999999999999997e38 < (-.f64 z t) Initial program 98.6%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 68.7%
if -1e113 < (-.f64 z t) < -1.0000000000000001e-114Initial program 99.5%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 75.9%
Taylor expanded in x around inf 58.1%
associate-*r/81.8%
*-commutative81.8%
associate-*r/82.0%
Simplified58.2%
if -1.0000000000000001e-114 < (-.f64 z t) < -2e-257 or 2.00000000000000017e-86 < (-.f64 z t) < 4.9999999999999997e38Initial program 99.8%
associate-/l*99.5%
Simplified99.5%
Taylor expanded in a around 0 90.3%
Taylor expanded in z around inf 72.7%
if -2e-257 < (-.f64 z t) < 2.00000000000000017e-86Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in a around 0 91.3%
Taylor expanded in z around 0 70.5%
Final simplification67.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* (- x y) 60.0) (- z t))))
(if (or (<= t_1 -2000000.0) (not (<= t_1 1e-19)))
(/ 60.0 (/ (- z t) (- x y)))
(* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double t_1 = ((x - y) * 60.0) / (z - t);
double tmp;
if ((t_1 <= -2000000.0) || !(t_1 <= 1e-19)) {
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) :: t_1
real(8) :: tmp
t_1 = ((x - y) * 60.0d0) / (z - t)
if ((t_1 <= (-2000000.0d0)) .or. (.not. (t_1 <= 1d-19))) 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 t_1 = ((x - y) * 60.0) / (z - t);
double tmp;
if ((t_1 <= -2000000.0) || !(t_1 <= 1e-19)) {
tmp = 60.0 / ((z - t) / (x - y));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = ((x - y) * 60.0) / (z - t) tmp = 0 if (t_1 <= -2000000.0) or not (t_1 <= 1e-19): tmp = 60.0 / ((z - t) / (x - y)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(Float64(x - y) * 60.0) / Float64(z - t)) tmp = 0.0 if ((t_1 <= -2000000.0) || !(t_1 <= 1e-19)) 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) t_1 = ((x - y) * 60.0) / (z - t); tmp = 0.0; if ((t_1 <= -2000000.0) || ~((t_1 <= 1e-19))) tmp = 60.0 / ((z - t) / (x - y)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(x - y), $MachinePrecision] * 60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -2000000.0], N[Not[LessEqual[t$95$1, 1e-19]], $MachinePrecision]], 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}
t_1 := \frac{\left(x - y\right) \cdot 60}{z - t}\\
\mathbf{if}\;t\_1 \leq -2000000 \lor \neg \left(t\_1 \leq 10^{-19}\right):\\
\;\;\;\;\frac{60}{\frac{z - t}{x - y}}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -2e6 or 9.9999999999999998e-20 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 98.1%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 82.2%
clear-num82.1%
un-div-inv82.2%
Applied egg-rr82.2%
if -2e6 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 9.9999999999999998e-20Initial program 99.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 78.8%
Final simplification80.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* 60.0 (/ (- x y) z))))
(if (<= a -2.1e-29)
(* a 120.0)
(if (<= a -3.3e-61)
t_1
(if (<= a -1.7e-120)
(* a 120.0)
(if (<= a 1.36e-123)
(* -60.0 (/ (- x y) t))
(if (<= a 7.2e-28) t_1 (* a 120.0))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * ((x - y) / z);
double tmp;
if (a <= -2.1e-29) {
tmp = a * 120.0;
} else if (a <= -3.3e-61) {
tmp = t_1;
} else if (a <= -1.7e-120) {
tmp = a * 120.0;
} else if (a <= 1.36e-123) {
tmp = -60.0 * ((x - y) / t);
} else if (a <= 7.2e-28) {
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) / z)
if (a <= (-2.1d-29)) then
tmp = a * 120.0d0
else if (a <= (-3.3d-61)) then
tmp = t_1
else if (a <= (-1.7d-120)) then
tmp = a * 120.0d0
else if (a <= 1.36d-123) then
tmp = (-60.0d0) * ((x - y) / t)
else if (a <= 7.2d-28) 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) / z);
double tmp;
if (a <= -2.1e-29) {
tmp = a * 120.0;
} else if (a <= -3.3e-61) {
tmp = t_1;
} else if (a <= -1.7e-120) {
tmp = a * 120.0;
} else if (a <= 1.36e-123) {
tmp = -60.0 * ((x - y) / t);
} else if (a <= 7.2e-28) {
tmp = t_1;
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = 60.0 * ((x - y) / z) tmp = 0 if a <= -2.1e-29: tmp = a * 120.0 elif a <= -3.3e-61: tmp = t_1 elif a <= -1.7e-120: tmp = a * 120.0 elif a <= 1.36e-123: tmp = -60.0 * ((x - y) / t) elif a <= 7.2e-28: 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) / z)) tmp = 0.0 if (a <= -2.1e-29) tmp = Float64(a * 120.0); elseif (a <= -3.3e-61) tmp = t_1; elseif (a <= -1.7e-120) tmp = Float64(a * 120.0); elseif (a <= 1.36e-123) tmp = Float64(-60.0 * Float64(Float64(x - y) / t)); elseif (a <= 7.2e-28) 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) / z); tmp = 0.0; if (a <= -2.1e-29) tmp = a * 120.0; elseif (a <= -3.3e-61) tmp = t_1; elseif (a <= -1.7e-120) tmp = a * 120.0; elseif (a <= 1.36e-123) tmp = -60.0 * ((x - y) / t); elseif (a <= 7.2e-28) 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] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.1e-29], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -3.3e-61], t$95$1, If[LessEqual[a, -1.7e-120], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 1.36e-123], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 7.2e-28], t$95$1, N[(a * 120.0), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 60 \cdot \frac{x - y}{z}\\
\mathbf{if}\;a \leq -2.1 \cdot 10^{-29}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -3.3 \cdot 10^{-61}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -1.7 \cdot 10^{-120}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq 1.36 \cdot 10^{-123}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\
\mathbf{elif}\;a \leq 7.2 \cdot 10^{-28}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -2.09999999999999989e-29 or -3.29999999999999996e-61 < a < -1.70000000000000005e-120 or 7.1999999999999997e-28 < a Initial program 98.5%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 76.3%
if -2.09999999999999989e-29 < a < -3.29999999999999996e-61 or 1.36e-123 < a < 7.1999999999999997e-28Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 78.3%
Taylor expanded in z around inf 61.9%
if -1.70000000000000005e-120 < a < 1.36e-123Initial program 99.6%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 87.5%
Taylor expanded in z around 0 53.8%
Final simplification67.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ 60.0 (- z t))))
(if (or (<= (* a 120.0) -2e-159) (not (<= (* a 120.0) 1e-78)))
(+ (* x t_1) (* a 120.0))
(* (- x y) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 / (z - t);
double tmp;
if (((a * 120.0) <= -2e-159) || !((a * 120.0) <= 1e-78)) {
tmp = (x * t_1) + (a * 120.0);
} else {
tmp = (x - y) * 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)
if (((a * 120.0d0) <= (-2d-159)) .or. (.not. ((a * 120.0d0) <= 1d-78))) then
tmp = (x * t_1) + (a * 120.0d0)
else
tmp = (x - y) * 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);
double tmp;
if (((a * 120.0) <= -2e-159) || !((a * 120.0) <= 1e-78)) {
tmp = (x * t_1) + (a * 120.0);
} else {
tmp = (x - y) * t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = 60.0 / (z - t) tmp = 0 if ((a * 120.0) <= -2e-159) or not ((a * 120.0) <= 1e-78): tmp = (x * t_1) + (a * 120.0) else: tmp = (x - y) * t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(60.0 / Float64(z - t)) tmp = 0.0 if ((Float64(a * 120.0) <= -2e-159) || !(Float64(a * 120.0) <= 1e-78)) tmp = Float64(Float64(x * t_1) + Float64(a * 120.0)); else tmp = Float64(Float64(x - y) * t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = 60.0 / (z - t); tmp = 0.0; if (((a * 120.0) <= -2e-159) || ~(((a * 120.0) <= 1e-78))) tmp = (x * t_1) + (a * 120.0); else tmp = (x - y) * t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[N[(a * 120.0), $MachinePrecision], -2e-159], N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 1e-78]], $MachinePrecision]], N[(N[(x * t$95$1), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(N[(x - y), $MachinePrecision] * t$95$1), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{60}{z - t}\\
\mathbf{if}\;a \cdot 120 \leq -2 \cdot 10^{-159} \lor \neg \left(a \cdot 120 \leq 10^{-78}\right):\\
\;\;\;\;x \cdot t\_1 + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\left(x - y\right) \cdot t\_1\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -1.99999999999999998e-159 or 9.99999999999999999e-79 < (*.f64 a #s(literal 120 binary64)) Initial program 98.7%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 86.9%
associate-*r/86.4%
*-commutative86.4%
associate-*r/86.9%
Simplified86.9%
if -1.99999999999999998e-159 < (*.f64 a #s(literal 120 binary64)) < 9.99999999999999999e-79Initial program 99.6%
*-commutative99.6%
associate-/l*99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 89.6%
associate-*r/89.6%
Simplified89.6%
*-commutative99.6%
associate-/l*99.7%
Applied egg-rr89.7%
Final simplification87.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= (* a 120.0) -1e-10) (not (<= (* a 120.0) 5e+15))) (* a 120.0) (* (- x y) (/ 60.0 (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((a * 120.0) <= -1e-10) || !((a * 120.0) <= 5e+15)) {
tmp = a * 120.0;
} else {
tmp = (x - y) * (60.0 / (z - t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (((a * 120.0d0) <= (-1d-10)) .or. (.not. ((a * 120.0d0) <= 5d+15))) then
tmp = a * 120.0d0
else
tmp = (x - y) * (60.0d0 / (z - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (((a * 120.0) <= -1e-10) || !((a * 120.0) <= 5e+15)) {
tmp = a * 120.0;
} else {
tmp = (x - y) * (60.0 / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if ((a * 120.0) <= -1e-10) or not ((a * 120.0) <= 5e+15): tmp = a * 120.0 else: tmp = (x - y) * (60.0 / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((Float64(a * 120.0) <= -1e-10) || !(Float64(a * 120.0) <= 5e+15)) tmp = Float64(a * 120.0); else tmp = Float64(Float64(x - y) * Float64(60.0 / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (((a * 120.0) <= -1e-10) || ~(((a * 120.0) <= 5e+15))) tmp = a * 120.0; else tmp = (x - y) * (60.0 / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[N[(a * 120.0), $MachinePrecision], -1e-10], N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 5e+15]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -1 \cdot 10^{-10} \lor \neg \left(a \cdot 120 \leq 5 \cdot 10^{+15}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{60}{z - t}\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -1.00000000000000004e-10 or 5e15 < (*.f64 a #s(literal 120 binary64)) Initial program 98.3%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 79.8%
if -1.00000000000000004e-10 < (*.f64 a #s(literal 120 binary64)) < 5e15Initial program 99.7%
*-commutative99.7%
associate-/l*99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 80.7%
associate-*r/80.7%
Simplified80.7%
*-commutative99.7%
associate-/l*99.7%
Applied egg-rr80.7%
Final simplification80.3%
(FPCore (x y z t a)
:precision binary64
(if (<= y -1.06e+35)
(+ (/ (* y -60.0) (- z t)) (* a 120.0))
(if (<= y 1.1e-7)
(+ (/ (* x 60.0) (- z t)) (* a 120.0))
(* y (+ (* 120.0 (/ a y)) (/ 60.0 (- t z)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.06e+35) {
tmp = ((y * -60.0) / (z - t)) + (a * 120.0);
} else if (y <= 1.1e-7) {
tmp = ((x * 60.0) / (z - t)) + (a * 120.0);
} else {
tmp = y * ((120.0 * (a / y)) + (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 <= (-1.06d+35)) then
tmp = ((y * (-60.0d0)) / (z - t)) + (a * 120.0d0)
else if (y <= 1.1d-7) then
tmp = ((x * 60.0d0) / (z - t)) + (a * 120.0d0)
else
tmp = y * ((120.0d0 * (a / y)) + (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 <= -1.06e+35) {
tmp = ((y * -60.0) / (z - t)) + (a * 120.0);
} else if (y <= 1.1e-7) {
tmp = ((x * 60.0) / (z - t)) + (a * 120.0);
} else {
tmp = y * ((120.0 * (a / y)) + (60.0 / (t - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -1.06e+35: tmp = ((y * -60.0) / (z - t)) + (a * 120.0) elif y <= 1.1e-7: tmp = ((x * 60.0) / (z - t)) + (a * 120.0) else: tmp = y * ((120.0 * (a / y)) + (60.0 / (t - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -1.06e+35) tmp = Float64(Float64(Float64(y * -60.0) / Float64(z - t)) + Float64(a * 120.0)); elseif (y <= 1.1e-7) tmp = Float64(Float64(Float64(x * 60.0) / Float64(z - t)) + Float64(a * 120.0)); else tmp = Float64(y * Float64(Float64(120.0 * Float64(a / y)) + Float64(60.0 / Float64(t - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -1.06e+35) tmp = ((y * -60.0) / (z - t)) + (a * 120.0); elseif (y <= 1.1e-7) tmp = ((x * 60.0) / (z - t)) + (a * 120.0); else tmp = y * ((120.0 * (a / y)) + (60.0 / (t - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -1.06e+35], N[(N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.1e-7], N[(N[(N[(x * 60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(120.0 * N[(a / y), $MachinePrecision]), $MachinePrecision] + N[(60.0 / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.06 \cdot 10^{+35}:\\
\;\;\;\;\frac{y \cdot -60}{z - t} + a \cdot 120\\
\mathbf{elif}\;y \leq 1.1 \cdot 10^{-7}:\\
\;\;\;\;\frac{x \cdot 60}{z - t} + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(120 \cdot \frac{a}{y} + \frac{60}{t - z}\right)\\
\end{array}
\end{array}
if y < -1.0600000000000001e35Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around 0 90.2%
associate-*r/90.3%
Simplified90.3%
if -1.0600000000000001e35 < y < 1.1000000000000001e-7Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 94.6%
associate-*r/94.6%
Simplified94.6%
if 1.1000000000000001e-7 < y Initial program 96.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in y around inf 96.8%
Taylor expanded in x around 0 89.5%
associate-*r/89.6%
metadata-eval89.6%
Simplified89.6%
Final simplification92.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -2.05e+35) (not (<= y 1.2e-7))) (+ (/ (* y -60.0) (- z t)) (* a 120.0)) (+ (/ (* x 60.0) (- z t)) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -2.05e+35) || !(y <= 1.2e-7)) {
tmp = ((y * -60.0) / (z - t)) + (a * 120.0);
} else {
tmp = ((x * 60.0) / (z - t)) + (a * 120.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((y <= (-2.05d+35)) .or. (.not. (y <= 1.2d-7))) then
tmp = ((y * (-60.0d0)) / (z - t)) + (a * 120.0d0)
else
tmp = ((x * 60.0d0) / (z - t)) + (a * 120.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -2.05e+35) || !(y <= 1.2e-7)) {
tmp = ((y * -60.0) / (z - t)) + (a * 120.0);
} else {
tmp = ((x * 60.0) / (z - t)) + (a * 120.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -2.05e+35) or not (y <= 1.2e-7): tmp = ((y * -60.0) / (z - t)) + (a * 120.0) else: tmp = ((x * 60.0) / (z - t)) + (a * 120.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -2.05e+35) || !(y <= 1.2e-7)) tmp = Float64(Float64(Float64(y * -60.0) / Float64(z - t)) + Float64(a * 120.0)); else tmp = Float64(Float64(Float64(x * 60.0) / Float64(z - t)) + Float64(a * 120.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -2.05e+35) || ~((y <= 1.2e-7))) tmp = ((y * -60.0) / (z - t)) + (a * 120.0); else tmp = ((x * 60.0) / (z - t)) + (a * 120.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -2.05e+35], N[Not[LessEqual[y, 1.2e-7]], $MachinePrecision]], N[(N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * 60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.05 \cdot 10^{+35} \lor \neg \left(y \leq 1.2 \cdot 10^{-7}\right):\\
\;\;\;\;\frac{y \cdot -60}{z - t} + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot 60}{z - t} + a \cdot 120\\
\end{array}
\end{array}
if y < -2.0499999999999999e35 or 1.19999999999999989e-7 < y Initial program 98.2%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 90.0%
associate-*r/89.2%
Simplified89.2%
if -2.0499999999999999e35 < y < 1.19999999999999989e-7Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 94.6%
associate-*r/94.6%
Simplified94.6%
Final simplification92.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -3.9e+35) (not (<= y 1.3e-7))) (+ (/ (* y -60.0) (- z t)) (* a 120.0)) (+ (* x (/ 60.0 (- z t))) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -3.9e+35) || !(y <= 1.3e-7)) {
tmp = ((y * -60.0) / (z - t)) + (a * 120.0);
} else {
tmp = (x * (60.0 / (z - t))) + (a * 120.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((y <= (-3.9d+35)) .or. (.not. (y <= 1.3d-7))) then
tmp = ((y * (-60.0d0)) / (z - t)) + (a * 120.0d0)
else
tmp = (x * (60.0d0 / (z - t))) + (a * 120.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -3.9e+35) || !(y <= 1.3e-7)) {
tmp = ((y * -60.0) / (z - t)) + (a * 120.0);
} else {
tmp = (x * (60.0 / (z - t))) + (a * 120.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -3.9e+35) or not (y <= 1.3e-7): tmp = ((y * -60.0) / (z - t)) + (a * 120.0) else: tmp = (x * (60.0 / (z - t))) + (a * 120.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -3.9e+35) || !(y <= 1.3e-7)) tmp = Float64(Float64(Float64(y * -60.0) / Float64(z - t)) + Float64(a * 120.0)); else tmp = Float64(Float64(x * Float64(60.0 / Float64(z - t))) + Float64(a * 120.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -3.9e+35) || ~((y <= 1.3e-7))) tmp = ((y * -60.0) / (z - t)) + (a * 120.0); else tmp = (x * (60.0 / (z - t))) + (a * 120.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -3.9e+35], N[Not[LessEqual[y, 1.3e-7]], $MachinePrecision]], N[(N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.9 \cdot 10^{+35} \lor \neg \left(y \leq 1.3 \cdot 10^{-7}\right):\\
\;\;\;\;\frac{y \cdot -60}{z - t} + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{60}{z - t} + a \cdot 120\\
\end{array}
\end{array}
if y < -3.8999999999999999e35 or 1.29999999999999999e-7 < y Initial program 98.2%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 90.0%
associate-*r/89.2%
Simplified89.2%
if -3.8999999999999999e35 < y < 1.29999999999999999e-7Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 94.6%
associate-*r/94.6%
*-commutative94.6%
associate-*r/94.6%
Simplified94.6%
Final simplification91.9%
(FPCore (x y z t a)
:precision binary64
(if (<= a -6.5e-136)
(* a 120.0)
(if (<= a -6.6e-217)
(* -60.0 (/ x t))
(if (<= a 7.4e-153) (* y (/ 60.0 t)) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -6.5e-136) {
tmp = a * 120.0;
} else if (a <= -6.6e-217) {
tmp = -60.0 * (x / t);
} else if (a <= 7.4e-153) {
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 (a <= (-6.5d-136)) then
tmp = a * 120.0d0
else if (a <= (-6.6d-217)) then
tmp = (-60.0d0) * (x / t)
else if (a <= 7.4d-153) 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 (a <= -6.5e-136) {
tmp = a * 120.0;
} else if (a <= -6.6e-217) {
tmp = -60.0 * (x / t);
} else if (a <= 7.4e-153) {
tmp = y * (60.0 / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -6.5e-136: tmp = a * 120.0 elif a <= -6.6e-217: tmp = -60.0 * (x / t) elif a <= 7.4e-153: tmp = y * (60.0 / t) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -6.5e-136) tmp = Float64(a * 120.0); elseif (a <= -6.6e-217) tmp = Float64(-60.0 * Float64(x / t)); elseif (a <= 7.4e-153) 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 (a <= -6.5e-136) tmp = a * 120.0; elseif (a <= -6.6e-217) tmp = -60.0 * (x / t); elseif (a <= 7.4e-153) tmp = y * (60.0 / t); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -6.5e-136], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -6.6e-217], N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 7.4e-153], N[(y * N[(60.0 / t), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -6.5 \cdot 10^{-136}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -6.6 \cdot 10^{-217}:\\
\;\;\;\;-60 \cdot \frac{x}{t}\\
\mathbf{elif}\;a \leq 7.4 \cdot 10^{-153}:\\
\;\;\;\;y \cdot \frac{60}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -6.50000000000000011e-136 or 7.4000000000000005e-153 < a Initial program 98.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 66.4%
if -6.50000000000000011e-136 < a < -6.59999999999999986e-217Initial program 99.6%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 81.5%
Taylor expanded in z around 0 52.4%
Taylor expanded in x around inf 42.6%
if -6.59999999999999986e-217 < a < 7.4000000000000005e-153Initial program 99.6%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 92.9%
Taylor expanded in z around 0 53.8%
Taylor expanded in x around 0 38.0%
associate-*r/38.1%
*-commutative38.1%
associate-*r/38.1%
Simplified38.1%
Final simplification58.3%
(FPCore (x y z t a)
:precision binary64
(if (<= a -2.8e-128)
(* a 120.0)
(if (<= a -1.45e-216)
(* -60.0 (/ x t))
(if (<= a 3.1e-152) (* 60.0 (/ y t)) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.8e-128) {
tmp = a * 120.0;
} else if (a <= -1.45e-216) {
tmp = -60.0 * (x / t);
} else if (a <= 3.1e-152) {
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 (a <= (-2.8d-128)) then
tmp = a * 120.0d0
else if (a <= (-1.45d-216)) then
tmp = (-60.0d0) * (x / t)
else if (a <= 3.1d-152) 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 (a <= -2.8e-128) {
tmp = a * 120.0;
} else if (a <= -1.45e-216) {
tmp = -60.0 * (x / t);
} else if (a <= 3.1e-152) {
tmp = 60.0 * (y / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -2.8e-128: tmp = a * 120.0 elif a <= -1.45e-216: tmp = -60.0 * (x / t) elif a <= 3.1e-152: tmp = 60.0 * (y / t) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2.8e-128) tmp = Float64(a * 120.0); elseif (a <= -1.45e-216) tmp = Float64(-60.0 * Float64(x / t)); elseif (a <= 3.1e-152) tmp = Float64(60.0 * Float64(y / t)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -2.8e-128) tmp = a * 120.0; elseif (a <= -1.45e-216) tmp = -60.0 * (x / t); elseif (a <= 3.1e-152) tmp = 60.0 * (y / t); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.8e-128], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -1.45e-216], N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.1e-152], N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.8 \cdot 10^{-128}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -1.45 \cdot 10^{-216}:\\
\;\;\;\;-60 \cdot \frac{x}{t}\\
\mathbf{elif}\;a \leq 3.1 \cdot 10^{-152}:\\
\;\;\;\;60 \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -2.7999999999999998e-128 or 3.0999999999999998e-152 < a Initial program 98.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 66.4%
if -2.7999999999999998e-128 < a < -1.45e-216Initial program 99.6%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 81.5%
Taylor expanded in z around 0 52.4%
Taylor expanded in x around inf 42.6%
if -1.45e-216 < a < 3.0999999999999998e-152Initial program 99.6%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 92.9%
Taylor expanded in z around 0 53.8%
Taylor expanded in x around 0 38.0%
Final simplification58.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -4.1e-16) (not (<= a 4.4e+14))) (* 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 <= -4.1e-16) || !(a <= 4.4e+14)) {
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 <= (-4.1d-16)) .or. (.not. (a <= 4.4d+14))) 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 <= -4.1e-16) || !(a <= 4.4e+14)) {
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 <= -4.1e-16) or not (a <= 4.4e+14): 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 <= -4.1e-16) || !(a <= 4.4e+14)) 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 <= -4.1e-16) || ~((a <= 4.4e+14))) 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, -4.1e-16], N[Not[LessEqual[a, 4.4e+14]], $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 -4.1 \cdot 10^{-16} \lor \neg \left(a \leq 4.4 \cdot 10^{+14}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\end{array}
\end{array}
if a < -4.10000000000000006e-16 or 4.4e14 < a Initial program 98.3%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 79.8%
if -4.10000000000000006e-16 < a < 4.4e14Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 80.7%
Final simplification80.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.8e-120) (not (<= a 4.6e-109))) (* a 120.0) (* -60.0 (/ (- x y) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.8e-120) || !(a <= 4.6e-109)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * ((x - y) / t);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-1.8d-120)) .or. (.not. (a <= 4.6d-109))) then
tmp = a * 120.0d0
else
tmp = (-60.0d0) * ((x - y) / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.8e-120) || !(a <= 4.6e-109)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * ((x - y) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.8e-120) or not (a <= 4.6e-109): tmp = a * 120.0 else: tmp = -60.0 * ((x - y) / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.8e-120) || !(a <= 4.6e-109)) tmp = Float64(a * 120.0); else tmp = Float64(-60.0 * Float64(Float64(x - y) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1.8e-120) || ~((a <= 4.6e-109))) tmp = a * 120.0; else tmp = -60.0 * ((x - y) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.8e-120], N[Not[LessEqual[a, 4.6e-109]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.8 \cdot 10^{-120} \lor \neg \left(a \leq 4.6 \cdot 10^{-109}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\
\end{array}
\end{array}
if a < -1.8000000000000001e-120 or 4.6000000000000003e-109 < a Initial program 98.7%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 69.1%
if -1.8000000000000001e-120 < a < 4.6000000000000003e-109Initial program 99.6%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 87.0%
Taylor expanded in z around 0 53.7%
Final simplification63.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -3.6e-131) (not (<= a 1.15e-123))) (* a 120.0) (* -60.0 (/ x t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -3.6e-131) || !(a <= 1.15e-123)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (x / t);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-3.6d-131)) .or. (.not. (a <= 1.15d-123))) then
tmp = a * 120.0d0
else
tmp = (-60.0d0) * (x / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -3.6e-131) || !(a <= 1.15e-123)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (x / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -3.6e-131) or not (a <= 1.15e-123): tmp = a * 120.0 else: tmp = -60.0 * (x / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -3.6e-131) || !(a <= 1.15e-123)) tmp = Float64(a * 120.0); else tmp = Float64(-60.0 * Float64(x / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -3.6e-131) || ~((a <= 1.15e-123))) tmp = a * 120.0; else tmp = -60.0 * (x / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -3.6e-131], N[Not[LessEqual[a, 1.15e-123]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.6 \cdot 10^{-131} \lor \neg \left(a \leq 1.15 \cdot 10^{-123}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{x}{t}\\
\end{array}
\end{array}
if a < -3.5999999999999999e-131 or 1.14999999999999993e-123 < a Initial program 98.7%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 68.1%
if -3.5999999999999999e-131 < a < 1.14999999999999993e-123Initial program 99.6%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 87.5%
Taylor expanded in z around 0 53.8%
Taylor expanded in x around inf 28.0%
Final simplification54.6%
(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(60.0 * Float64(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[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
60 \cdot \frac{x - y}{z - t} + a \cdot 120
\end{array}
Initial program 99.0%
associate-/l*99.8%
Simplified99.8%
(FPCore (x y z t a) :precision binary64 (* a 120.0))
double code(double x, double y, double z, double t, double a) {
return a * 120.0;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = a * 120.0d0
end function
public static double code(double x, double y, double z, double t, double a) {
return a * 120.0;
}
def code(x, y, z, t, a): return a * 120.0
function code(x, y, z, t, a) return Float64(a * 120.0) end
function tmp = code(x, y, z, t, a) tmp = a * 120.0; end
code[x_, y_, z_, t_, a_] := N[(a * 120.0), $MachinePrecision]
\begin{array}{l}
\\
a \cdot 120
\end{array}
Initial program 99.0%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 50.3%
Final simplification50.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(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 2024092
(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)))