
(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 19 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 (/ (- x y) (- z t)))))
double code(double x, double y, double z, double t, double a) {
return fma(a, 120.0, (60.0 * ((x - y) / (z - t))));
}
function code(x, y, z, t, a) return fma(a, 120.0, Float64(60.0 * Float64(Float64(x - y) / Float64(z - t)))) end
code[x_, y_, z_, t_, a_] := N[(a * 120.0 + N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(a, 120, 60 \cdot \frac{x - y}{z - t}\right)
\end{array}
Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
+-commutative99.8%
fma-define99.9%
Applied egg-rr99.9%
(FPCore (x y z t a) :precision binary64 (fma 60.0 (/ (- x y) (- z t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return fma(60.0, ((x - y) / (z - t)), (a * 120.0));
}
function code(x, y, z, t, a) return fma(60.0, Float64(Float64(x - y) / Float64(z - t)), Float64(a * 120.0)) end
code[x_, y_, z_, t_, a_] := N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(60, \frac{x - y}{z - t}, a \cdot 120\right)
\end{array}
Initial program 99.8%
associate-/l*99.8%
fma-define99.9%
Simplified99.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= (* a 120.0) -5e-47) (not (<= (* a 120.0) 5e-167))) (+ (/ (* y -60.0) (- z t)) (* a 120.0)) (* (- x y) (/ 60.0 (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((a * 120.0) <= -5e-47) || !((a * 120.0) <= 5e-167)) {
tmp = ((y * -60.0) / (z - t)) + (a * 120.0);
} else {
tmp = (x - y) * (60.0 / (z - t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (((a * 120.0d0) <= (-5d-47)) .or. (.not. ((a * 120.0d0) <= 5d-167))) then
tmp = ((y * (-60.0d0)) / (z - t)) + (a * 120.0d0)
else
tmp = (x - y) * (60.0d0 / (z - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (((a * 120.0) <= -5e-47) || !((a * 120.0) <= 5e-167)) {
tmp = ((y * -60.0) / (z - t)) + (a * 120.0);
} else {
tmp = (x - y) * (60.0 / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if ((a * 120.0) <= -5e-47) or not ((a * 120.0) <= 5e-167): tmp = ((y * -60.0) / (z - t)) + (a * 120.0) else: tmp = (x - y) * (60.0 / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((Float64(a * 120.0) <= -5e-47) || !(Float64(a * 120.0) <= 5e-167)) tmp = Float64(Float64(Float64(y * -60.0) / Float64(z - t)) + Float64(a * 120.0)); else tmp = Float64(Float64(x - y) * Float64(60.0 / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (((a * 120.0) <= -5e-47) || ~(((a * 120.0) <= 5e-167))) tmp = ((y * -60.0) / (z - t)) + (a * 120.0); else tmp = (x - y) * (60.0 / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[N[(a * 120.0), $MachinePrecision], -5e-47], N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 5e-167]], $MachinePrecision]], N[(N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -5 \cdot 10^{-47} \lor \neg \left(a \cdot 120 \leq 5 \cdot 10^{-167}\right):\\
\;\;\;\;\frac{y \cdot -60}{z - t} + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{60}{z - t}\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -5.00000000000000011e-47 or 5.0000000000000002e-167 < (*.f64 a #s(literal 120 binary64)) Initial program 99.9%
Taylor expanded in x around 0 84.1%
if -5.00000000000000011e-47 < (*.f64 a #s(literal 120 binary64)) < 5.0000000000000002e-167Initial program 99.7%
*-commutative99.7%
associate-/l*99.8%
Applied egg-rr99.8%
Taylor expanded in a around 0 86.1%
associate-*r/86.1%
*-commutative86.1%
associate-/l*86.1%
Simplified86.1%
Final simplification84.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= (* a 120.0) -1e+53) (not (<= (* a 120.0) 100000.0))) (* a 120.0) (* 60.0 (/ (- x y) (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((a * 120.0) <= -1e+53) || !((a * 120.0) <= 100000.0)) {
tmp = a * 120.0;
} else {
tmp = 60.0 * ((x - y) / (z - t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (((a * 120.0d0) <= (-1d+53)) .or. (.not. ((a * 120.0d0) <= 100000.0d0))) then
tmp = a * 120.0d0
else
tmp = 60.0d0 * ((x - y) / (z - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (((a * 120.0) <= -1e+53) || !((a * 120.0) <= 100000.0)) {
tmp = a * 120.0;
} else {
tmp = 60.0 * ((x - y) / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if ((a * 120.0) <= -1e+53) or not ((a * 120.0) <= 100000.0): tmp = a * 120.0 else: tmp = 60.0 * ((x - y) / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((Float64(a * 120.0) <= -1e+53) || !(Float64(a * 120.0) <= 100000.0)) tmp = Float64(a * 120.0); else tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (((a * 120.0) <= -1e+53) || ~(((a * 120.0) <= 100000.0))) tmp = a * 120.0; else tmp = 60.0 * ((x - y) / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[N[(a * 120.0), $MachinePrecision], -1e+53], N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 100000.0]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -1 \cdot 10^{+53} \lor \neg \left(a \cdot 120 \leq 100000\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -9.9999999999999999e52 or 1e5 < (*.f64 a #s(literal 120 binary64)) Initial program 99.9%
associate-/l*99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in z around inf 83.5%
if -9.9999999999999999e52 < (*.f64 a #s(literal 120 binary64)) < 1e5Initial program 99.8%
associate-/l*99.8%
fma-define99.8%
Simplified99.8%
Taylor expanded in a around 0 74.7%
Final simplification78.6%
(FPCore (x y z t a) :precision binary64 (if (<= (* a 120.0) -1e+53) (+ (/ (* y -60.0) z) (* a 120.0)) (if (<= (* a 120.0) 100000.0) (* 60.0 (/ (- x y) (- z t))) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -1e+53) {
tmp = ((y * -60.0) / z) + (a * 120.0);
} else if ((a * 120.0) <= 100000.0) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a * 120.0d0) <= (-1d+53)) then
tmp = ((y * (-60.0d0)) / z) + (a * 120.0d0)
else if ((a * 120.0d0) <= 100000.0d0) then
tmp = 60.0d0 * ((x - y) / (z - t))
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -1e+53) {
tmp = ((y * -60.0) / z) + (a * 120.0);
} else if ((a * 120.0) <= 100000.0) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -1e+53: tmp = ((y * -60.0) / z) + (a * 120.0) elif (a * 120.0) <= 100000.0: tmp = 60.0 * ((x - y) / (z - t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -1e+53) tmp = Float64(Float64(Float64(y * -60.0) / z) + Float64(a * 120.0)); elseif (Float64(a * 120.0) <= 100000.0) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a * 120.0) <= -1e+53) tmp = ((y * -60.0) / z) + (a * 120.0); elseif ((a * 120.0) <= 100000.0) tmp = 60.0 * ((x - y) / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -1e+53], N[(N[(N[(y * -60.0), $MachinePrecision] / z), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 100000.0], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -1 \cdot 10^{+53}:\\
\;\;\;\;\frac{y \cdot -60}{z} + a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq 100000:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -9.9999999999999999e52Initial program 99.7%
Taylor expanded in x around 0 89.8%
Taylor expanded in z around inf 83.9%
if -9.9999999999999999e52 < (*.f64 a #s(literal 120 binary64)) < 1e5Initial program 99.8%
associate-/l*99.8%
fma-define99.8%
Simplified99.8%
Taylor expanded in a around 0 74.7%
if 1e5 < (*.f64 a #s(literal 120 binary64)) Initial program 100.0%
associate-/l*100.0%
fma-define100.0%
Simplified100.0%
Taylor expanded in z around inf 84.7%
Final simplification79.0%
(FPCore (x y z t a)
:precision binary64
(if (<= a -1.35e-58)
(* a 120.0)
(if (<= a -1.75e-227)
(* 60.0 (/ x (- z t)))
(if (<= a 9e-148) (/ (* y -60.0) (- z t)) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.35e-58) {
tmp = a * 120.0;
} else if (a <= -1.75e-227) {
tmp = 60.0 * (x / (z - t));
} else if (a <= 9e-148) {
tmp = (y * -60.0) / (z - t);
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-1.35d-58)) then
tmp = a * 120.0d0
else if (a <= (-1.75d-227)) then
tmp = 60.0d0 * (x / (z - t))
else if (a <= 9d-148) then
tmp = (y * (-60.0d0)) / (z - t)
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.35e-58) {
tmp = a * 120.0;
} else if (a <= -1.75e-227) {
tmp = 60.0 * (x / (z - t));
} else if (a <= 9e-148) {
tmp = (y * -60.0) / (z - t);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.35e-58: tmp = a * 120.0 elif a <= -1.75e-227: tmp = 60.0 * (x / (z - t)) elif a <= 9e-148: tmp = (y * -60.0) / (z - t) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.35e-58) tmp = Float64(a * 120.0); elseif (a <= -1.75e-227) tmp = Float64(60.0 * Float64(x / Float64(z - t))); elseif (a <= 9e-148) tmp = Float64(Float64(y * -60.0) / Float64(z - t)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.35e-58) tmp = a * 120.0; elseif (a <= -1.75e-227) tmp = 60.0 * (x / (z - t)); elseif (a <= 9e-148) tmp = (y * -60.0) / (z - t); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.35e-58], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -1.75e-227], N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 9e-148], N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.35 \cdot 10^{-58}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -1.75 \cdot 10^{-227}:\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\
\mathbf{elif}\;a \leq 9 \cdot 10^{-148}:\\
\;\;\;\;\frac{y \cdot -60}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -1.3499999999999999e-58 or 9.00000000000000029e-148 < a Initial program 99.9%
associate-/l*99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in z around inf 72.5%
if -1.3499999999999999e-58 < a < -1.75000000000000005e-227Initial program 99.8%
associate-/l*99.9%
Simplified99.9%
+-commutative99.9%
fma-define99.9%
Applied egg-rr99.9%
Taylor expanded in x around inf 51.5%
if -1.75000000000000005e-227 < a < 9.00000000000000029e-148Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
+-commutative99.7%
fma-define99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 62.7%
associate-*r/62.8%
*-commutative62.8%
Simplified62.8%
Final simplification66.8%
(FPCore (x y z t a)
:precision binary64
(if (<= a -6.5e-69)
(* a 120.0)
(if (<= a -8.2e-230)
(* 60.0 (/ x (- z t)))
(if (<= a 2.2e-148) (* y (/ -60.0 (- z t))) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -6.5e-69) {
tmp = a * 120.0;
} else if (a <= -8.2e-230) {
tmp = 60.0 * (x / (z - t));
} else if (a <= 2.2e-148) {
tmp = y * (-60.0 / (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 <= (-6.5d-69)) then
tmp = a * 120.0d0
else if (a <= (-8.2d-230)) then
tmp = 60.0d0 * (x / (z - t))
else if (a <= 2.2d-148) then
tmp = y * ((-60.0d0) / (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 <= -6.5e-69) {
tmp = a * 120.0;
} else if (a <= -8.2e-230) {
tmp = 60.0 * (x / (z - t));
} else if (a <= 2.2e-148) {
tmp = y * (-60.0 / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -6.5e-69: tmp = a * 120.0 elif a <= -8.2e-230: tmp = 60.0 * (x / (z - t)) elif a <= 2.2e-148: tmp = y * (-60.0 / (z - t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -6.5e-69) tmp = Float64(a * 120.0); elseif (a <= -8.2e-230) tmp = Float64(60.0 * Float64(x / Float64(z - t))); elseif (a <= 2.2e-148) tmp = Float64(y * Float64(-60.0 / 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 <= -6.5e-69) tmp = a * 120.0; elseif (a <= -8.2e-230) tmp = 60.0 * (x / (z - t)); elseif (a <= 2.2e-148) tmp = y * (-60.0 / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -6.5e-69], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -8.2e-230], N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.2e-148], N[(y * N[(-60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -6.5 \cdot 10^{-69}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -8.2 \cdot 10^{-230}:\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\
\mathbf{elif}\;a \leq 2.2 \cdot 10^{-148}:\\
\;\;\;\;y \cdot \frac{-60}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -6.49999999999999951e-69 or 2.20000000000000017e-148 < a Initial program 99.9%
associate-/l*99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in z around inf 72.5%
if -6.49999999999999951e-69 < a < -8.2000000000000003e-230Initial program 99.8%
associate-/l*99.9%
Simplified99.9%
+-commutative99.9%
fma-define99.9%
Applied egg-rr99.9%
Taylor expanded in x around inf 51.5%
if -8.2000000000000003e-230 < a < 2.20000000000000017e-148Initial program 99.7%
Taylor expanded in x around 0 73.0%
Taylor expanded in y around inf 72.7%
associate-*r/72.9%
metadata-eval72.9%
Simplified72.9%
Taylor expanded in a around 0 62.8%
Final simplification66.8%
(FPCore (x y z t a)
:precision binary64
(if (<= a -1.4e-57)
(* a 120.0)
(if (<= a -1.62e-229)
(* 60.0 (/ x (- z t)))
(if (<= a 1.1e-147) (* -60.0 (/ y (- z t))) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.4e-57) {
tmp = a * 120.0;
} else if (a <= -1.62e-229) {
tmp = 60.0 * (x / (z - t));
} else if (a <= 1.1e-147) {
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 (a <= (-1.4d-57)) then
tmp = a * 120.0d0
else if (a <= (-1.62d-229)) then
tmp = 60.0d0 * (x / (z - t))
else if (a <= 1.1d-147) 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 (a <= -1.4e-57) {
tmp = a * 120.0;
} else if (a <= -1.62e-229) {
tmp = 60.0 * (x / (z - t));
} else if (a <= 1.1e-147) {
tmp = -60.0 * (y / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.4e-57: tmp = a * 120.0 elif a <= -1.62e-229: tmp = 60.0 * (x / (z - t)) elif a <= 1.1e-147: tmp = -60.0 * (y / (z - t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.4e-57) tmp = Float64(a * 120.0); elseif (a <= -1.62e-229) tmp = Float64(60.0 * Float64(x / Float64(z - t))); elseif (a <= 1.1e-147) 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 (a <= -1.4e-57) tmp = a * 120.0; elseif (a <= -1.62e-229) tmp = 60.0 * (x / (z - t)); elseif (a <= 1.1e-147) tmp = -60.0 * (y / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.4e-57], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -1.62e-229], N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.1e-147], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.4 \cdot 10^{-57}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -1.62 \cdot 10^{-229}:\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\
\mathbf{elif}\;a \leq 1.1 \cdot 10^{-147}:\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -1.4e-57 or 1.1000000000000001e-147 < a Initial program 99.9%
associate-/l*99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in z around inf 72.5%
if -1.4e-57 < a < -1.62e-229Initial program 99.8%
associate-/l*99.9%
Simplified99.9%
+-commutative99.9%
fma-define99.9%
Applied egg-rr99.9%
Taylor expanded in x around inf 51.5%
if -1.62e-229 < a < 1.1000000000000001e-147Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
+-commutative99.7%
fma-define99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 62.7%
Final simplification66.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -6.6e+16) (not (<= x 12600000000.0))) (+ (/ (* 60.0 x) (- z t)) (* a 120.0)) (+ (/ (* y -60.0) (- z t)) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -6.6e+16) || !(x <= 12600000000.0)) {
tmp = ((60.0 * x) / (z - t)) + (a * 120.0);
} else {
tmp = ((y * -60.0) / (z - t)) + (a * 120.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((x <= (-6.6d+16)) .or. (.not. (x <= 12600000000.0d0))) then
tmp = ((60.0d0 * x) / (z - t)) + (a * 120.0d0)
else
tmp = ((y * (-60.0d0)) / (z - t)) + (a * 120.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -6.6e+16) || !(x <= 12600000000.0)) {
tmp = ((60.0 * x) / (z - t)) + (a * 120.0);
} else {
tmp = ((y * -60.0) / (z - t)) + (a * 120.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -6.6e+16) or not (x <= 12600000000.0): tmp = ((60.0 * x) / (z - t)) + (a * 120.0) else: tmp = ((y * -60.0) / (z - t)) + (a * 120.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -6.6e+16) || !(x <= 12600000000.0)) tmp = Float64(Float64(Float64(60.0 * x) / Float64(z - t)) + Float64(a * 120.0)); else tmp = Float64(Float64(Float64(y * -60.0) / Float64(z - t)) + Float64(a * 120.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -6.6e+16) || ~((x <= 12600000000.0))) tmp = ((60.0 * x) / (z - t)) + (a * 120.0); else tmp = ((y * -60.0) / (z - t)) + (a * 120.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -6.6e+16], N[Not[LessEqual[x, 12600000000.0]], $MachinePrecision]], N[(N[(N[(60.0 * x), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.6 \cdot 10^{+16} \lor \neg \left(x \leq 12600000000\right):\\
\;\;\;\;\frac{60 \cdot x}{z - t} + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot -60}{z - t} + a \cdot 120\\
\end{array}
\end{array}
if x < -6.6e16 or 1.26e10 < x Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 88.1%
associate-*r/88.1%
Simplified88.1%
if -6.6e16 < x < 1.26e10Initial program 99.9%
Taylor expanded in x around 0 93.9%
Final simplification91.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -4.5e+59) (not (<= z 5.5e-9))) (+ (/ (* y -60.0) z) (* a 120.0)) (+ (* 60.0 (/ (- y x) t)) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -4.5e+59) || !(z <= 5.5e-9)) {
tmp = ((y * -60.0) / z) + (a * 120.0);
} else {
tmp = (60.0 * ((y - x) / t)) + (a * 120.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-4.5d+59)) .or. (.not. (z <= 5.5d-9))) then
tmp = ((y * (-60.0d0)) / z) + (a * 120.0d0)
else
tmp = (60.0d0 * ((y - x) / t)) + (a * 120.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -4.5e+59) || !(z <= 5.5e-9)) {
tmp = ((y * -60.0) / z) + (a * 120.0);
} else {
tmp = (60.0 * ((y - x) / t)) + (a * 120.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -4.5e+59) or not (z <= 5.5e-9): tmp = ((y * -60.0) / z) + (a * 120.0) else: tmp = (60.0 * ((y - x) / t)) + (a * 120.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -4.5e+59) || !(z <= 5.5e-9)) tmp = Float64(Float64(Float64(y * -60.0) / z) + Float64(a * 120.0)); else tmp = Float64(Float64(60.0 * Float64(Float64(y - x) / t)) + Float64(a * 120.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -4.5e+59) || ~((z <= 5.5e-9))) tmp = ((y * -60.0) / z) + (a * 120.0); else tmp = (60.0 * ((y - x) / t)) + (a * 120.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -4.5e+59], N[Not[LessEqual[z, 5.5e-9]], $MachinePrecision]], N[(N[(N[(y * -60.0), $MachinePrecision] / z), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(N[(60.0 * N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.5 \cdot 10^{+59} \lor \neg \left(z \leq 5.5 \cdot 10^{-9}\right):\\
\;\;\;\;\frac{y \cdot -60}{z} + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{y - x}{t} + a \cdot 120\\
\end{array}
\end{array}
if z < -4.49999999999999959e59 or 5.4999999999999996e-9 < z Initial program 99.9%
Taylor expanded in x around 0 84.3%
Taylor expanded in z around inf 76.6%
if -4.49999999999999959e59 < z < 5.4999999999999996e-9Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around 0 82.2%
associate-*r/82.2%
neg-mul-182.2%
neg-sub082.2%
sub-neg82.2%
+-commutative82.2%
associate--r+82.2%
neg-sub082.2%
remove-double-neg82.2%
Simplified82.2%
Final simplification79.5%
(FPCore (x y z t a)
:precision binary64
(if (<= z -3.4e+59)
(+ (* y (/ -60.0 (+ z t))) (* a 120.0))
(if (<= z 2e-23)
(+ (* (- x y) (/ -60.0 t)) (* a 120.0))
(+ (/ (* y -60.0) z) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.4e+59) {
tmp = (y * (-60.0 / (z + t))) + (a * 120.0);
} else if (z <= 2e-23) {
tmp = ((x - y) * (-60.0 / t)) + (a * 120.0);
} else {
tmp = ((y * -60.0) / z) + (a * 120.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-3.4d+59)) then
tmp = (y * ((-60.0d0) / (z + t))) + (a * 120.0d0)
else if (z <= 2d-23) then
tmp = ((x - y) * ((-60.0d0) / t)) + (a * 120.0d0)
else
tmp = ((y * (-60.0d0)) / z) + (a * 120.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.4e+59) {
tmp = (y * (-60.0 / (z + t))) + (a * 120.0);
} else if (z <= 2e-23) {
tmp = ((x - y) * (-60.0 / t)) + (a * 120.0);
} else {
tmp = ((y * -60.0) / z) + (a * 120.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.4e+59: tmp = (y * (-60.0 / (z + t))) + (a * 120.0) elif z <= 2e-23: tmp = ((x - y) * (-60.0 / t)) + (a * 120.0) else: tmp = ((y * -60.0) / z) + (a * 120.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.4e+59) tmp = Float64(Float64(y * Float64(-60.0 / Float64(z + t))) + Float64(a * 120.0)); elseif (z <= 2e-23) tmp = Float64(Float64(Float64(x - y) * Float64(-60.0 / t)) + Float64(a * 120.0)); else tmp = Float64(Float64(Float64(y * -60.0) / z) + Float64(a * 120.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3.4e+59) tmp = (y * (-60.0 / (z + t))) + (a * 120.0); elseif (z <= 2e-23) tmp = ((x - y) * (-60.0 / t)) + (a * 120.0); else tmp = ((y * -60.0) / z) + (a * 120.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.4e+59], N[(N[(y * N[(-60.0 / N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2e-23], N[(N[(N[(x - y), $MachinePrecision] * N[(-60.0 / t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y * -60.0), $MachinePrecision] / z), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.4 \cdot 10^{+59}:\\
\;\;\;\;y \cdot \frac{-60}{z + t} + a \cdot 120\\
\mathbf{elif}\;z \leq 2 \cdot 10^{-23}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{-60}{t} + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot -60}{z} + a \cdot 120\\
\end{array}
\end{array}
if z < -3.40000000000000006e59Initial program 99.9%
Taylor expanded in x around 0 83.7%
associate-/l*83.7%
sub-neg83.7%
add-sqr-sqrt38.0%
sqrt-unprod80.1%
sqr-neg80.1%
sqrt-unprod45.7%
add-sqr-sqrt81.6%
Applied egg-rr81.6%
associate-*r/81.6%
*-commutative81.6%
associate-*r/81.6%
Simplified81.6%
if -3.40000000000000006e59 < z < 1.99999999999999992e-23Initial program 99.8%
Taylor expanded in z around 0 82.2%
neg-mul-182.2%
Simplified82.2%
Taylor expanded in t around 0 82.2%
associate-*r/82.2%
*-commutative82.2%
*-lft-identity82.2%
times-frac82.3%
/-rgt-identity82.3%
Simplified82.3%
if 1.99999999999999992e-23 < z Initial program 99.8%
Taylor expanded in x around 0 84.9%
Taylor expanded in z around inf 74.7%
Final simplification80.2%
(FPCore (x y z t a)
:precision binary64
(if (<= z -3.4e+59)
(+ (* y (/ -60.0 (+ z t))) (* a 120.0))
(if (<= z 1.1e-12)
(+ (* 60.0 (/ (- y x) t)) (* a 120.0))
(+ (/ (* y -60.0) z) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.4e+59) {
tmp = (y * (-60.0 / (z + t))) + (a * 120.0);
} else if (z <= 1.1e-12) {
tmp = (60.0 * ((y - x) / t)) + (a * 120.0);
} else {
tmp = ((y * -60.0) / z) + (a * 120.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-3.4d+59)) then
tmp = (y * ((-60.0d0) / (z + t))) + (a * 120.0d0)
else if (z <= 1.1d-12) then
tmp = (60.0d0 * ((y - x) / t)) + (a * 120.0d0)
else
tmp = ((y * (-60.0d0)) / z) + (a * 120.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.4e+59) {
tmp = (y * (-60.0 / (z + t))) + (a * 120.0);
} else if (z <= 1.1e-12) {
tmp = (60.0 * ((y - x) / t)) + (a * 120.0);
} else {
tmp = ((y * -60.0) / z) + (a * 120.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.4e+59: tmp = (y * (-60.0 / (z + t))) + (a * 120.0) elif z <= 1.1e-12: tmp = (60.0 * ((y - x) / t)) + (a * 120.0) else: tmp = ((y * -60.0) / z) + (a * 120.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.4e+59) tmp = Float64(Float64(y * Float64(-60.0 / Float64(z + t))) + Float64(a * 120.0)); elseif (z <= 1.1e-12) tmp = Float64(Float64(60.0 * Float64(Float64(y - x) / t)) + Float64(a * 120.0)); else tmp = Float64(Float64(Float64(y * -60.0) / z) + Float64(a * 120.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3.4e+59) tmp = (y * (-60.0 / (z + t))) + (a * 120.0); elseif (z <= 1.1e-12) tmp = (60.0 * ((y - x) / t)) + (a * 120.0); else tmp = ((y * -60.0) / z) + (a * 120.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.4e+59], N[(N[(y * N[(-60.0 / N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.1e-12], N[(N[(60.0 * N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y * -60.0), $MachinePrecision] / z), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.4 \cdot 10^{+59}:\\
\;\;\;\;y \cdot \frac{-60}{z + t} + a \cdot 120\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{-12}:\\
\;\;\;\;60 \cdot \frac{y - x}{t} + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot -60}{z} + a \cdot 120\\
\end{array}
\end{array}
if z < -3.40000000000000006e59Initial program 99.9%
Taylor expanded in x around 0 83.7%
associate-/l*83.7%
sub-neg83.7%
add-sqr-sqrt38.0%
sqrt-unprod80.1%
sqr-neg80.1%
sqrt-unprod45.7%
add-sqr-sqrt81.6%
Applied egg-rr81.6%
associate-*r/81.6%
*-commutative81.6%
associate-*r/81.6%
Simplified81.6%
if -3.40000000000000006e59 < z < 1.09999999999999996e-12Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around 0 82.2%
associate-*r/82.2%
neg-mul-182.2%
neg-sub082.2%
sub-neg82.2%
+-commutative82.2%
associate--r+82.2%
neg-sub082.2%
remove-double-neg82.2%
Simplified82.2%
if 1.09999999999999996e-12 < z Initial program 99.8%
Taylor expanded in x around 0 84.9%
Taylor expanded in z around inf 74.7%
Final simplification80.2%
(FPCore (x y z t a)
:precision binary64
(if (<= y -1.8e+244)
(* -60.0 (/ y z))
(if (<= y -6.8e+180)
(* 60.0 (/ y t))
(if (<= y 1.25e+158) (* a 120.0) (/ (* y -60.0) z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.8e+244) {
tmp = -60.0 * (y / z);
} else if (y <= -6.8e+180) {
tmp = 60.0 * (y / t);
} else if (y <= 1.25e+158) {
tmp = a * 120.0;
} else {
tmp = (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) :: tmp
if (y <= (-1.8d+244)) then
tmp = (-60.0d0) * (y / z)
else if (y <= (-6.8d+180)) then
tmp = 60.0d0 * (y / t)
else if (y <= 1.25d+158) then
tmp = a * 120.0d0
else
tmp = (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 tmp;
if (y <= -1.8e+244) {
tmp = -60.0 * (y / z);
} else if (y <= -6.8e+180) {
tmp = 60.0 * (y / t);
} else if (y <= 1.25e+158) {
tmp = a * 120.0;
} else {
tmp = (y * -60.0) / z;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -1.8e+244: tmp = -60.0 * (y / z) elif y <= -6.8e+180: tmp = 60.0 * (y / t) elif y <= 1.25e+158: tmp = a * 120.0 else: tmp = (y * -60.0) / z return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -1.8e+244) tmp = Float64(-60.0 * Float64(y / z)); elseif (y <= -6.8e+180) tmp = Float64(60.0 * Float64(y / t)); elseif (y <= 1.25e+158) tmp = Float64(a * 120.0); else tmp = Float64(Float64(y * -60.0) / z); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -1.8e+244) tmp = -60.0 * (y / z); elseif (y <= -6.8e+180) tmp = 60.0 * (y / t); elseif (y <= 1.25e+158) tmp = a * 120.0; else tmp = (y * -60.0) / z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -1.8e+244], N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -6.8e+180], N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.25e+158], N[(a * 120.0), $MachinePrecision], N[(N[(y * -60.0), $MachinePrecision] / z), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.8 \cdot 10^{+244}:\\
\;\;\;\;-60 \cdot \frac{y}{z}\\
\mathbf{elif}\;y \leq -6.8 \cdot 10^{+180}:\\
\;\;\;\;60 \cdot \frac{y}{t}\\
\mathbf{elif}\;y \leq 1.25 \cdot 10^{+158}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot -60}{z}\\
\end{array}
\end{array}
if y < -1.8e244Initial program 100.0%
associate-/l*99.9%
Simplified99.9%
+-commutative99.9%
fma-define99.9%
Applied egg-rr99.9%
Taylor expanded in y around inf 75.1%
Taylor expanded in z around inf 60.2%
if -1.8e244 < y < -6.79999999999999969e180Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
+-commutative99.8%
fma-define99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 87.3%
Taylor expanded in z around 0 75.1%
if -6.79999999999999969e180 < y < 1.2499999999999999e158Initial program 99.8%
associate-/l*99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in z around inf 60.6%
if 1.2499999999999999e158 < y Initial program 99.8%
associate-/l*99.6%
Simplified99.6%
+-commutative99.6%
fma-define99.6%
Applied egg-rr99.6%
Taylor expanded in y around inf 68.7%
Taylor expanded in z around inf 46.8%
associate-*r/46.9%
Simplified46.9%
Final simplification59.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* -60.0 (/ y z))))
(if (<= y -2.4e+242)
t_1
(if (<= y -3.8e+180)
(* 60.0 (/ y t))
(if (<= y 2.05e+158) (* a 120.0) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -60.0 * (y / z);
double tmp;
if (y <= -2.4e+242) {
tmp = t_1;
} else if (y <= -3.8e+180) {
tmp = 60.0 * (y / t);
} else if (y <= 2.05e+158) {
tmp = a * 120.0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (-60.0d0) * (y / z)
if (y <= (-2.4d+242)) then
tmp = t_1
else if (y <= (-3.8d+180)) then
tmp = 60.0d0 * (y / t)
else if (y <= 2.05d+158) 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);
double tmp;
if (y <= -2.4e+242) {
tmp = t_1;
} else if (y <= -3.8e+180) {
tmp = 60.0 * (y / t);
} else if (y <= 2.05e+158) {
tmp = a * 120.0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -60.0 * (y / z) tmp = 0 if y <= -2.4e+242: tmp = t_1 elif y <= -3.8e+180: tmp = 60.0 * (y / t) elif y <= 2.05e+158: tmp = a * 120.0 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(-60.0 * Float64(y / z)) tmp = 0.0 if (y <= -2.4e+242) tmp = t_1; elseif (y <= -3.8e+180) tmp = Float64(60.0 * Float64(y / t)); elseif (y <= 2.05e+158) 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); tmp = 0.0; if (y <= -2.4e+242) tmp = t_1; elseif (y <= -3.8e+180) tmp = 60.0 * (y / t); elseif (y <= 2.05e+158) 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 / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.4e+242], t$95$1, If[LessEqual[y, -3.8e+180], N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.05e+158], N[(a * 120.0), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -60 \cdot \frac{y}{z}\\
\mathbf{if}\;y \leq -2.4 \cdot 10^{+242}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -3.8 \cdot 10^{+180}:\\
\;\;\;\;60 \cdot \frac{y}{t}\\
\mathbf{elif}\;y \leq 2.05 \cdot 10^{+158}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2.40000000000000012e242 or 2.05000000000000002e158 < y Initial program 99.9%
associate-/l*99.7%
Simplified99.7%
+-commutative99.7%
fma-define99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 70.5%
Taylor expanded in z around inf 50.6%
if -2.40000000000000012e242 < y < -3.8e180Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
+-commutative99.8%
fma-define99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 87.3%
Taylor expanded in z around 0 75.1%
if -3.8e180 < y < 2.05000000000000002e158Initial program 99.8%
associate-/l*99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in z around inf 60.6%
Final simplification59.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -3.2e-88) (not (<= a 1.1e-147))) (* a 120.0) (* -60.0 (/ y (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -3.2e-88) || !(a <= 1.1e-147)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (y / (z - t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-3.2d-88)) .or. (.not. (a <= 1.1d-147))) then
tmp = a * 120.0d0
else
tmp = (-60.0d0) * (y / (z - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -3.2e-88) || !(a <= 1.1e-147)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (y / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -3.2e-88) or not (a <= 1.1e-147): tmp = a * 120.0 else: tmp = -60.0 * (y / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -3.2e-88) || !(a <= 1.1e-147)) tmp = Float64(a * 120.0); else tmp = Float64(-60.0 * Float64(y / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -3.2e-88) || ~((a <= 1.1e-147))) tmp = a * 120.0; else tmp = -60.0 * (y / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -3.2e-88], N[Not[LessEqual[a, 1.1e-147]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.2 \cdot 10^{-88} \lor \neg \left(a \leq 1.1 \cdot 10^{-147}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\end{array}
\end{array}
if a < -3.20000000000000012e-88 or 1.1000000000000001e-147 < a Initial program 99.9%
associate-/l*99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in z around inf 70.1%
if -3.20000000000000012e-88 < a < 1.1000000000000001e-147Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
+-commutative99.8%
fma-define99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 52.6%
Final simplification64.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -3.3e-108) (not (<= a 1.15e-178))) (* a 120.0) (* -60.0 (/ y z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -3.3e-108) || !(a <= 1.15e-178)) {
tmp = a * 120.0;
} else {
tmp = -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.3d-108)) .or. (.not. (a <= 1.15d-178))) then
tmp = a * 120.0d0
else
tmp = (-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.3e-108) || !(a <= 1.15e-178)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (y / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -3.3e-108) or not (a <= 1.15e-178): tmp = a * 120.0 else: tmp = -60.0 * (y / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -3.3e-108) || !(a <= 1.15e-178)) tmp = Float64(a * 120.0); else tmp = 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.3e-108) || ~((a <= 1.15e-178))) tmp = a * 120.0; else tmp = -60.0 * (y / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -3.3e-108], N[Not[LessEqual[a, 1.15e-178]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.3 \cdot 10^{-108} \lor \neg \left(a \leq 1.15 \cdot 10^{-178}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if a < -3.3000000000000002e-108 or 1.14999999999999997e-178 < a Initial program 99.9%
associate-/l*99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in z around inf 65.9%
if -3.3000000000000002e-108 < a < 1.14999999999999997e-178Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
+-commutative99.7%
fma-define99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 53.8%
Taylor expanded in z around inf 35.2%
Final simplification57.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -2.3e-118) (not (<= a 4.3e-169))) (* a 120.0) (* -60.0 (/ x t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.3e-118) || !(a <= 4.3e-169)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (x / t);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-2.3d-118)) .or. (.not. (a <= 4.3d-169))) then
tmp = a * 120.0d0
else
tmp = (-60.0d0) * (x / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.3e-118) || !(a <= 4.3e-169)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (x / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -2.3e-118) or not (a <= 4.3e-169): tmp = a * 120.0 else: tmp = -60.0 * (x / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -2.3e-118) || !(a <= 4.3e-169)) tmp = Float64(a * 120.0); else tmp = Float64(-60.0 * Float64(x / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -2.3e-118) || ~((a <= 4.3e-169))) tmp = a * 120.0; else tmp = -60.0 * (x / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -2.3e-118], N[Not[LessEqual[a, 4.3e-169]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.3 \cdot 10^{-118} \lor \neg \left(a \leq 4.3 \cdot 10^{-169}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{x}{t}\\
\end{array}
\end{array}
if a < -2.30000000000000021e-118 or 4.29999999999999984e-169 < a Initial program 99.9%
associate-/l*99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in z around inf 66.6%
if -2.30000000000000021e-118 < a < 4.29999999999999984e-169Initial program 99.7%
Taylor expanded in z around 0 55.6%
neg-mul-155.6%
Simplified55.6%
Taylor expanded in t around 0 55.6%
Taylor expanded in x around inf 24.8%
Final simplification55.0%
(FPCore (x y z t a) :precision binary64 (+ (* 60.0 (/ (- x y) (- z t))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return (60.0 * ((x - y) / (z - t))) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (60.0d0 * ((x - y) / (z - t))) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return (60.0 * ((x - y) / (z - t))) + (a * 120.0);
}
def code(x, y, z, t, a): return (60.0 * ((x - y) / (z - t))) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = (60.0 * ((x - y) / (z - t))) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
60 \cdot \frac{x - y}{z - t} + a \cdot 120
\end{array}
Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
(FPCore (x y z t a) :precision binary64 (* a 120.0))
double code(double x, double y, double z, double t, double a) {
return a * 120.0;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = a * 120.0d0
end function
public static double code(double x, double y, double z, double t, double a) {
return a * 120.0;
}
def code(x, y, z, t, a): return a * 120.0
function code(x, y, z, t, a) return Float64(a * 120.0) end
function tmp = code(x, y, z, t, a) tmp = a * 120.0; end
code[x_, y_, z_, t_, a_] := N[(a * 120.0), $MachinePrecision]
\begin{array}{l}
\\
a \cdot 120
\end{array}
Initial program 99.8%
associate-/l*99.8%
fma-define99.9%
Simplified99.9%
Taylor expanded in z around inf 51.2%
Final simplification51.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 2024145
(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)))