
(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 15 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 (/ (- x y) (/ (- z t) 60.0))))
double code(double x, double y, double z, double t, double a) {
return fma(a, 120.0, ((x - y) / ((z - t) / 60.0)));
}
function code(x, y, z, t, a) return fma(a, 120.0, Float64(Float64(x - y) / Float64(Float64(z - t) / 60.0))) end
code[x_, y_, z_, t_, a_] := N[(a * 120.0 + N[(N[(x - y), $MachinePrecision] / N[(N[(z - t), $MachinePrecision] / 60.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(a, 120, \frac{x - y}{\frac{z - t}{60}}\right)
\end{array}
Initial program 99.7%
+-commutative99.7%
fma-def99.8%
*-commutative99.8%
associate-/l*99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t a) :precision binary64 (fma a 120.0 (* (- x y) (/ 60.0 (- z t)))))
double code(double x, double y, double z, double t, double a) {
return fma(a, 120.0, ((x - y) * (60.0 / (z - t))));
}
function code(x, y, z, t, a) return fma(a, 120.0, Float64(Float64(x - y) * Float64(60.0 / Float64(z - t)))) end
code[x_, y_, z_, t_, a_] := N[(a * 120.0 + N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(a, 120, \left(x - y\right) \cdot \frac{60}{z - t}\right)
\end{array}
Initial program 99.7%
+-commutative99.7%
fma-def99.8%
associate-*l/99.8%
Simplified99.8%
Final simplification99.8%
(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(60.0 / Float64(Float64(z - t) / Float64(x - y)))) end
code[x_, y_, z_, t_, a_] := N[(a * 120.0 + N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(a, 120, \frac{60}{\frac{z - t}{x - y}}\right)
\end{array}
Initial program 99.7%
+-commutative99.7%
fma-def99.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
(let* ((t_1 (* 60.0 (/ (- x y) (- z t)))))
(if (<= (* a 120.0) -1e+16)
(* a 120.0)
(if (<= (* a 120.0) 2e-150)
t_1
(if (<= (* a 120.0) 1e-130)
(* a 120.0)
(if (<= (* a 120.0) 2e-74) t_1 (+ (* a 120.0) (* -60.0 (/ x t)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * ((x - y) / (z - t));
double tmp;
if ((a * 120.0) <= -1e+16) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 2e-150) {
tmp = t_1;
} else if ((a * 120.0) <= 1e-130) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 2e-74) {
tmp = t_1;
} else {
tmp = (a * 120.0) + (-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) :: t_1
real(8) :: tmp
t_1 = 60.0d0 * ((x - y) / (z - t))
if ((a * 120.0d0) <= (-1d+16)) then
tmp = a * 120.0d0
else if ((a * 120.0d0) <= 2d-150) then
tmp = t_1
else if ((a * 120.0d0) <= 1d-130) then
tmp = a * 120.0d0
else if ((a * 120.0d0) <= 2d-74) then
tmp = t_1
else
tmp = (a * 120.0d0) + ((-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 t_1 = 60.0 * ((x - y) / (z - t));
double tmp;
if ((a * 120.0) <= -1e+16) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 2e-150) {
tmp = t_1;
} else if ((a * 120.0) <= 1e-130) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 2e-74) {
tmp = t_1;
} else {
tmp = (a * 120.0) + (-60.0 * (x / t));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = 60.0 * ((x - y) / (z - t)) tmp = 0 if (a * 120.0) <= -1e+16: tmp = a * 120.0 elif (a * 120.0) <= 2e-150: tmp = t_1 elif (a * 120.0) <= 1e-130: tmp = a * 120.0 elif (a * 120.0) <= 2e-74: tmp = t_1 else: tmp = (a * 120.0) + (-60.0 * (x / t)) return tmp
function code(x, y, z, t, a) t_1 = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))) tmp = 0.0 if (Float64(a * 120.0) <= -1e+16) tmp = Float64(a * 120.0); elseif (Float64(a * 120.0) <= 2e-150) tmp = t_1; elseif (Float64(a * 120.0) <= 1e-130) tmp = Float64(a * 120.0); elseif (Float64(a * 120.0) <= 2e-74) tmp = t_1; else tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(x / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = 60.0 * ((x - y) / (z - t)); tmp = 0.0; if ((a * 120.0) <= -1e+16) tmp = a * 120.0; elseif ((a * 120.0) <= 2e-150) tmp = t_1; elseif ((a * 120.0) <= 1e-130) tmp = a * 120.0; elseif ((a * 120.0) <= 2e-74) tmp = t_1; else tmp = (a * 120.0) + (-60.0 * (x / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * 120.0), $MachinePrecision], -1e+16], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 2e-150], t$95$1, If[LessEqual[N[(a * 120.0), $MachinePrecision], 1e-130], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 2e-74], t$95$1, N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 60 \cdot \frac{x - y}{z - t}\\
\mathbf{if}\;a \cdot 120 \leq -1 \cdot 10^{+16}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{-150}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \cdot 120 \leq 10^{-130}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{-74}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{x}{t}\\
\end{array}
\end{array}
if (*.f64 a 120) < -1e16 or 2.00000000000000001e-150 < (*.f64 a 120) < 1.0000000000000001e-130Initial program 99.8%
Taylor expanded in z around inf 80.6%
if -1e16 < (*.f64 a 120) < 2.00000000000000001e-150 or 1.0000000000000001e-130 < (*.f64 a 120) < 1.99999999999999992e-74Initial program 99.6%
+-commutative99.6%
fma-def99.6%
associate-*l/99.7%
Simplified99.7%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 84.1%
if 1.99999999999999992e-74 < (*.f64 a 120) Initial program 99.8%
Taylor expanded in x around inf 82.2%
Taylor expanded in z around 0 70.5%
Final simplification78.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= (* a 120.0) -5e-75) (not (<= (* a 120.0) 1e-180))) (+ (* a 120.0) (* -60.0 (/ y (- z t)))) (* 60.0 (/ (- x y) (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((a * 120.0) <= -5e-75) || !((a * 120.0) <= 1e-180)) {
tmp = (a * 120.0) + (-60.0 * (y / (z - t)));
} 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) <= (-5d-75)) .or. (.not. ((a * 120.0d0) <= 1d-180))) then
tmp = (a * 120.0d0) + ((-60.0d0) * (y / (z - t)))
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) <= -5e-75) || !((a * 120.0) <= 1e-180)) {
tmp = (a * 120.0) + (-60.0 * (y / (z - t)));
} else {
tmp = 60.0 * ((x - y) / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if ((a * 120.0) <= -5e-75) or not ((a * 120.0) <= 1e-180): tmp = (a * 120.0) + (-60.0 * (y / (z - t))) 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) <= -5e-75) || !(Float64(a * 120.0) <= 1e-180)) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / Float64(z - t)))); 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) <= -5e-75) || ~(((a * 120.0) <= 1e-180))) tmp = (a * 120.0) + (-60.0 * (y / (z - t))); 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], -5e-75], N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 1e-180]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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 -5 \cdot 10^{-75} \lor \neg \left(a \cdot 120 \leq 10^{-180}\right):\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\end{array}
\end{array}
if (*.f64 a 120) < -4.99999999999999979e-75 or 1e-180 < (*.f64 a 120) Initial program 99.8%
Taylor expanded in x around 0 85.8%
if -4.99999999999999979e-75 < (*.f64 a 120) < 1e-180Initial program 99.6%
+-commutative99.6%
fma-def99.6%
associate-*l/99.7%
Simplified99.7%
associate-/r/99.6%
Applied egg-rr99.6%
Taylor expanded in a around 0 90.4%
Final simplification87.1%
(FPCore (x y z t a)
:precision binary64
(if (or (<= a -58000000.0)
(and (not (<= a 1.25e-146)) (or (<= a 5.4e-37) (not (<= a 1.4e-11)))))
(* 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 <= -58000000.0) || (!(a <= 1.25e-146) && ((a <= 5.4e-37) || !(a <= 1.4e-11)))) {
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 <= (-58000000.0d0)) .or. (.not. (a <= 1.25d-146)) .and. (a <= 5.4d-37) .or. (.not. (a <= 1.4d-11))) 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 <= -58000000.0) || (!(a <= 1.25e-146) && ((a <= 5.4e-37) || !(a <= 1.4e-11)))) {
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 <= -58000000.0) or (not (a <= 1.25e-146) and ((a <= 5.4e-37) or not (a <= 1.4e-11))): tmp = a * 120.0 else: tmp = 60.0 * ((x - y) / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -58000000.0) || (!(a <= 1.25e-146) && ((a <= 5.4e-37) || !(a <= 1.4e-11)))) 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 <= -58000000.0) || (~((a <= 1.25e-146)) && ((a <= 5.4e-37) || ~((a <= 1.4e-11))))) tmp = a * 120.0; else tmp = 60.0 * ((x - y) / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -58000000.0], And[N[Not[LessEqual[a, 1.25e-146]], $MachinePrecision], Or[LessEqual[a, 5.4e-37], N[Not[LessEqual[a, 1.4e-11]], $MachinePrecision]]]], N[(a * 120.0), $MachinePrecision], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -58000000 \lor \neg \left(a \leq 1.25 \cdot 10^{-146}\right) \land \left(a \leq 5.4 \cdot 10^{-37} \lor \neg \left(a \leq 1.4 \cdot 10^{-11}\right)\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\end{array}
\end{array}
if a < -5.8e7 or 1.24999999999999989e-146 < a < 5.40000000000000032e-37 or 1.4e-11 < a Initial program 99.8%
Taylor expanded in z around inf 73.9%
if -5.8e7 < a < 1.24999999999999989e-146 or 5.40000000000000032e-37 < a < 1.4e-11Initial program 99.6%
+-commutative99.6%
fma-def99.6%
associate-*l/99.7%
Simplified99.7%
associate-/r/99.6%
Applied egg-rr99.6%
Taylor expanded in a around 0 84.8%
Final simplification78.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* -60.0 (/ y (- z t)))))
(if (<= y -4.6e+188)
t_1
(if (<= y -1.1e-267)
(* a 120.0)
(if (<= y -6.8e-296)
(* 60.0 (/ x (- z t)))
(if (<= y 6.2e+181) (* a 120.0) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -60.0 * (y / (z - t));
double tmp;
if (y <= -4.6e+188) {
tmp = t_1;
} else if (y <= -1.1e-267) {
tmp = a * 120.0;
} else if (y <= -6.8e-296) {
tmp = 60.0 * (x / (z - t));
} else if (y <= 6.2e+181) {
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 - t))
if (y <= (-4.6d+188)) then
tmp = t_1
else if (y <= (-1.1d-267)) then
tmp = a * 120.0d0
else if (y <= (-6.8d-296)) then
tmp = 60.0d0 * (x / (z - t))
else if (y <= 6.2d+181) then
tmp = a * 120.0d0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = -60.0 * (y / (z - t));
double tmp;
if (y <= -4.6e+188) {
tmp = t_1;
} else if (y <= -1.1e-267) {
tmp = a * 120.0;
} else if (y <= -6.8e-296) {
tmp = 60.0 * (x / (z - t));
} else if (y <= 6.2e+181) {
tmp = a * 120.0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -60.0 * (y / (z - t)) tmp = 0 if y <= -4.6e+188: tmp = t_1 elif y <= -1.1e-267: tmp = a * 120.0 elif y <= -6.8e-296: tmp = 60.0 * (x / (z - t)) elif y <= 6.2e+181: tmp = a * 120.0 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(-60.0 * Float64(y / Float64(z - t))) tmp = 0.0 if (y <= -4.6e+188) tmp = t_1; elseif (y <= -1.1e-267) tmp = Float64(a * 120.0); elseif (y <= -6.8e-296) tmp = Float64(60.0 * Float64(x / Float64(z - t))); elseif (y <= 6.2e+181) tmp = Float64(a * 120.0); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = -60.0 * (y / (z - t)); tmp = 0.0; if (y <= -4.6e+188) tmp = t_1; elseif (y <= -1.1e-267) tmp = a * 120.0; elseif (y <= -6.8e-296) tmp = 60.0 * (x / (z - t)); elseif (y <= 6.2e+181) tmp = a * 120.0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.6e+188], t$95$1, If[LessEqual[y, -1.1e-267], N[(a * 120.0), $MachinePrecision], If[LessEqual[y, -6.8e-296], N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.2e+181], N[(a * 120.0), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -60 \cdot \frac{y}{z - t}\\
\mathbf{if}\;y \leq -4.6 \cdot 10^{+188}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -1.1 \cdot 10^{-267}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;y \leq -6.8 \cdot 10^{-296}:\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\
\mathbf{elif}\;y \leq 6.2 \cdot 10^{+181}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -4.60000000000000023e188 or 6.19999999999999978e181 < y Initial program 99.7%
Taylor expanded in x around 0 90.9%
associate-*r/90.7%
metadata-eval90.7%
distribute-lft-neg-in90.7%
distribute-frac-neg90.7%
associate-*l/90.8%
*-commutative90.8%
distribute-rgt-neg-in90.8%
distribute-neg-frac90.8%
metadata-eval90.8%
Simplified90.8%
*-commutative90.8%
fma-def90.8%
Applied egg-rr90.8%
Taylor expanded in y around inf 77.0%
if -4.60000000000000023e188 < y < -1.09999999999999994e-267 or -6.79999999999999993e-296 < y < 6.19999999999999978e181Initial program 99.8%
Taylor expanded in z around inf 62.7%
if -1.09999999999999994e-267 < y < -6.79999999999999993e-296Initial program 99.5%
+-commutative99.5%
fma-def99.5%
associate-*l/99.5%
Simplified99.5%
associate-/r/99.8%
Applied egg-rr99.8%
Taylor expanded in a around 0 73.3%
Taylor expanded in x around inf 64.2%
Final simplification65.6%
(FPCore (x y z t a)
:precision binary64
(if (<= z -5500000000.0)
(+ (* a 120.0) (* -60.0 (/ y z)))
(if (<= z 2.15e-252)
(+ (* a 120.0) (* 60.0 (/ y t)))
(if (<= z 1.35e-37)
(* 60.0 (/ (- x y) (- z t)))
(+ (* a 120.0) (* 60.0 (/ x z)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5500000000.0) {
tmp = (a * 120.0) + (-60.0 * (y / z));
} else if (z <= 2.15e-252) {
tmp = (a * 120.0) + (60.0 * (y / t));
} else if (z <= 1.35e-37) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = (a * 120.0) + (60.0 * (x / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-5500000000.0d0)) then
tmp = (a * 120.0d0) + ((-60.0d0) * (y / z))
else if (z <= 2.15d-252) then
tmp = (a * 120.0d0) + (60.0d0 * (y / t))
else if (z <= 1.35d-37) then
tmp = 60.0d0 * ((x - y) / (z - t))
else
tmp = (a * 120.0d0) + (60.0d0 * (x / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5500000000.0) {
tmp = (a * 120.0) + (-60.0 * (y / z));
} else if (z <= 2.15e-252) {
tmp = (a * 120.0) + (60.0 * (y / t));
} else if (z <= 1.35e-37) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = (a * 120.0) + (60.0 * (x / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -5500000000.0: tmp = (a * 120.0) + (-60.0 * (y / z)) elif z <= 2.15e-252: tmp = (a * 120.0) + (60.0 * (y / t)) elif z <= 1.35e-37: tmp = 60.0 * ((x - y) / (z - t)) else: tmp = (a * 120.0) + (60.0 * (x / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -5500000000.0) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / z))); elseif (z <= 2.15e-252) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(y / t))); elseif (z <= 1.35e-37) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); else tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(x / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -5500000000.0) tmp = (a * 120.0) + (-60.0 * (y / z)); elseif (z <= 2.15e-252) tmp = (a * 120.0) + (60.0 * (y / t)); elseif (z <= 1.35e-37) tmp = 60.0 * ((x - y) / (z - t)); else tmp = (a * 120.0) + (60.0 * (x / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -5500000000.0], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.15e-252], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.35e-37], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5500000000:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\
\mathbf{elif}\;z \leq 2.15 \cdot 10^{-252}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t}\\
\mathbf{elif}\;z \leq 1.35 \cdot 10^{-37}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{x}{z}\\
\end{array}
\end{array}
if z < -5.5e9Initial program 99.8%
Taylor expanded in x around 0 82.5%
Taylor expanded in z around inf 82.5%
if -5.5e9 < z < 2.14999999999999996e-252Initial program 99.7%
Taylor expanded in x around 0 78.6%
Taylor expanded in z around 0 72.3%
if 2.14999999999999996e-252 < z < 1.35000000000000008e-37Initial program 99.5%
+-commutative99.5%
fma-def99.6%
associate-*l/99.7%
Simplified99.7%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 75.5%
if 1.35000000000000008e-37 < z Initial program 99.8%
Taylor expanded in x around inf 84.5%
Taylor expanded in z around inf 78.5%
Final simplification77.2%
(FPCore (x y z t a)
:precision binary64
(if (<= z -4000000000.0)
(+ (* a 120.0) (* -60.0 (/ y z)))
(if (<= z 1.4e-254)
(+ (* a 120.0) (* 60.0 (/ y t)))
(if (<= z 3.1e-43)
(* 60.0 (/ (- x y) (- z t)))
(+ (* a 120.0) (/ (* x 60.0) z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4000000000.0) {
tmp = (a * 120.0) + (-60.0 * (y / z));
} else if (z <= 1.4e-254) {
tmp = (a * 120.0) + (60.0 * (y / t));
} else if (z <= 3.1e-43) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = (a * 120.0) + ((x * 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 (z <= (-4000000000.0d0)) then
tmp = (a * 120.0d0) + ((-60.0d0) * (y / z))
else if (z <= 1.4d-254) then
tmp = (a * 120.0d0) + (60.0d0 * (y / t))
else if (z <= 3.1d-43) then
tmp = 60.0d0 * ((x - y) / (z - t))
else
tmp = (a * 120.0d0) + ((x * 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 (z <= -4000000000.0) {
tmp = (a * 120.0) + (-60.0 * (y / z));
} else if (z <= 1.4e-254) {
tmp = (a * 120.0) + (60.0 * (y / t));
} else if (z <= 3.1e-43) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = (a * 120.0) + ((x * 60.0) / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -4000000000.0: tmp = (a * 120.0) + (-60.0 * (y / z)) elif z <= 1.4e-254: tmp = (a * 120.0) + (60.0 * (y / t)) elif z <= 3.1e-43: tmp = 60.0 * ((x - y) / (z - t)) else: tmp = (a * 120.0) + ((x * 60.0) / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -4000000000.0) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / z))); elseif (z <= 1.4e-254) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(y / t))); elseif (z <= 3.1e-43) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); else tmp = Float64(Float64(a * 120.0) + Float64(Float64(x * 60.0) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -4000000000.0) tmp = (a * 120.0) + (-60.0 * (y / z)); elseif (z <= 1.4e-254) tmp = (a * 120.0) + (60.0 * (y / t)); elseif (z <= 3.1e-43) tmp = 60.0 * ((x - y) / (z - t)); else tmp = (a * 120.0) + ((x * 60.0) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4000000000.0], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.4e-254], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.1e-43], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(x * 60.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4000000000:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{-254}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t}\\
\mathbf{elif}\;z \leq 3.1 \cdot 10^{-43}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{x \cdot 60}{z}\\
\end{array}
\end{array}
if z < -4e9Initial program 99.8%
Taylor expanded in x around 0 82.5%
Taylor expanded in z around inf 82.5%
if -4e9 < z < 1.39999999999999992e-254Initial program 99.7%
Taylor expanded in x around 0 78.6%
Taylor expanded in z around 0 72.3%
if 1.39999999999999992e-254 < z < 3.0999999999999999e-43Initial program 99.5%
+-commutative99.5%
fma-def99.6%
associate-*l/99.7%
Simplified99.7%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 75.5%
if 3.0999999999999999e-43 < z Initial program 99.8%
Taylor expanded in x around inf 84.5%
Taylor expanded in z around inf 78.5%
associate-*r/78.5%
*-commutative78.5%
Simplified78.5%
Final simplification77.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -4.4e+74) (not (<= y 6.3e+66))) (+ (* a 120.0) (* -60.0 (/ y (- 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 ((y <= -4.4e+74) || !(y <= 6.3e+66)) {
tmp = (a * 120.0) + (-60.0 * (y / (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 ((y <= (-4.4d+74)) .or. (.not. (y <= 6.3d+66))) then
tmp = (a * 120.0d0) + ((-60.0d0) * (y / (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 ((y <= -4.4e+74) || !(y <= 6.3e+66)) {
tmp = (a * 120.0) + (-60.0 * (y / (z - t)));
} else {
tmp = (a * 120.0) + (60.0 * (x / (z - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -4.4e+74) or not (y <= 6.3e+66): tmp = (a * 120.0) + (-60.0 * (y / (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 ((y <= -4.4e+74) || !(y <= 6.3e+66)) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / Float64(z - t)))); else tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(x / Float64(z - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -4.4e+74) || ~((y <= 6.3e+66))) tmp = (a * 120.0) + (-60.0 * (y / (z - t))); else tmp = (a * 120.0) + (60.0 * (x / (z - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -4.4e+74], N[Not[LessEqual[y, 6.3e+66]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.4 \cdot 10^{+74} \lor \neg \left(y \leq 6.3 \cdot 10^{+66}\right):\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{x}{z - t}\\
\end{array}
\end{array}
if y < -4.4000000000000002e74 or 6.2999999999999998e66 < y Initial program 99.6%
Taylor expanded in x around 0 89.3%
if -4.4000000000000002e74 < y < 6.2999999999999998e66Initial program 99.8%
Taylor expanded in x around inf 92.0%
Final simplification90.9%
(FPCore (x y z t a) :precision binary64 (+ (* (- x y) (/ 60.0 (- z t))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return ((x - y) * (60.0 / (z - t))) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((x - y) * (60.0d0 / (z - t))) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return ((x - y) * (60.0 / (z - t))) + (a * 120.0);
}
def code(x, y, z, t, a): return ((x - y) * (60.0 / (z - t))) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(Float64(x - y) * Float64(60.0 / Float64(z - t))) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = ((x - y) * (60.0 / (z - t))) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x - y\right) \cdot \frac{60}{z - t} + a \cdot 120
\end{array}
Initial program 99.7%
associate-*l/99.8%
Applied egg-rr99.8%
Final simplification99.8%
(FPCore (x y z t a) :precision binary64 (+ (/ (- y x) (* (- z t) -0.016666666666666666)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return ((y - x) / ((z - t) * -0.016666666666666666)) + (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 = ((y - x) / ((z - t) * (-0.016666666666666666d0))) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return ((y - x) / ((z - t) * -0.016666666666666666)) + (a * 120.0);
}
def code(x, y, z, t, a): return ((y - x) / ((z - t) * -0.016666666666666666)) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(Float64(y - x) / Float64(Float64(z - t) * -0.016666666666666666)) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = ((y - x) / ((z - t) * -0.016666666666666666)) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(y - x), $MachinePrecision] / N[(N[(z - t), $MachinePrecision] * -0.016666666666666666), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{y - x}{\left(z - t\right) \cdot -0.016666666666666666} + a \cdot 120
\end{array}
Initial program 99.7%
*-commutative99.7%
associate-/l*99.8%
frac-2neg99.8%
distribute-frac-neg99.8%
div-inv99.8%
distribute-rgt-neg-in99.8%
metadata-eval99.8%
metadata-eval99.8%
Applied egg-rr99.8%
Final simplification99.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -8.4e+188) (not (<= y 3.5e+181))) (* -60.0 (/ y (- z t))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -8.4e+188) || !(y <= 3.5e+181)) {
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 <= (-8.4d+188)) .or. (.not. (y <= 3.5d+181))) 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 <= -8.4e+188) || !(y <= 3.5e+181)) {
tmp = -60.0 * (y / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -8.4e+188) or not (y <= 3.5e+181): 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 <= -8.4e+188) || !(y <= 3.5e+181)) 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 <= -8.4e+188) || ~((y <= 3.5e+181))) 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, -8.4e+188], N[Not[LessEqual[y, 3.5e+181]], $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 -8.4 \cdot 10^{+188} \lor \neg \left(y \leq 3.5 \cdot 10^{+181}\right):\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if y < -8.39999999999999945e188 or 3.50000000000000008e181 < y Initial program 99.7%
Taylor expanded in x around 0 90.9%
associate-*r/90.7%
metadata-eval90.7%
distribute-lft-neg-in90.7%
distribute-frac-neg90.7%
associate-*l/90.8%
*-commutative90.8%
distribute-rgt-neg-in90.8%
distribute-neg-frac90.8%
metadata-eval90.8%
Simplified90.8%
*-commutative90.8%
fma-def90.8%
Applied egg-rr90.8%
Taylor expanded in y around inf 77.0%
if -8.39999999999999945e188 < y < 3.50000000000000008e181Initial program 99.8%
Taylor expanded in z around inf 60.8%
Final simplification64.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -4.4e+243) (not (<= y 1.1e+184))) (* -60.0 (/ y z)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -4.4e+243) || !(y <= 1.1e+184)) {
tmp = -60.0 * (y / z);
} 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 <= (-4.4d+243)) .or. (.not. (y <= 1.1d+184))) then
tmp = (-60.0d0) * (y / z)
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 <= -4.4e+243) || !(y <= 1.1e+184)) {
tmp = -60.0 * (y / z);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -4.4e+243) or not (y <= 1.1e+184): tmp = -60.0 * (y / z) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -4.4e+243) || !(y <= 1.1e+184)) tmp = Float64(-60.0 * Float64(y / z)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -4.4e+243) || ~((y <= 1.1e+184))) tmp = -60.0 * (y / z); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -4.4e+243], N[Not[LessEqual[y, 1.1e+184]], $MachinePrecision]], N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.4 \cdot 10^{+243} \lor \neg \left(y \leq 1.1 \cdot 10^{+184}\right):\\
\;\;\;\;-60 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if y < -4.40000000000000018e243 or 1.1e184 < y Initial program 99.7%
+-commutative99.7%
fma-def99.7%
associate-*l/99.8%
Simplified99.8%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 88.9%
Taylor expanded in z around inf 50.5%
Taylor expanded in x around 0 48.8%
if -4.40000000000000018e243 < y < 1.1e184Initial program 99.8%
Taylor expanded in z around inf 59.7%
Final simplification57.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.7%
Taylor expanded in z around inf 51.6%
Final simplification51.6%
(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 2023305
(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)))