
(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 (- x y) (/ -60.0 (- t z)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return fma((x - y), (-60.0 / (t - z)), (a * 120.0));
}
function code(x, y, z, t, a) return fma(Float64(x - y), Float64(-60.0 / Float64(t - z)), Float64(a * 120.0)) end
code[x_, y_, z_, t_, a_] := N[(N[(x - y), $MachinePrecision] * N[(-60.0 / N[(t - z), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(x - y, \frac{-60}{t - z}, a \cdot 120\right)
\end{array}
Initial program 99.4%
*-commutative99.4%
associate-/l*99.7%
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%
(FPCore (x y z t a) :precision binary64 (if (or (<= (* a 120.0) -5.5e-39) (not (<= (* a 120.0) 1e-34))) (+ (* a 120.0) (* y (/ -60.0 (- z t)))) (* (- x y) (/ 60.0 (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((a * 120.0) <= -5.5e-39) || !((a * 120.0) <= 1e-34)) {
tmp = (a * 120.0) + (y * (-60.0 / (z - t)));
} 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) <= (-5.5d-39)) .or. (.not. ((a * 120.0d0) <= 1d-34))) then
tmp = (a * 120.0d0) + (y * ((-60.0d0) / (z - t)))
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) <= -5.5e-39) || !((a * 120.0) <= 1e-34)) {
tmp = (a * 120.0) + (y * (-60.0 / (z - t)));
} else {
tmp = (x - y) * (60.0 / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if ((a * 120.0) <= -5.5e-39) or not ((a * 120.0) <= 1e-34): tmp = (a * 120.0) + (y * (-60.0 / (z - t))) 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) <= -5.5e-39) || !(Float64(a * 120.0) <= 1e-34)) tmp = Float64(Float64(a * 120.0) + Float64(y * Float64(-60.0 / Float64(z - t)))); 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) <= -5.5e-39) || ~(((a * 120.0) <= 1e-34))) tmp = (a * 120.0) + (y * (-60.0 / (z - t))); 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], -5.5e-39], N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 1e-34]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(y * N[(-60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $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.5 \cdot 10^{-39} \lor \neg \left(a \cdot 120 \leq 10^{-34}\right):\\
\;\;\;\;a \cdot 120 + y \cdot \frac{-60}{z - t}\\
\mathbf{else}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{60}{z - t}\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -5.50000000000000018e-39 or 9.99999999999999928e-35 < (*.f64 a #s(literal 120 binary64)) Initial program 99.2%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around 0 85.8%
associate-*r/85.1%
*-commutative85.1%
*-lft-identity85.1%
times-frac85.8%
/-rgt-identity85.8%
Simplified85.8%
if -5.50000000000000018e-39 < (*.f64 a #s(literal 120 binary64)) < 9.99999999999999928e-35Initial program 99.6%
associate-/l*99.6%
Simplified99.6%
+-commutative99.6%
fma-define99.6%
clear-num99.5%
un-div-inv99.6%
Applied egg-rr99.6%
Taylor expanded in a around 0 81.7%
associate-*r/81.7%
associate-*l/81.7%
metadata-eval81.7%
associate-*r/81.6%
*-commutative81.6%
associate-*r/81.7%
metadata-eval81.7%
Simplified81.7%
Final simplification83.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= (* a 120.0) -2000000000000.0) (not (<= (* a 120.0) 1e+17))) (* 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) <= -2000000000000.0) || !((a * 120.0) <= 1e+17)) {
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) :: tmp
if (((a * 120.0d0) <= (-2000000000000.0d0)) .or. (.not. ((a * 120.0d0) <= 1d+17))) 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 tmp;
if (((a * 120.0) <= -2000000000000.0) || !((a * 120.0) <= 1e+17)) {
tmp = 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) <= -2000000000000.0) or not ((a * 120.0) <= 1e+17): tmp = 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) <= -2000000000000.0) || !(Float64(a * 120.0) <= 1e+17)) 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) tmp = 0.0; if (((a * 120.0) <= -2000000000000.0) || ~(((a * 120.0) <= 1e+17))) tmp = 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], -2000000000000.0], N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 1e+17]], $MachinePrecision]], 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}
\mathbf{if}\;a \cdot 120 \leq -2000000000000 \lor \neg \left(a \cdot 120 \leq 10^{+17}\right):\\
\;\;\;\;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)) < -2e12 or 1e17 < (*.f64 a #s(literal 120 binary64)) Initial program 99.1%
*-commutative99.1%
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 77.4%
if -2e12 < (*.f64 a #s(literal 120 binary64)) < 1e17Initial program 99.6%
associate-/l*99.6%
Simplified99.6%
+-commutative99.6%
fma-define99.6%
clear-num99.5%
un-div-inv99.6%
Applied egg-rr99.6%
Taylor expanded in a around 0 78.3%
associate-*r/78.4%
associate-*l/78.4%
metadata-eval78.4%
associate-*r/78.2%
*-commutative78.2%
associate-*r/78.4%
metadata-eval78.4%
Simplified78.4%
Final simplification77.9%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -1e+36)
(+ (* a 120.0) (/ (* x 60.0) z))
(if (<= (* a 120.0) 1e-34)
(* (- x y) (/ 60.0 (- z t)))
(+ (* a 120.0) (* y (/ -60.0 z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -1e+36) {
tmp = (a * 120.0) + ((x * 60.0) / z);
} else if ((a * 120.0) <= 1e-34) {
tmp = (x - y) * (60.0 / (z - t));
} else {
tmp = (a * 120.0) + (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 ((a * 120.0d0) <= (-1d+36)) then
tmp = (a * 120.0d0) + ((x * 60.0d0) / z)
else if ((a * 120.0d0) <= 1d-34) then
tmp = (x - y) * (60.0d0 / (z - t))
else
tmp = (a * 120.0d0) + (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 ((a * 120.0) <= -1e+36) {
tmp = (a * 120.0) + ((x * 60.0) / z);
} else if ((a * 120.0) <= 1e-34) {
tmp = (x - y) * (60.0 / (z - t));
} else {
tmp = (a * 120.0) + (y * (-60.0 / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -1e+36: tmp = (a * 120.0) + ((x * 60.0) / z) elif (a * 120.0) <= 1e-34: tmp = (x - y) * (60.0 / (z - t)) else: tmp = (a * 120.0) + (y * (-60.0 / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -1e+36) tmp = Float64(Float64(a * 120.0) + Float64(Float64(x * 60.0) / z)); elseif (Float64(a * 120.0) <= 1e-34) tmp = Float64(Float64(x - y) * Float64(60.0 / Float64(z - t))); else tmp = Float64(Float64(a * 120.0) + Float64(y * Float64(-60.0 / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a * 120.0) <= -1e+36) tmp = (a * 120.0) + ((x * 60.0) / z); elseif ((a * 120.0) <= 1e-34) tmp = (x - y) * (60.0 / (z - t)); else tmp = (a * 120.0) + (y * (-60.0 / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -1e+36], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(x * 60.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 1e-34], N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(y * N[(-60.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -1 \cdot 10^{+36}:\\
\;\;\;\;a \cdot 120 + \frac{x \cdot 60}{z}\\
\mathbf{elif}\;a \cdot 120 \leq 10^{-34}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{60}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + y \cdot \frac{-60}{z}\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -1.00000000000000004e36Initial program 99.9%
Taylor expanded in z around inf 79.4%
Taylor expanded in x around inf 83.3%
if -1.00000000000000004e36 < (*.f64 a #s(literal 120 binary64)) < 9.99999999999999928e-35Initial program 99.6%
associate-/l*99.6%
Simplified99.6%
+-commutative99.6%
fma-define99.6%
clear-num99.5%
un-div-inv99.6%
Applied egg-rr99.6%
Taylor expanded in a around 0 79.6%
associate-*r/79.6%
associate-*l/79.7%
metadata-eval79.7%
associate-*r/79.5%
*-commutative79.5%
associate-*r/79.7%
metadata-eval79.7%
Simplified79.7%
if 9.99999999999999928e-35 < (*.f64 a #s(literal 120 binary64)) Initial program 98.5%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around 0 86.6%
associate-*r/85.2%
*-commutative85.2%
*-lft-identity85.2%
times-frac86.6%
/-rgt-identity86.6%
Simplified86.6%
Taylor expanded in z around inf 72.6%
Final simplification78.7%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -2000000000000.0)
(* a 120.0)
(if (<= (* a 120.0) 1e-34)
(* (- x y) (/ 60.0 (- z t)))
(+ (* a 120.0) (* y (/ -60.0 z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -2000000000000.0) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 1e-34) {
tmp = (x - y) * (60.0 / (z - t));
} else {
tmp = (a * 120.0) + (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 ((a * 120.0d0) <= (-2000000000000.0d0)) then
tmp = a * 120.0d0
else if ((a * 120.0d0) <= 1d-34) then
tmp = (x - y) * (60.0d0 / (z - t))
else
tmp = (a * 120.0d0) + (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 ((a * 120.0) <= -2000000000000.0) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 1e-34) {
tmp = (x - y) * (60.0 / (z - t));
} else {
tmp = (a * 120.0) + (y * (-60.0 / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -2000000000000.0: tmp = a * 120.0 elif (a * 120.0) <= 1e-34: tmp = (x - y) * (60.0 / (z - t)) else: tmp = (a * 120.0) + (y * (-60.0 / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -2000000000000.0) tmp = Float64(a * 120.0); elseif (Float64(a * 120.0) <= 1e-34) tmp = Float64(Float64(x - y) * Float64(60.0 / Float64(z - t))); else tmp = Float64(Float64(a * 120.0) + Float64(y * Float64(-60.0 / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a * 120.0) <= -2000000000000.0) tmp = a * 120.0; elseif ((a * 120.0) <= 1e-34) tmp = (x - y) * (60.0 / (z - t)); else tmp = (a * 120.0) + (y * (-60.0 / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -2000000000000.0], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 1e-34], N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(y * N[(-60.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -2000000000000:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq 10^{-34}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{60}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + y \cdot \frac{-60}{z}\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -2e12Initial 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 78.2%
if -2e12 < (*.f64 a #s(literal 120 binary64)) < 9.99999999999999928e-35Initial program 99.6%
associate-/l*99.6%
Simplified99.6%
+-commutative99.6%
fma-define99.6%
clear-num99.5%
un-div-inv99.6%
Applied egg-rr99.6%
Taylor expanded in a around 0 80.5%
associate-*r/80.5%
associate-*l/80.5%
metadata-eval80.5%
associate-*r/80.3%
*-commutative80.3%
associate-*r/80.5%
metadata-eval80.5%
Simplified80.5%
if 9.99999999999999928e-35 < (*.f64 a #s(literal 120 binary64)) Initial program 98.5%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around 0 86.6%
associate-*r/85.2%
*-commutative85.2%
*-lft-identity85.2%
times-frac86.6%
/-rgt-identity86.6%
Simplified86.6%
Taylor expanded in z around inf 72.6%
Final simplification78.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -680000.0) (not (<= z 9.2e+34))) (+ (* a 120.0) (* (- x y) (/ 60.0 z))) (+ (* a 120.0) (* (- x y) (/ -60.0 t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -680000.0) || !(z <= 9.2e+34)) {
tmp = (a * 120.0) + ((x - y) * (60.0 / z));
} else {
tmp = (a * 120.0) + ((x - y) * (-60.0 / t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-680000.0d0)) .or. (.not. (z <= 9.2d+34))) then
tmp = (a * 120.0d0) + ((x - y) * (60.0d0 / z))
else
tmp = (a * 120.0d0) + ((x - y) * ((-60.0d0) / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -680000.0) || !(z <= 9.2e+34)) {
tmp = (a * 120.0) + ((x - y) * (60.0 / z));
} else {
tmp = (a * 120.0) + ((x - y) * (-60.0 / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -680000.0) or not (z <= 9.2e+34): tmp = (a * 120.0) + ((x - y) * (60.0 / z)) else: tmp = (a * 120.0) + ((x - y) * (-60.0 / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -680000.0) || !(z <= 9.2e+34)) tmp = Float64(Float64(a * 120.0) + Float64(Float64(x - y) * Float64(60.0 / z))); else tmp = Float64(Float64(a * 120.0) + Float64(Float64(x - y) * Float64(-60.0 / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -680000.0) || ~((z <= 9.2e+34))) tmp = (a * 120.0) + ((x - y) * (60.0 / z)); else tmp = (a * 120.0) + ((x - y) * (-60.0 / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -680000.0], N[Not[LessEqual[z, 9.2e+34]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(x - y), $MachinePrecision] * N[(60.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(x - y), $MachinePrecision] * N[(-60.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -680000 \lor \neg \left(z \leq 9.2 \cdot 10^{+34}\right):\\
\;\;\;\;a \cdot 120 + \left(x - y\right) \cdot \frac{60}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \left(x - y\right) \cdot \frac{-60}{t}\\
\end{array}
\end{array}
if z < -6.8e5 or 9.1999999999999993e34 < z Initial program 99.8%
*-commutative99.8%
associate-/l*99.8%
Applied egg-rr99.8%
Taylor expanded in z around inf 92.4%
if -6.8e5 < z < 9.1999999999999993e34Initial program 99.1%
*-commutative99.1%
associate-/l*99.7%
Applied egg-rr99.7%
Taylor expanded in z around 0 80.0%
Final simplification85.4%
(FPCore (x y z t a)
:precision binary64
(if (<= y -1.3e+122)
(+ (* a 120.0) (* y (/ -60.0 (- z t))))
(if (<= y 0.14)
(+ (* a 120.0) (/ (* x 60.0) (- 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.3e+122) {
tmp = (a * 120.0) + (y * (-60.0 / (z - t)));
} else if (y <= 0.14) {
tmp = (a * 120.0) + ((x * 60.0) / (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.3d+122)) then
tmp = (a * 120.0d0) + (y * ((-60.0d0) / (z - t)))
else if (y <= 0.14d0) then
tmp = (a * 120.0d0) + ((x * 60.0d0) / (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.3e+122) {
tmp = (a * 120.0) + (y * (-60.0 / (z - t)));
} else if (y <= 0.14) {
tmp = (a * 120.0) + ((x * 60.0) / (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.3e+122: tmp = (a * 120.0) + (y * (-60.0 / (z - t))) elif y <= 0.14: tmp = (a * 120.0) + ((x * 60.0) / (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.3e+122) tmp = Float64(Float64(a * 120.0) + Float64(y * Float64(-60.0 / Float64(z - t)))); elseif (y <= 0.14) tmp = Float64(Float64(a * 120.0) + Float64(Float64(x * 60.0) / 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.3e+122) tmp = (a * 120.0) + (y * (-60.0 / (z - t))); elseif (y <= 0.14) tmp = (a * 120.0) + ((x * 60.0) / (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.3e+122], N[(N[(a * 120.0), $MachinePrecision] + N[(y * N[(-60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 0.14], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(x * 60.0), $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.3 \cdot 10^{+122}:\\
\;\;\;\;a \cdot 120 + y \cdot \frac{-60}{z - t}\\
\mathbf{elif}\;y \leq 0.14:\\
\;\;\;\;a \cdot 120 + \frac{x \cdot 60}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z - t}\\
\end{array}
\end{array}
if y < -1.30000000000000004e122Initial program 96.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around 0 90.6%
associate-*r/87.7%
*-commutative87.7%
*-lft-identity87.7%
times-frac90.5%
/-rgt-identity90.5%
Simplified90.5%
if -1.30000000000000004e122 < y < 0.14000000000000001Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around inf 92.3%
associate-*r/92.3%
Simplified92.3%
if 0.14000000000000001 < y Initial program 99.7%
Taylor expanded in x around 0 87.8%
Final simplification91.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -0.5) (not (<= a 8.2e+18))) (* 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 <= -0.5) || !(a <= 8.2e+18)) {
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 <= (-0.5d0)) .or. (.not. (a <= 8.2d+18))) 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 <= -0.5) || !(a <= 8.2e+18)) {
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 <= -0.5) or not (a <= 8.2e+18): 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 <= -0.5) || !(a <= 8.2e+18)) 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 <= -0.5) || ~((a <= 8.2e+18))) 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, -0.5], N[Not[LessEqual[a, 8.2e+18]], $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 -0.5 \lor \neg \left(a \leq 8.2 \cdot 10^{+18}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\end{array}
\end{array}
if a < -0.5 or 8.2e18 < a Initial program 99.1%
*-commutative99.1%
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 77.4%
if -0.5 < a < 8.2e18Initial program 99.6%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 78.3%
Final simplification77.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -9.5e+172) (not (<= x 5.2e+111))) (/ (* x 60.0) (- z t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -9.5e+172) || !(x <= 5.2e+111)) {
tmp = (x * 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 ((x <= (-9.5d+172)) .or. (.not. (x <= 5.2d+111))) then
tmp = (x * 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 ((x <= -9.5e+172) || !(x <= 5.2e+111)) {
tmp = (x * 60.0) / (z - t);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -9.5e+172) or not (x <= 5.2e+111): tmp = (x * 60.0) / (z - t) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -9.5e+172) || !(x <= 5.2e+111)) tmp = Float64(Float64(x * 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 ((x <= -9.5e+172) || ~((x <= 5.2e+111))) tmp = (x * 60.0) / (z - t); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -9.5e+172], N[Not[LessEqual[x, 5.2e+111]], $MachinePrecision]], N[(N[(x * 60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -9.5 \cdot 10^{+172} \lor \neg \left(x \leq 5.2 \cdot 10^{+111}\right):\\
\;\;\;\;\frac{x \cdot 60}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if x < -9.50000000000000027e172 or 5.1999999999999997e111 < x Initial program 99.8%
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 x around inf 71.0%
associate-*r/71.1%
Simplified71.1%
if -9.50000000000000027e172 < x < 5.1999999999999997e111Initial program 99.3%
*-commutative99.3%
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 54.4%
Final simplification58.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -6.8e+172) (not (<= x 5.2e+111))) (* 60.0 (/ x (- z t))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -6.8e+172) || !(x <= 5.2e+111)) {
tmp = 60.0 * (x / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((x <= (-6.8d+172)) .or. (.not. (x <= 5.2d+111))) then
tmp = 60.0d0 * (x / (z - t))
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -6.8e+172) || !(x <= 5.2e+111)) {
tmp = 60.0 * (x / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -6.8e+172) or not (x <= 5.2e+111): tmp = 60.0 * (x / (z - t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -6.8e+172) || !(x <= 5.2e+111)) tmp = Float64(60.0 * Float64(x / Float64(z - t))); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -6.8e+172) || ~((x <= 5.2e+111))) tmp = 60.0 * (x / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -6.8e+172], N[Not[LessEqual[x, 5.2e+111]], $MachinePrecision]], N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.8 \cdot 10^{+172} \lor \neg \left(x \leq 5.2 \cdot 10^{+111}\right):\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if x < -6.7999999999999996e172 or 5.1999999999999997e111 < x Initial program 99.8%
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 x around inf 71.0%
if -6.7999999999999996e172 < x < 5.1999999999999997e111Initial program 99.3%
*-commutative99.3%
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 54.4%
Final simplification58.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.05e-201) (not (<= a 2.4e-74))) (* a 120.0) (* y (/ -60.0 z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.05e-201) || !(a <= 2.4e-74)) {
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 ((a <= (-1.05d-201)) .or. (.not. (a <= 2.4d-74))) 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 ((a <= -1.05e-201) || !(a <= 2.4e-74)) {
tmp = a * 120.0;
} else {
tmp = y * (-60.0 / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.05e-201) or not (a <= 2.4e-74): tmp = a * 120.0 else: tmp = y * (-60.0 / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.05e-201) || !(a <= 2.4e-74)) tmp = Float64(a * 120.0); else tmp = Float64(y * Float64(-60.0 / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1.05e-201) || ~((a <= 2.4e-74))) tmp = a * 120.0; else tmp = y * (-60.0 / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.05e-201], N[Not[LessEqual[a, 2.4e-74]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(y * N[(-60.0 / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.05 \cdot 10^{-201} \lor \neg \left(a \leq 2.4 \cdot 10^{-74}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{-60}{z}\\
\end{array}
\end{array}
if a < -1.05000000000000006e-201 or 2.3999999999999999e-74 < a Initial program 99.4%
*-commutative99.4%
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 59.7%
if -1.05000000000000006e-201 < a < 2.3999999999999999e-74Initial program 99.5%
*-commutative99.5%
associate-/l*99.5%
fma-define99.6%
sub-neg99.6%
+-commutative99.6%
neg-sub099.6%
associate-+l-99.6%
sub0-neg99.6%
distribute-frac-neg299.6%
distribute-neg-frac99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around inf 44.2%
Taylor expanded in t around 0 30.9%
associate-*r/30.9%
*-commutative30.9%
associate-*r/30.9%
Simplified30.9%
Final simplification51.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -2.3e-200) (not (<= a 6.5e-76))) (* a 120.0) (* -60.0 (/ y z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.3e-200) || !(a <= 6.5e-76)) {
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 <= (-2.3d-200)) .or. (.not. (a <= 6.5d-76))) 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 <= -2.3e-200) || !(a <= 6.5e-76)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (y / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -2.3e-200) or not (a <= 6.5e-76): tmp = a * 120.0 else: tmp = -60.0 * (y / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -2.3e-200) || !(a <= 6.5e-76)) 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 <= -2.3e-200) || ~((a <= 6.5e-76))) 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, -2.3e-200], N[Not[LessEqual[a, 6.5e-76]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.3 \cdot 10^{-200} \lor \neg \left(a \leq 6.5 \cdot 10^{-76}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if a < -2.30000000000000007e-200 or 6.5e-76 < a Initial program 99.4%
*-commutative99.4%
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 59.7%
if -2.30000000000000007e-200 < a < 6.5e-76Initial program 99.5%
*-commutative99.5%
associate-/l*99.5%
fma-define99.6%
sub-neg99.6%
+-commutative99.6%
neg-sub099.6%
associate-+l-99.6%
sub0-neg99.6%
distribute-frac-neg299.6%
distribute-neg-frac99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around inf 44.2%
Taylor expanded in t around 0 30.9%
Final simplification51.7%
(FPCore (x y z t a) :precision binary64 (+ (* a 120.0) (* (- x y) (/ 60.0 (- z t)))))
double code(double x, double y, double z, double t, double a) {
return (a * 120.0) + ((x - y) * (60.0 / (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) + ((x - y) * (60.0d0 / (z - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return (a * 120.0) + ((x - y) * (60.0 / (z - t)));
}
def code(x, y, z, t, a): return (a * 120.0) + ((x - y) * (60.0 / (z - t)))
function code(x, y, z, t, a) return Float64(Float64(a * 120.0) + Float64(Float64(x - y) * Float64(60.0 / Float64(z - t)))) end
function tmp = code(x, y, z, t, a) tmp = (a * 120.0) + ((x - y) * (60.0 / (z - t))); end
code[x_, y_, z_, t_, a_] := N[(N[(a * 120.0), $MachinePrecision] + N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
a \cdot 120 + \left(x - y\right) \cdot \frac{60}{z - t}
\end{array}
Initial program 99.4%
*-commutative99.4%
associate-/l*99.7%
Applied egg-rr99.7%
Final simplification99.7%
(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.4%
associate-/l*99.7%
Simplified99.7%
Final simplification99.7%
(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.4%
*-commutative99.4%
associate-/l*99.7%
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 46.1%
Final simplification46.1%
(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 2024160
(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)))