
(FPCore (x y z t a) :precision binary64 (+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((60.0d0 * (x - y)) / (z - t)) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
def code(x, y, z, t, a): return ((60.0 * (x - y)) / (z - t)) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = ((60.0 * (x - y)) / (z - t)) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 18 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((60.0d0 * (x - y)) / (z - t)) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
def code(x, y, z, t, a): return ((60.0 * (x - y)) / (z - t)) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = ((60.0 * (x - y)) / (z - t)) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120
\end{array}
(FPCore (x y z t a) :precision binary64 (fma (/ 60.0 (- z t)) (- x y) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return fma((60.0 / (z - t)), (x - y), (a * 120.0));
}
function code(x, y, z, t, a) return fma(Float64(60.0 / Float64(z - t)), Float64(x - y), Float64(a * 120.0)) end
code[x_, y_, z_, t_, a_] := N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(\frac{60}{z - t}, x - y, a \cdot 120\right)
\end{array}
Initial program 99.8%
lift--.f64N/A
lift-*.f64N/A
remove-double-negN/A
lift--.f64N/A
remove-double-negN/A
div-invN/A
lift-*.f64N/A
div-invN/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6499.9
Applied egg-rr99.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* 60.0 (- x y)) (- z t))))
(if (<= t_1 -1e+107)
(* -60.0 (/ y (- z t)))
(if (<= t_1 2e+84)
(* a 120.0)
(if (<= t_1 5e+188) (/ (* (- x y) -60.0) t) (* (- x y) (/ 60.0 z)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_1 <= -1e+107) {
tmp = -60.0 * (y / (z - t));
} else if (t_1 <= 2e+84) {
tmp = a * 120.0;
} else if (t_1 <= 5e+188) {
tmp = ((x - y) * -60.0) / t;
} else {
tmp = (x - y) * (60.0 / z);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (60.0d0 * (x - y)) / (z - t)
if (t_1 <= (-1d+107)) then
tmp = (-60.0d0) * (y / (z - t))
else if (t_1 <= 2d+84) then
tmp = a * 120.0d0
else if (t_1 <= 5d+188) then
tmp = ((x - y) * (-60.0d0)) / t
else
tmp = (x - y) * (60.0d0 / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_1 <= -1e+107) {
tmp = -60.0 * (y / (z - t));
} else if (t_1 <= 2e+84) {
tmp = a * 120.0;
} else if (t_1 <= 5e+188) {
tmp = ((x - y) * -60.0) / t;
} else {
tmp = (x - y) * (60.0 / z);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (60.0 * (x - y)) / (z - t) tmp = 0 if t_1 <= -1e+107: tmp = -60.0 * (y / (z - t)) elif t_1 <= 2e+84: tmp = a * 120.0 elif t_1 <= 5e+188: tmp = ((x - y) * -60.0) / t else: tmp = (x - y) * (60.0 / z) 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 <= -1e+107) tmp = Float64(-60.0 * Float64(y / Float64(z - t))); elseif (t_1 <= 2e+84) tmp = Float64(a * 120.0); elseif (t_1 <= 5e+188) tmp = Float64(Float64(Float64(x - y) * -60.0) / t); else tmp = Float64(Float64(x - y) * Float64(60.0 / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (60.0 * (x - y)) / (z - t); tmp = 0.0; if (t_1 <= -1e+107) tmp = -60.0 * (y / (z - t)); elseif (t_1 <= 2e+84) tmp = a * 120.0; elseif (t_1 <= 5e+188) tmp = ((x - y) * -60.0) / t; else tmp = (x - y) * (60.0 / z); 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, -1e+107], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+84], N[(a * 120.0), $MachinePrecision], If[LessEqual[t$95$1, 5e+188], N[(N[(N[(x - y), $MachinePrecision] * -60.0), $MachinePrecision] / t), $MachinePrecision], N[(N[(x - y), $MachinePrecision] * N[(60.0 / z), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+107}:\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+84}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+188}:\\
\;\;\;\;\frac{\left(x - y\right) \cdot -60}{t}\\
\mathbf{else}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{60}{z}\\
\end{array}
\end{array}
if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -9.9999999999999997e106Initial program 99.7%
Taylor expanded in y around inf
lower-*.f64N/A
lower-/.f64N/A
lower--.f6455.7
Simplified55.7%
if -9.9999999999999997e106 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 2.00000000000000012e84Initial program 99.9%
Taylor expanded in z around inf
lower-*.f6478.9
Simplified78.9%
if 2.00000000000000012e84 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 5.0000000000000001e188Initial program 99.5%
Taylor expanded in a around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6482.9
Simplified82.9%
Taylor expanded in z around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f6463.8
Simplified63.8%
if 5.0000000000000001e188 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 99.9%
lift--.f64N/A
lift-*.f64N/A
remove-double-negN/A
lift--.f64N/A
remove-double-negN/A
div-invN/A
lift-*.f64N/A
div-invN/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6499.9
Applied egg-rr99.9%
Taylor expanded in z around inf
lower-/.f6487.2
Simplified87.2%
Taylor expanded in z around 0
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
metadata-evalN/A
associate-*r/N/A
lower-*.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6482.8
Simplified82.8%
Final simplification74.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* -60.0 (/ y (- z t)))) (t_2 (/ (* 60.0 (- x y)) (- z t))))
(if (<= t_2 -1e+107)
t_1
(if (<= t_2 2e+92)
(* a 120.0)
(if (<= t_2 5e+222) t_1 (* (- x y) (/ 60.0 z)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -60.0 * (y / (z - t));
double t_2 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_2 <= -1e+107) {
tmp = t_1;
} else if (t_2 <= 2e+92) {
tmp = a * 120.0;
} else if (t_2 <= 5e+222) {
tmp = t_1;
} else {
tmp = (x - y) * (60.0 / z);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (-60.0d0) * (y / (z - t))
t_2 = (60.0d0 * (x - y)) / (z - t)
if (t_2 <= (-1d+107)) then
tmp = t_1
else if (t_2 <= 2d+92) then
tmp = a * 120.0d0
else if (t_2 <= 5d+222) then
tmp = t_1
else
tmp = (x - y) * (60.0d0 / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = -60.0 * (y / (z - t));
double t_2 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_2 <= -1e+107) {
tmp = t_1;
} else if (t_2 <= 2e+92) {
tmp = a * 120.0;
} else if (t_2 <= 5e+222) {
tmp = t_1;
} else {
tmp = (x - y) * (60.0 / z);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -60.0 * (y / (z - t)) t_2 = (60.0 * (x - y)) / (z - t) tmp = 0 if t_2 <= -1e+107: tmp = t_1 elif t_2 <= 2e+92: tmp = a * 120.0 elif t_2 <= 5e+222: tmp = t_1 else: tmp = (x - y) * (60.0 / z) return tmp
function code(x, y, z, t, a) t_1 = Float64(-60.0 * Float64(y / Float64(z - t))) t_2 = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) tmp = 0.0 if (t_2 <= -1e+107) tmp = t_1; elseif (t_2 <= 2e+92) tmp = Float64(a * 120.0); elseif (t_2 <= 5e+222) tmp = t_1; else tmp = Float64(Float64(x - y) * Float64(60.0 / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = -60.0 * (y / (z - t)); t_2 = (60.0 * (x - y)) / (z - t); tmp = 0.0; if (t_2 <= -1e+107) tmp = t_1; elseif (t_2 <= 2e+92) tmp = a * 120.0; elseif (t_2 <= 5e+222) tmp = t_1; else tmp = (x - y) * (60.0 / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+107], t$95$1, If[LessEqual[t$95$2, 2e+92], N[(a * 120.0), $MachinePrecision], If[LessEqual[t$95$2, 5e+222], t$95$1, N[(N[(x - y), $MachinePrecision] * N[(60.0 / z), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -60 \cdot \frac{y}{z - t}\\
t_2 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{+107}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+92}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+222}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{60}{z}\\
\end{array}
\end{array}
if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -9.9999999999999997e106 or 2.0000000000000001e92 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 5.00000000000000023e222Initial program 99.6%
Taylor expanded in y around inf
lower-*.f64N/A
lower-/.f64N/A
lower--.f6456.4
Simplified56.4%
if -9.9999999999999997e106 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 2.0000000000000001e92Initial program 99.9%
Taylor expanded in z around inf
lower-*.f6478.1
Simplified78.1%
if 5.00000000000000023e222 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 100.0%
lift--.f64N/A
lift-*.f64N/A
remove-double-negN/A
lift--.f64N/A
remove-double-negN/A
div-invN/A
lift-*.f64N/A
div-invN/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6499.9
Applied egg-rr99.9%
Taylor expanded in z around inf
lower-/.f6489.4
Simplified89.4%
Taylor expanded in z around 0
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
metadata-evalN/A
associate-*r/N/A
lower-*.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6489.4
Simplified89.4%
Final simplification74.1%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* (/ 60.0 (- z t)) (- x y))) (t_2 (/ (* 60.0 (- x y)) (- z t)))) (if (<= t_2 -1e+107) t_1 (if (<= t_2 1e+67) (* a 120.0) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (60.0 / (z - t)) * (x - y);
double t_2 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_2 <= -1e+107) {
tmp = t_1;
} else if (t_2 <= 1e+67) {
tmp = a * 120.0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (60.0d0 / (z - t)) * (x - y)
t_2 = (60.0d0 * (x - y)) / (z - t)
if (t_2 <= (-1d+107)) then
tmp = t_1
else if (t_2 <= 1d+67) then
tmp = a * 120.0d0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (60.0 / (z - t)) * (x - y);
double t_2 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_2 <= -1e+107) {
tmp = t_1;
} else if (t_2 <= 1e+67) {
tmp = a * 120.0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (60.0 / (z - t)) * (x - y) t_2 = (60.0 * (x - y)) / (z - t) tmp = 0 if t_2 <= -1e+107: tmp = t_1 elif t_2 <= 1e+67: tmp = a * 120.0 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(60.0 / Float64(z - t)) * Float64(x - y)) t_2 = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) tmp = 0.0 if (t_2 <= -1e+107) tmp = t_1; elseif (t_2 <= 1e+67) tmp = Float64(a * 120.0); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (60.0 / (z - t)) * (x - y); t_2 = (60.0 * (x - y)) / (z - t); tmp = 0.0; if (t_2 <= -1e+107) tmp = t_1; elseif (t_2 <= 1e+67) tmp = 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[(z - t), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+107], t$95$1, If[LessEqual[t$95$2, 1e+67], N[(a * 120.0), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{60}{z - t} \cdot \left(x - y\right)\\
t_2 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{+107}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 10^{+67}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -9.9999999999999997e106 or 9.99999999999999983e66 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 99.7%
Taylor expanded in a around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6489.6
Simplified89.6%
lift--.f64N/A
lift--.f64N/A
associate-*l/N/A
lift-/.f64N/A
lower-*.f6489.8
Applied egg-rr89.8%
if -9.9999999999999997e106 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 9.99999999999999983e66Initial program 99.9%
Taylor expanded in z around inf
lower-*.f6479.6
Simplified79.6%
Final simplification82.8%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* -60.0 (/ y (- z t)))) (t_2 (/ (* 60.0 (- x y)) (- z t)))) (if (<= t_2 -1e+107) t_1 (if (<= t_2 2e+92) (* a 120.0) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -60.0 * (y / (z - t));
double t_2 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_2 <= -1e+107) {
tmp = t_1;
} else if (t_2 <= 2e+92) {
tmp = a * 120.0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (-60.0d0) * (y / (z - t))
t_2 = (60.0d0 * (x - y)) / (z - t)
if (t_2 <= (-1d+107)) then
tmp = t_1
else if (t_2 <= 2d+92) then
tmp = a * 120.0d0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = -60.0 * (y / (z - t));
double t_2 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_2 <= -1e+107) {
tmp = t_1;
} else if (t_2 <= 2e+92) {
tmp = a * 120.0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -60.0 * (y / (z - t)) t_2 = (60.0 * (x - y)) / (z - t) tmp = 0 if t_2 <= -1e+107: tmp = t_1 elif t_2 <= 2e+92: tmp = a * 120.0 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(-60.0 * Float64(y / Float64(z - t))) t_2 = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) tmp = 0.0 if (t_2 <= -1e+107) tmp = t_1; elseif (t_2 <= 2e+92) tmp = Float64(a * 120.0); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = -60.0 * (y / (z - t)); t_2 = (60.0 * (x - y)) / (z - t); tmp = 0.0; if (t_2 <= -1e+107) tmp = t_1; elseif (t_2 <= 2e+92) tmp = a * 120.0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+107], t$95$1, If[LessEqual[t$95$2, 2e+92], N[(a * 120.0), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -60 \cdot \frac{y}{z - t}\\
t_2 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{+107}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+92}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -9.9999999999999997e106 or 2.0000000000000001e92 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 99.7%
Taylor expanded in y around inf
lower-*.f64N/A
lower-/.f64N/A
lower--.f6453.1
Simplified53.1%
if -9.9999999999999997e106 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 2.0000000000000001e92Initial program 99.9%
Taylor expanded in z around inf
lower-*.f6478.1
Simplified78.1%
Final simplification70.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* 60.0 (- x y)) (- z t))))
(if (<= t_1 -1e+107)
(/ (* y -60.0) z)
(if (<= t_1 5e+222) (* a 120.0) (/ (* 60.0 x) z)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_1 <= -1e+107) {
tmp = (y * -60.0) / z;
} else if (t_1 <= 5e+222) {
tmp = a * 120.0;
} else {
tmp = (60.0 * x) / z;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (60.0d0 * (x - y)) / (z - t)
if (t_1 <= (-1d+107)) then
tmp = (y * (-60.0d0)) / z
else if (t_1 <= 5d+222) then
tmp = a * 120.0d0
else
tmp = (60.0d0 * x) / z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_1 <= -1e+107) {
tmp = (y * -60.0) / z;
} else if (t_1 <= 5e+222) {
tmp = a * 120.0;
} else {
tmp = (60.0 * x) / z;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (60.0 * (x - y)) / (z - t) tmp = 0 if t_1 <= -1e+107: tmp = (y * -60.0) / z elif t_1 <= 5e+222: tmp = a * 120.0 else: tmp = (60.0 * x) / z 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 <= -1e+107) tmp = Float64(Float64(y * -60.0) / z); elseif (t_1 <= 5e+222) tmp = Float64(a * 120.0); else tmp = Float64(Float64(60.0 * x) / z); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (60.0 * (x - y)) / (z - t); tmp = 0.0; if (t_1 <= -1e+107) tmp = (y * -60.0) / z; elseif (t_1 <= 5e+222) tmp = a * 120.0; else tmp = (60.0 * x) / z; 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, -1e+107], N[(N[(y * -60.0), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$1, 5e+222], N[(a * 120.0), $MachinePrecision], N[(N[(60.0 * x), $MachinePrecision] / z), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+107}:\\
\;\;\;\;\frac{y \cdot -60}{z}\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+222}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{60 \cdot x}{z}\\
\end{array}
\end{array}
if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -9.9999999999999997e106Initial program 99.7%
lift--.f64N/A
lift-*.f64N/A
remove-double-negN/A
lift--.f64N/A
remove-double-negN/A
div-invN/A
lift-*.f64N/A
div-invN/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6499.9
Applied egg-rr99.9%
Taylor expanded in z around inf
lower-/.f6456.7
Simplified56.7%
Taylor expanded in y around inf
associate-*r/N/A
lower-/.f64N/A
lower-*.f6442.5
Simplified42.5%
if -9.9999999999999997e106 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 5.00000000000000023e222Initial program 99.8%
Taylor expanded in z around inf
lower-*.f6471.8
Simplified71.8%
if 5.00000000000000023e222 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 100.0%
lift--.f64N/A
lift-*.f64N/A
remove-double-negN/A
lift--.f64N/A
remove-double-negN/A
div-invN/A
lift-*.f64N/A
div-invN/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6499.9
Applied egg-rr99.9%
Taylor expanded in x around inf
associate-*r/N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f6459.3
Simplified59.3%
Taylor expanded in z around inf
associate-*r/N/A
lower-/.f64N/A
lower-*.f6458.7
Simplified58.7%
Final simplification66.7%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (/ (* y -60.0) z)) (t_2 (/ (* 60.0 (- x y)) (- z t)))) (if (<= t_2 -1e+107) t_1 (if (<= t_2 2e+103) (* a 120.0) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y * -60.0) / z;
double t_2 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_2 <= -1e+107) {
tmp = t_1;
} else if (t_2 <= 2e+103) {
tmp = a * 120.0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (y * (-60.0d0)) / z
t_2 = (60.0d0 * (x - y)) / (z - t)
if (t_2 <= (-1d+107)) then
tmp = t_1
else if (t_2 <= 2d+103) then
tmp = a * 120.0d0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (y * -60.0) / z;
double t_2 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_2 <= -1e+107) {
tmp = t_1;
} else if (t_2 <= 2e+103) {
tmp = a * 120.0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y * -60.0) / z t_2 = (60.0 * (x - y)) / (z - t) tmp = 0 if t_2 <= -1e+107: tmp = t_1 elif t_2 <= 2e+103: tmp = a * 120.0 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y * -60.0) / z) t_2 = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) tmp = 0.0 if (t_2 <= -1e+107) tmp = t_1; elseif (t_2 <= 2e+103) tmp = Float64(a * 120.0); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y * -60.0) / z; t_2 = (60.0 * (x - y)) / (z - t); tmp = 0.0; if (t_2 <= -1e+107) tmp = t_1; elseif (t_2 <= 2e+103) tmp = a * 120.0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y * -60.0), $MachinePrecision] / z), $MachinePrecision]}, Block[{t$95$2 = N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+107], t$95$1, If[LessEqual[t$95$2, 2e+103], N[(a * 120.0), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot -60}{z}\\
t_2 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{+107}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+103}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -9.9999999999999997e106 or 2e103 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 99.7%
lift--.f64N/A
lift-*.f64N/A
remove-double-negN/A
lift--.f64N/A
remove-double-negN/A
div-invN/A
lift-*.f64N/A
div-invN/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6499.8
Applied egg-rr99.8%
Taylor expanded in z around inf
lower-/.f6462.3
Simplified62.3%
Taylor expanded in y around inf
associate-*r/N/A
lower-/.f64N/A
lower-*.f6438.4
Simplified38.4%
if -9.9999999999999997e106 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 2e103Initial program 99.9%
Taylor expanded in z around inf
lower-*.f6477.7
Simplified77.7%
Final simplification66.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* 60.0 (- x y)) (- z t))))
(if (<= t_1 -2e+213)
(/ (* x -60.0) t)
(if (<= t_1 1e+132) (* a 120.0) (* 60.0 (/ y t))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_1 <= -2e+213) {
tmp = (x * -60.0) / t;
} else if (t_1 <= 1e+132) {
tmp = a * 120.0;
} else {
tmp = 60.0 * (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) :: t_1
real(8) :: tmp
t_1 = (60.0d0 * (x - y)) / (z - t)
if (t_1 <= (-2d+213)) then
tmp = (x * (-60.0d0)) / t
else if (t_1 <= 1d+132) then
tmp = a * 120.0d0
else
tmp = 60.0d0 * (y / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_1 <= -2e+213) {
tmp = (x * -60.0) / t;
} else if (t_1 <= 1e+132) {
tmp = a * 120.0;
} else {
tmp = 60.0 * (y / t);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (60.0 * (x - y)) / (z - t) tmp = 0 if t_1 <= -2e+213: tmp = (x * -60.0) / t elif t_1 <= 1e+132: tmp = a * 120.0 else: tmp = 60.0 * (y / t) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) tmp = 0.0 if (t_1 <= -2e+213) tmp = Float64(Float64(x * -60.0) / t); elseif (t_1 <= 1e+132) tmp = Float64(a * 120.0); else tmp = Float64(60.0 * Float64(y / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (60.0 * (x - y)) / (z - t); tmp = 0.0; if (t_1 <= -2e+213) tmp = (x * -60.0) / t; elseif (t_1 <= 1e+132) tmp = a * 120.0; else tmp = 60.0 * (y / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+213], N[(N[(x * -60.0), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[t$95$1, 1e+132], N[(a * 120.0), $MachinePrecision], N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+213}:\\
\;\;\;\;\frac{x \cdot -60}{t}\\
\mathbf{elif}\;t\_1 \leq 10^{+132}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{y}{t}\\
\end{array}
\end{array}
if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -1.99999999999999997e213Initial program 99.9%
Taylor expanded in z around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f6466.5
Simplified66.5%
Taylor expanded in x around inf
associate-*r/N/A
lower-/.f64N/A
lower-*.f6440.5
Simplified40.5%
if -1.99999999999999997e213 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 9.99999999999999991e131Initial program 99.9%
Taylor expanded in z around inf
lower-*.f6471.5
Simplified71.5%
if 9.99999999999999991e131 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 99.7%
Taylor expanded in z around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f6464.6
Simplified64.6%
Taylor expanded in y around inf
associate-*r/N/A
*-commutativeN/A
associate-*r/N/A
metadata-evalN/A
associate-*r/N/A
lower-*.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6435.8
Simplified35.8%
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
metadata-evalN/A
metadata-evalN/A
lower-*.f64N/A
lower-/.f6435.8
Applied egg-rr35.8%
Final simplification64.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* 60.0 (- x y)) (- z t))))
(if (<= t_1 -2e+213)
(* x (/ -60.0 t))
(if (<= t_1 1e+132) (* a 120.0) (* 60.0 (/ y t))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_1 <= -2e+213) {
tmp = x * (-60.0 / t);
} else if (t_1 <= 1e+132) {
tmp = a * 120.0;
} else {
tmp = 60.0 * (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) :: t_1
real(8) :: tmp
t_1 = (60.0d0 * (x - y)) / (z - t)
if (t_1 <= (-2d+213)) then
tmp = x * ((-60.0d0) / t)
else if (t_1 <= 1d+132) then
tmp = a * 120.0d0
else
tmp = 60.0d0 * (y / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_1 <= -2e+213) {
tmp = x * (-60.0 / t);
} else if (t_1 <= 1e+132) {
tmp = a * 120.0;
} else {
tmp = 60.0 * (y / t);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (60.0 * (x - y)) / (z - t) tmp = 0 if t_1 <= -2e+213: tmp = x * (-60.0 / t) elif t_1 <= 1e+132: tmp = a * 120.0 else: tmp = 60.0 * (y / t) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) tmp = 0.0 if (t_1 <= -2e+213) tmp = Float64(x * Float64(-60.0 / t)); elseif (t_1 <= 1e+132) tmp = Float64(a * 120.0); else tmp = Float64(60.0 * Float64(y / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (60.0 * (x - y)) / (z - t); tmp = 0.0; if (t_1 <= -2e+213) tmp = x * (-60.0 / t); elseif (t_1 <= 1e+132) tmp = a * 120.0; else tmp = 60.0 * (y / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+213], N[(x * N[(-60.0 / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+132], N[(a * 120.0), $MachinePrecision], N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+213}:\\
\;\;\;\;x \cdot \frac{-60}{t}\\
\mathbf{elif}\;t\_1 \leq 10^{+132}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{y}{t}\\
\end{array}
\end{array}
if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -1.99999999999999997e213Initial program 99.9%
lift--.f64N/A
lift-*.f64N/A
remove-double-negN/A
lift--.f64N/A
remove-double-negN/A
div-invN/A
lift-*.f64N/A
div-invN/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6499.9
Applied egg-rr99.9%
Taylor expanded in x around inf
associate-*r/N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f6448.5
Simplified48.5%
Taylor expanded in z around 0
associate-*r/N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6440.5
Simplified40.5%
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6440.4
Applied egg-rr40.4%
if -1.99999999999999997e213 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 9.99999999999999991e131Initial program 99.9%
Taylor expanded in z around inf
lower-*.f6471.5
Simplified71.5%
if 9.99999999999999991e131 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 99.7%
Taylor expanded in z around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f6464.6
Simplified64.6%
Taylor expanded in y around inf
associate-*r/N/A
*-commutativeN/A
associate-*r/N/A
metadata-evalN/A
associate-*r/N/A
lower-*.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6435.8
Simplified35.8%
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
metadata-evalN/A
metadata-evalN/A
lower-*.f64N/A
lower-/.f6435.8
Applied egg-rr35.8%
Final simplification64.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* 60.0 (- x y)) (- z t))))
(if (<= t_1 -2e+213)
(* x (/ -60.0 t))
(if (<= t_1 1e+132) (* a 120.0) (* y (/ 60.0 t))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_1 <= -2e+213) {
tmp = x * (-60.0 / t);
} else if (t_1 <= 1e+132) {
tmp = a * 120.0;
} else {
tmp = y * (60.0 / t);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (60.0d0 * (x - y)) / (z - t)
if (t_1 <= (-2d+213)) then
tmp = x * ((-60.0d0) / t)
else if (t_1 <= 1d+132) then
tmp = a * 120.0d0
else
tmp = y * (60.0d0 / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_1 <= -2e+213) {
tmp = x * (-60.0 / t);
} else if (t_1 <= 1e+132) {
tmp = a * 120.0;
} else {
tmp = y * (60.0 / t);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (60.0 * (x - y)) / (z - t) tmp = 0 if t_1 <= -2e+213: tmp = x * (-60.0 / t) elif t_1 <= 1e+132: tmp = a * 120.0 else: tmp = y * (60.0 / t) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) tmp = 0.0 if (t_1 <= -2e+213) tmp = Float64(x * Float64(-60.0 / t)); elseif (t_1 <= 1e+132) tmp = Float64(a * 120.0); else tmp = Float64(y * Float64(60.0 / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (60.0 * (x - y)) / (z - t); tmp = 0.0; if (t_1 <= -2e+213) tmp = x * (-60.0 / t); elseif (t_1 <= 1e+132) tmp = a * 120.0; else tmp = y * (60.0 / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+213], N[(x * N[(-60.0 / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+132], N[(a * 120.0), $MachinePrecision], N[(y * N[(60.0 / t), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+213}:\\
\;\;\;\;x \cdot \frac{-60}{t}\\
\mathbf{elif}\;t\_1 \leq 10^{+132}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{60}{t}\\
\end{array}
\end{array}
if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -1.99999999999999997e213Initial program 99.9%
lift--.f64N/A
lift-*.f64N/A
remove-double-negN/A
lift--.f64N/A
remove-double-negN/A
div-invN/A
lift-*.f64N/A
div-invN/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6499.9
Applied egg-rr99.9%
Taylor expanded in x around inf
associate-*r/N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f6448.5
Simplified48.5%
Taylor expanded in z around 0
associate-*r/N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6440.5
Simplified40.5%
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6440.4
Applied egg-rr40.4%
if -1.99999999999999997e213 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 9.99999999999999991e131Initial program 99.9%
Taylor expanded in z around inf
lower-*.f6471.5
Simplified71.5%
if 9.99999999999999991e131 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 99.7%
Taylor expanded in z around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f6464.6
Simplified64.6%
Taylor expanded in y around inf
associate-*r/N/A
*-commutativeN/A
associate-*r/N/A
metadata-evalN/A
associate-*r/N/A
lower-*.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6435.8
Simplified35.8%
Final simplification64.3%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* y (/ 60.0 t))) (t_2 (/ (* 60.0 (- x y)) (- z t)))) (if (<= t_2 -2e+227) t_1 (if (<= t_2 1e+132) (* a 120.0) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (60.0 / t);
double t_2 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_2 <= -2e+227) {
tmp = t_1;
} else if (t_2 <= 1e+132) {
tmp = a * 120.0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = y * (60.0d0 / t)
t_2 = (60.0d0 * (x - y)) / (z - t)
if (t_2 <= (-2d+227)) then
tmp = t_1
else if (t_2 <= 1d+132) then
tmp = a * 120.0d0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y * (60.0 / t);
double t_2 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_2 <= -2e+227) {
tmp = t_1;
} else if (t_2 <= 1e+132) {
tmp = a * 120.0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (60.0 / t) t_2 = (60.0 * (x - y)) / (z - t) tmp = 0 if t_2 <= -2e+227: tmp = t_1 elif t_2 <= 1e+132: tmp = a * 120.0 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(60.0 / t)) t_2 = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) tmp = 0.0 if (t_2 <= -2e+227) tmp = t_1; elseif (t_2 <= 1e+132) tmp = Float64(a * 120.0); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * (60.0 / t); t_2 = (60.0 * (x - y)) / (z - t); tmp = 0.0; if (t_2 <= -2e+227) tmp = t_1; elseif (t_2 <= 1e+132) tmp = a * 120.0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(60.0 / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+227], t$95$1, If[LessEqual[t$95$2, 1e+132], N[(a * 120.0), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{60}{t}\\
t_2 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{+227}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 10^{+132}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -2.0000000000000002e227 or 9.99999999999999991e131 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 99.7%
Taylor expanded in z around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f6466.6
Simplified66.6%
Taylor expanded in y around inf
associate-*r/N/A
*-commutativeN/A
associate-*r/N/A
metadata-evalN/A
associate-*r/N/A
lower-*.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6433.9
Simplified33.9%
if -2.0000000000000002e227 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 9.99999999999999991e131Initial program 99.9%
Taylor expanded in z around inf
lower-*.f6471.2
Simplified71.2%
Final simplification63.4%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.45e+46)
(fma -60.0 (/ y z) (* a 120.0))
(if (<= z 8.2e-107)
(fma -60.0 (/ (- x y) t) (* a 120.0))
(if (<= z 1.15e-41)
(* (/ 60.0 (- z t)) (- x y))
(fma x (/ 60.0 z) (* a 120.0))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.45e+46) {
tmp = fma(-60.0, (y / z), (a * 120.0));
} else if (z <= 8.2e-107) {
tmp = fma(-60.0, ((x - y) / t), (a * 120.0));
} else if (z <= 1.15e-41) {
tmp = (60.0 / (z - t)) * (x - y);
} else {
tmp = fma(x, (60.0 / z), (a * 120.0));
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.45e+46) tmp = fma(-60.0, Float64(y / z), Float64(a * 120.0)); elseif (z <= 8.2e-107) tmp = fma(-60.0, Float64(Float64(x - y) / t), Float64(a * 120.0)); elseif (z <= 1.15e-41) tmp = Float64(Float64(60.0 / Float64(z - t)) * Float64(x - y)); else tmp = fma(x, Float64(60.0 / z), Float64(a * 120.0)); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.45e+46], N[(-60.0 * N[(y / z), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.2e-107], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.15e-41], N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision], N[(x * N[(60.0 / z), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.45 \cdot 10^{+46}:\\
\;\;\;\;\mathsf{fma}\left(-60, \frac{y}{z}, a \cdot 120\right)\\
\mathbf{elif}\;z \leq 8.2 \cdot 10^{-107}:\\
\;\;\;\;\mathsf{fma}\left(-60, \frac{x - y}{t}, a \cdot 120\right)\\
\mathbf{elif}\;z \leq 1.15 \cdot 10^{-41}:\\
\;\;\;\;\frac{60}{z - t} \cdot \left(x - y\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x, \frac{60}{z}, a \cdot 120\right)\\
\end{array}
\end{array}
if z < -1.4500000000000001e46Initial program 99.8%
lift--.f64N/A
lift-*.f64N/A
remove-double-negN/A
lift--.f64N/A
remove-double-negN/A
div-invN/A
lift-*.f64N/A
div-invN/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6499.9
Applied egg-rr99.9%
Taylor expanded in z around inf
lower-/.f6494.3
Simplified94.3%
Taylor expanded in x around 0
lower-fma.f64N/A
lower-/.f64N/A
lower-*.f6488.6
Simplified88.6%
if -1.4500000000000001e46 < z < 8.1999999999999998e-107Initial program 99.9%
Taylor expanded in z around 0
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6483.9
Simplified83.9%
if 8.1999999999999998e-107 < z < 1.15000000000000005e-41Initial program 99.8%
Taylor expanded in a around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6492.2
Simplified92.2%
lift--.f64N/A
lift--.f64N/A
associate-*l/N/A
lift-/.f64N/A
lower-*.f6492.3
Applied egg-rr92.3%
if 1.15000000000000005e-41 < z Initial program 99.8%
lift--.f64N/A
lift-*.f64N/A
remove-double-negN/A
lift--.f64N/A
remove-double-negN/A
div-invN/A
lift-*.f64N/A
div-invN/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6499.9
Applied egg-rr99.9%
Taylor expanded in z around inf
lower-/.f6485.7
Simplified85.7%
Taylor expanded in y around 0
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
metadata-evalN/A
associate-*r/N/A
lower-fma.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f64N/A
lower-*.f6483.9
Simplified83.9%
Final simplification85.2%
(FPCore (x y z t a)
:precision binary64
(if (<= t -2.2e-78)
(fma a 120.0 (* (- x y) (/ -60.0 t)))
(if (<= t 2.6e-32)
(fma (/ 60.0 z) (- x y) (* a 120.0))
(fma -60.0 (/ (- x y) t) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.2e-78) {
tmp = fma(a, 120.0, ((x - y) * (-60.0 / t)));
} else if (t <= 2.6e-32) {
tmp = fma((60.0 / z), (x - y), (a * 120.0));
} else {
tmp = fma(-60.0, ((x - y) / t), (a * 120.0));
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (t <= -2.2e-78) tmp = fma(a, 120.0, Float64(Float64(x - y) * Float64(-60.0 / t))); elseif (t <= 2.6e-32) tmp = fma(Float64(60.0 / z), Float64(x - y), Float64(a * 120.0)); else tmp = fma(-60.0, Float64(Float64(x - y) / t), Float64(a * 120.0)); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2.2e-78], N[(a * 120.0 + N[(N[(x - y), $MachinePrecision] * N[(-60.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.6e-32], N[(N[(60.0 / z), $MachinePrecision] * N[(x - y), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.2 \cdot 10^{-78}:\\
\;\;\;\;\mathsf{fma}\left(a, 120, \left(x - y\right) \cdot \frac{-60}{t}\right)\\
\mathbf{elif}\;t \leq 2.6 \cdot 10^{-32}:\\
\;\;\;\;\mathsf{fma}\left(\frac{60}{z}, x - y, a \cdot 120\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-60, \frac{x - y}{t}, a \cdot 120\right)\\
\end{array}
\end{array}
if t < -2.1999999999999999e-78Initial program 99.8%
Taylor expanded in z around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f6489.2
Simplified89.2%
lift--.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-*.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6489.3
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6489.4
Applied egg-rr89.4%
if -2.1999999999999999e-78 < t < 2.5999999999999997e-32Initial program 99.9%
lift--.f64N/A
lift-*.f64N/A
remove-double-negN/A
lift--.f64N/A
remove-double-negN/A
div-invN/A
lift-*.f64N/A
div-invN/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6499.9
Applied egg-rr99.9%
Taylor expanded in z around inf
lower-/.f6485.5
Simplified85.5%
if 2.5999999999999997e-32 < t Initial program 99.8%
Taylor expanded in z around 0
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6491.9
Simplified91.9%
Final simplification88.2%
(FPCore (x y z t a)
:precision binary64
(if (<= t -2.2e-78)
(fma a 120.0 (* (- x y) (/ -60.0 t)))
(if (<= t 2.6e-32)
(fma 120.0 a (/ (* 60.0 (- x y)) z))
(fma -60.0 (/ (- x y) t) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.2e-78) {
tmp = fma(a, 120.0, ((x - y) * (-60.0 / t)));
} else if (t <= 2.6e-32) {
tmp = fma(120.0, a, ((60.0 * (x - y)) / z));
} else {
tmp = fma(-60.0, ((x - y) / t), (a * 120.0));
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (t <= -2.2e-78) tmp = fma(a, 120.0, Float64(Float64(x - y) * Float64(-60.0 / t))); elseif (t <= 2.6e-32) tmp = fma(120.0, a, Float64(Float64(60.0 * Float64(x - y)) / z)); else tmp = fma(-60.0, Float64(Float64(x - y) / t), Float64(a * 120.0)); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2.2e-78], N[(a * 120.0 + N[(N[(x - y), $MachinePrecision] * N[(-60.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.6e-32], N[(120.0 * a + N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.2 \cdot 10^{-78}:\\
\;\;\;\;\mathsf{fma}\left(a, 120, \left(x - y\right) \cdot \frac{-60}{t}\right)\\
\mathbf{elif}\;t \leq 2.6 \cdot 10^{-32}:\\
\;\;\;\;\mathsf{fma}\left(120, a, \frac{60 \cdot \left(x - y\right)}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-60, \frac{x - y}{t}, a \cdot 120\right)\\
\end{array}
\end{array}
if t < -2.1999999999999999e-78Initial program 99.8%
Taylor expanded in z around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f6489.2
Simplified89.2%
lift--.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-*.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6489.3
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6489.4
Applied egg-rr89.4%
if -2.1999999999999999e-78 < t < 2.5999999999999997e-32Initial program 99.9%
lift--.f64N/A
lift-*.f64N/A
remove-double-negN/A
lift--.f64N/A
remove-double-negN/A
div-invN/A
lift-*.f64N/A
div-invN/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6499.9
Applied egg-rr99.9%
Taylor expanded in z around inf
+-commutativeN/A
lower-fma.f64N/A
associate-*r/N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f6485.5
Simplified85.5%
if 2.5999999999999997e-32 < t Initial program 99.8%
Taylor expanded in z around 0
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6491.9
Simplified91.9%
Final simplification88.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma -60.0 (/ (- x y) t) (* a 120.0))))
(if (<= t -2.2e-78)
t_1
(if (<= t 2.6e-32) (fma 120.0 a (/ (* 60.0 (- x y)) z)) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(-60.0, ((x - y) / t), (a * 120.0));
double tmp;
if (t <= -2.2e-78) {
tmp = t_1;
} else if (t <= 2.6e-32) {
tmp = fma(120.0, a, ((60.0 * (x - y)) / z));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(-60.0, Float64(Float64(x - y) / t), Float64(a * 120.0)) tmp = 0.0 if (t <= -2.2e-78) tmp = t_1; elseif (t <= 2.6e-32) tmp = fma(120.0, a, Float64(Float64(60.0 * Float64(x - y)) / z)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.2e-78], t$95$1, If[LessEqual[t, 2.6e-32], N[(120.0 * a + N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-60, \frac{x - y}{t}, a \cdot 120\right)\\
\mathbf{if}\;t \leq -2.2 \cdot 10^{-78}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.6 \cdot 10^{-32}:\\
\;\;\;\;\mathsf{fma}\left(120, a, \frac{60 \cdot \left(x - y\right)}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -2.1999999999999999e-78 or 2.5999999999999997e-32 < t Initial program 99.8%
Taylor expanded in z around 0
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6490.5
Simplified90.5%
if -2.1999999999999999e-78 < t < 2.5999999999999997e-32Initial program 99.9%
lift--.f64N/A
lift-*.f64N/A
remove-double-negN/A
lift--.f64N/A
remove-double-negN/A
div-invN/A
lift-*.f64N/A
div-invN/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6499.9
Applied egg-rr99.9%
Taylor expanded in z around inf
+-commutativeN/A
lower-fma.f64N/A
associate-*r/N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f6485.5
Simplified85.5%
Final simplification88.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma -60.0 (/ (- x y) t) (* a 120.0))))
(if (<= t -2.2e-78)
t_1
(if (<= t 2.6e-32) (fma 60.0 (/ (- x y) z) (* a 120.0)) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(-60.0, ((x - y) / t), (a * 120.0));
double tmp;
if (t <= -2.2e-78) {
tmp = t_1;
} else if (t <= 2.6e-32) {
tmp = fma(60.0, ((x - y) / z), (a * 120.0));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(-60.0, Float64(Float64(x - y) / t), Float64(a * 120.0)) tmp = 0.0 if (t <= -2.2e-78) tmp = t_1; elseif (t <= 2.6e-32) tmp = fma(60.0, Float64(Float64(x - y) / z), Float64(a * 120.0)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.2e-78], t$95$1, If[LessEqual[t, 2.6e-32], N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-60, \frac{x - y}{t}, a \cdot 120\right)\\
\mathbf{if}\;t \leq -2.2 \cdot 10^{-78}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.6 \cdot 10^{-32}:\\
\;\;\;\;\mathsf{fma}\left(60, \frac{x - y}{z}, a \cdot 120\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -2.1999999999999999e-78 or 2.5999999999999997e-32 < t Initial program 99.8%
Taylor expanded in z around 0
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6490.5
Simplified90.5%
if -2.1999999999999999e-78 < t < 2.5999999999999997e-32Initial program 99.9%
Taylor expanded in z around inf
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6485.5
Simplified85.5%
Final simplification88.2%
(FPCore (x y z t a) :precision binary64 (fma a 120.0 (/ (* (- x y) -60.0) (- t z))))
double code(double x, double y, double z, double t, double a) {
return fma(a, 120.0, (((x - y) * -60.0) / (t - z)));
}
function code(x, y, z, t, a) return fma(a, 120.0, Float64(Float64(Float64(x - y) * -60.0) / Float64(t - z))) end
code[x_, y_, z_, t_, a_] := N[(a * 120.0 + N[(N[(N[(x - y), $MachinePrecision] * -60.0), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(a, 120, \frac{\left(x - y\right) \cdot -60}{t - z}\right)
\end{array}
Initial program 99.8%
lift--.f64N/A
lift-*.f64N/A
remove-double-negN/A
lift--.f64N/A
remove-double-negN/A
lift-/.f64N/A
lift-*.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6499.9
lift-/.f64N/A
frac-2negN/A
lower-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
lower-*.f64N/A
metadata-evalN/A
neg-sub0N/A
lift--.f64N/A
sub-negN/A
+-commutativeN/A
associate--r+N/A
neg-sub0N/A
remove-double-negN/A
lower--.f6499.9
Applied egg-rr99.9%
(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%
Taylor expanded in z around inf
lower-*.f6457.7
Simplified57.7%
Final simplification57.7%
(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 2024208
(FPCore (x y z t a)
:name "Data.Colour.RGB:hslsv from colour-2.3.3, B"
:precision binary64
:alt
(! :herbie-platform default (+ (/ 60 (/ (- z t) (- x y))) (* a 120)))
(+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))