
(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 16 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 (/ (- 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}
Initial program 99.1%
associate-/l*99.8%
Simplified99.8%
clear-num99.7%
un-div-inv99.8%
Applied egg-rr99.8%
(FPCore (x y z t a)
:precision binary64
(if (<= y -1.95e+220)
(+ (* -60.0 (/ y z)) (* a 120.0))
(if (or (<= y -1.25e+84) (not (<= y 1.9e+168)))
(/ 60.0 (/ (- z t) (- x y)))
(+ (* 60.0 (/ x (- z t))) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.95e+220) {
tmp = (-60.0 * (y / z)) + (a * 120.0);
} else if ((y <= -1.25e+84) || !(y <= 1.9e+168)) {
tmp = 60.0 / ((z - t) / (x - y));
} else {
tmp = (60.0 * (x / (z - t))) + (a * 120.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (y <= (-1.95d+220)) then
tmp = ((-60.0d0) * (y / z)) + (a * 120.0d0)
else if ((y <= (-1.25d+84)) .or. (.not. (y <= 1.9d+168))) then
tmp = 60.0d0 / ((z - t) / (x - y))
else
tmp = (60.0d0 * (x / (z - t))) + (a * 120.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.95e+220) {
tmp = (-60.0 * (y / z)) + (a * 120.0);
} else if ((y <= -1.25e+84) || !(y <= 1.9e+168)) {
tmp = 60.0 / ((z - t) / (x - y));
} else {
tmp = (60.0 * (x / (z - t))) + (a * 120.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -1.95e+220: tmp = (-60.0 * (y / z)) + (a * 120.0) elif (y <= -1.25e+84) or not (y <= 1.9e+168): tmp = 60.0 / ((z - t) / (x - y)) else: tmp = (60.0 * (x / (z - t))) + (a * 120.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -1.95e+220) tmp = Float64(Float64(-60.0 * Float64(y / z)) + Float64(a * 120.0)); elseif ((y <= -1.25e+84) || !(y <= 1.9e+168)) tmp = Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))); else tmp = Float64(Float64(60.0 * Float64(x / Float64(z - t))) + Float64(a * 120.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -1.95e+220) tmp = (-60.0 * (y / z)) + (a * 120.0); elseif ((y <= -1.25e+84) || ~((y <= 1.9e+168))) tmp = 60.0 / ((z - t) / (x - y)); else tmp = (60.0 * (x / (z - t))) + (a * 120.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -1.95e+220], N[(N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -1.25e+84], N[Not[LessEqual[y, 1.9e+168]], $MachinePrecision]], N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.95 \cdot 10^{+220}:\\
\;\;\;\;-60 \cdot \frac{y}{z} + a \cdot 120\\
\mathbf{elif}\;y \leq -1.25 \cdot 10^{+84} \lor \neg \left(y \leq 1.9 \cdot 10^{+168}\right):\\
\;\;\;\;\frac{60}{\frac{z - t}{x - y}}\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x}{z - t} + a \cdot 120\\
\end{array}
\end{array}
if y < -1.95000000000000008e220Initial program 99.6%
associate-/l*99.7%
Simplified99.7%
clear-num99.6%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in z around inf 83.1%
Taylor expanded in x around 0 83.1%
if -1.95000000000000008e220 < y < -1.25e84 or 1.9000000000000001e168 < y Initial program 96.6%
associate-/l*99.6%
Simplified99.6%
clear-num99.6%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in a around 0 75.5%
clear-num99.6%
un-div-inv99.8%
Applied egg-rr75.7%
if -1.25e84 < y < 1.9000000000000001e168Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 86.5%
Final simplification83.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (* -60.0 (/ y z)) (* a 120.0))))
(if (<= z -2.7e+85)
t_1
(if (<= z 1.5e-68)
(- (* a 120.0) (/ (* y -60.0) t))
(if (<= z 7.6e-5) (* 60.0 (/ (- x y) (- z t))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (-60.0 * (y / z)) + (a * 120.0);
double tmp;
if (z <= -2.7e+85) {
tmp = t_1;
} else if (z <= 1.5e-68) {
tmp = (a * 120.0) - ((y * -60.0) / t);
} else if (z <= 7.6e-5) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = ((-60.0d0) * (y / z)) + (a * 120.0d0)
if (z <= (-2.7d+85)) then
tmp = t_1
else if (z <= 1.5d-68) then
tmp = (a * 120.0d0) - ((y * (-60.0d0)) / t)
else if (z <= 7.6d-5) then
tmp = 60.0d0 * ((x - y) / (z - t))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (-60.0 * (y / z)) + (a * 120.0);
double tmp;
if (z <= -2.7e+85) {
tmp = t_1;
} else if (z <= 1.5e-68) {
tmp = (a * 120.0) - ((y * -60.0) / t);
} else if (z <= 7.6e-5) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (-60.0 * (y / z)) + (a * 120.0) tmp = 0 if z <= -2.7e+85: tmp = t_1 elif z <= 1.5e-68: tmp = (a * 120.0) - ((y * -60.0) / t) elif z <= 7.6e-5: tmp = 60.0 * ((x - y) / (z - t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(-60.0 * Float64(y / z)) + Float64(a * 120.0)) tmp = 0.0 if (z <= -2.7e+85) tmp = t_1; elseif (z <= 1.5e-68) tmp = Float64(Float64(a * 120.0) - Float64(Float64(y * -60.0) / t)); elseif (z <= 7.6e-5) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (-60.0 * (y / z)) + (a * 120.0); tmp = 0.0; if (z <= -2.7e+85) tmp = t_1; elseif (z <= 1.5e-68) tmp = (a * 120.0) - ((y * -60.0) / t); elseif (z <= 7.6e-5) tmp = 60.0 * ((x - y) / (z - t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.7e+85], t$95$1, If[LessEqual[z, 1.5e-68], N[(N[(a * 120.0), $MachinePrecision] - N[(N[(y * -60.0), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.6e-5], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -60 \cdot \frac{y}{z} + a \cdot 120\\
\mathbf{if}\;z \leq -2.7 \cdot 10^{+85}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{-68}:\\
\;\;\;\;a \cdot 120 - \frac{y \cdot -60}{t}\\
\mathbf{elif}\;z \leq 7.6 \cdot 10^{-5}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.69999999999999983e85 or 7.6000000000000004e-5 < z Initial program 98.9%
associate-/l*99.7%
Simplified99.7%
clear-num99.8%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in z around inf 97.0%
Taylor expanded in x around 0 87.6%
if -2.69999999999999983e85 < z < 1.5e-68Initial program 99.1%
Taylor expanded in z around 0 82.0%
neg-mul-182.0%
Simplified82.0%
Taylor expanded in x around 0 71.3%
if 1.5e-68 < z < 7.6000000000000004e-5Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
clear-num99.2%
un-div-inv99.5%
Applied egg-rr99.5%
Taylor expanded in a around 0 77.3%
Final simplification78.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= (* a 120.0) -4e+29) (not (<= (* a 120.0) 1e-20))) (+ (* -60.0 (/ y z)) (* a 120.0)) (/ 60.0 (/ (- z t) (- x y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((a * 120.0) <= -4e+29) || !((a * 120.0) <= 1e-20)) {
tmp = (-60.0 * (y / z)) + (a * 120.0);
} else {
tmp = 60.0 / ((z - t) / (x - 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 (((a * 120.0d0) <= (-4d+29)) .or. (.not. ((a * 120.0d0) <= 1d-20))) then
tmp = ((-60.0d0) * (y / z)) + (a * 120.0d0)
else
tmp = 60.0d0 / ((z - t) / (x - y))
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) <= -4e+29) || !((a * 120.0) <= 1e-20)) {
tmp = (-60.0 * (y / z)) + (a * 120.0);
} else {
tmp = 60.0 / ((z - t) / (x - y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if ((a * 120.0) <= -4e+29) or not ((a * 120.0) <= 1e-20): tmp = (-60.0 * (y / z)) + (a * 120.0) else: tmp = 60.0 / ((z - t) / (x - y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((Float64(a * 120.0) <= -4e+29) || !(Float64(a * 120.0) <= 1e-20)) tmp = Float64(Float64(-60.0 * Float64(y / z)) + Float64(a * 120.0)); else tmp = Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (((a * 120.0) <= -4e+29) || ~(((a * 120.0) <= 1e-20))) tmp = (-60.0 * (y / z)) + (a * 120.0); else tmp = 60.0 / ((z - t) / (x - y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[N[(a * 120.0), $MachinePrecision], -4e+29], N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 1e-20]], $MachinePrecision]], N[(N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -4 \cdot 10^{+29} \lor \neg \left(a \cdot 120 \leq 10^{-20}\right):\\
\;\;\;\;-60 \cdot \frac{y}{z} + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{60}{\frac{z - t}{x - y}}\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -3.99999999999999966e29 or 9.99999999999999945e-21 < (*.f64 a #s(literal 120 binary64)) Initial program 98.4%
associate-/l*99.9%
Simplified99.9%
clear-num99.8%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in z around inf 78.2%
Taylor expanded in x around 0 79.1%
if -3.99999999999999966e29 < (*.f64 a #s(literal 120 binary64)) < 9.99999999999999945e-21Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
clear-num99.6%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in a around 0 69.4%
clear-num99.6%
un-div-inv99.8%
Applied egg-rr69.5%
Final simplification74.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= (* a 120.0) -4e+29) (not (<= (* a 120.0) 1e-20))) (+ (* -60.0 (/ y z)) (* 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) <= -4e+29) || !((a * 120.0) <= 1e-20)) {
tmp = (-60.0 * (y / z)) + (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) <= (-4d+29)) .or. (.not. ((a * 120.0d0) <= 1d-20))) then
tmp = ((-60.0d0) * (y / z)) + (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) <= -4e+29) || !((a * 120.0) <= 1e-20)) {
tmp = (-60.0 * (y / z)) + (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) <= -4e+29) or not ((a * 120.0) <= 1e-20): tmp = (-60.0 * (y / z)) + (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) <= -4e+29) || !(Float64(a * 120.0) <= 1e-20)) tmp = Float64(Float64(-60.0 * Float64(y / z)) + 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) <= -4e+29) || ~(((a * 120.0) <= 1e-20))) tmp = (-60.0 * (y / z)) + (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], -4e+29], N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 1e-20]], $MachinePrecision]], N[(N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -4 \cdot 10^{+29} \lor \neg \left(a \cdot 120 \leq 10^{-20}\right):\\
\;\;\;\;-60 \cdot \frac{y}{z} + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -3.99999999999999966e29 or 9.99999999999999945e-21 < (*.f64 a #s(literal 120 binary64)) Initial program 98.4%
associate-/l*99.9%
Simplified99.9%
clear-num99.8%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in z around inf 78.2%
Taylor expanded in x around 0 79.1%
if -3.99999999999999966e29 < (*.f64 a #s(literal 120 binary64)) < 9.99999999999999945e-21Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
clear-num99.6%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in a around 0 69.4%
Final simplification74.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= (* a 120.0) -100000000000.0) (not (<= (* a 120.0) 3e-60))) (* 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) <= -100000000000.0) || !((a * 120.0) <= 3e-60)) {
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) <= (-100000000000.0d0)) .or. (.not. ((a * 120.0d0) <= 3d-60))) 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) <= -100000000000.0) || !((a * 120.0) <= 3e-60)) {
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) <= -100000000000.0) or not ((a * 120.0) <= 3e-60): 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) <= -100000000000.0) || !(Float64(a * 120.0) <= 3e-60)) 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) <= -100000000000.0) || ~(((a * 120.0) <= 3e-60))) 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], -100000000000.0], N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 3e-60]], $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 -100000000000 \lor \neg \left(a \cdot 120 \leq 3 \cdot 10^{-60}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -1e11 or 3.00000000000000019e-60 < (*.f64 a #s(literal 120 binary64)) Initial program 98.5%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 72.7%
if -1e11 < (*.f64 a #s(literal 120 binary64)) < 3.00000000000000019e-60Initial program 99.8%
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%
Final simplification72.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -2.4e+99) (not (<= x 3.5e+97))) (+ (* 60.0 (/ x (- z t))) (* a 120.0)) (+ (* 60.0 (/ y (- t z))) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -2.4e+99) || !(x <= 3.5e+97)) {
tmp = (60.0 * (x / (z - t))) + (a * 120.0);
} else {
tmp = (60.0 * (y / (t - z))) + (a * 120.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((x <= (-2.4d+99)) .or. (.not. (x <= 3.5d+97))) then
tmp = (60.0d0 * (x / (z - t))) + (a * 120.0d0)
else
tmp = (60.0d0 * (y / (t - z))) + (a * 120.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -2.4e+99) || !(x <= 3.5e+97)) {
tmp = (60.0 * (x / (z - t))) + (a * 120.0);
} else {
tmp = (60.0 * (y / (t - z))) + (a * 120.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -2.4e+99) or not (x <= 3.5e+97): tmp = (60.0 * (x / (z - t))) + (a * 120.0) else: tmp = (60.0 * (y / (t - z))) + (a * 120.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -2.4e+99) || !(x <= 3.5e+97)) tmp = Float64(Float64(60.0 * Float64(x / Float64(z - t))) + Float64(a * 120.0)); else tmp = Float64(Float64(60.0 * Float64(y / Float64(t - z))) + Float64(a * 120.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -2.4e+99) || ~((x <= 3.5e+97))) tmp = (60.0 * (x / (z - t))) + (a * 120.0); else tmp = (60.0 * (y / (t - z))) + (a * 120.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -2.4e+99], N[Not[LessEqual[x, 3.5e+97]], $MachinePrecision]], N[(N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(N[(60.0 * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.4 \cdot 10^{+99} \lor \neg \left(x \leq 3.5 \cdot 10^{+97}\right):\\
\;\;\;\;60 \cdot \frac{x}{z - t} + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{y}{t - z} + a \cdot 120\\
\end{array}
\end{array}
if x < -2.4000000000000001e99 or 3.5000000000000001e97 < x Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 90.3%
if -2.4000000000000001e99 < x < 3.5000000000000001e97Initial program 98.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 92.1%
neg-mul-192.1%
distribute-neg-frac292.1%
neg-sub092.1%
sub-neg92.1%
+-commutative92.1%
associate--r+92.1%
neg-sub092.1%
remove-double-neg92.1%
Simplified92.1%
Final simplification91.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= (- x y) -5e+196) (not (<= (- x y) 4e+271))) (* (- x y) (/ 60.0 z)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((x - y) <= -5e+196) || !((x - y) <= 4e+271)) {
tmp = (x - y) * (60.0 / 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 (((x - y) <= (-5d+196)) .or. (.not. ((x - y) <= 4d+271))) then
tmp = (x - y) * (60.0d0 / 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 (((x - y) <= -5e+196) || !((x - y) <= 4e+271)) {
tmp = (x - y) * (60.0 / z);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if ((x - y) <= -5e+196) or not ((x - y) <= 4e+271): tmp = (x - y) * (60.0 / z) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((Float64(x - y) <= -5e+196) || !(Float64(x - y) <= 4e+271)) tmp = Float64(Float64(x - y) * Float64(60.0 / z)); 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) <= -5e+196) || ~(((x - y) <= 4e+271))) tmp = (x - y) * (60.0 / z); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[N[(x - y), $MachinePrecision], -5e+196], N[Not[LessEqual[N[(x - y), $MachinePrecision], 4e+271]], $MachinePrecision]], N[(N[(x - y), $MachinePrecision] * N[(60.0 / z), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x - y \leq -5 \cdot 10^{+196} \lor \neg \left(x - y \leq 4 \cdot 10^{+271}\right):\\
\;\;\;\;\left(x - y\right) \cdot \frac{60}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (-.f64 x y) < -4.9999999999999998e196 or 3.99999999999999981e271 < (-.f64 x y) Initial program 96.4%
associate-/l*99.6%
Simplified99.6%
clear-num99.7%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in a around 0 81.2%
associate-*r/79.5%
associate-*l/81.3%
metadata-eval81.3%
associate-*r/81.2%
*-commutative81.2%
associate-*r/81.3%
metadata-eval81.3%
Simplified81.3%
Taylor expanded in z around inf 54.6%
if -4.9999999999999998e196 < (-.f64 x y) < 3.99999999999999981e271Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 62.2%
Final simplification60.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= (- x y) -5e+196) (not (<= (- x y) 4e+271))) (* 60.0 (/ (- x y) z)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((x - y) <= -5e+196) || !((x - y) <= 4e+271)) {
tmp = 60.0 * ((x - y) / z);
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (((x - y) <= (-5d+196)) .or. (.not. ((x - y) <= 4d+271))) then
tmp = 60.0d0 * ((x - y) / z)
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (((x - y) <= -5e+196) || !((x - y) <= 4e+271)) {
tmp = 60.0 * ((x - y) / z);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if ((x - y) <= -5e+196) or not ((x - y) <= 4e+271): tmp = 60.0 * ((x - y) / z) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((Float64(x - y) <= -5e+196) || !(Float64(x - y) <= 4e+271)) tmp = Float64(60.0 * Float64(Float64(x - y) / z)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (((x - y) <= -5e+196) || ~(((x - y) <= 4e+271))) tmp = 60.0 * ((x - y) / z); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[N[(x - y), $MachinePrecision], -5e+196], N[Not[LessEqual[N[(x - y), $MachinePrecision], 4e+271]], $MachinePrecision]], N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x - y \leq -5 \cdot 10^{+196} \lor \neg \left(x - y \leq 4 \cdot 10^{+271}\right):\\
\;\;\;\;60 \cdot \frac{x - y}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (-.f64 x y) < -4.9999999999999998e196 or 3.99999999999999981e271 < (-.f64 x y) Initial program 96.4%
associate-/l*99.6%
Simplified99.6%
clear-num99.7%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in a around 0 81.2%
Taylor expanded in z around inf 54.6%
if -4.9999999999999998e196 < (-.f64 x y) < 3.99999999999999981e271Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 62.2%
Final simplification60.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -6.6e+116) (not (<= y 7e+48))) (* y (/ 60.0 (- t z))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -6.6e+116) || !(y <= 7e+48)) {
tmp = y * (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 ((y <= (-6.6d+116)) .or. (.not. (y <= 7d+48))) then
tmp = y * (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 ((y <= -6.6e+116) || !(y <= 7e+48)) {
tmp = y * (60.0 / (t - z));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -6.6e+116) or not (y <= 7e+48): tmp = y * (60.0 / (t - z)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -6.6e+116) || !(y <= 7e+48)) tmp = Float64(y * 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 ((y <= -6.6e+116) || ~((y <= 7e+48))) tmp = y * (60.0 / (t - z)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -6.6e+116], N[Not[LessEqual[y, 7e+48]], $MachinePrecision]], N[(y * N[(60.0 / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.6 \cdot 10^{+116} \lor \neg \left(y \leq 7 \cdot 10^{+48}\right):\\
\;\;\;\;y \cdot \frac{60}{t - z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if y < -6.5999999999999996e116 or 6.9999999999999995e48 < y Initial program 97.8%
associate-/l*99.7%
Simplified99.7%
clear-num99.6%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in a around 0 68.4%
associate-*r/67.4%
associate-*l/68.4%
metadata-eval68.4%
associate-*r/68.4%
*-commutative68.4%
associate-*r/68.4%
metadata-eval68.4%
Simplified68.4%
Taylor expanded in x around 0 55.9%
neg-mul-155.9%
Simplified55.9%
if -6.5999999999999996e116 < y < 6.9999999999999995e48Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 65.0%
Final simplification61.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -2.25e-135) (not (<= a 7.2e-63))) (* 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.25e-135) || !(a <= 7.2e-63)) {
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.25d-135)) .or. (.not. (a <= 7.2d-63))) 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.25e-135) || !(a <= 7.2e-63)) {
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.25e-135) or not (a <= 7.2e-63): 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.25e-135) || !(a <= 7.2e-63)) 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.25e-135) || ~((a <= 7.2e-63))) 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.25e-135], N[Not[LessEqual[a, 7.2e-63]], $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.25 \cdot 10^{-135} \lor \neg \left(a \leq 7.2 \cdot 10^{-63}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot -60}{z - t}\\
\end{array}
\end{array}
if a < -2.24999999999999994e-135 or 7.20000000000000016e-63 < a Initial program 98.7%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 67.9%
if -2.24999999999999994e-135 < a < 7.20000000000000016e-63Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
clear-num99.5%
un-div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 77.5%
Taylor expanded in x around 0 49.1%
associate-*r/49.3%
Simplified49.3%
Final simplification61.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -1.45e+199) (not (<= x 2.6e+175))) (* 60.0 (/ x (- z t))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -1.45e+199) || !(x <= 2.6e+175)) {
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 <= (-1.45d+199)) .or. (.not. (x <= 2.6d+175))) 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 <= -1.45e+199) || !(x <= 2.6e+175)) {
tmp = 60.0 * (x / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -1.45e+199) or not (x <= 2.6e+175): 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 <= -1.45e+199) || !(x <= 2.6e+175)) 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 <= -1.45e+199) || ~((x <= 2.6e+175))) 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, -1.45e+199], N[Not[LessEqual[x, 2.6e+175]], $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 -1.45 \cdot 10^{+199} \lor \neg \left(x \leq 2.6 \cdot 10^{+175}\right):\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if x < -1.4499999999999999e199 or 2.6e175 < x Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
clear-num99.8%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in a around 0 73.1%
Taylor expanded in x around inf 70.0%
if -1.4499999999999999e199 < x < 2.6e175Initial program 98.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 57.7%
Final simplification59.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -3.1e-227) (not (<= a 7e-144))) (* a 120.0) (* 60.0 (/ y t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -3.1e-227) || !(a <= 7e-144)) {
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 ((a <= (-3.1d-227)) .or. (.not. (a <= 7d-144))) 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 ((a <= -3.1e-227) || !(a <= 7e-144)) {
tmp = a * 120.0;
} else {
tmp = 60.0 * (y / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -3.1e-227) or not (a <= 7e-144): tmp = a * 120.0 else: tmp = 60.0 * (y / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -3.1e-227) || !(a <= 7e-144)) 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 ((a <= -3.1e-227) || ~((a <= 7e-144))) tmp = a * 120.0; else tmp = 60.0 * (y / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -3.1e-227], N[Not[LessEqual[a, 7e-144]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.1 \cdot 10^{-227} \lor \neg \left(a \leq 7 \cdot 10^{-144}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{y}{t}\\
\end{array}
\end{array}
if a < -3.09999999999999979e-227 or 6.9999999999999997e-144 < a Initial program 98.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 62.2%
if -3.09999999999999979e-227 < a < 6.9999999999999997e-144Initial program 99.8%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in z around 0 59.4%
associate-*r/59.4%
neg-mul-159.4%
neg-sub059.4%
sub-neg59.4%
+-commutative59.4%
associate--r+59.4%
neg-sub059.4%
remove-double-neg59.4%
Simplified59.4%
Taylor expanded in t around 0 50.7%
Taylor expanded in y around inf 35.5%
Final simplification56.5%
(FPCore (x y z t a) :precision binary64 (+ (* 60.0 (/ (- x y) (- z t))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return (60.0 * ((x - y) / (z - t))) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (60.0d0 * ((x - y) / (z - t))) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return (60.0 * ((x - y) / (z - t))) + (a * 120.0);
}
def code(x, y, z, t, a): return (60.0 * ((x - y) / (z - t))) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = (60.0 * ((x - y) / (z - t))) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
60 \cdot \frac{x - y}{z - t} + a \cdot 120
\end{array}
Initial program 99.1%
associate-/l*99.8%
Simplified99.8%
(FPCore (x y z t a) :precision binary64 (if (<= x -1.25e+228) (* -60.0 (/ x t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -1.25e+228) {
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 <= (-1.25d+228)) 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 <= -1.25e+228) {
tmp = -60.0 * (x / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -1.25e+228: tmp = -60.0 * (x / t) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -1.25e+228) 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 <= -1.25e+228) tmp = -60.0 * (x / t); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -1.25e+228], N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.25 \cdot 10^{+228}:\\
\;\;\;\;-60 \cdot \frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if x < -1.25e228Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around 0 54.8%
associate-*r/54.8%
neg-mul-154.8%
neg-sub054.8%
sub-neg54.8%
+-commutative54.8%
associate--r+54.8%
neg-sub054.8%
remove-double-neg54.8%
Simplified54.8%
Taylor expanded in t around 0 47.5%
Taylor expanded in y around 0 47.5%
if -1.25e228 < x Initial program 99.0%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 55.1%
Final simplification54.8%
(FPCore (x y z t a) :precision binary64 (* a 120.0))
double code(double x, double y, double z, double t, double a) {
return a * 120.0;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = a * 120.0d0
end function
public static double code(double x, double y, double z, double t, double a) {
return a * 120.0;
}
def code(x, y, z, t, a): return a * 120.0
function code(x, y, z, t, a) return Float64(a * 120.0) end
function tmp = code(x, y, z, t, a) tmp = a * 120.0; end
code[x_, y_, z_, t_, a_] := N[(a * 120.0), $MachinePrecision]
\begin{array}{l}
\\
a \cdot 120
\end{array}
Initial program 99.1%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 52.8%
Final simplification52.8%
(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 2024116
(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)))