
(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 14 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 (+ (/ (* 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}
Initial program 99.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* 60.0 (- x y)) (- z t))))
(if (or (<= t_1 -2e+86) (not (<= t_1 2e+68)))
t_1
(+ (* a 120.0) (* y (/ -60.0 (- z t)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (60.0 * (x - y)) / (z - t);
double tmp;
if ((t_1 <= -2e+86) || !(t_1 <= 2e+68)) {
tmp = t_1;
} else {
tmp = (a * 120.0) + (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) :: t_1
real(8) :: tmp
t_1 = (60.0d0 * (x - y)) / (z - t)
if ((t_1 <= (-2d+86)) .or. (.not. (t_1 <= 2d+68))) then
tmp = t_1
else
tmp = (a * 120.0d0) + (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 t_1 = (60.0 * (x - y)) / (z - t);
double tmp;
if ((t_1 <= -2e+86) || !(t_1 <= 2e+68)) {
tmp = t_1;
} else {
tmp = (a * 120.0) + (y * (-60.0 / (z - t)));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (60.0 * (x - y)) / (z - t) tmp = 0 if (t_1 <= -2e+86) or not (t_1 <= 2e+68): tmp = t_1 else: tmp = (a * 120.0) + (y * (-60.0 / (z - t))) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) tmp = 0.0 if ((t_1 <= -2e+86) || !(t_1 <= 2e+68)) tmp = t_1; else tmp = Float64(Float64(a * 120.0) + Float64(y * Float64(-60.0 / Float64(z - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (60.0 * (x - y)) / (z - t); tmp = 0.0; if ((t_1 <= -2e+86) || ~((t_1 <= 2e+68))) tmp = t_1; else tmp = (a * 120.0) + (y * (-60.0 / (z - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -2e+86], N[Not[LessEqual[t$95$1, 2e+68]], $MachinePrecision]], t$95$1, N[(N[(a * 120.0), $MachinePrecision] + N[(y * N[(-60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+86} \lor \neg \left(t\_1 \leq 2 \cdot 10^{+68}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + y \cdot \frac{-60}{z - t}\\
\end{array}
\end{array}
if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -2e86 or 1.99999999999999991e68 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
+-commutative99.7%
fma-define99.7%
clear-num99.6%
un-div-inv99.6%
Applied egg-rr99.6%
Taylor expanded in a around 0 89.0%
associate-*r/89.1%
Simplified89.1%
if -2e86 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 1.99999999999999991e68Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around 0 88.0%
associate-*r/88.0%
*-commutative88.0%
*-lft-identity88.0%
times-frac88.0%
/-rgt-identity88.0%
Simplified88.0%
Final simplification88.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* 60.0 (- x y)) (- z t))))
(if (<= t_1 -2e+23)
t_1
(if (<= t_1 2e+40) (* a 120.0) (* (- x y) (/ 60.0 (- z t)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_1 <= -2e+23) {
tmp = t_1;
} else if (t_1 <= 2e+40) {
tmp = a * 120.0;
} else {
tmp = (x - y) * (60.0 / (z - t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (60.0d0 * (x - y)) / (z - t)
if (t_1 <= (-2d+23)) then
tmp = t_1
else if (t_1 <= 2d+40) then
tmp = a * 120.0d0
else
tmp = (x - y) * (60.0d0 / (z - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_1 <= -2e+23) {
tmp = t_1;
} else if (t_1 <= 2e+40) {
tmp = a * 120.0;
} else {
tmp = (x - y) * (60.0 / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (60.0 * (x - y)) / (z - t) tmp = 0 if t_1 <= -2e+23: tmp = t_1 elif t_1 <= 2e+40: tmp = a * 120.0 else: tmp = (x - y) * (60.0 / (z - t)) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) tmp = 0.0 if (t_1 <= -2e+23) tmp = t_1; elseif (t_1 <= 2e+40) tmp = Float64(a * 120.0); else tmp = Float64(Float64(x - y) * Float64(60.0 / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (60.0 * (x - y)) / (z - t); tmp = 0.0; if (t_1 <= -2e+23) tmp = t_1; elseif (t_1 <= 2e+40) tmp = a * 120.0; else tmp = (x - y) * (60.0 / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+23], t$95$1, If[LessEqual[t$95$1, 2e+40], N[(a * 120.0), $MachinePrecision], N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+23}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+40}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{60}{z - t}\\
\end{array}
\end{array}
if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -1.9999999999999998e23Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
+-commutative99.7%
fma-define99.7%
clear-num99.6%
un-div-inv99.6%
Applied egg-rr99.6%
Taylor expanded in a around 0 87.0%
associate-*r/87.2%
Simplified87.2%
if -1.9999999999999998e23 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 2.00000000000000006e40Initial program 99.9%
*-commutative99.9%
associate-/l*99.8%
fma-define99.9%
sub-neg99.9%
+-commutative99.9%
neg-sub099.9%
associate-+l-99.9%
sub0-neg99.9%
distribute-frac-neg299.9%
distribute-neg-frac99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in t around inf 75.5%
if 2.00000000000000006e40 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
+-commutative99.8%
fma-define99.8%
clear-num99.6%
un-div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 79.1%
associate-*r/79.1%
Simplified79.1%
*-commutative79.1%
associate-/l*79.2%
Applied egg-rr79.2%
Final simplification78.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= (* a 120.0) -1e-44) (not (<= (* a 120.0) 2e-41))) (* 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-44) || !((a * 120.0) <= 2e-41)) {
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-44)) .or. (.not. ((a * 120.0d0) <= 2d-41))) 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-44) || !((a * 120.0) <= 2e-41)) {
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-44) or not ((a * 120.0) <= 2e-41): 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-44) || !(Float64(a * 120.0) <= 2e-41)) 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-44) || ~(((a * 120.0) <= 2e-41))) 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-44], N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 2e-41]], $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^{-44} \lor \neg \left(a \cdot 120 \leq 2 \cdot 10^{-41}\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.99999999999999953e-45 or 2.00000000000000001e-41 < (*.f64 a #s(literal 120 binary64)) Initial program 99.9%
*-commutative99.9%
associate-/l*99.9%
fma-define99.9%
sub-neg99.9%
+-commutative99.9%
neg-sub099.9%
associate-+l-99.9%
sub0-neg99.9%
distribute-frac-neg299.9%
distribute-neg-frac99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in t around inf 73.4%
if -9.99999999999999953e-45 < (*.f64 a #s(literal 120 binary64)) < 2.00000000000000001e-41Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 78.8%
Final simplification75.8%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -1e-44)
(* a 120.0)
(if (<= (* a 120.0) 1e-43)
(* 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 ((a * 120.0) <= -1e-44) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 1e-43) {
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 ((a * 120.0d0) <= (-1d-44)) then
tmp = a * 120.0d0
else if ((a * 120.0d0) <= 1d-43) 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 ((a * 120.0) <= -1e-44) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 1e-43) {
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 (a * 120.0) <= -1e-44: tmp = a * 120.0 elif (a * 120.0) <= 1e-43: 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 (Float64(a * 120.0) <= -1e-44) tmp = Float64(a * 120.0); elseif (Float64(a * 120.0) <= 1e-43) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); else tmp = Float64(Float64(a * 120.0) + Float64(Float64(60.0 * x) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a * 120.0) <= -1e-44) tmp = a * 120.0; elseif ((a * 120.0) <= 1e-43) 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[N[(a * 120.0), $MachinePrecision], -1e-44], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 1e-43], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(60.0 * x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -1 \cdot 10^{-44}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq 10^{-43}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{60 \cdot x}{z}\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -9.99999999999999953e-45Initial program 99.9%
*-commutative99.9%
associate-/l*99.9%
fma-define99.9%
sub-neg99.9%
+-commutative99.9%
neg-sub099.9%
associate-+l-99.9%
sub0-neg99.9%
distribute-frac-neg299.9%
distribute-neg-frac99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in t around inf 72.8%
if -9.99999999999999953e-45 < (*.f64 a #s(literal 120 binary64)) < 1.00000000000000008e-43Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 78.6%
if 1.00000000000000008e-43 < (*.f64 a #s(literal 120 binary64)) Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 94.0%
associate-*r/94.0%
Simplified94.0%
Taylor expanded in z around inf 77.7%
associate-*r/77.7%
Simplified77.7%
Final simplification76.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -4.1e+15) (not (<= z 2.3e+50))) (+ (* a 120.0) (* y (/ -60.0 z))) (+ (* a 120.0) (* -60.0 (/ (- x y) t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -4.1e+15) || !(z <= 2.3e+50)) {
tmp = (a * 120.0) + (y * (-60.0 / z));
} else {
tmp = (a * 120.0) + (-60.0 * ((x - y) / t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-4.1d+15)) .or. (.not. (z <= 2.3d+50))) then
tmp = (a * 120.0d0) + (y * ((-60.0d0) / z))
else
tmp = (a * 120.0d0) + ((-60.0d0) * ((x - y) / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -4.1e+15) || !(z <= 2.3e+50)) {
tmp = (a * 120.0) + (y * (-60.0 / z));
} else {
tmp = (a * 120.0) + (-60.0 * ((x - y) / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -4.1e+15) or not (z <= 2.3e+50): tmp = (a * 120.0) + (y * (-60.0 / z)) else: tmp = (a * 120.0) + (-60.0 * ((x - y) / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -4.1e+15) || !(z <= 2.3e+50)) tmp = Float64(Float64(a * 120.0) + Float64(y * Float64(-60.0 / z))); else tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(Float64(x - y) / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -4.1e+15) || ~((z <= 2.3e+50))) tmp = (a * 120.0) + (y * (-60.0 / z)); else tmp = (a * 120.0) + (-60.0 * ((x - y) / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -4.1e+15], N[Not[LessEqual[z, 2.3e+50]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(y * N[(-60.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.1 \cdot 10^{+15} \lor \neg \left(z \leq 2.3 \cdot 10^{+50}\right):\\
\;\;\;\;a \cdot 120 + y \cdot \frac{-60}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{x - y}{t}\\
\end{array}
\end{array}
if z < -4.1e15 or 2.29999999999999997e50 < z Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 85.3%
associate-*r/85.3%
*-commutative85.3%
*-lft-identity85.3%
times-frac85.4%
/-rgt-identity85.4%
Simplified85.4%
Taylor expanded in z around inf 79.6%
if -4.1e15 < z < 2.29999999999999997e50Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around 0 81.5%
Final simplification80.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= (- z t) -5e-65) (not (<= (- z t) 2e+82))) (* a 120.0) (* 60.0 (/ x (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((z - t) <= -5e-65) || !((z - t) <= 2e+82)) {
tmp = a * 120.0;
} else {
tmp = 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 (((z - t) <= (-5d-65)) .or. (.not. ((z - t) <= 2d+82))) then
tmp = a * 120.0d0
else
tmp = 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 (((z - t) <= -5e-65) || !((z - t) <= 2e+82)) {
tmp = a * 120.0;
} else {
tmp = 60.0 * (x / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if ((z - t) <= -5e-65) or not ((z - t) <= 2e+82): tmp = a * 120.0 else: tmp = 60.0 * (x / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((Float64(z - t) <= -5e-65) || !(Float64(z - t) <= 2e+82)) tmp = Float64(a * 120.0); else tmp = 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 (((z - t) <= -5e-65) || ~(((z - t) <= 2e+82))) tmp = a * 120.0; else tmp = 60.0 * (x / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[N[(z - t), $MachinePrecision], -5e-65], N[Not[LessEqual[N[(z - t), $MachinePrecision], 2e+82]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z - t \leq -5 \cdot 10^{-65} \lor \neg \left(z - t \leq 2 \cdot 10^{+82}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\
\end{array}
\end{array}
if (-.f64 z t) < -4.99999999999999983e-65 or 1.9999999999999999e82 < (-.f64 z t) Initial program 99.9%
*-commutative99.9%
associate-/l*99.9%
fma-define99.9%
sub-neg99.9%
+-commutative99.9%
neg-sub099.9%
associate-+l-99.9%
sub0-neg99.9%
distribute-frac-neg299.9%
distribute-neg-frac99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in t around inf 64.5%
if -4.99999999999999983e-65 < (-.f64 z t) < 1.9999999999999999e82Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
+-commutative99.7%
fma-define99.7%
clear-num99.6%
un-div-inv99.6%
Applied egg-rr99.6%
Taylor expanded in x around inf 53.6%
Final simplification61.7%
(FPCore (x y z t a)
:precision binary64
(if (<= y -1.52e-9)
(+ (* a 120.0) (* y (/ -60.0 (- z t))))
(if (<= y 2.25e+92)
(+ (* a 120.0) (/ (* 60.0 x) (- z t)))
(+ (* a 120.0) (/ (* y -60.0) (- z t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.52e-9) {
tmp = (a * 120.0) + (y * (-60.0 / (z - t)));
} else if (y <= 2.25e+92) {
tmp = (a * 120.0) + ((60.0 * x) / (z - t));
} else {
tmp = (a * 120.0) + ((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 (y <= (-1.52d-9)) then
tmp = (a * 120.0d0) + (y * ((-60.0d0) / (z - t)))
else if (y <= 2.25d+92) then
tmp = (a * 120.0d0) + ((60.0d0 * x) / (z - t))
else
tmp = (a * 120.0d0) + ((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 (y <= -1.52e-9) {
tmp = (a * 120.0) + (y * (-60.0 / (z - t)));
} else if (y <= 2.25e+92) {
tmp = (a * 120.0) + ((60.0 * x) / (z - t));
} else {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -1.52e-9: tmp = (a * 120.0) + (y * (-60.0 / (z - t))) elif y <= 2.25e+92: tmp = (a * 120.0) + ((60.0 * x) / (z - t)) else: tmp = (a * 120.0) + ((y * -60.0) / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -1.52e-9) tmp = Float64(Float64(a * 120.0) + Float64(y * Float64(-60.0 / Float64(z - t)))); elseif (y <= 2.25e+92) tmp = Float64(Float64(a * 120.0) + Float64(Float64(60.0 * x) / Float64(z - t))); else tmp = Float64(Float64(a * 120.0) + Float64(Float64(y * -60.0) / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -1.52e-9) tmp = (a * 120.0) + (y * (-60.0 / (z - t))); elseif (y <= 2.25e+92) tmp = (a * 120.0) + ((60.0 * x) / (z - t)); else tmp = (a * 120.0) + ((y * -60.0) / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -1.52e-9], N[(N[(a * 120.0), $MachinePrecision] + N[(y * N[(-60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.25e+92], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(60.0 * x), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.52 \cdot 10^{-9}:\\
\;\;\;\;a \cdot 120 + y \cdot \frac{-60}{z - t}\\
\mathbf{elif}\;y \leq 2.25 \cdot 10^{+92}:\\
\;\;\;\;a \cdot 120 + \frac{60 \cdot x}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z - t}\\
\end{array}
\end{array}
if y < -1.51999999999999992e-9Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 89.9%
associate-*r/89.9%
*-commutative89.9%
*-lft-identity89.9%
times-frac89.9%
/-rgt-identity89.9%
Simplified89.9%
if -1.51999999999999992e-9 < y < 2.25e92Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 95.8%
associate-*r/95.9%
Simplified95.9%
if 2.25e92 < y Initial program 99.9%
Taylor expanded in x around 0 86.7%
Final simplification92.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -2.2e-107) (not (<= a 6.5e-71))) (* a 120.0) (/ (* y -60.0) (- z t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.2e-107) || !(a <= 6.5e-71)) {
tmp = a * 120.0;
} else {
tmp = (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 <= (-2.2d-107)) .or. (.not. (a <= 6.5d-71))) then
tmp = a * 120.0d0
else
tmp = (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 <= -2.2e-107) || !(a <= 6.5e-71)) {
tmp = a * 120.0;
} else {
tmp = (y * -60.0) / (z - t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -2.2e-107) or not (a <= 6.5e-71): tmp = a * 120.0 else: tmp = (y * -60.0) / (z - t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -2.2e-107) || !(a <= 6.5e-71)) tmp = Float64(a * 120.0); else tmp = Float64(Float64(y * -60.0) / Float64(z - t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -2.2e-107) || ~((a <= 6.5e-71))) tmp = a * 120.0; else tmp = (y * -60.0) / (z - t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -2.2e-107], N[Not[LessEqual[a, 6.5e-71]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.2 \cdot 10^{-107} \lor \neg \left(a \leq 6.5 \cdot 10^{-71}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot -60}{z - t}\\
\end{array}
\end{array}
if a < -2.20000000000000012e-107 or 6.50000000000000005e-71 < a Initial program 99.9%
*-commutative99.9%
associate-/l*99.9%
fma-define99.9%
sub-neg99.9%
+-commutative99.9%
neg-sub099.9%
associate-+l-99.9%
sub0-neg99.9%
distribute-frac-neg299.9%
distribute-neg-frac99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in t around inf 69.5%
if -2.20000000000000012e-107 < a < 6.50000000000000005e-71Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
+-commutative99.7%
fma-define99.7%
clear-num99.5%
un-div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 50.3%
associate-*r/50.3%
Simplified50.3%
Final simplification62.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -8e-108) (not (<= a 3.05e-75))) (* a 120.0) (* 60.0 (/ y (- t z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -8e-108) || !(a <= 3.05e-75)) {
tmp = a * 120.0;
} else {
tmp = 60.0 * (y / (t - z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-8d-108)) .or. (.not. (a <= 3.05d-75))) then
tmp = a * 120.0d0
else
tmp = 60.0d0 * (y / (t - z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -8e-108) || !(a <= 3.05e-75)) {
tmp = a * 120.0;
} else {
tmp = 60.0 * (y / (t - z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -8e-108) or not (a <= 3.05e-75): tmp = a * 120.0 else: tmp = 60.0 * (y / (t - z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -8e-108) || !(a <= 3.05e-75)) tmp = Float64(a * 120.0); else tmp = Float64(60.0 * Float64(y / Float64(t - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -8e-108) || ~((a <= 3.05e-75))) tmp = a * 120.0; else tmp = 60.0 * (y / (t - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -8e-108], N[Not[LessEqual[a, 3.05e-75]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(60.0 * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -8 \cdot 10^{-108} \lor \neg \left(a \leq 3.05 \cdot 10^{-75}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{y}{t - z}\\
\end{array}
\end{array}
if a < -8.00000000000000032e-108 or 3.05000000000000021e-75 < a Initial program 99.9%
*-commutative99.9%
associate-/l*99.9%
fma-define99.9%
sub-neg99.9%
+-commutative99.9%
neg-sub099.9%
associate-+l-99.9%
sub0-neg99.9%
distribute-frac-neg299.9%
distribute-neg-frac99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in t around inf 69.5%
if -8.00000000000000032e-108 < a < 3.05000000000000021e-75Initial program 99.7%
*-commutative99.7%
associate-/l*99.7%
fma-define99.7%
sub-neg99.7%
+-commutative99.7%
neg-sub099.7%
associate-+l-99.7%
sub0-neg99.7%
distribute-frac-neg299.7%
distribute-neg-frac99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 50.3%
Final simplification62.5%
(FPCore (x y z t a) :precision binary64 (+ (* a 120.0) (* 60.0 (/ (- x y) (- z t)))))
double code(double x, double y, double z, double t, double a) {
return (a * 120.0) + (60.0 * ((x - y) / (z - t)));
}
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) + (60.0d0 * ((x - y) / (z - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return (a * 120.0) + (60.0 * ((x - y) / (z - t)));
}
def code(x, y, z, t, a): return (a * 120.0) + (60.0 * ((x - y) / (z - t)))
function code(x, y, z, t, a) return Float64(Float64(a * 120.0) + Float64(60.0 * Float64(Float64(x - y) / Float64(z - t)))) end
function tmp = code(x, y, z, t, a) tmp = (a * 120.0) + (60.0 * ((x - y) / (z - t))); end
code[x_, y_, z_, t_, a_] := N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
a \cdot 120 + 60 \cdot \frac{x - y}{z - t}
\end{array}
Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t a) :precision binary64 (if (<= y -3.5e+125) (* 60.0 (/ y t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -3.5e+125) {
tmp = 60.0 * (y / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (y <= (-3.5d+125)) then
tmp = 60.0d0 * (y / t)
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -3.5e+125) {
tmp = 60.0 * (y / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -3.5e+125: tmp = 60.0 * (y / t) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -3.5e+125) tmp = Float64(60.0 * Float64(y / t)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -3.5e+125) tmp = 60.0 * (y / t); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -3.5e+125], N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.5 \cdot 10^{+125}:\\
\;\;\;\;60 \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if y < -3.50000000000000011e125Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around 0 51.4%
Taylor expanded in x around 0 54.4%
Taylor expanded in y around inf 42.2%
if -3.50000000000000011e125 < y Initial program 99.9%
*-commutative99.9%
associate-/l*99.8%
fma-define99.8%
sub-neg99.8%
+-commutative99.8%
neg-sub099.8%
associate-+l-99.8%
sub0-neg99.8%
distribute-frac-neg299.8%
distribute-neg-frac99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in t around inf 57.0%
Final simplification54.9%
(FPCore (x y z t a) :precision binary64 (if (<= x -2.1e+123) (* -60.0 (/ x t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -2.1e+123) {
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 (x <= (-2.1d+123)) 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 (x <= -2.1e+123) {
tmp = -60.0 * (x / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -2.1e+123: tmp = -60.0 * (x / t) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -2.1e+123) 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 (x <= -2.1e+123) tmp = -60.0 * (x / t); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -2.1e+123], N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.1 \cdot 10^{+123}:\\
\;\;\;\;-60 \cdot \frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if x < -2.09999999999999994e123Initial program 99.9%
associate-/l*99.7%
Simplified99.7%
+-commutative99.7%
fma-define99.7%
clear-num99.6%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in x around inf 65.9%
Taylor expanded in z around 0 42.2%
if -2.09999999999999994e123 < x Initial program 99.8%
*-commutative99.8%
associate-/l*99.8%
fma-define99.8%
sub-neg99.8%
+-commutative99.8%
neg-sub099.8%
associate-+l-99.8%
sub0-neg99.8%
distribute-frac-neg299.8%
distribute-neg-frac99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in t around inf 56.2%
Final simplification54.3%
(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%
associate-/l*99.8%
fma-define99.8%
sub-neg99.8%
+-commutative99.8%
neg-sub099.8%
associate-+l-99.8%
sub0-neg99.8%
distribute-frac-neg299.8%
distribute-neg-frac99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in t around inf 51.7%
Final simplification51.7%
(FPCore (x y z t a) :precision binary64 (+ (/ 60.0 (/ (- z t) (- x y))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (60.0d0 / ((z - t) / (x - y))) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
def code(x, y, z, t, a): return (60.0 / ((z - t) / (x - y))) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = (60.0 / ((z - t) / (x - y))) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60}{\frac{z - t}{x - y}} + a \cdot 120
\end{array}
herbie shell --seed 2024157
(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)))