
(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 (- (* a 120.0) (/ 60.0 (/ (- z t) (- y x)))))
double code(double x, double y, double z, double t, double a) {
return (a * 120.0) - (60.0 / ((z - t) / (y - x)));
}
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 / ((z - t) / (y - x)))
end function
public static double code(double x, double y, double z, double t, double a) {
return (a * 120.0) - (60.0 / ((z - t) / (y - x)));
}
def code(x, y, z, t, a): return (a * 120.0) - (60.0 / ((z - t) / (y - x)))
function code(x, y, z, t, a) return Float64(Float64(a * 120.0) - Float64(60.0 / Float64(Float64(z - t) / Float64(y - x)))) end
function tmp = code(x, y, z, t, a) tmp = (a * 120.0) - (60.0 / ((z - t) / (y - x))); end
code[x_, y_, z_, t_, a_] := N[(N[(a * 120.0), $MachinePrecision] - N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
a \cdot 120 - \frac{60}{\frac{z - t}{y - x}}
\end{array}
Initial program 99.0%
associate-/l*99.4%
Simplified99.4%
clear-num99.3%
un-div-inv99.4%
Applied egg-rr99.4%
Final simplification99.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= (- x y) -1e+163) (not (<= (- x y) 5e+111))) (* 60.0 (/ (- x y) (- z t))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((x - y) <= -1e+163) || !((x - y) <= 5e+111)) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (((x - y) <= (-1d+163)) .or. (.not. ((x - y) <= 5d+111))) then
tmp = 60.0d0 * ((x - y) / (z - t))
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (((x - y) <= -1e+163) || !((x - y) <= 5e+111)) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if ((x - y) <= -1e+163) or not ((x - y) <= 5e+111): tmp = 60.0 * ((x - y) / (z - t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((Float64(x - y) <= -1e+163) || !(Float64(x - y) <= 5e+111)) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (((x - y) <= -1e+163) || ~(((x - y) <= 5e+111))) tmp = 60.0 * ((x - y) / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[N[(x - y), $MachinePrecision], -1e+163], N[Not[LessEqual[N[(x - y), $MachinePrecision], 5e+111]], $MachinePrecision]], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x - y \leq -1 \cdot 10^{+163} \lor \neg \left(x - y \leq 5 \cdot 10^{+111}\right):\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (-.f64 x y) < -9.9999999999999994e162 or 4.9999999999999997e111 < (-.f64 x y) Initial program 98.1%
associate-/l*98.9%
Simplified98.9%
clear-num98.9%
un-div-inv98.9%
Applied egg-rr98.9%
Taylor expanded in a around 0 74.3%
if -9.9999999999999994e162 < (-.f64 x y) < 4.9999999999999997e111Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 73.7%
Final simplification74.0%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -100000.0)
(- (* a 120.0) (/ 60.0 (/ z y)))
(if (<= (* a 120.0) 5e-14)
(* (- y x) (/ 60.0 (- t z)))
(+ (* a 120.0) (/ (* x -60.0) t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -100000.0) {
tmp = (a * 120.0) - (60.0 / (z / y));
} else if ((a * 120.0) <= 5e-14) {
tmp = (y - x) * (60.0 / (t - z));
} else {
tmp = (a * 120.0) + ((x * -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 ((a * 120.0d0) <= (-100000.0d0)) then
tmp = (a * 120.0d0) - (60.0d0 / (z / y))
else if ((a * 120.0d0) <= 5d-14) then
tmp = (y - x) * (60.0d0 / (t - z))
else
tmp = (a * 120.0d0) + ((x * (-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 ((a * 120.0) <= -100000.0) {
tmp = (a * 120.0) - (60.0 / (z / y));
} else if ((a * 120.0) <= 5e-14) {
tmp = (y - x) * (60.0 / (t - z));
} else {
tmp = (a * 120.0) + ((x * -60.0) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -100000.0: tmp = (a * 120.0) - (60.0 / (z / y)) elif (a * 120.0) <= 5e-14: tmp = (y - x) * (60.0 / (t - z)) else: tmp = (a * 120.0) + ((x * -60.0) / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -100000.0) tmp = Float64(Float64(a * 120.0) - Float64(60.0 / Float64(z / y))); elseif (Float64(a * 120.0) <= 5e-14) tmp = Float64(Float64(y - x) * Float64(60.0 / Float64(t - z))); else tmp = Float64(Float64(a * 120.0) + Float64(Float64(x * -60.0) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a * 120.0) <= -100000.0) tmp = (a * 120.0) - (60.0 / (z / y)); elseif ((a * 120.0) <= 5e-14) tmp = (y - x) * (60.0 / (t - z)); else tmp = (a * 120.0) + ((x * -60.0) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -100000.0], N[(N[(a * 120.0), $MachinePrecision] - N[(60.0 / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 5e-14], N[(N[(y - x), $MachinePrecision] * N[(60.0 / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(x * -60.0), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -100000:\\
\;\;\;\;a \cdot 120 - \frac{60}{\frac{z}{y}}\\
\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-14}:\\
\;\;\;\;\left(y - x\right) \cdot \frac{60}{t - z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{x \cdot -60}{t}\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -1e5Initial program 98.2%
associate-/l*98.2%
Simplified98.2%
clear-num98.2%
un-div-inv98.3%
Applied egg-rr98.3%
Taylor expanded in x around 0 86.7%
neg-mul-186.7%
Simplified86.7%
Taylor expanded in z around inf 78.5%
associate-*r/78.5%
neg-mul-178.5%
Simplified78.5%
if -1e5 < (*.f64 a #s(literal 120 binary64)) < 5.0000000000000002e-14Initial program 99.0%
associate-/l*99.7%
Simplified99.7%
clear-num99.6%
un-div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 71.2%
associate-*r/70.5%
associate-*l/71.2%
metadata-eval71.2%
associate-*r/71.2%
*-commutative71.2%
associate-*r/71.2%
metadata-eval71.2%
Simplified71.2%
if 5.0000000000000002e-14 < (*.f64 a #s(literal 120 binary64)) Initial program 99.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 89.5%
associate-*r/89.5%
Simplified89.5%
Taylor expanded in z around 0 80.2%
associate-*r/80.2%
Simplified80.2%
Final simplification75.1%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -100000.0)
(+ (* a 120.0) (* -60.0 (/ y z)))
(if (<= (* a 120.0) 5e-14)
(* (- y x) (/ 60.0 (- t z)))
(+ (* a 120.0) (/ (* x -60.0) t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -100000.0) {
tmp = (a * 120.0) + (-60.0 * (y / z));
} else if ((a * 120.0) <= 5e-14) {
tmp = (y - x) * (60.0 / (t - z));
} else {
tmp = (a * 120.0) + ((x * -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 ((a * 120.0d0) <= (-100000.0d0)) then
tmp = (a * 120.0d0) + ((-60.0d0) * (y / z))
else if ((a * 120.0d0) <= 5d-14) then
tmp = (y - x) * (60.0d0 / (t - z))
else
tmp = (a * 120.0d0) + ((x * (-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 ((a * 120.0) <= -100000.0) {
tmp = (a * 120.0) + (-60.0 * (y / z));
} else if ((a * 120.0) <= 5e-14) {
tmp = (y - x) * (60.0 / (t - z));
} else {
tmp = (a * 120.0) + ((x * -60.0) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -100000.0: tmp = (a * 120.0) + (-60.0 * (y / z)) elif (a * 120.0) <= 5e-14: tmp = (y - x) * (60.0 / (t - z)) else: tmp = (a * 120.0) + ((x * -60.0) / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -100000.0) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / z))); elseif (Float64(a * 120.0) <= 5e-14) tmp = Float64(Float64(y - x) * Float64(60.0 / Float64(t - z))); else tmp = Float64(Float64(a * 120.0) + Float64(Float64(x * -60.0) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a * 120.0) <= -100000.0) tmp = (a * 120.0) + (-60.0 * (y / z)); elseif ((a * 120.0) <= 5e-14) tmp = (y - x) * (60.0 / (t - z)); else tmp = (a * 120.0) + ((x * -60.0) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -100000.0], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 5e-14], N[(N[(y - x), $MachinePrecision] * N[(60.0 / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(x * -60.0), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -100000:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\
\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-14}:\\
\;\;\;\;\left(y - x\right) \cdot \frac{60}{t - z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{x \cdot -60}{t}\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -1e5Initial program 98.2%
associate-/l*98.2%
Simplified98.2%
Taylor expanded in z around inf 73.0%
Taylor expanded in x around 0 78.5%
if -1e5 < (*.f64 a #s(literal 120 binary64)) < 5.0000000000000002e-14Initial program 99.0%
associate-/l*99.7%
Simplified99.7%
clear-num99.6%
un-div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 71.2%
associate-*r/70.5%
associate-*l/71.2%
metadata-eval71.2%
associate-*r/71.2%
*-commutative71.2%
associate-*r/71.2%
metadata-eval71.2%
Simplified71.2%
if 5.0000000000000002e-14 < (*.f64 a #s(literal 120 binary64)) Initial program 99.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 89.5%
associate-*r/89.5%
Simplified89.5%
Taylor expanded in z around 0 80.2%
associate-*r/80.2%
Simplified80.2%
Final simplification75.1%
(FPCore (x y z t a) :precision binary64 (if (<= (* a 120.0) -100000.0) (+ (* a 120.0) (* -60.0 (/ y z))) (if (<= (* a 120.0) 1e+30) (* (- y x) (/ 60.0 (- t z))) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -100000.0) {
tmp = (a * 120.0) + (-60.0 * (y / z));
} else if ((a * 120.0) <= 1e+30) {
tmp = (y - x) * (60.0 / (t - 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 ((a * 120.0d0) <= (-100000.0d0)) then
tmp = (a * 120.0d0) + ((-60.0d0) * (y / z))
else if ((a * 120.0d0) <= 1d+30) then
tmp = (y - x) * (60.0d0 / (t - 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 ((a * 120.0) <= -100000.0) {
tmp = (a * 120.0) + (-60.0 * (y / z));
} else if ((a * 120.0) <= 1e+30) {
tmp = (y - x) * (60.0 / (t - z));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -100000.0: tmp = (a * 120.0) + (-60.0 * (y / z)) elif (a * 120.0) <= 1e+30: tmp = (y - x) * (60.0 / (t - z)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -100000.0) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / z))); elseif (Float64(a * 120.0) <= 1e+30) tmp = Float64(Float64(y - x) * Float64(60.0 / Float64(t - z))); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a * 120.0) <= -100000.0) tmp = (a * 120.0) + (-60.0 * (y / z)); elseif ((a * 120.0) <= 1e+30) tmp = (y - x) * (60.0 / (t - z)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -100000.0], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 1e+30], N[(N[(y - x), $MachinePrecision] * N[(60.0 / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -100000:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\
\mathbf{elif}\;a \cdot 120 \leq 10^{+30}:\\
\;\;\;\;\left(y - x\right) \cdot \frac{60}{t - z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -1e5Initial program 98.2%
associate-/l*98.2%
Simplified98.2%
Taylor expanded in z around inf 73.0%
Taylor expanded in x around 0 78.5%
if -1e5 < (*.f64 a #s(literal 120 binary64)) < 1e30Initial program 99.0%
associate-/l*99.7%
Simplified99.7%
clear-num99.6%
un-div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 70.1%
associate-*r/69.4%
associate-*l/70.1%
metadata-eval70.1%
associate-*r/70.1%
*-commutative70.1%
associate-*r/70.1%
metadata-eval70.1%
Simplified70.1%
if 1e30 < (*.f64 a #s(literal 120 binary64)) Initial program 99.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 83.8%
Final simplification74.8%
(FPCore (x y z t a) :precision binary64 (if (<= (- x y) -1e+163) (* (- y x) (/ 60.0 (- t z))) (if (<= (- x y) 5e+111) (* a 120.0) (* 60.0 (/ (- x y) (- z t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x - y) <= -1e+163) {
tmp = (y - x) * (60.0 / (t - z));
} else if ((x - y) <= 5e+111) {
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 ((x - y) <= (-1d+163)) then
tmp = (y - x) * (60.0d0 / (t - z))
else if ((x - y) <= 5d+111) 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 ((x - y) <= -1e+163) {
tmp = (y - x) * (60.0 / (t - z));
} else if ((x - y) <= 5e+111) {
tmp = a * 120.0;
} else {
tmp = 60.0 * ((x - y) / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x - y) <= -1e+163: tmp = (y - x) * (60.0 / (t - z)) elif (x - y) <= 5e+111: 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(x - y) <= -1e+163) tmp = Float64(Float64(y - x) * Float64(60.0 / Float64(t - z))); elseif (Float64(x - y) <= 5e+111) 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 ((x - y) <= -1e+163) tmp = (y - x) * (60.0 / (t - z)); elseif ((x - y) <= 5e+111) tmp = a * 120.0; else tmp = 60.0 * ((x - y) / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(x - y), $MachinePrecision], -1e+163], N[(N[(y - x), $MachinePrecision] * N[(60.0 / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x - y), $MachinePrecision], 5e+111], 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}\;x - y \leq -1 \cdot 10^{+163}:\\
\;\;\;\;\left(y - x\right) \cdot \frac{60}{t - z}\\
\mathbf{elif}\;x - y \leq 5 \cdot 10^{+111}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\end{array}
\end{array}
if (-.f64 x y) < -9.9999999999999994e162Initial program 97.3%
associate-/l*97.2%
Simplified97.2%
clear-num97.2%
un-div-inv97.4%
Applied egg-rr97.4%
Taylor expanded in a around 0 83.7%
associate-*r/83.7%
associate-*l/83.8%
metadata-eval83.8%
associate-*r/83.8%
*-commutative83.8%
associate-*r/83.8%
metadata-eval83.8%
Simplified83.8%
if -9.9999999999999994e162 < (-.f64 x y) < 4.9999999999999997e111Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 73.7%
if 4.9999999999999997e111 < (-.f64 x y) Initial program 98.5%
associate-/l*99.8%
Simplified99.8%
clear-num99.7%
un-div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 69.5%
Final simplification74.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -1.2e+115) (not (<= x 3.7e+99))) (+ (* a 120.0) (* 60.0 (/ x (- z t)))) (+ (* a 120.0) (/ 60.0 (/ (- t z) y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -1.2e+115) || !(x <= 3.7e+99)) {
tmp = (a * 120.0) + (60.0 * (x / (z - t)));
} else {
tmp = (a * 120.0) + (60.0 / ((t - z) / y));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((x <= (-1.2d+115)) .or. (.not. (x <= 3.7d+99))) then
tmp = (a * 120.0d0) + (60.0d0 * (x / (z - t)))
else
tmp = (a * 120.0d0) + (60.0d0 / ((t - z) / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -1.2e+115) || !(x <= 3.7e+99)) {
tmp = (a * 120.0) + (60.0 * (x / (z - t)));
} else {
tmp = (a * 120.0) + (60.0 / ((t - z) / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -1.2e+115) or not (x <= 3.7e+99): tmp = (a * 120.0) + (60.0 * (x / (z - t))) else: tmp = (a * 120.0) + (60.0 / ((t - z) / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -1.2e+115) || !(x <= 3.7e+99)) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(x / Float64(z - t)))); else tmp = Float64(Float64(a * 120.0) + Float64(60.0 / Float64(Float64(t - z) / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -1.2e+115) || ~((x <= 3.7e+99))) tmp = (a * 120.0) + (60.0 * (x / (z - t))); else tmp = (a * 120.0) + (60.0 / ((t - z) / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -1.2e+115], N[Not[LessEqual[x, 3.7e+99]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 / N[(N[(t - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.2 \cdot 10^{+115} \lor \neg \left(x \leq 3.7 \cdot 10^{+99}\right):\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{x}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{60}{\frac{t - z}{y}}\\
\end{array}
\end{array}
if x < -1.2e115 or 3.7000000000000001e99 < x Initial program 97.7%
associate-/l*98.7%
Simplified98.7%
Taylor expanded in x around inf 90.4%
if -1.2e115 < x < 3.7000000000000001e99Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
clear-num99.7%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in x around 0 91.7%
neg-mul-191.7%
Simplified91.7%
Final simplification91.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -1.2e+115) (not (<= x 2.55e+99))) (+ (* a 120.0) (* 60.0 (/ x (- z t)))) (+ (* a 120.0) (* 60.0 (/ y (- t z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -1.2e+115) || !(x <= 2.55e+99)) {
tmp = (a * 120.0) + (60.0 * (x / (z - t)));
} else {
tmp = (a * 120.0) + (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 ((x <= (-1.2d+115)) .or. (.not. (x <= 2.55d+99))) then
tmp = (a * 120.0d0) + (60.0d0 * (x / (z - t)))
else
tmp = (a * 120.0d0) + (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 ((x <= -1.2e+115) || !(x <= 2.55e+99)) {
tmp = (a * 120.0) + (60.0 * (x / (z - t)));
} else {
tmp = (a * 120.0) + (60.0 * (y / (t - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -1.2e+115) or not (x <= 2.55e+99): tmp = (a * 120.0) + (60.0 * (x / (z - t))) else: tmp = (a * 120.0) + (60.0 * (y / (t - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -1.2e+115) || !(x <= 2.55e+99)) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(x / Float64(z - t)))); else tmp = Float64(Float64(a * 120.0) + 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 ((x <= -1.2e+115) || ~((x <= 2.55e+99))) tmp = (a * 120.0) + (60.0 * (x / (z - t))); else tmp = (a * 120.0) + (60.0 * (y / (t - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -1.2e+115], N[Not[LessEqual[x, 2.55e+99]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.2 \cdot 10^{+115} \lor \neg \left(x \leq 2.55 \cdot 10^{+99}\right):\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{x}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t - z}\\
\end{array}
\end{array}
if x < -1.2e115 or 2.54999999999999976e99 < x Initial program 97.7%
associate-/l*98.7%
Simplified98.7%
Taylor expanded in x around inf 90.4%
if -1.2e115 < x < 2.54999999999999976e99Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 91.7%
associate-*r/91.7%
remove-double-neg91.7%
neg-mul-191.7%
times-frac91.7%
metadata-eval91.7%
neg-sub091.7%
sub-neg91.7%
+-commutative91.7%
associate--r+91.7%
neg-sub091.7%
remove-double-neg91.7%
Simplified91.7%
Final simplification91.2%
(FPCore (x y z t a)
:precision binary64
(if (<= y -1.1e+180)
(+ (* a 120.0) (/ 60.0 (/ t y)))
(if (<= y 1.6e+153)
(+ (* a 120.0) (* 60.0 (/ x (- z t))))
(* (- y x) (/ 60.0 (- t z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.1e+180) {
tmp = (a * 120.0) + (60.0 / (t / y));
} else if (y <= 1.6e+153) {
tmp = (a * 120.0) + (60.0 * (x / (z - t)));
} else {
tmp = (y - x) * (60.0 / (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 (y <= (-1.1d+180)) then
tmp = (a * 120.0d0) + (60.0d0 / (t / y))
else if (y <= 1.6d+153) then
tmp = (a * 120.0d0) + (60.0d0 * (x / (z - t)))
else
tmp = (y - x) * (60.0d0 / (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 (y <= -1.1e+180) {
tmp = (a * 120.0) + (60.0 / (t / y));
} else if (y <= 1.6e+153) {
tmp = (a * 120.0) + (60.0 * (x / (z - t)));
} else {
tmp = (y - x) * (60.0 / (t - z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -1.1e+180: tmp = (a * 120.0) + (60.0 / (t / y)) elif y <= 1.6e+153: tmp = (a * 120.0) + (60.0 * (x / (z - t))) else: tmp = (y - x) * (60.0 / (t - z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -1.1e+180) tmp = Float64(Float64(a * 120.0) + Float64(60.0 / Float64(t / y))); elseif (y <= 1.6e+153) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(x / Float64(z - t)))); else tmp = Float64(Float64(y - x) * Float64(60.0 / Float64(t - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -1.1e+180) tmp = (a * 120.0) + (60.0 / (t / y)); elseif (y <= 1.6e+153) tmp = (a * 120.0) + (60.0 * (x / (z - t))); else tmp = (y - x) * (60.0 / (t - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -1.1e+180], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.6e+153], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y - x), $MachinePrecision] * N[(60.0 / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.1 \cdot 10^{+180}:\\
\;\;\;\;a \cdot 120 + \frac{60}{\frac{t}{y}}\\
\mathbf{elif}\;y \leq 1.6 \cdot 10^{+153}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{x}{z - t}\\
\mathbf{else}:\\
\;\;\;\;\left(y - x\right) \cdot \frac{60}{t - z}\\
\end{array}
\end{array}
if y < -1.1e180Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
clear-num99.8%
un-div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in x around 0 96.4%
neg-mul-196.4%
Simplified96.4%
Taylor expanded in z around 0 74.0%
if -1.1e180 < y < 1.6000000000000001e153Initial program 99.3%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 88.2%
if 1.6000000000000001e153 < y Initial program 95.3%
associate-/l*95.3%
Simplified95.3%
clear-num95.4%
un-div-inv95.4%
Applied egg-rr95.4%
Taylor expanded in a around 0 90.5%
associate-*r/90.6%
associate-*l/90.7%
metadata-eval90.7%
associate-*r/90.6%
*-commutative90.6%
associate-*r/90.7%
metadata-eval90.7%
Simplified90.7%
Final simplification86.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -3e+175) (not (<= x 1.4e+113))) (* 60.0 (/ x (- z t))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -3e+175) || !(x <= 1.4e+113)) {
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 <= (-3d+175)) .or. (.not. (x <= 1.4d+113))) 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 <= -3e+175) || !(x <= 1.4e+113)) {
tmp = 60.0 * (x / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -3e+175) or not (x <= 1.4e+113): 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 <= -3e+175) || !(x <= 1.4e+113)) 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 <= -3e+175) || ~((x <= 1.4e+113))) 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, -3e+175], N[Not[LessEqual[x, 1.4e+113]], $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 -3 \cdot 10^{+175} \lor \neg \left(x \leq 1.4 \cdot 10^{+113}\right):\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if x < -3.0000000000000002e175 or 1.39999999999999999e113 < x Initial program 98.5%
associate-/l*99.7%
Simplified99.7%
clear-num99.7%
un-div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 74.9%
Taylor expanded in x around inf 69.5%
if -3.0000000000000002e175 < x < 1.39999999999999999e113Initial program 99.2%
associate-/l*99.2%
Simplified99.2%
Taylor expanded in z around inf 61.9%
Final simplification64.2%
(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.0%
associate-/l*99.4%
Simplified99.4%
Final simplification99.4%
(FPCore (x y z t a) :precision binary64 (if (<= y 5.6e+157) (* a 120.0) (* 60.0 (/ y t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= 5.6e+157) {
tmp = a * 120.0;
} else {
tmp = 60.0 * (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 (y <= 5.6d+157) then
tmp = a * 120.0d0
else
tmp = 60.0d0 * (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 (y <= 5.6e+157) {
tmp = a * 120.0;
} else {
tmp = 60.0 * (y / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= 5.6e+157: tmp = a * 120.0 else: tmp = 60.0 * (y / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= 5.6e+157) tmp = Float64(a * 120.0); else tmp = Float64(60.0 * Float64(y / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= 5.6e+157) tmp = a * 120.0; else tmp = 60.0 * (y / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, 5.6e+157], N[(a * 120.0), $MachinePrecision], N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 5.6 \cdot 10^{+157}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{y}{t}\\
\end{array}
\end{array}
if y < 5.6000000000000005e157Initial program 99.4%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 55.1%
if 5.6000000000000005e157 < y Initial program 95.3%
associate-/l*95.3%
Simplified95.3%
clear-num95.4%
un-div-inv95.4%
Applied egg-rr95.4%
Taylor expanded in a around 0 90.5%
Taylor expanded in x around 0 64.9%
associate-*r/70.0%
remove-double-neg70.0%
neg-mul-170.0%
times-frac69.9%
metadata-eval69.9%
neg-sub069.9%
sub-neg69.9%
+-commutative69.9%
associate--r+69.9%
neg-sub069.9%
remove-double-neg69.9%
Simplified64.9%
Taylor expanded in t around inf 52.7%
Final simplification54.9%
(FPCore (x y z t a) :precision binary64 (if (<= x 1.5e+137) (* a 120.0) (* 60.0 (/ x z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= 1.5e+137) {
tmp = a * 120.0;
} else {
tmp = 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 (x <= 1.5d+137) then
tmp = a * 120.0d0
else
tmp = 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 (x <= 1.5e+137) {
tmp = a * 120.0;
} else {
tmp = 60.0 * (x / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= 1.5e+137: tmp = a * 120.0 else: tmp = 60.0 * (x / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= 1.5e+137) tmp = Float64(a * 120.0); else tmp = Float64(60.0 * Float64(x / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= 1.5e+137) tmp = a * 120.0; else tmp = 60.0 * (x / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, 1.5e+137], N[(a * 120.0), $MachinePrecision], N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.5 \cdot 10^{+137}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x}{z}\\
\end{array}
\end{array}
if x < 1.5e137Initial program 99.3%
associate-/l*99.3%
Simplified99.3%
Taylor expanded in z around inf 56.2%
if 1.5e137 < x Initial program 97.4%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 59.5%
Taylor expanded in x around inf 59.5%
Taylor expanded in x around inf 42.8%
Final simplification54.0%
(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.0%
associate-/l*99.4%
Simplified99.4%
Taylor expanded in z around inf 51.2%
Final simplification51.2%
(FPCore (x y z t a) :precision binary64 (+ (/ 60.0 (/ (- z t) (- x y))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (60.0d0 / ((z - t) / (x - y))) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
def code(x, y, z, t, a): return (60.0 / ((z - t) / (x - y))) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = (60.0 / ((z - t) / (x - y))) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60}{\frac{z - t}{x - y}} + a \cdot 120
\end{array}
herbie shell --seed 2024137
(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)))