
(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 a 120.0 (* (/ 60.0 (- z t)) (- x y))))
double code(double x, double y, double z, double t, double a) {
return fma(a, 120.0, ((60.0 / (z - t)) * (x - y)));
}
function code(x, y, z, t, a) return fma(a, 120.0, Float64(Float64(60.0 / Float64(z - t)) * Float64(x - y))) end
code[x_, y_, z_, t_, a_] := N[(a * 120.0 + N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(a, 120, \frac{60}{z - t} \cdot \left(x - y\right)\right)
\end{array}
Initial program 99.8%
+-commutative99.8%
fma-def99.8%
associate-*l/99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -4e+36)
(+ (* a 120.0) (/ 60.0 (/ t y)))
(if (<= (* a 120.0) -2e-57)
(+ (* a 120.0) (/ (* y -60.0) z))
(if (<= (* a 120.0) 1e-37)
(* (/ 60.0 (- z t)) (- x y))
(+ (* a 120.0) (/ 60.0 (/ (- z) y)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -4e+36) {
tmp = (a * 120.0) + (60.0 / (t / y));
} else if ((a * 120.0) <= -2e-57) {
tmp = (a * 120.0) + ((y * -60.0) / z);
} else if ((a * 120.0) <= 1e-37) {
tmp = (60.0 / (z - t)) * (x - y);
} else {
tmp = (a * 120.0) + (60.0 / (-z / y));
}
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) <= (-4d+36)) then
tmp = (a * 120.0d0) + (60.0d0 / (t / y))
else if ((a * 120.0d0) <= (-2d-57)) then
tmp = (a * 120.0d0) + ((y * (-60.0d0)) / z)
else if ((a * 120.0d0) <= 1d-37) then
tmp = (60.0d0 / (z - t)) * (x - y)
else
tmp = (a * 120.0d0) + (60.0d0 / (-z / y))
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) <= -4e+36) {
tmp = (a * 120.0) + (60.0 / (t / y));
} else if ((a * 120.0) <= -2e-57) {
tmp = (a * 120.0) + ((y * -60.0) / z);
} else if ((a * 120.0) <= 1e-37) {
tmp = (60.0 / (z - t)) * (x - y);
} else {
tmp = (a * 120.0) + (60.0 / (-z / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -4e+36: tmp = (a * 120.0) + (60.0 / (t / y)) elif (a * 120.0) <= -2e-57: tmp = (a * 120.0) + ((y * -60.0) / z) elif (a * 120.0) <= 1e-37: tmp = (60.0 / (z - t)) * (x - y) else: tmp = (a * 120.0) + (60.0 / (-z / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -4e+36) tmp = Float64(Float64(a * 120.0) + Float64(60.0 / Float64(t / y))); elseif (Float64(a * 120.0) <= -2e-57) tmp = Float64(Float64(a * 120.0) + Float64(Float64(y * -60.0) / z)); elseif (Float64(a * 120.0) <= 1e-37) tmp = Float64(Float64(60.0 / Float64(z - t)) * Float64(x - y)); else tmp = Float64(Float64(a * 120.0) + Float64(60.0 / Float64(Float64(-z) / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a * 120.0) <= -4e+36) tmp = (a * 120.0) + (60.0 / (t / y)); elseif ((a * 120.0) <= -2e-57) tmp = (a * 120.0) + ((y * -60.0) / z); elseif ((a * 120.0) <= 1e-37) tmp = (60.0 / (z - t)) * (x - y); else tmp = (a * 120.0) + (60.0 / (-z / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -4e+36], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], -2e-57], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(y * -60.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 1e-37], N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 / N[((-z) / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -4 \cdot 10^{+36}:\\
\;\;\;\;a \cdot 120 + \frac{60}{\frac{t}{y}}\\
\mathbf{elif}\;a \cdot 120 \leq -2 \cdot 10^{-57}:\\
\;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z}\\
\mathbf{elif}\;a \cdot 120 \leq 10^{-37}:\\
\;\;\;\;\frac{60}{z - t} \cdot \left(x - y\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{60}{\frac{-z}{y}}\\
\end{array}
\end{array}
if (*.f64 a 120) < -4.00000000000000017e36Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around 0 77.8%
neg-mul-177.8%
distribute-neg-frac77.8%
Simplified77.8%
Taylor expanded in x around 0 75.6%
if -4.00000000000000017e36 < (*.f64 a 120) < -1.99999999999999991e-57Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
associate-/r/99.8%
Applied egg-rr99.8%
associate-/r/99.7%
div-inv99.6%
associate-/r*99.7%
Applied egg-rr99.7%
Taylor expanded in x around 0 94.4%
Taylor expanded in z around inf 81.9%
*-commutative81.9%
associate-*l/81.9%
Simplified81.9%
if -1.99999999999999991e-57 < (*.f64 a 120) < 1.00000000000000007e-37Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
associate-/r/99.8%
Applied egg-rr99.8%
Taylor expanded in a around 0 81.0%
*-commutative81.0%
associate-*l/81.0%
Simplified81.0%
clear-num81.0%
*-un-lft-identity81.0%
times-frac80.9%
clear-num80.8%
div-inv80.8%
clear-num80.9%
associate-/r/81.1%
clear-num81.0%
clear-num81.0%
clear-num81.1%
Applied egg-rr81.1%
if 1.00000000000000007e-37 < (*.f64 a 120) Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 80.5%
Taylor expanded in x around 0 81.2%
associate-*r/81.2%
mul-1-neg81.2%
Simplified81.2%
Final simplification80.0%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -4e+36)
(+ (* a 120.0) (/ 60.0 (/ t y)))
(if (or (<= (* a 120.0) -2e-57) (not (<= (* a 120.0) 1e-37)))
(+ (* a 120.0) (* -60.0 (/ y z)))
(* (/ 60.0 (- z t)) (- x y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -4e+36) {
tmp = (a * 120.0) + (60.0 / (t / y));
} else if (((a * 120.0) <= -2e-57) || !((a * 120.0) <= 1e-37)) {
tmp = (a * 120.0) + (-60.0 * (y / z));
} else {
tmp = (60.0 / (z - t)) * (x - y);
}
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) <= (-4d+36)) then
tmp = (a * 120.0d0) + (60.0d0 / (t / y))
else if (((a * 120.0d0) <= (-2d-57)) .or. (.not. ((a * 120.0d0) <= 1d-37))) then
tmp = (a * 120.0d0) + ((-60.0d0) * (y / z))
else
tmp = (60.0d0 / (z - t)) * (x - y)
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) <= -4e+36) {
tmp = (a * 120.0) + (60.0 / (t / y));
} else if (((a * 120.0) <= -2e-57) || !((a * 120.0) <= 1e-37)) {
tmp = (a * 120.0) + (-60.0 * (y / z));
} else {
tmp = (60.0 / (z - t)) * (x - y);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -4e+36: tmp = (a * 120.0) + (60.0 / (t / y)) elif ((a * 120.0) <= -2e-57) or not ((a * 120.0) <= 1e-37): tmp = (a * 120.0) + (-60.0 * (y / z)) else: tmp = (60.0 / (z - t)) * (x - y) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -4e+36) tmp = Float64(Float64(a * 120.0) + Float64(60.0 / Float64(t / y))); elseif ((Float64(a * 120.0) <= -2e-57) || !(Float64(a * 120.0) <= 1e-37)) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / z))); else tmp = Float64(Float64(60.0 / Float64(z - t)) * Float64(x - y)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a * 120.0) <= -4e+36) tmp = (a * 120.0) + (60.0 / (t / y)); elseif (((a * 120.0) <= -2e-57) || ~(((a * 120.0) <= 1e-37))) tmp = (a * 120.0) + (-60.0 * (y / z)); else tmp = (60.0 / (z - t)) * (x - y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -4e+36], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[N[(a * 120.0), $MachinePrecision], -2e-57], N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 1e-37]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -4 \cdot 10^{+36}:\\
\;\;\;\;a \cdot 120 + \frac{60}{\frac{t}{y}}\\
\mathbf{elif}\;a \cdot 120 \leq -2 \cdot 10^{-57} \lor \neg \left(a \cdot 120 \leq 10^{-37}\right):\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{60}{z - t} \cdot \left(x - y\right)\\
\end{array}
\end{array}
if (*.f64 a 120) < -4.00000000000000017e36Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around 0 77.8%
neg-mul-177.8%
distribute-neg-frac77.8%
Simplified77.8%
Taylor expanded in x around 0 75.6%
if -4.00000000000000017e36 < (*.f64 a 120) < -1.99999999999999991e-57 or 1.00000000000000007e-37 < (*.f64 a 120) Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 79.6%
Taylor expanded in x around 0 81.3%
if -1.99999999999999991e-57 < (*.f64 a 120) < 1.00000000000000007e-37Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
associate-/r/99.8%
Applied egg-rr99.8%
Taylor expanded in a around 0 81.0%
*-commutative81.0%
associate-*l/81.0%
Simplified81.0%
clear-num81.0%
*-un-lft-identity81.0%
times-frac80.9%
clear-num80.8%
div-inv80.8%
clear-num80.9%
associate-/r/81.1%
clear-num81.0%
clear-num81.0%
clear-num81.1%
Applied egg-rr81.1%
Final simplification80.0%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -4e+36)
(+ (* a 120.0) (/ 60.0 (/ t y)))
(if (<= (* a 120.0) -2e-57)
(+ (* a 120.0) (/ (* y -60.0) z))
(if (<= (* a 120.0) 1e-37)
(* (/ 60.0 (- z t)) (- x y))
(+ (* a 120.0) (* -60.0 (/ y z)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -4e+36) {
tmp = (a * 120.0) + (60.0 / (t / y));
} else if ((a * 120.0) <= -2e-57) {
tmp = (a * 120.0) + ((y * -60.0) / z);
} else if ((a * 120.0) <= 1e-37) {
tmp = (60.0 / (z - t)) * (x - y);
} else {
tmp = (a * 120.0) + (-60.0 * (y / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a * 120.0d0) <= (-4d+36)) then
tmp = (a * 120.0d0) + (60.0d0 / (t / y))
else if ((a * 120.0d0) <= (-2d-57)) then
tmp = (a * 120.0d0) + ((y * (-60.0d0)) / z)
else if ((a * 120.0d0) <= 1d-37) then
tmp = (60.0d0 / (z - t)) * (x - y)
else
tmp = (a * 120.0d0) + ((-60.0d0) * (y / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -4e+36) {
tmp = (a * 120.0) + (60.0 / (t / y));
} else if ((a * 120.0) <= -2e-57) {
tmp = (a * 120.0) + ((y * -60.0) / z);
} else if ((a * 120.0) <= 1e-37) {
tmp = (60.0 / (z - t)) * (x - y);
} else {
tmp = (a * 120.0) + (-60.0 * (y / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -4e+36: tmp = (a * 120.0) + (60.0 / (t / y)) elif (a * 120.0) <= -2e-57: tmp = (a * 120.0) + ((y * -60.0) / z) elif (a * 120.0) <= 1e-37: tmp = (60.0 / (z - t)) * (x - y) else: tmp = (a * 120.0) + (-60.0 * (y / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -4e+36) tmp = Float64(Float64(a * 120.0) + Float64(60.0 / Float64(t / y))); elseif (Float64(a * 120.0) <= -2e-57) tmp = Float64(Float64(a * 120.0) + Float64(Float64(y * -60.0) / z)); elseif (Float64(a * 120.0) <= 1e-37) tmp = Float64(Float64(60.0 / Float64(z - t)) * Float64(x - y)); else tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a * 120.0) <= -4e+36) tmp = (a * 120.0) + (60.0 / (t / y)); elseif ((a * 120.0) <= -2e-57) tmp = (a * 120.0) + ((y * -60.0) / z); elseif ((a * 120.0) <= 1e-37) tmp = (60.0 / (z - t)) * (x - y); else tmp = (a * 120.0) + (-60.0 * (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -4e+36], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], -2e-57], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(y * -60.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 1e-37], N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -4 \cdot 10^{+36}:\\
\;\;\;\;a \cdot 120 + \frac{60}{\frac{t}{y}}\\
\mathbf{elif}\;a \cdot 120 \leq -2 \cdot 10^{-57}:\\
\;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z}\\
\mathbf{elif}\;a \cdot 120 \leq 10^{-37}:\\
\;\;\;\;\frac{60}{z - t} \cdot \left(x - y\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if (*.f64 a 120) < -4.00000000000000017e36Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around 0 77.8%
neg-mul-177.8%
distribute-neg-frac77.8%
Simplified77.8%
Taylor expanded in x around 0 75.6%
if -4.00000000000000017e36 < (*.f64 a 120) < -1.99999999999999991e-57Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
associate-/r/99.8%
Applied egg-rr99.8%
associate-/r/99.7%
div-inv99.6%
associate-/r*99.7%
Applied egg-rr99.7%
Taylor expanded in x around 0 94.4%
Taylor expanded in z around inf 81.9%
*-commutative81.9%
associate-*l/81.9%
Simplified81.9%
if -1.99999999999999991e-57 < (*.f64 a 120) < 1.00000000000000007e-37Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
associate-/r/99.8%
Applied egg-rr99.8%
Taylor expanded in a around 0 81.0%
*-commutative81.0%
associate-*l/81.0%
Simplified81.0%
clear-num81.0%
*-un-lft-identity81.0%
times-frac80.9%
clear-num80.8%
div-inv80.8%
clear-num80.9%
associate-/r/81.1%
clear-num81.0%
clear-num81.0%
clear-num81.1%
Applied egg-rr81.1%
if 1.00000000000000007e-37 < (*.f64 a 120) Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 80.5%
Taylor expanded in x around 0 81.2%
Final simplification80.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ 60.0 (- z t))))
(if (<= y -5.6e+251)
(* -60.0 (/ y (- z t)))
(if (<= y -2.6e+188)
(+ (* a 120.0) (* -60.0 (/ y z)))
(if (<= y -7.2e+19)
(* t_1 (- x y))
(if (<= y 3.2e+141)
(+ (* a 120.0) (* t_1 x))
(/ (* 60.0 (- x y)) (- z t))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 / (z - t);
double tmp;
if (y <= -5.6e+251) {
tmp = -60.0 * (y / (z - t));
} else if (y <= -2.6e+188) {
tmp = (a * 120.0) + (-60.0 * (y / z));
} else if (y <= -7.2e+19) {
tmp = t_1 * (x - y);
} else if (y <= 3.2e+141) {
tmp = (a * 120.0) + (t_1 * x);
} else {
tmp = (60.0 * (x - y)) / (z - t);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = 60.0d0 / (z - t)
if (y <= (-5.6d+251)) then
tmp = (-60.0d0) * (y / (z - t))
else if (y <= (-2.6d+188)) then
tmp = (a * 120.0d0) + ((-60.0d0) * (y / z))
else if (y <= (-7.2d+19)) then
tmp = t_1 * (x - y)
else if (y <= 3.2d+141) then
tmp = (a * 120.0d0) + (t_1 * x)
else
tmp = (60.0d0 * (x - y)) / (z - t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 / (z - t);
double tmp;
if (y <= -5.6e+251) {
tmp = -60.0 * (y / (z - t));
} else if (y <= -2.6e+188) {
tmp = (a * 120.0) + (-60.0 * (y / z));
} else if (y <= -7.2e+19) {
tmp = t_1 * (x - y);
} else if (y <= 3.2e+141) {
tmp = (a * 120.0) + (t_1 * x);
} else {
tmp = (60.0 * (x - y)) / (z - t);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = 60.0 / (z - t) tmp = 0 if y <= -5.6e+251: tmp = -60.0 * (y / (z - t)) elif y <= -2.6e+188: tmp = (a * 120.0) + (-60.0 * (y / z)) elif y <= -7.2e+19: tmp = t_1 * (x - y) elif y <= 3.2e+141: tmp = (a * 120.0) + (t_1 * x) else: tmp = (60.0 * (x - y)) / (z - t) return tmp
function code(x, y, z, t, a) t_1 = Float64(60.0 / Float64(z - t)) tmp = 0.0 if (y <= -5.6e+251) tmp = Float64(-60.0 * Float64(y / Float64(z - t))); elseif (y <= -2.6e+188) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / z))); elseif (y <= -7.2e+19) tmp = Float64(t_1 * Float64(x - y)); elseif (y <= 3.2e+141) tmp = Float64(Float64(a * 120.0) + Float64(t_1 * x)); else tmp = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = 60.0 / (z - t); tmp = 0.0; if (y <= -5.6e+251) tmp = -60.0 * (y / (z - t)); elseif (y <= -2.6e+188) tmp = (a * 120.0) + (-60.0 * (y / z)); elseif (y <= -7.2e+19) tmp = t_1 * (x - y); elseif (y <= 3.2e+141) tmp = (a * 120.0) + (t_1 * x); else tmp = (60.0 * (x - y)) / (z - t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5.6e+251], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.6e+188], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -7.2e+19], N[(t$95$1 * N[(x - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.2e+141], N[(N[(a * 120.0), $MachinePrecision] + N[(t$95$1 * x), $MachinePrecision]), $MachinePrecision], N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{60}{z - t}\\
\mathbf{if}\;y \leq -5.6 \cdot 10^{+251}:\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\mathbf{elif}\;y \leq -2.6 \cdot 10^{+188}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\
\mathbf{elif}\;y \leq -7.2 \cdot 10^{+19}:\\
\;\;\;\;t_1 \cdot \left(x - y\right)\\
\mathbf{elif}\;y \leq 3.2 \cdot 10^{+141}:\\
\;\;\;\;a \cdot 120 + t_1 \cdot x\\
\mathbf{else}:\\
\;\;\;\;\frac{60 \cdot \left(x - y\right)}{z - t}\\
\end{array}
\end{array}
if y < -5.6000000000000001e251Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 100.0%
if -5.6000000000000001e251 < y < -2.59999999999999987e188Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 86.3%
Taylor expanded in x around 0 86.3%
if -2.59999999999999987e188 < y < -7.2e19Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
associate-/r/99.9%
Applied egg-rr99.9%
Taylor expanded in a around 0 74.9%
*-commutative74.9%
associate-*l/74.9%
Simplified74.9%
clear-num74.8%
*-un-lft-identity74.8%
times-frac74.7%
clear-num74.7%
div-inv74.7%
clear-num74.8%
associate-/r/75.0%
clear-num74.8%
clear-num74.8%
clear-num75.0%
Applied egg-rr75.0%
if -7.2e19 < y < 3.20000000000000019e141Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
associate-/r/99.8%
Applied egg-rr99.8%
Taylor expanded in x around inf 93.4%
associate-*r/93.4%
associate-*l/93.4%
*-commutative93.4%
Simplified93.4%
if 3.20000000000000019e141 < y Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
associate-/r/99.8%
Applied egg-rr99.8%
Taylor expanded in a around 0 71.5%
*-commutative71.5%
associate-*l/71.6%
Simplified71.6%
Final simplification86.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* 60.0 (/ x (- z t)))) (t_2 (* -60.0 (/ y (- z t)))))
(if (<= a -7.2e-68)
(* a 120.0)
(if (<= a -5.3e-173)
t_2
(if (<= a 1.25e-245)
t_1
(if (<= a 4.2e-236) t_2 (if (<= a 5e-56) t_1 (* a 120.0))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * (x / (z - t));
double t_2 = -60.0 * (y / (z - t));
double tmp;
if (a <= -7.2e-68) {
tmp = a * 120.0;
} else if (a <= -5.3e-173) {
tmp = t_2;
} else if (a <= 1.25e-245) {
tmp = t_1;
} else if (a <= 4.2e-236) {
tmp = t_2;
} else if (a <= 5e-56) {
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) :: t_2
real(8) :: tmp
t_1 = 60.0d0 * (x / (z - t))
t_2 = (-60.0d0) * (y / (z - t))
if (a <= (-7.2d-68)) then
tmp = a * 120.0d0
else if (a <= (-5.3d-173)) then
tmp = t_2
else if (a <= 1.25d-245) then
tmp = t_1
else if (a <= 4.2d-236) then
tmp = t_2
else if (a <= 5d-56) then
tmp = t_1
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * (x / (z - t));
double t_2 = -60.0 * (y / (z - t));
double tmp;
if (a <= -7.2e-68) {
tmp = a * 120.0;
} else if (a <= -5.3e-173) {
tmp = t_2;
} else if (a <= 1.25e-245) {
tmp = t_1;
} else if (a <= 4.2e-236) {
tmp = t_2;
} else if (a <= 5e-56) {
tmp = t_1;
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = 60.0 * (x / (z - t)) t_2 = -60.0 * (y / (z - t)) tmp = 0 if a <= -7.2e-68: tmp = a * 120.0 elif a <= -5.3e-173: tmp = t_2 elif a <= 1.25e-245: tmp = t_1 elif a <= 4.2e-236: tmp = t_2 elif a <= 5e-56: tmp = t_1 else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) t_1 = Float64(60.0 * Float64(x / Float64(z - t))) t_2 = Float64(-60.0 * Float64(y / Float64(z - t))) tmp = 0.0 if (a <= -7.2e-68) tmp = Float64(a * 120.0); elseif (a <= -5.3e-173) tmp = t_2; elseif (a <= 1.25e-245) tmp = t_1; elseif (a <= 4.2e-236) tmp = t_2; elseif (a <= 5e-56) tmp = t_1; else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = 60.0 * (x / (z - t)); t_2 = -60.0 * (y / (z - t)); tmp = 0.0; if (a <= -7.2e-68) tmp = a * 120.0; elseif (a <= -5.3e-173) tmp = t_2; elseif (a <= 1.25e-245) tmp = t_1; elseif (a <= 4.2e-236) tmp = t_2; elseif (a <= 5e-56) tmp = t_1; else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -7.2e-68], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -5.3e-173], t$95$2, If[LessEqual[a, 1.25e-245], t$95$1, If[LessEqual[a, 4.2e-236], t$95$2, If[LessEqual[a, 5e-56], t$95$1, N[(a * 120.0), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 60 \cdot \frac{x}{z - t}\\
t_2 := -60 \cdot \frac{y}{z - t}\\
\mathbf{if}\;a \leq -7.2 \cdot 10^{-68}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -5.3 \cdot 10^{-173}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq 1.25 \cdot 10^{-245}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 4.2 \cdot 10^{-236}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq 5 \cdot 10^{-56}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -7.20000000000000015e-68 or 4.99999999999999997e-56 < a Initial program 99.8%
+-commutative99.8%
fma-def99.9%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in a around inf 71.9%
if -7.20000000000000015e-68 < a < -5.29999999999999964e-173 or 1.2499999999999999e-245 < a < 4.19999999999999958e-236Initial program 99.9%
associate-/l*99.7%
Simplified99.7%
associate-/r/99.9%
Applied egg-rr99.9%
Taylor expanded in y around inf 60.5%
if -5.29999999999999964e-173 < a < 1.2499999999999999e-245 or 4.19999999999999958e-236 < a < 4.99999999999999997e-56Initial program 99.6%
associate-/l*99.6%
Simplified99.6%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in x around inf 57.2%
Final simplification65.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* -60.0 (/ y (- z t)))))
(if (<= a -2.5e-69)
(* a 120.0)
(if (<= a -1.75e-172)
t_1
(if (<= a 4e-245)
(* (/ 60.0 (- z t)) x)
(if (<= a 3.3e-235)
t_1
(if (<= a 4.5e-56) (* 60.0 (/ x (- z t))) (* a 120.0))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -60.0 * (y / (z - t));
double tmp;
if (a <= -2.5e-69) {
tmp = a * 120.0;
} else if (a <= -1.75e-172) {
tmp = t_1;
} else if (a <= 4e-245) {
tmp = (60.0 / (z - t)) * x;
} else if (a <= 3.3e-235) {
tmp = t_1;
} else if (a <= 4.5e-56) {
tmp = 60.0 * (x / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (-60.0d0) * (y / (z - t))
if (a <= (-2.5d-69)) then
tmp = a * 120.0d0
else if (a <= (-1.75d-172)) then
tmp = t_1
else if (a <= 4d-245) then
tmp = (60.0d0 / (z - t)) * x
else if (a <= 3.3d-235) then
tmp = t_1
else if (a <= 4.5d-56) then
tmp = 60.0d0 * (x / (z - t))
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = -60.0 * (y / (z - t));
double tmp;
if (a <= -2.5e-69) {
tmp = a * 120.0;
} else if (a <= -1.75e-172) {
tmp = t_1;
} else if (a <= 4e-245) {
tmp = (60.0 / (z - t)) * x;
} else if (a <= 3.3e-235) {
tmp = t_1;
} else if (a <= 4.5e-56) {
tmp = 60.0 * (x / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -60.0 * (y / (z - t)) tmp = 0 if a <= -2.5e-69: tmp = a * 120.0 elif a <= -1.75e-172: tmp = t_1 elif a <= 4e-245: tmp = (60.0 / (z - t)) * x elif a <= 3.3e-235: tmp = t_1 elif a <= 4.5e-56: tmp = 60.0 * (x / (z - t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) t_1 = Float64(-60.0 * Float64(y / Float64(z - t))) tmp = 0.0 if (a <= -2.5e-69) tmp = Float64(a * 120.0); elseif (a <= -1.75e-172) tmp = t_1; elseif (a <= 4e-245) tmp = Float64(Float64(60.0 / Float64(z - t)) * x); elseif (a <= 3.3e-235) tmp = t_1; elseif (a <= 4.5e-56) tmp = Float64(60.0 * Float64(x / Float64(z - t))); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = -60.0 * (y / (z - t)); tmp = 0.0; if (a <= -2.5e-69) tmp = a * 120.0; elseif (a <= -1.75e-172) tmp = t_1; elseif (a <= 4e-245) tmp = (60.0 / (z - t)) * x; elseif (a <= 3.3e-235) tmp = t_1; elseif (a <= 4.5e-56) tmp = 60.0 * (x / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.5e-69], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -1.75e-172], t$95$1, If[LessEqual[a, 4e-245], N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[a, 3.3e-235], t$95$1, If[LessEqual[a, 4.5e-56], N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -60 \cdot \frac{y}{z - t}\\
\mathbf{if}\;a \leq -2.5 \cdot 10^{-69}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -1.75 \cdot 10^{-172}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 4 \cdot 10^{-245}:\\
\;\;\;\;\frac{60}{z - t} \cdot x\\
\mathbf{elif}\;a \leq 3.3 \cdot 10^{-235}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 4.5 \cdot 10^{-56}:\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -2.50000000000000017e-69 or 4.5000000000000001e-56 < a Initial program 99.8%
+-commutative99.8%
fma-def99.9%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in a around inf 71.9%
if -2.50000000000000017e-69 < a < -1.75000000000000014e-172 or 3.9999999999999997e-245 < a < 3.30000000000000028e-235Initial program 99.9%
associate-/l*99.7%
Simplified99.7%
associate-/r/99.9%
Applied egg-rr99.9%
Taylor expanded in y around inf 60.5%
if -1.75000000000000014e-172 < a < 3.9999999999999997e-245Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
associate-/r/99.8%
Applied egg-rr99.8%
Taylor expanded in a around 0 92.6%
*-commutative92.6%
associate-*l/92.6%
Simplified92.6%
Taylor expanded in x around inf 65.2%
*-commutative65.2%
Simplified65.2%
Taylor expanded in x around 0 65.2%
*-commutative65.2%
associate-*l/65.2%
associate-*r/65.3%
Simplified65.3%
if 3.30000000000000028e-235 < a < 4.5000000000000001e-56Initial program 99.6%
associate-/l*99.6%
Simplified99.6%
associate-/r/99.6%
Applied egg-rr99.6%
Taylor expanded in x around inf 47.9%
Final simplification65.9%
(FPCore (x y z t a)
:precision binary64
(if (<= a -2.4e-63)
(* a 120.0)
(if (<= a -2.9e-175)
(/ y (/ (- z t) -60.0))
(if (<= a 1e-245)
(* (/ 60.0 (- z t)) x)
(if (<= a 3.2e-237)
(* -60.0 (/ y (- z t)))
(if (<= a 2.5e-55) (* 60.0 (/ x (- z t))) (* a 120.0)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.4e-63) {
tmp = a * 120.0;
} else if (a <= -2.9e-175) {
tmp = y / ((z - t) / -60.0);
} else if (a <= 1e-245) {
tmp = (60.0 / (z - t)) * x;
} else if (a <= 3.2e-237) {
tmp = -60.0 * (y / (z - t));
} else if (a <= 2.5e-55) {
tmp = 60.0 * (x / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-2.4d-63)) then
tmp = a * 120.0d0
else if (a <= (-2.9d-175)) then
tmp = y / ((z - t) / (-60.0d0))
else if (a <= 1d-245) then
tmp = (60.0d0 / (z - t)) * x
else if (a <= 3.2d-237) then
tmp = (-60.0d0) * (y / (z - t))
else if (a <= 2.5d-55) then
tmp = 60.0d0 * (x / (z - t))
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.4e-63) {
tmp = a * 120.0;
} else if (a <= -2.9e-175) {
tmp = y / ((z - t) / -60.0);
} else if (a <= 1e-245) {
tmp = (60.0 / (z - t)) * x;
} else if (a <= 3.2e-237) {
tmp = -60.0 * (y / (z - t));
} else if (a <= 2.5e-55) {
tmp = 60.0 * (x / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -2.4e-63: tmp = a * 120.0 elif a <= -2.9e-175: tmp = y / ((z - t) / -60.0) elif a <= 1e-245: tmp = (60.0 / (z - t)) * x elif a <= 3.2e-237: tmp = -60.0 * (y / (z - t)) elif a <= 2.5e-55: tmp = 60.0 * (x / (z - t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2.4e-63) tmp = Float64(a * 120.0); elseif (a <= -2.9e-175) tmp = Float64(y / Float64(Float64(z - t) / -60.0)); elseif (a <= 1e-245) tmp = Float64(Float64(60.0 / Float64(z - t)) * x); elseif (a <= 3.2e-237) tmp = Float64(-60.0 * Float64(y / Float64(z - t))); elseif (a <= 2.5e-55) tmp = Float64(60.0 * Float64(x / Float64(z - t))); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -2.4e-63) tmp = a * 120.0; elseif (a <= -2.9e-175) tmp = y / ((z - t) / -60.0); elseif (a <= 1e-245) tmp = (60.0 / (z - t)) * x; elseif (a <= 3.2e-237) tmp = -60.0 * (y / (z - t)); elseif (a <= 2.5e-55) tmp = 60.0 * (x / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.4e-63], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -2.9e-175], N[(y / N[(N[(z - t), $MachinePrecision] / -60.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1e-245], N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[a, 3.2e-237], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.5e-55], N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.4 \cdot 10^{-63}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -2.9 \cdot 10^{-175}:\\
\;\;\;\;\frac{y}{\frac{z - t}{-60}}\\
\mathbf{elif}\;a \leq 10^{-245}:\\
\;\;\;\;\frac{60}{z - t} \cdot x\\
\mathbf{elif}\;a \leq 3.2 \cdot 10^{-237}:\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\mathbf{elif}\;a \leq 2.5 \cdot 10^{-55}:\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -2.4000000000000001e-63 or 2.5000000000000001e-55 < a Initial program 99.8%
+-commutative99.8%
fma-def99.9%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in a around inf 71.9%
if -2.4000000000000001e-63 < a < -2.89999999999999999e-175Initial program 99.9%
associate-/l*99.6%
Simplified99.6%
associate-/r/99.9%
Applied egg-rr99.9%
Taylor expanded in y around inf 53.5%
associate-*r/53.6%
*-commutative53.6%
associate-/l*53.7%
Simplified53.7%
if -2.89999999999999999e-175 < a < 9.9999999999999993e-246Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
associate-/r/99.8%
Applied egg-rr99.8%
Taylor expanded in a around 0 92.6%
*-commutative92.6%
associate-*l/92.6%
Simplified92.6%
Taylor expanded in x around inf 65.2%
*-commutative65.2%
Simplified65.2%
Taylor expanded in x around 0 65.2%
*-commutative65.2%
associate-*l/65.2%
associate-*r/65.3%
Simplified65.3%
if 9.9999999999999993e-246 < a < 3.2e-237Initial program 100.0%
associate-/l*99.8%
Simplified99.8%
associate-/r/100.0%
Applied egg-rr100.0%
Taylor expanded in y around inf 86.5%
if 3.2e-237 < a < 2.5000000000000001e-55Initial program 99.6%
associate-/l*99.6%
Simplified99.6%
associate-/r/99.6%
Applied egg-rr99.6%
Taylor expanded in x around inf 47.9%
Final simplification66.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.25e-121) (not (<= t 5.7e-28))) (+ (* a 120.0) (* (/ 60.0 (- z t)) x)) (+ (* a 120.0) (/ 60.0 (/ z (- x y))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.25e-121) || !(t <= 5.7e-28)) {
tmp = (a * 120.0) + ((60.0 / (z - t)) * x);
} else {
tmp = (a * 120.0) + (60.0 / (z / (x - y)));
}
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 ((t <= (-1.25d-121)) .or. (.not. (t <= 5.7d-28))) then
tmp = (a * 120.0d0) + ((60.0d0 / (z - t)) * x)
else
tmp = (a * 120.0d0) + (60.0d0 / (z / (x - y)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.25e-121) || !(t <= 5.7e-28)) {
tmp = (a * 120.0) + ((60.0 / (z - t)) * x);
} else {
tmp = (a * 120.0) + (60.0 / (z / (x - y)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.25e-121) or not (t <= 5.7e-28): tmp = (a * 120.0) + ((60.0 / (z - t)) * x) else: tmp = (a * 120.0) + (60.0 / (z / (x - y))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.25e-121) || !(t <= 5.7e-28)) tmp = Float64(Float64(a * 120.0) + Float64(Float64(60.0 / Float64(z - t)) * x)); else tmp = Float64(Float64(a * 120.0) + Float64(60.0 / Float64(z / Float64(x - y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -1.25e-121) || ~((t <= 5.7e-28))) tmp = (a * 120.0) + ((60.0 / (z - t)) * x); else tmp = (a * 120.0) + (60.0 / (z / (x - y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.25e-121], N[Not[LessEqual[t, 5.7e-28]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 / N[(z / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.25 \cdot 10^{-121} \lor \neg \left(t \leq 5.7 \cdot 10^{-28}\right):\\
\;\;\;\;a \cdot 120 + \frac{60}{z - t} \cdot x\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{60}{\frac{z}{x - y}}\\
\end{array}
\end{array}
if t < -1.24999999999999997e-121 or 5.7000000000000004e-28 < t Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
associate-/r/99.8%
Applied egg-rr99.8%
Taylor expanded in x around inf 82.8%
associate-*r/82.9%
associate-*l/82.9%
*-commutative82.9%
Simplified82.9%
if -1.24999999999999997e-121 < t < 5.7000000000000004e-28Initial program 99.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 88.3%
Final simplification84.8%
(FPCore (x y z t a)
:precision binary64
(if (<= x -8.6e+172)
(+ (* a 120.0) (/ 60.0 (/ (- z t) x)))
(if (<= x 1.25e+26)
(+ (* a 120.0) (/ (* y -60.0) (- z t)))
(+ (* a 120.0) (* (/ 60.0 (- z t)) x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -8.6e+172) {
tmp = (a * 120.0) + (60.0 / ((z - t) / x));
} else if (x <= 1.25e+26) {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
} else {
tmp = (a * 120.0) + ((60.0 / (z - t)) * x);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (x <= (-8.6d+172)) then
tmp = (a * 120.0d0) + (60.0d0 / ((z - t) / x))
else if (x <= 1.25d+26) then
tmp = (a * 120.0d0) + ((y * (-60.0d0)) / (z - t))
else
tmp = (a * 120.0d0) + ((60.0d0 / (z - t)) * x)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -8.6e+172) {
tmp = (a * 120.0) + (60.0 / ((z - t) / x));
} else if (x <= 1.25e+26) {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
} else {
tmp = (a * 120.0) + ((60.0 / (z - t)) * x);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -8.6e+172: tmp = (a * 120.0) + (60.0 / ((z - t) / x)) elif x <= 1.25e+26: tmp = (a * 120.0) + ((y * -60.0) / (z - t)) else: tmp = (a * 120.0) + ((60.0 / (z - t)) * x) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -8.6e+172) tmp = Float64(Float64(a * 120.0) + Float64(60.0 / Float64(Float64(z - t) / x))); elseif (x <= 1.25e+26) tmp = Float64(Float64(a * 120.0) + Float64(Float64(y * -60.0) / Float64(z - t))); else tmp = Float64(Float64(a * 120.0) + Float64(Float64(60.0 / Float64(z - t)) * x)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -8.6e+172) tmp = (a * 120.0) + (60.0 / ((z - t) / x)); elseif (x <= 1.25e+26) tmp = (a * 120.0) + ((y * -60.0) / (z - t)); else tmp = (a * 120.0) + ((60.0 / (z - t)) * x); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -8.6e+172], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 / N[(N[(z - t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.25e+26], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -8.6 \cdot 10^{+172}:\\
\;\;\;\;a \cdot 120 + \frac{60}{\frac{z - t}{x}}\\
\mathbf{elif}\;x \leq 1.25 \cdot 10^{+26}:\\
\;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{60}{z - t} \cdot x\\
\end{array}
\end{array}
if x < -8.6000000000000005e172Initial program 99.5%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around inf 88.7%
if -8.6000000000000005e172 < x < 1.25e26Initial program 99.8%
Taylor expanded in x around 0 94.1%
if 1.25e26 < x Initial program 99.9%
associate-/l*99.6%
Simplified99.6%
associate-/r/99.8%
Applied egg-rr99.8%
Taylor expanded in x around inf 92.3%
associate-*r/92.4%
associate-*l/92.4%
*-commutative92.4%
Simplified92.4%
Final simplification93.0%
(FPCore (x y z t a)
:precision binary64
(if (<= x -9.2e+172)
(+ (* a 120.0) (/ 60.0 (/ (- z t) x)))
(if (<= x 6e+25)
(+ (* a 120.0) (/ (* y -60.0) (- z t)))
(+ (* a 120.0) (/ (* 60.0 x) (- z t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -9.2e+172) {
tmp = (a * 120.0) + (60.0 / ((z - t) / x));
} else if (x <= 6e+25) {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
} else {
tmp = (a * 120.0) + ((60.0 * x) / (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 (x <= (-9.2d+172)) then
tmp = (a * 120.0d0) + (60.0d0 / ((z - t) / x))
else if (x <= 6d+25) then
tmp = (a * 120.0d0) + ((y * (-60.0d0)) / (z - t))
else
tmp = (a * 120.0d0) + ((60.0d0 * x) / (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 (x <= -9.2e+172) {
tmp = (a * 120.0) + (60.0 / ((z - t) / x));
} else if (x <= 6e+25) {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
} else {
tmp = (a * 120.0) + ((60.0 * x) / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -9.2e+172: tmp = (a * 120.0) + (60.0 / ((z - t) / x)) elif x <= 6e+25: tmp = (a * 120.0) + ((y * -60.0) / (z - t)) else: tmp = (a * 120.0) + ((60.0 * x) / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -9.2e+172) tmp = Float64(Float64(a * 120.0) + Float64(60.0 / Float64(Float64(z - t) / x))); elseif (x <= 6e+25) tmp = Float64(Float64(a * 120.0) + Float64(Float64(y * -60.0) / Float64(z - t))); else tmp = Float64(Float64(a * 120.0) + Float64(Float64(60.0 * x) / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -9.2e+172) tmp = (a * 120.0) + (60.0 / ((z - t) / x)); elseif (x <= 6e+25) tmp = (a * 120.0) + ((y * -60.0) / (z - t)); else tmp = (a * 120.0) + ((60.0 * x) / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -9.2e+172], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 / N[(N[(z - t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 6e+25], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(60.0 * x), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -9.2 \cdot 10^{+172}:\\
\;\;\;\;a \cdot 120 + \frac{60}{\frac{z - t}{x}}\\
\mathbf{elif}\;x \leq 6 \cdot 10^{+25}:\\
\;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{60 \cdot x}{z - t}\\
\end{array}
\end{array}
if x < -9.2000000000000003e172Initial program 99.5%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around inf 88.7%
if -9.2000000000000003e172 < x < 6.00000000000000011e25Initial program 99.8%
Taylor expanded in x around 0 94.1%
if 6.00000000000000011e25 < x Initial program 99.9%
Taylor expanded in x around inf 92.4%
*-commutative92.4%
Simplified92.4%
Final simplification93.1%
(FPCore (x y z t a) :precision binary64 (if (<= a -2.4e-59) (* a 120.0) (if (<= a 1.35e-14) (* 60.0 (/ (- x y) (- z t))) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.4e-59) {
tmp = a * 120.0;
} else if (a <= 1.35e-14) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-2.4d-59)) then
tmp = a * 120.0d0
else if (a <= 1.35d-14) then
tmp = 60.0d0 * ((x - y) / (z - t))
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.4e-59) {
tmp = a * 120.0;
} else if (a <= 1.35e-14) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -2.4e-59: tmp = a * 120.0 elif a <= 1.35e-14: tmp = 60.0 * ((x - y) / (z - t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2.4e-59) tmp = Float64(a * 120.0); elseif (a <= 1.35e-14) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -2.4e-59) tmp = a * 120.0; elseif (a <= 1.35e-14) tmp = 60.0 * ((x - y) / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.4e-59], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 1.35e-14], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.4 \cdot 10^{-59}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq 1.35 \cdot 10^{-14}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -2.40000000000000015e-59 or 1.3499999999999999e-14 < a Initial program 99.8%
+-commutative99.8%
fma-def99.9%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in a around inf 73.7%
if -2.40000000000000015e-59 < a < 1.3499999999999999e-14Initial program 99.7%
+-commutative99.7%
fma-def99.7%
associate-*l/99.8%
Simplified99.8%
Taylor expanded in a around 0 81.3%
Final simplification77.2%
(FPCore (x y z t a) :precision binary64 (if (<= a -3.2e-59) (* a 120.0) (if (<= a 5.3e-20) (* (/ 60.0 (- z t)) (- x y)) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.2e-59) {
tmp = a * 120.0;
} else if (a <= 5.3e-20) {
tmp = (60.0 / (z - t)) * (x - y);
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-3.2d-59)) then
tmp = a * 120.0d0
else if (a <= 5.3d-20) then
tmp = (60.0d0 / (z - t)) * (x - y)
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.2e-59) {
tmp = a * 120.0;
} else if (a <= 5.3e-20) {
tmp = (60.0 / (z - t)) * (x - y);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -3.2e-59: tmp = a * 120.0 elif a <= 5.3e-20: tmp = (60.0 / (z - t)) * (x - y) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -3.2e-59) tmp = Float64(a * 120.0); elseif (a <= 5.3e-20) tmp = Float64(Float64(60.0 / Float64(z - t)) * Float64(x - y)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -3.2e-59) tmp = a * 120.0; elseif (a <= 5.3e-20) tmp = (60.0 / (z - t)) * (x - y); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3.2e-59], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 5.3e-20], N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.2 \cdot 10^{-59}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq 5.3 \cdot 10^{-20}:\\
\;\;\;\;\frac{60}{z - t} \cdot \left(x - y\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -3.1999999999999999e-59 or 5.3000000000000002e-20 < a Initial program 99.8%
+-commutative99.8%
fma-def99.9%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in a around inf 73.7%
if -3.1999999999999999e-59 < a < 5.3000000000000002e-20Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
associate-/r/99.8%
Applied egg-rr99.8%
Taylor expanded in a around 0 81.3%
*-commutative81.3%
associate-*l/81.4%
Simplified81.4%
clear-num81.3%
*-un-lft-identity81.3%
times-frac81.2%
clear-num81.1%
div-inv81.2%
clear-num81.2%
associate-/r/81.4%
clear-num81.3%
clear-num81.3%
clear-num81.4%
Applied egg-rr81.4%
Final simplification77.2%
(FPCore (x y z t a)
:precision binary64
(if (<= a -3.2e-59)
(* a 120.0)
(if (<= a 1.95e-32)
(* (/ 60.0 (- z t)) (- x y))
(+ (* a 120.0) (* -60.0 (/ y z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.2e-59) {
tmp = a * 120.0;
} else if (a <= 1.95e-32) {
tmp = (60.0 / (z - t)) * (x - y);
} else {
tmp = (a * 120.0) + (-60.0 * (y / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-3.2d-59)) then
tmp = a * 120.0d0
else if (a <= 1.95d-32) then
tmp = (60.0d0 / (z - t)) * (x - y)
else
tmp = (a * 120.0d0) + ((-60.0d0) * (y / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.2e-59) {
tmp = a * 120.0;
} else if (a <= 1.95e-32) {
tmp = (60.0 / (z - t)) * (x - y);
} else {
tmp = (a * 120.0) + (-60.0 * (y / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -3.2e-59: tmp = a * 120.0 elif a <= 1.95e-32: tmp = (60.0 / (z - t)) * (x - y) else: tmp = (a * 120.0) + (-60.0 * (y / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -3.2e-59) tmp = Float64(a * 120.0); elseif (a <= 1.95e-32) tmp = Float64(Float64(60.0 / Float64(z - t)) * Float64(x - y)); else tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -3.2e-59) tmp = a * 120.0; elseif (a <= 1.95e-32) tmp = (60.0 / (z - t)) * (x - y); else tmp = (a * 120.0) + (-60.0 * (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3.2e-59], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 1.95e-32], N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.2 \cdot 10^{-59}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq 1.95 \cdot 10^{-32}:\\
\;\;\;\;\frac{60}{z - t} \cdot \left(x - y\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if a < -3.1999999999999999e-59Initial program 99.8%
+-commutative99.8%
fma-def99.9%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in a around inf 70.7%
if -3.1999999999999999e-59 < a < 1.9500000000000001e-32Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
associate-/r/99.8%
Applied egg-rr99.8%
Taylor expanded in a around 0 81.0%
*-commutative81.0%
associate-*l/81.0%
Simplified81.0%
clear-num81.0%
*-un-lft-identity81.0%
times-frac80.9%
clear-num80.8%
div-inv80.8%
clear-num80.9%
associate-/r/81.1%
clear-num81.0%
clear-num81.0%
clear-num81.1%
Applied egg-rr81.1%
if 1.9500000000000001e-32 < a Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 80.5%
Taylor expanded in x around 0 81.2%
Final simplification78.2%
(FPCore (x y z t a) :precision binary64 (+ (* (/ 60.0 (- z t)) (- x y)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return ((60.0 / (z - t)) * (x - y)) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((60.0d0 / (z - t)) * (x - y)) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return ((60.0 / (z - t)) * (x - y)) + (a * 120.0);
}
def code(x, y, z, t, a): return ((60.0 / (z - t)) * (x - y)) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(Float64(60.0 / Float64(z - t)) * Float64(x - y)) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = ((60.0 / (z - t)) * (x - y)) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60}{z - t} \cdot \left(x - y\right) + a \cdot 120
\end{array}
Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
associate-/r/99.8%
Applied egg-rr99.8%
Final simplification99.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -7.2e+19) (not (<= y 1e+141))) (* -60.0 (/ y (- z t))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -7.2e+19) || !(y <= 1e+141)) {
tmp = -60.0 * (y / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((y <= (-7.2d+19)) .or. (.not. (y <= 1d+141))) then
tmp = (-60.0d0) * (y / (z - t))
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -7.2e+19) || !(y <= 1e+141)) {
tmp = -60.0 * (y / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -7.2e+19) or not (y <= 1e+141): tmp = -60.0 * (y / (z - t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -7.2e+19) || !(y <= 1e+141)) tmp = Float64(-60.0 * Float64(y / Float64(z - t))); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -7.2e+19) || ~((y <= 1e+141))) tmp = -60.0 * (y / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -7.2e+19], N[Not[LessEqual[y, 1e+141]], $MachinePrecision]], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.2 \cdot 10^{+19} \lor \neg \left(y \leq 10^{+141}\right):\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if y < -7.2e19 or 1.00000000000000002e141 < y Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
associate-/r/99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 59.0%
if -7.2e19 < y < 1.00000000000000002e141Initial program 99.8%
+-commutative99.8%
fma-def99.8%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in a around inf 62.3%
Final simplification61.0%
(FPCore (x y z t a) :precision binary64 (if (<= a -3.7e-173) (* a 120.0) (if (<= a 1e-172) (* -60.0 (/ x t)) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.7e-173) {
tmp = a * 120.0;
} else if (a <= 1e-172) {
tmp = -60.0 * (x / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-3.7d-173)) then
tmp = a * 120.0d0
else if (a <= 1d-172) then
tmp = (-60.0d0) * (x / t)
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.7e-173) {
tmp = a * 120.0;
} else if (a <= 1e-172) {
tmp = -60.0 * (x / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -3.7e-173: tmp = a * 120.0 elif a <= 1e-172: tmp = -60.0 * (x / t) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -3.7e-173) tmp = Float64(a * 120.0); elseif (a <= 1e-172) tmp = Float64(-60.0 * Float64(x / t)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -3.7e-173) tmp = a * 120.0; elseif (a <= 1e-172) tmp = -60.0 * (x / t); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3.7e-173], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 1e-172], N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.7 \cdot 10^{-173}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq 10^{-172}:\\
\;\;\;\;-60 \cdot \frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -3.7e-173 or 1e-172 < a Initial program 99.8%
+-commutative99.8%
fma-def99.9%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in a around inf 62.1%
if -3.7e-173 < a < 1e-172Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in z around 0 63.5%
neg-mul-163.5%
distribute-neg-frac63.5%
Simplified63.5%
Taylor expanded in y around 0 41.9%
Taylor expanded in a around 0 39.6%
Final simplification56.5%
(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%
+-commutative99.8%
fma-def99.8%
associate-*l/99.8%
Simplified99.8%
Taylor expanded in a around inf 49.2%
Final simplification49.2%
(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 2023221
(FPCore (x y z t a)
:name "Data.Colour.RGB:hslsv from colour-2.3.3, B"
:precision binary64
:herbie-target
(+ (/ 60.0 (/ (- z t) (- x y))) (* a 120.0))
(+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))