
(FPCore (x y z t a) :precision binary64 (+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((60.0d0 * (x - y)) / (z - t)) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
def code(x, y, z, t, a): return ((60.0 * (x - y)) / (z - t)) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = ((60.0 * (x - y)) / (z - t)) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((60.0d0 * (x - y)) / (z - t)) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
def code(x, y, z, t, a): return ((60.0 * (x - y)) / (z - t)) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = ((60.0 * (x - y)) / (z - t)) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120
\end{array}
(FPCore (x y z t a) :precision binary64 (+ (/ 60.0 (/ (- 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%
Final simplification99.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (* a 120.0) (/ 60.0 (/ z x)))))
(if (<= z -1.08e+99)
t_1
(if (<= z -8.8e-98)
(/ (* 60.0 (- x y)) (- z t))
(if (<= z 6600000.0) (+ (* a 120.0) (* -60.0 (/ (- x y) t))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (a * 120.0) + (60.0 / (z / x));
double tmp;
if (z <= -1.08e+99) {
tmp = t_1;
} else if (z <= -8.8e-98) {
tmp = (60.0 * (x - y)) / (z - t);
} else if (z <= 6600000.0) {
tmp = (a * 120.0) + (-60.0 * ((x - y) / 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 = (a * 120.0d0) + (60.0d0 / (z / x))
if (z <= (-1.08d+99)) then
tmp = t_1
else if (z <= (-8.8d-98)) then
tmp = (60.0d0 * (x - y)) / (z - t)
else if (z <= 6600000.0d0) then
tmp = (a * 120.0d0) + ((-60.0d0) * ((x - y) / 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 = (a * 120.0) + (60.0 / (z / x));
double tmp;
if (z <= -1.08e+99) {
tmp = t_1;
} else if (z <= -8.8e-98) {
tmp = (60.0 * (x - y)) / (z - t);
} else if (z <= 6600000.0) {
tmp = (a * 120.0) + (-60.0 * ((x - y) / t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (a * 120.0) + (60.0 / (z / x)) tmp = 0 if z <= -1.08e+99: tmp = t_1 elif z <= -8.8e-98: tmp = (60.0 * (x - y)) / (z - t) elif z <= 6600000.0: tmp = (a * 120.0) + (-60.0 * ((x - y) / t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(a * 120.0) + Float64(60.0 / Float64(z / x))) tmp = 0.0 if (z <= -1.08e+99) tmp = t_1; elseif (z <= -8.8e-98) tmp = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)); elseif (z <= 6600000.0) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(Float64(x - y) / t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (a * 120.0) + (60.0 / (z / x)); tmp = 0.0; if (z <= -1.08e+99) tmp = t_1; elseif (z <= -8.8e-98) tmp = (60.0 * (x - y)) / (z - t); elseif (z <= 6600000.0) tmp = (a * 120.0) + (-60.0 * ((x - y) / t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 / N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.08e+99], t$95$1, If[LessEqual[z, -8.8e-98], N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6600000.0], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot 120 + \frac{60}{\frac{z}{x}}\\
\mathbf{if}\;z \leq -1.08 \cdot 10^{+99}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -8.8 \cdot 10^{-98}:\\
\;\;\;\;\frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{elif}\;z \leq 6600000:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{x - y}{t}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -1.08e99 or 6.6e6 < z Initial program 98.0%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 85.4%
Taylor expanded in z around inf 81.1%
if -1.08e99 < z < -8.79999999999999985e-98Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 72.6%
associate-*r/72.6%
Applied egg-rr72.6%
if -8.79999999999999985e-98 < z < 6.6e6Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in z around 0 82.5%
Final simplification80.4%
(FPCore (x y z t a) :precision binary64 (if (<= (* a 120.0) -1e-27) (* a 120.0) (if (<= (* a 120.0) 5e-8) (* 60.0 (/ (- x y) (- z t))) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -1e-27) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 5e-8) {
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 ((a * 120.0d0) <= (-1d-27)) then
tmp = a * 120.0d0
else if ((a * 120.0d0) <= 5d-8) 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 ((a * 120.0) <= -1e-27) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 5e-8) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -1e-27: tmp = a * 120.0 elif (a * 120.0) <= 5e-8: 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(a * 120.0) <= -1e-27) tmp = Float64(a * 120.0); elseif (Float64(a * 120.0) <= 5e-8) 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 ((a * 120.0) <= -1e-27) tmp = a * 120.0; elseif ((a * 120.0) <= 5e-8) tmp = 60.0 * ((x - y) / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -1e-27], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 5e-8], 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}\;a \cdot 120 \leq -1 \cdot 10^{-27}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-8}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a 120) < -1e-27 or 4.9999999999999998e-8 < (*.f64 a 120) Initial program 98.2%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 74.9%
if -1e-27 < (*.f64 a 120) < 4.9999999999999998e-8Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 79.4%
Final simplification77.3%
(FPCore (x y z t a) :precision binary64 (if (<= (* a 120.0) -1e-27) (+ (* a 120.0) (* -60.0 (/ y z))) (if (<= (* a 120.0) 5e-8) (* 60.0 (/ (- x y) (- z t))) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -1e-27) {
tmp = (a * 120.0) + (-60.0 * (y / z));
} else if ((a * 120.0) <= 5e-8) {
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 ((a * 120.0d0) <= (-1d-27)) then
tmp = (a * 120.0d0) + ((-60.0d0) * (y / z))
else if ((a * 120.0d0) <= 5d-8) 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 ((a * 120.0) <= -1e-27) {
tmp = (a * 120.0) + (-60.0 * (y / z));
} else if ((a * 120.0) <= 5e-8) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -1e-27: tmp = (a * 120.0) + (-60.0 * (y / z)) elif (a * 120.0) <= 5e-8: 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(a * 120.0) <= -1e-27) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / z))); elseif (Float64(a * 120.0) <= 5e-8) 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 ((a * 120.0) <= -1e-27) tmp = (a * 120.0) + (-60.0 * (y / z)); elseif ((a * 120.0) <= 5e-8) tmp = 60.0 * ((x - y) / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -1e-27], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 5e-8], 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}\;a \cdot 120 \leq -1 \cdot 10^{-27}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\
\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-8}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a 120) < -1e-27Initial program 98.1%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 72.1%
Taylor expanded in x around 0 72.2%
if -1e-27 < (*.f64 a 120) < 4.9999999999999998e-8Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 79.4%
if 4.9999999999999998e-8 < (*.f64 a 120) Initial program 98.3%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 79.6%
Final simplification77.8%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -1e-27)
(+ (* a 120.0) (* -60.0 (/ y z)))
(if (<= (* a 120.0) 5e-8)
(* 60.0 (/ (- x y) (- z t)))
(+ (* a 120.0) (/ 60.0 (/ z x))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -1e-27) {
tmp = (a * 120.0) + (-60.0 * (y / z));
} else if ((a * 120.0) <= 5e-8) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = (a * 120.0) + (60.0 / (z / x));
}
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-27)) then
tmp = (a * 120.0d0) + ((-60.0d0) * (y / z))
else if ((a * 120.0d0) <= 5d-8) then
tmp = 60.0d0 * ((x - y) / (z - t))
else
tmp = (a * 120.0d0) + (60.0d0 / (z / x))
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-27) {
tmp = (a * 120.0) + (-60.0 * (y / z));
} else if ((a * 120.0) <= 5e-8) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = (a * 120.0) + (60.0 / (z / x));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -1e-27: tmp = (a * 120.0) + (-60.0 * (y / z)) elif (a * 120.0) <= 5e-8: tmp = 60.0 * ((x - y) / (z - t)) else: tmp = (a * 120.0) + (60.0 / (z / x)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -1e-27) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / z))); elseif (Float64(a * 120.0) <= 5e-8) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); else tmp = Float64(Float64(a * 120.0) + Float64(60.0 / Float64(z / x))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a * 120.0) <= -1e-27) tmp = (a * 120.0) + (-60.0 * (y / z)); elseif ((a * 120.0) <= 5e-8) tmp = 60.0 * ((x - y) / (z - t)); else tmp = (a * 120.0) + (60.0 / (z / x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -1e-27], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 5e-8], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 / N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -1 \cdot 10^{-27}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\
\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-8}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{60}{\frac{z}{x}}\\
\end{array}
\end{array}
if (*.f64 a 120) < -1e-27Initial program 98.1%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 72.1%
Taylor expanded in x around 0 72.2%
if -1e-27 < (*.f64 a 120) < 4.9999999999999998e-8Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 79.4%
if 4.9999999999999998e-8 < (*.f64 a 120) Initial program 98.3%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 95.7%
Taylor expanded in z around inf 81.0%
Final simplification78.2%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -1e-27)
(+ (* a 120.0) (* -60.0 (/ y z)))
(if (<= (* a 120.0) 5e-8)
(/ (* 60.0 (- x y)) (- z t))
(+ (* a 120.0) (/ 60.0 (/ z x))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -1e-27) {
tmp = (a * 120.0) + (-60.0 * (y / z));
} else if ((a * 120.0) <= 5e-8) {
tmp = (60.0 * (x - y)) / (z - t);
} else {
tmp = (a * 120.0) + (60.0 / (z / x));
}
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-27)) then
tmp = (a * 120.0d0) + ((-60.0d0) * (y / z))
else if ((a * 120.0d0) <= 5d-8) then
tmp = (60.0d0 * (x - y)) / (z - t)
else
tmp = (a * 120.0d0) + (60.0d0 / (z / x))
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-27) {
tmp = (a * 120.0) + (-60.0 * (y / z));
} else if ((a * 120.0) <= 5e-8) {
tmp = (60.0 * (x - y)) / (z - t);
} else {
tmp = (a * 120.0) + (60.0 / (z / x));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -1e-27: tmp = (a * 120.0) + (-60.0 * (y / z)) elif (a * 120.0) <= 5e-8: tmp = (60.0 * (x - y)) / (z - t) else: tmp = (a * 120.0) + (60.0 / (z / x)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -1e-27) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / z))); elseif (Float64(a * 120.0) <= 5e-8) tmp = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)); else tmp = Float64(Float64(a * 120.0) + Float64(60.0 / Float64(z / x))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a * 120.0) <= -1e-27) tmp = (a * 120.0) + (-60.0 * (y / z)); elseif ((a * 120.0) <= 5e-8) tmp = (60.0 * (x - y)) / (z - t); else tmp = (a * 120.0) + (60.0 / (z / x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -1e-27], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 5e-8], N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 / N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -1 \cdot 10^{-27}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\
\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-8}:\\
\;\;\;\;\frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{60}{\frac{z}{x}}\\
\end{array}
\end{array}
if (*.f64 a 120) < -1e-27Initial program 98.1%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 72.1%
Taylor expanded in x around 0 72.2%
if -1e-27 < (*.f64 a 120) < 4.9999999999999998e-8Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 79.4%
associate-*r/79.6%
Applied egg-rr79.6%
if 4.9999999999999998e-8 < (*.f64 a 120) Initial program 98.3%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 95.7%
Taylor expanded in z around inf 81.0%
Final simplification78.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* 60.0 (/ x z))) (t_2 (* 60.0 (/ (- x) t))))
(if (<= x -4.8e+183)
t_2
(if (<= x 3.4e+106)
(* a 120.0)
(if (<= x 1.5e+179)
t_1
(if (<= x 8.5e+184) (* a 120.0) (if (<= x 2.9e+227) t_2 t_1)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * (x / z);
double t_2 = 60.0 * (-x / t);
double tmp;
if (x <= -4.8e+183) {
tmp = t_2;
} else if (x <= 3.4e+106) {
tmp = a * 120.0;
} else if (x <= 1.5e+179) {
tmp = t_1;
} else if (x <= 8.5e+184) {
tmp = a * 120.0;
} else if (x <= 2.9e+227) {
tmp = t_2;
} 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) :: t_2
real(8) :: tmp
t_1 = 60.0d0 * (x / z)
t_2 = 60.0d0 * (-x / t)
if (x <= (-4.8d+183)) then
tmp = t_2
else if (x <= 3.4d+106) then
tmp = a * 120.0d0
else if (x <= 1.5d+179) then
tmp = t_1
else if (x <= 8.5d+184) then
tmp = a * 120.0d0
else if (x <= 2.9d+227) then
tmp = t_2
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 * (x / z);
double t_2 = 60.0 * (-x / t);
double tmp;
if (x <= -4.8e+183) {
tmp = t_2;
} else if (x <= 3.4e+106) {
tmp = a * 120.0;
} else if (x <= 1.5e+179) {
tmp = t_1;
} else if (x <= 8.5e+184) {
tmp = a * 120.0;
} else if (x <= 2.9e+227) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = 60.0 * (x / z) t_2 = 60.0 * (-x / t) tmp = 0 if x <= -4.8e+183: tmp = t_2 elif x <= 3.4e+106: tmp = a * 120.0 elif x <= 1.5e+179: tmp = t_1 elif x <= 8.5e+184: tmp = a * 120.0 elif x <= 2.9e+227: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(60.0 * Float64(x / z)) t_2 = Float64(60.0 * Float64(Float64(-x) / t)) tmp = 0.0 if (x <= -4.8e+183) tmp = t_2; elseif (x <= 3.4e+106) tmp = Float64(a * 120.0); elseif (x <= 1.5e+179) tmp = t_1; elseif (x <= 8.5e+184) tmp = Float64(a * 120.0); elseif (x <= 2.9e+227) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = 60.0 * (x / z); t_2 = 60.0 * (-x / t); tmp = 0.0; if (x <= -4.8e+183) tmp = t_2; elseif (x <= 3.4e+106) tmp = a * 120.0; elseif (x <= 1.5e+179) tmp = t_1; elseif (x <= 8.5e+184) tmp = a * 120.0; elseif (x <= 2.9e+227) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(60.0 * N[((-x) / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4.8e+183], t$95$2, If[LessEqual[x, 3.4e+106], N[(a * 120.0), $MachinePrecision], If[LessEqual[x, 1.5e+179], t$95$1, If[LessEqual[x, 8.5e+184], N[(a * 120.0), $MachinePrecision], If[LessEqual[x, 2.9e+227], t$95$2, t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 60 \cdot \frac{x}{z}\\
t_2 := 60 \cdot \frac{-x}{t}\\
\mathbf{if}\;x \leq -4.8 \cdot 10^{+183}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 3.4 \cdot 10^{+106}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;x \leq 1.5 \cdot 10^{+179}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 8.5 \cdot 10^{+184}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;x \leq 2.9 \cdot 10^{+227}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if x < -4.8000000000000003e183 or 8.50000000000000043e184 < x < 2.8999999999999998e227Initial program 95.6%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 83.3%
Taylor expanded in x around inf 77.3%
Taylor expanded in z around 0 53.1%
associate-*r/53.1%
neg-mul-153.1%
Simplified53.1%
if -4.8000000000000003e183 < x < 3.39999999999999994e106 or 1.4999999999999999e179 < x < 8.50000000000000043e184Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 58.2%
if 3.39999999999999994e106 < x < 1.4999999999999999e179 or 2.8999999999999998e227 < x Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 85.4%
Taylor expanded in x around inf 74.2%
Taylor expanded in z around inf 55.9%
Final simplification57.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* 60.0 (/ x (- z t)))))
(if (<= x -7.2e+119)
t_1
(if (<= x 9.2e-268)
(* a 120.0)
(if (<= x 6.5e-228)
(/ -60.0 (/ (- z t) y))
(if (<= x 1.5e+21) (* a 120.0) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * (x / (z - t));
double tmp;
if (x <= -7.2e+119) {
tmp = t_1;
} else if (x <= 9.2e-268) {
tmp = a * 120.0;
} else if (x <= 6.5e-228) {
tmp = -60.0 / ((z - t) / y);
} else if (x <= 1.5e+21) {
tmp = a * 120.0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = 60.0d0 * (x / (z - t))
if (x <= (-7.2d+119)) then
tmp = t_1
else if (x <= 9.2d-268) then
tmp = a * 120.0d0
else if (x <= 6.5d-228) then
tmp = (-60.0d0) / ((z - t) / y)
else if (x <= 1.5d+21) then
tmp = a * 120.0d0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * (x / (z - t));
double tmp;
if (x <= -7.2e+119) {
tmp = t_1;
} else if (x <= 9.2e-268) {
tmp = a * 120.0;
} else if (x <= 6.5e-228) {
tmp = -60.0 / ((z - t) / y);
} else if (x <= 1.5e+21) {
tmp = a * 120.0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = 60.0 * (x / (z - t)) tmp = 0 if x <= -7.2e+119: tmp = t_1 elif x <= 9.2e-268: tmp = a * 120.0 elif x <= 6.5e-228: tmp = -60.0 / ((z - t) / y) elif x <= 1.5e+21: tmp = a * 120.0 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(60.0 * Float64(x / Float64(z - t))) tmp = 0.0 if (x <= -7.2e+119) tmp = t_1; elseif (x <= 9.2e-268) tmp = Float64(a * 120.0); elseif (x <= 6.5e-228) tmp = Float64(-60.0 / Float64(Float64(z - t) / y)); elseif (x <= 1.5e+21) tmp = Float64(a * 120.0); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = 60.0 * (x / (z - t)); tmp = 0.0; if (x <= -7.2e+119) tmp = t_1; elseif (x <= 9.2e-268) tmp = a * 120.0; elseif (x <= 6.5e-228) tmp = -60.0 / ((z - t) / y); elseif (x <= 1.5e+21) tmp = a * 120.0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -7.2e+119], t$95$1, If[LessEqual[x, 9.2e-268], N[(a * 120.0), $MachinePrecision], If[LessEqual[x, 6.5e-228], N[(-60.0 / N[(N[(z - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.5e+21], N[(a * 120.0), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 60 \cdot \frac{x}{z - t}\\
\mathbf{if}\;x \leq -7.2 \cdot 10^{+119}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 9.2 \cdot 10^{-268}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;x \leq 6.5 \cdot 10^{-228}:\\
\;\;\;\;\frac{-60}{\frac{z - t}{y}}\\
\mathbf{elif}\;x \leq 1.5 \cdot 10^{+21}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if x < -7.20000000000000003e119 or 1.5e21 < x Initial program 97.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 78.9%
Taylor expanded in x around inf 70.7%
if -7.20000000000000003e119 < x < 9.20000000000000042e-268 or 6.50000000000000029e-228 < x < 1.5e21Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 64.7%
if 9.20000000000000042e-268 < x < 6.50000000000000029e-228Initial program 99.7%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in a around 0 78.3%
Taylor expanded in x around 0 70.3%
associate-*r/70.3%
associate-/l*70.4%
Simplified70.4%
Final simplification67.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -8.5e-46) (not (<= z 9.0))) (+ (* a 120.0) (/ 60.0 (/ z (- x y)))) (+ (* a 120.0) (* -60.0 (/ (- x y) t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -8.5e-46) || !(z <= 9.0)) {
tmp = (a * 120.0) + (60.0 / (z / (x - y)));
} else {
tmp = (a * 120.0) + (-60.0 * ((x - y) / t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-8.5d-46)) .or. (.not. (z <= 9.0d0))) then
tmp = (a * 120.0d0) + (60.0d0 / (z / (x - y)))
else
tmp = (a * 120.0d0) + ((-60.0d0) * ((x - y) / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -8.5e-46) || !(z <= 9.0)) {
tmp = (a * 120.0) + (60.0 / (z / (x - y)));
} else {
tmp = (a * 120.0) + (-60.0 * ((x - y) / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -8.5e-46) or not (z <= 9.0): tmp = (a * 120.0) + (60.0 / (z / (x - y))) else: tmp = (a * 120.0) + (-60.0 * ((x - y) / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -8.5e-46) || !(z <= 9.0)) tmp = Float64(Float64(a * 120.0) + Float64(60.0 / Float64(z / Float64(x - y)))); else tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(Float64(x - y) / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -8.5e-46) || ~((z <= 9.0))) tmp = (a * 120.0) + (60.0 / (z / (x - y))); else tmp = (a * 120.0) + (-60.0 * ((x - y) / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -8.5e-46], N[Not[LessEqual[z, 9.0]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 / N[(z / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.5 \cdot 10^{-46} \lor \neg \left(z \leq 9\right):\\
\;\;\;\;a \cdot 120 + \frac{60}{\frac{z}{x - y}}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{x - y}{t}\\
\end{array}
\end{array}
if z < -8.5000000000000001e-46 or 9 < z Initial program 98.4%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 91.5%
if -8.5000000000000001e-46 < z < 9Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around 0 81.2%
Final simplification86.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -21000000.0) (not (<= x 2.05e-8))) (+ (* a 120.0) (/ 60.0 (/ (- z t) x))) (+ (* a 120.0) (/ (* y -60.0) (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -21000000.0) || !(x <= 2.05e-8)) {
tmp = (a * 120.0) + (60.0 / ((z - t) / x));
} 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 ((x <= (-21000000.0d0)) .or. (.not. (x <= 2.05d-8))) then
tmp = (a * 120.0d0) + (60.0d0 / ((z - t) / x))
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 ((x <= -21000000.0) || !(x <= 2.05e-8)) {
tmp = (a * 120.0) + (60.0 / ((z - t) / x));
} else {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -21000000.0) or not (x <= 2.05e-8): tmp = (a * 120.0) + (60.0 / ((z - t) / x)) else: tmp = (a * 120.0) + ((y * -60.0) / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -21000000.0) || !(x <= 2.05e-8)) tmp = Float64(Float64(a * 120.0) + Float64(60.0 / Float64(Float64(z - t) / x))); 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 ((x <= -21000000.0) || ~((x <= 2.05e-8))) tmp = (a * 120.0) + (60.0 / ((z - t) / x)); else tmp = (a * 120.0) + ((y * -60.0) / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -21000000.0], N[Not[LessEqual[x, 2.05e-8]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 / N[(N[(z - t), $MachinePrecision] / x), $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}\;x \leq -21000000 \lor \neg \left(x \leq 2.05 \cdot 10^{-8}\right):\\
\;\;\;\;a \cdot 120 + \frac{60}{\frac{z - t}{x}}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z - t}\\
\end{array}
\end{array}
if x < -2.1e7 or 2.05000000000000016e-8 < x Initial program 98.3%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around inf 89.1%
if -2.1e7 < x < 2.05000000000000016e-8Initial program 99.9%
Taylor expanded in x around 0 96.9%
Final simplification92.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -3.6e+114) (not (<= x 2.8e+21))) (* 60.0 (/ x (- z t))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -3.6e+114) || !(x <= 2.8e+21)) {
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 <= (-3.6d+114)) .or. (.not. (x <= 2.8d+21))) 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 <= -3.6e+114) || !(x <= 2.8e+21)) {
tmp = 60.0 * (x / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -3.6e+114) or not (x <= 2.8e+21): 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 <= -3.6e+114) || !(x <= 2.8e+21)) 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 <= -3.6e+114) || ~((x <= 2.8e+21))) 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, -3.6e+114], N[Not[LessEqual[x, 2.8e+21]], $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.6 \cdot 10^{+114} \lor \neg \left(x \leq 2.8 \cdot 10^{+21}\right):\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if x < -3.6000000000000001e114 or 2.8e21 < x Initial program 97.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 78.9%
Taylor expanded in x around inf 70.7%
if -3.6000000000000001e114 < x < 2.8e21Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 61.3%
Final simplification64.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -5.2e+121) (not (<= x 1.32e+105))) (* 60.0 (/ x z)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -5.2e+121) || !(x <= 1.32e+105)) {
tmp = 60.0 * (x / 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 <= (-5.2d+121)) .or. (.not. (x <= 1.32d+105))) then
tmp = 60.0d0 * (x / 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 <= -5.2e+121) || !(x <= 1.32e+105)) {
tmp = 60.0 * (x / z);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -5.2e+121) or not (x <= 1.32e+105): tmp = 60.0 * (x / z) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -5.2e+121) || !(x <= 1.32e+105)) tmp = Float64(60.0 * Float64(x / 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 <= -5.2e+121) || ~((x <= 1.32e+105))) tmp = 60.0 * (x / z); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -5.2e+121], N[Not[LessEqual[x, 1.32e+105]], $MachinePrecision]], N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.2 \cdot 10^{+121} \lor \neg \left(x \leq 1.32 \cdot 10^{+105}\right):\\
\;\;\;\;60 \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if x < -5.1999999999999998e121 or 1.31999999999999994e105 < x Initial program 97.4%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 81.4%
Taylor expanded in x around inf 72.5%
Taylor expanded in z around inf 40.9%
if -5.1999999999999998e121 < x < 1.31999999999999994e105Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 59.7%
Final simplification53.5%
(FPCore (x y z t a) :precision binary64 (if (<= y -1.48e+118) (* -60.0 (/ y z)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.48e+118) {
tmp = -60.0 * (y / z);
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (y <= (-1.48d+118)) then
tmp = (-60.0d0) * (y / z)
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.48e+118) {
tmp = -60.0 * (y / z);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -1.48e+118: tmp = -60.0 * (y / z) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -1.48e+118) tmp = Float64(-60.0 * Float64(y / z)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -1.48e+118) tmp = -60.0 * (y / z); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -1.48e+118], N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.48 \cdot 10^{+118}:\\
\;\;\;\;-60 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if y < -1.4799999999999999e118Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in z around inf 59.7%
Taylor expanded in x around 0 50.9%
Taylor expanded in y around inf 38.7%
if -1.4799999999999999e118 < y Initial program 98.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 51.9%
Final simplification49.5%
(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 46.6%
Final simplification46.6%
(FPCore (x y z t a) :precision binary64 (+ (/ 60.0 (/ (- z t) (- x y))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (60.0d0 / ((z - t) / (x - y))) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
def code(x, y, z, t, a): return (60.0 / ((z - t) / (x - y))) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = (60.0 / ((z - t) / (x - y))) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60}{\frac{z - t}{x - y}} + a \cdot 120
\end{array}
herbie shell --seed 2023275
(FPCore (x y z t a)
:name "Data.Colour.RGB:hslsv from colour-2.3.3, B"
:precision binary64
:herbie-target
(+ (/ 60.0 (/ (- z t) (- x y))) (* a 120.0))
(+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))