
(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.4%
associate-/l*99.8%
clear-num99.8%
un-div-inv99.8%
Applied egg-rr99.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* 60.0 (- x y)) (- z t))))
(if (<= t_1 -5e+31)
(* 60.0 (/ (- x y) (- z t)))
(if (<= t_1 1e-264)
(* a 120.0)
(if (<= t_1 5e-33)
(+ (* a 120.0) (* -60.0 (/ x t)))
(if (<= t_1 2000.0) (+ (* a 120.0) (* y (/ -60.0 z))) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_1 <= -5e+31) {
tmp = 60.0 * ((x - y) / (z - t));
} else if (t_1 <= 1e-264) {
tmp = a * 120.0;
} else if (t_1 <= 5e-33) {
tmp = (a * 120.0) + (-60.0 * (x / t));
} else if (t_1 <= 2000.0) {
tmp = (a * 120.0) + (y * (-60.0 / z));
} 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 - y)) / (z - t)
if (t_1 <= (-5d+31)) then
tmp = 60.0d0 * ((x - y) / (z - t))
else if (t_1 <= 1d-264) then
tmp = a * 120.0d0
else if (t_1 <= 5d-33) then
tmp = (a * 120.0d0) + ((-60.0d0) * (x / t))
else if (t_1 <= 2000.0d0) then
tmp = (a * 120.0d0) + (y * ((-60.0d0) / z))
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 - y)) / (z - t);
double tmp;
if (t_1 <= -5e+31) {
tmp = 60.0 * ((x - y) / (z - t));
} else if (t_1 <= 1e-264) {
tmp = a * 120.0;
} else if (t_1 <= 5e-33) {
tmp = (a * 120.0) + (-60.0 * (x / t));
} else if (t_1 <= 2000.0) {
tmp = (a * 120.0) + (y * (-60.0 / z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (60.0 * (x - y)) / (z - t) tmp = 0 if t_1 <= -5e+31: tmp = 60.0 * ((x - y) / (z - t)) elif t_1 <= 1e-264: tmp = a * 120.0 elif t_1 <= 5e-33: tmp = (a * 120.0) + (-60.0 * (x / t)) elif t_1 <= 2000.0: tmp = (a * 120.0) + (y * (-60.0 / z)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) tmp = 0.0 if (t_1 <= -5e+31) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); elseif (t_1 <= 1e-264) tmp = Float64(a * 120.0); elseif (t_1 <= 5e-33) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(x / t))); elseif (t_1 <= 2000.0) tmp = Float64(Float64(a * 120.0) + Float64(y * Float64(-60.0 / z))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (60.0 * (x - y)) / (z - t); tmp = 0.0; if (t_1 <= -5e+31) tmp = 60.0 * ((x - y) / (z - t)); elseif (t_1 <= 1e-264) tmp = a * 120.0; elseif (t_1 <= 5e-33) tmp = (a * 120.0) + (-60.0 * (x / t)); elseif (t_1 <= 2000.0) tmp = (a * 120.0) + (y * (-60.0 / z)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+31], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e-264], N[(a * 120.0), $MachinePrecision], If[LessEqual[t$95$1, 5e-33], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2000.0], N[(N[(a * 120.0), $MachinePrecision] + N[(y * N[(-60.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+31}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{elif}\;t\_1 \leq 10^{-264}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-33}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{x}{t}\\
\mathbf{elif}\;t\_1 \leq 2000:\\
\;\;\;\;a \cdot 120 + y \cdot \frac{-60}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -5.00000000000000027e31Initial program 97.9%
associate-/l*99.7%
clear-num99.7%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in a around 0 87.3%
if -5.00000000000000027e31 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 1e-264Initial program 99.9%
Taylor expanded in z around inf 86.7%
if 1e-264 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 5.00000000000000028e-33Initial program 99.9%
Taylor expanded in x around inf 82.6%
Taylor expanded in z around 0 78.6%
if 5.00000000000000028e-33 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 2e3Initial program 100.0%
Taylor expanded in x around 0 93.8%
*-commutative93.8%
associate-/l*93.8%
Applied egg-rr93.8%
Taylor expanded in z around inf 93.8%
if 2e3 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 99.7%
associate-/l*99.6%
clear-num99.6%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in a around 0 76.9%
associate-*r/77.1%
Applied egg-rr77.1%
Final simplification83.0%
(FPCore (x y z t a)
:precision binary64
(if (or (<= a -3.1e+37)
(not (or (<= a -6.3e+19) (and (not (<= a -9e-55)) (<= a 5.8e-61)))))
(* 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 <= -3.1e+37) || !((a <= -6.3e+19) || (!(a <= -9e-55) && (a <= 5.8e-61)))) {
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 <= (-3.1d+37)) .or. (.not. (a <= (-6.3d+19)) .or. (.not. (a <= (-9d-55))) .and. (a <= 5.8d-61))) 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 <= -3.1e+37) || !((a <= -6.3e+19) || (!(a <= -9e-55) && (a <= 5.8e-61)))) {
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 <= -3.1e+37) or not ((a <= -6.3e+19) or (not (a <= -9e-55) and (a <= 5.8e-61))): tmp = a * 120.0 else: tmp = 60.0 * ((x - y) / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -3.1e+37) || !((a <= -6.3e+19) || (!(a <= -9e-55) && (a <= 5.8e-61)))) 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 <= -3.1e+37) || ~(((a <= -6.3e+19) || (~((a <= -9e-55)) && (a <= 5.8e-61))))) tmp = a * 120.0; else tmp = 60.0 * ((x - y) / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -3.1e+37], N[Not[Or[LessEqual[a, -6.3e+19], And[N[Not[LessEqual[a, -9e-55]], $MachinePrecision], LessEqual[a, 5.8e-61]]]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.1 \cdot 10^{+37} \lor \neg \left(a \leq -6.3 \cdot 10^{+19} \lor \neg \left(a \leq -9 \cdot 10^{-55}\right) \land a \leq 5.8 \cdot 10^{-61}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\end{array}
\end{array}
if a < -3.1000000000000002e37 or -6.3e19 < a < -8.99999999999999941e-55 or 5.7999999999999999e-61 < a Initial program 99.9%
Taylor expanded in z around inf 75.0%
if -3.1000000000000002e37 < a < -6.3e19 or -8.99999999999999941e-55 < a < 5.7999999999999999e-61Initial program 98.9%
associate-/l*99.6%
clear-num99.6%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in a around 0 81.6%
Final simplification77.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (* a 120.0) (* y (/ -60.0 z)))))
(if (<= z -4e+125)
t_1
(if (<= z -5700.0)
(+ (* a 120.0) (/ 60.0 (/ z x)))
(if (<= z 1.95e-72)
(+ (* a 120.0) (* -60.0 (/ (- x y) t)))
(if (<= z 5.8e+69) (/ (* 60.0 (- x y)) (- z t)) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (a * 120.0) + (y * (-60.0 / z));
double tmp;
if (z <= -4e+125) {
tmp = t_1;
} else if (z <= -5700.0) {
tmp = (a * 120.0) + (60.0 / (z / x));
} else if (z <= 1.95e-72) {
tmp = (a * 120.0) + (-60.0 * ((x - y) / t));
} else if (z <= 5.8e+69) {
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 = (a * 120.0d0) + (y * ((-60.0d0) / z))
if (z <= (-4d+125)) then
tmp = t_1
else if (z <= (-5700.0d0)) then
tmp = (a * 120.0d0) + (60.0d0 / (z / x))
else if (z <= 1.95d-72) then
tmp = (a * 120.0d0) + ((-60.0d0) * ((x - y) / t))
else if (z <= 5.8d+69) 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 = (a * 120.0) + (y * (-60.0 / z));
double tmp;
if (z <= -4e+125) {
tmp = t_1;
} else if (z <= -5700.0) {
tmp = (a * 120.0) + (60.0 / (z / x));
} else if (z <= 1.95e-72) {
tmp = (a * 120.0) + (-60.0 * ((x - y) / t));
} else if (z <= 5.8e+69) {
tmp = (60.0 * (x - y)) / (z - t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (a * 120.0) + (y * (-60.0 / z)) tmp = 0 if z <= -4e+125: tmp = t_1 elif z <= -5700.0: tmp = (a * 120.0) + (60.0 / (z / x)) elif z <= 1.95e-72: tmp = (a * 120.0) + (-60.0 * ((x - y) / t)) elif z <= 5.8e+69: tmp = (60.0 * (x - y)) / (z - t) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(a * 120.0) + Float64(y * Float64(-60.0 / z))) tmp = 0.0 if (z <= -4e+125) tmp = t_1; elseif (z <= -5700.0) tmp = Float64(Float64(a * 120.0) + Float64(60.0 / Float64(z / x))); elseif (z <= 1.95e-72) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(Float64(x - y) / t))); elseif (z <= 5.8e+69) tmp = Float64(Float64(60.0 * 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 = (a * 120.0) + (y * (-60.0 / z)); tmp = 0.0; if (z <= -4e+125) tmp = t_1; elseif (z <= -5700.0) tmp = (a * 120.0) + (60.0 / (z / x)); elseif (z <= 1.95e-72) tmp = (a * 120.0) + (-60.0 * ((x - y) / t)); elseif (z <= 5.8e+69) 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[(a * 120.0), $MachinePrecision] + N[(y * N[(-60.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4e+125], t$95$1, If[LessEqual[z, -5700.0], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 / N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.95e-72], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.8e+69], N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot 120 + y \cdot \frac{-60}{z}\\
\mathbf{if}\;z \leq -4 \cdot 10^{+125}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -5700:\\
\;\;\;\;a \cdot 120 + \frac{60}{\frac{z}{x}}\\
\mathbf{elif}\;z \leq 1.95 \cdot 10^{-72}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{x - y}{t}\\
\mathbf{elif}\;z \leq 5.8 \cdot 10^{+69}:\\
\;\;\;\;\frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.9999999999999997e125 or 5.7999999999999997e69 < z Initial program 98.8%
Taylor expanded in x around 0 89.4%
*-commutative89.4%
associate-/l*90.6%
Applied egg-rr90.6%
Taylor expanded in z around inf 87.2%
if -3.9999999999999997e125 < z < -5700Initial program 99.8%
associate-/l*99.7%
clear-num99.8%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in x around inf 89.1%
Taylor expanded in z around inf 76.7%
if -5700 < z < 1.95e-72Initial program 99.8%
Taylor expanded in z around 0 89.3%
if 1.95e-72 < z < 5.7999999999999997e69Initial program 99.8%
associate-/l*99.7%
clear-num99.5%
un-div-inv99.6%
Applied egg-rr99.6%
Taylor expanded in a around 0 71.3%
associate-*r/71.4%
Applied egg-rr71.4%
Final simplification84.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (* a 120.0) (* 60.0 (/ (- x y) z)))))
(if (<= z -7e+85)
t_1
(if (<= z -2.2e-24)
(+ (* a 120.0) (* 60.0 (/ x (- z t))))
(if (<= z 4.1e-71) (+ (* 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 * ((x - y) / z));
double tmp;
if (z <= -7e+85) {
tmp = t_1;
} else if (z <= -2.2e-24) {
tmp = (a * 120.0) + (60.0 * (x / (z - t)));
} else if (z <= 4.1e-71) {
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 * ((x - y) / z))
if (z <= (-7d+85)) then
tmp = t_1
else if (z <= (-2.2d-24)) then
tmp = (a * 120.0d0) + (60.0d0 * (x / (z - t)))
else if (z <= 4.1d-71) 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 * ((x - y) / z));
double tmp;
if (z <= -7e+85) {
tmp = t_1;
} else if (z <= -2.2e-24) {
tmp = (a * 120.0) + (60.0 * (x / (z - t)));
} else if (z <= 4.1e-71) {
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 * ((x - y) / z)) tmp = 0 if z <= -7e+85: tmp = t_1 elif z <= -2.2e-24: tmp = (a * 120.0) + (60.0 * (x / (z - t))) elif z <= 4.1e-71: 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(Float64(x - y) / z))) tmp = 0.0 if (z <= -7e+85) tmp = t_1; elseif (z <= -2.2e-24) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(x / Float64(z - t)))); elseif (z <= 4.1e-71) 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 * ((x - y) / z)); tmp = 0.0; if (z <= -7e+85) tmp = t_1; elseif (z <= -2.2e-24) tmp = (a * 120.0) + (60.0 * (x / (z - t))); elseif (z <= 4.1e-71) 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[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7e+85], t$95$1, If[LessEqual[z, -2.2e-24], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.1e-71], 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 + 60 \cdot \frac{x - y}{z}\\
\mathbf{if}\;z \leq -7 \cdot 10^{+85}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -2.2 \cdot 10^{-24}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{x}{z - t}\\
\mathbf{elif}\;z \leq 4.1 \cdot 10^{-71}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{x - y}{t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -7.0000000000000001e85 or 4.09999999999999993e-71 < z Initial program 99.1%
Taylor expanded in z around inf 86.7%
if -7.0000000000000001e85 < z < -2.20000000000000002e-24Initial program 99.8%
Taylor expanded in x around inf 94.9%
if -2.20000000000000002e-24 < z < 4.09999999999999993e-71Initial program 99.8%
Taylor expanded in z around 0 90.7%
Final simplification89.0%
(FPCore (x y z t a) :precision binary64 (if (<= (* a 120.0) -2e-46) (+ (* a 120.0) (* -60.0 (/ x t))) (if (<= (* a 120.0) 6e-59) (* 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) <= -2e-46) {
tmp = (a * 120.0) + (-60.0 * (x / t));
} else if ((a * 120.0) <= 6e-59) {
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) <= (-2d-46)) then
tmp = (a * 120.0d0) + ((-60.0d0) * (x / t))
else if ((a * 120.0d0) <= 6d-59) 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) <= -2e-46) {
tmp = (a * 120.0) + (-60.0 * (x / t));
} else if ((a * 120.0) <= 6e-59) {
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) <= -2e-46: tmp = (a * 120.0) + (-60.0 * (x / t)) elif (a * 120.0) <= 6e-59: 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) <= -2e-46) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(x / t))); elseif (Float64(a * 120.0) <= 6e-59) 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) <= -2e-46) tmp = (a * 120.0) + (-60.0 * (x / t)); elseif ((a * 120.0) <= 6e-59) 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], -2e-46], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 6e-59], 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 -2 \cdot 10^{-46}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{x}{t}\\
\mathbf{elif}\;a \cdot 120 \leq 6 \cdot 10^{-59}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -2.00000000000000005e-46Initial program 99.8%
Taylor expanded in x around inf 90.8%
Taylor expanded in z around 0 75.6%
if -2.00000000000000005e-46 < (*.f64 a #s(literal 120 binary64)) < 6.0000000000000002e-59Initial program 98.8%
associate-/l*99.6%
clear-num99.6%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in a around 0 81.4%
if 6.0000000000000002e-59 < (*.f64 a #s(literal 120 binary64)) Initial program 99.9%
Taylor expanded in z around inf 72.9%
Final simplification77.1%
(FPCore (x y z t a)
:precision binary64
(if (<= a -7e-52)
(* a 120.0)
(if (<= a 2e-207)
(* -60.0 (/ (- x y) t))
(if (<= a 5.6e-145) (* 60.0 (/ (- x y) z)) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -7e-52) {
tmp = a * 120.0;
} else if (a <= 2e-207) {
tmp = -60.0 * ((x - y) / t);
} else if (a <= 5.6e-145) {
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 (a <= (-7d-52)) then
tmp = a * 120.0d0
else if (a <= 2d-207) then
tmp = (-60.0d0) * ((x - y) / t)
else if (a <= 5.6d-145) 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 (a <= -7e-52) {
tmp = a * 120.0;
} else if (a <= 2e-207) {
tmp = -60.0 * ((x - y) / t);
} else if (a <= 5.6e-145) {
tmp = 60.0 * ((x - y) / z);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -7e-52: tmp = a * 120.0 elif a <= 2e-207: tmp = -60.0 * ((x - y) / t) elif a <= 5.6e-145: tmp = 60.0 * ((x - y) / z) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -7e-52) tmp = Float64(a * 120.0); elseif (a <= 2e-207) tmp = Float64(-60.0 * Float64(Float64(x - y) / t)); elseif (a <= 5.6e-145) 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 (a <= -7e-52) tmp = a * 120.0; elseif (a <= 2e-207) tmp = -60.0 * ((x - y) / t); elseif (a <= 5.6e-145) tmp = 60.0 * ((x - y) / z); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -7e-52], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 2e-207], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 5.6e-145], N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -7 \cdot 10^{-52}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq 2 \cdot 10^{-207}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\
\mathbf{elif}\;a \leq 5.6 \cdot 10^{-145}:\\
\;\;\;\;60 \cdot \frac{x - y}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -7.0000000000000001e-52 or 5.6000000000000002e-145 < a Initial program 99.9%
Taylor expanded in z around inf 68.0%
if -7.0000000000000001e-52 < a < 1.99999999999999985e-207Initial program 98.3%
associate-/l*99.6%
clear-num99.6%
un-div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 84.4%
Taylor expanded in z around 0 49.1%
if 1.99999999999999985e-207 < a < 5.6000000000000002e-145Initial program 99.7%
associate-/l*99.5%
clear-num99.6%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in a around 0 99.5%
Taylor expanded in z around inf 78.1%
Final simplification63.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -5000000000000.0) (not (<= y 3.6e+44))) (+ (* a 120.0) (* y (/ -60.0 (- z t)))) (+ (* a 120.0) (/ 60.0 (/ (- z t) x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -5000000000000.0) || !(y <= 3.6e+44)) {
tmp = (a * 120.0) + (y * (-60.0 / (z - t)));
} else {
tmp = (a * 120.0) + (60.0 / ((z - t) / 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 ((y <= (-5000000000000.0d0)) .or. (.not. (y <= 3.6d+44))) then
tmp = (a * 120.0d0) + (y * ((-60.0d0) / (z - t)))
else
tmp = (a * 120.0d0) + (60.0d0 / ((z - t) / x))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -5000000000000.0) || !(y <= 3.6e+44)) {
tmp = (a * 120.0) + (y * (-60.0 / (z - t)));
} else {
tmp = (a * 120.0) + (60.0 / ((z - t) / x));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -5000000000000.0) or not (y <= 3.6e+44): tmp = (a * 120.0) + (y * (-60.0 / (z - t))) else: tmp = (a * 120.0) + (60.0 / ((z - t) / x)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -5000000000000.0) || !(y <= 3.6e+44)) tmp = Float64(Float64(a * 120.0) + Float64(y * Float64(-60.0 / Float64(z - t)))); else tmp = Float64(Float64(a * 120.0) + Float64(60.0 / Float64(Float64(z - t) / x))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -5000000000000.0) || ~((y <= 3.6e+44))) tmp = (a * 120.0) + (y * (-60.0 / (z - t))); else tmp = (a * 120.0) + (60.0 / ((z - t) / x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -5000000000000.0], N[Not[LessEqual[y, 3.6e+44]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(y * N[(-60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 / N[(N[(z - t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5000000000000 \lor \neg \left(y \leq 3.6 \cdot 10^{+44}\right):\\
\;\;\;\;a \cdot 120 + y \cdot \frac{-60}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{60}{\frac{z - t}{x}}\\
\end{array}
\end{array}
if y < -5e12 or 3.6e44 < y Initial program 98.9%
Taylor expanded in x around 0 89.7%
*-commutative89.7%
associate-/l*90.6%
Applied egg-rr90.6%
if -5e12 < y < 3.6e44Initial program 99.9%
associate-/l*99.8%
clear-num99.8%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in x around inf 95.9%
Final simplification93.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -400000000000.0) (not (<= y 1e+45))) (+ (* a 120.0) (* y (/ -60.0 (- z t)))) (+ (* a 120.0) (* x (/ 60.0 (- z t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -400000000000.0) || !(y <= 1e+45)) {
tmp = (a * 120.0) + (y * (-60.0 / (z - t)));
} else {
tmp = (a * 120.0) + (x * (60.0 / (z - t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((y <= (-400000000000.0d0)) .or. (.not. (y <= 1d+45))) then
tmp = (a * 120.0d0) + (y * ((-60.0d0) / (z - t)))
else
tmp = (a * 120.0d0) + (x * (60.0d0 / (z - t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -400000000000.0) || !(y <= 1e+45)) {
tmp = (a * 120.0) + (y * (-60.0 / (z - t)));
} else {
tmp = (a * 120.0) + (x * (60.0 / (z - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -400000000000.0) or not (y <= 1e+45): tmp = (a * 120.0) + (y * (-60.0 / (z - t))) else: tmp = (a * 120.0) + (x * (60.0 / (z - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -400000000000.0) || !(y <= 1e+45)) tmp = Float64(Float64(a * 120.0) + Float64(y * Float64(-60.0 / Float64(z - t)))); else tmp = Float64(Float64(a * 120.0) + Float64(x * Float64(60.0 / Float64(z - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -400000000000.0) || ~((y <= 1e+45))) tmp = (a * 120.0) + (y * (-60.0 / (z - t))); else tmp = (a * 120.0) + (x * (60.0 / (z - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -400000000000.0], N[Not[LessEqual[y, 1e+45]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(y * N[(-60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(x * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -400000000000 \lor \neg \left(y \leq 10^{+45}\right):\\
\;\;\;\;a \cdot 120 + y \cdot \frac{-60}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + x \cdot \frac{60}{z - t}\\
\end{array}
\end{array}
if y < -4e11 or 9.9999999999999993e44 < y Initial program 98.9%
Taylor expanded in x around 0 89.7%
*-commutative89.7%
associate-/l*90.6%
Applied egg-rr90.6%
if -4e11 < y < 9.9999999999999993e44Initial program 99.9%
associate-/l*99.8%
clear-num99.8%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in x around inf 95.9%
*-commutative95.9%
associate-*l/95.9%
associate-*r/95.9%
Simplified95.9%
Final simplification93.6%
(FPCore (x y z t a)
:precision binary64
(if (<= y -1.65e+152)
(* 60.0 (/ (- x y) (- z t)))
(if (<= y 2.2e+111)
(+ (* a 120.0) (* 60.0 (/ x (- z t))))
(/ (* 60.0 (- x y)) (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.65e+152) {
tmp = 60.0 * ((x - y) / (z - t));
} else if (y <= 2.2e+111) {
tmp = (a * 120.0) + (60.0 * (x / (z - t)));
} 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 (y <= (-1.65d+152)) then
tmp = 60.0d0 * ((x - y) / (z - t))
else if (y <= 2.2d+111) then
tmp = (a * 120.0d0) + (60.0d0 * (x / (z - t)))
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 (y <= -1.65e+152) {
tmp = 60.0 * ((x - y) / (z - t));
} else if (y <= 2.2e+111) {
tmp = (a * 120.0) + (60.0 * (x / (z - t)));
} else {
tmp = (60.0 * (x - y)) / (z - t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -1.65e+152: tmp = 60.0 * ((x - y) / (z - t)) elif y <= 2.2e+111: tmp = (a * 120.0) + (60.0 * (x / (z - t))) else: tmp = (60.0 * (x - y)) / (z - t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -1.65e+152) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); elseif (y <= 2.2e+111) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(x / Float64(z - t)))); else tmp = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -1.65e+152) tmp = 60.0 * ((x - y) / (z - t)); elseif (y <= 2.2e+111) tmp = (a * 120.0) + (60.0 * (x / (z - t))); else tmp = (60.0 * (x - y)) / (z - t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -1.65e+152], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.2e+111], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.65 \cdot 10^{+152}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{elif}\;y \leq 2.2 \cdot 10^{+111}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{x}{z - t}\\
\mathbf{else}:\\
\;\;\;\;\frac{60 \cdot \left(x - y\right)}{z - t}\\
\end{array}
\end{array}
if y < -1.6500000000000001e152Initial program 96.6%
associate-/l*99.7%
clear-num99.7%
un-div-inv99.6%
Applied egg-rr99.6%
Taylor expanded in a around 0 67.5%
if -1.6500000000000001e152 < y < 2.19999999999999999e111Initial program 99.8%
Taylor expanded in x around inf 92.4%
if 2.19999999999999999e111 < y Initial program 99.8%
associate-/l*99.5%
clear-num99.5%
un-div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 73.2%
associate-*r/73.5%
Applied egg-rr73.5%
Final simplification86.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.9e-54) (not (<= a 4.9e-146))) (* a 120.0) (* -60.0 (/ (- x y) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.9e-54) || !(a <= 4.9e-146)) {
tmp = a * 120.0;
} else {
tmp = -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 ((a <= (-1.9d-54)) .or. (.not. (a <= 4.9d-146))) then
tmp = a * 120.0d0
else
tmp = (-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 ((a <= -1.9e-54) || !(a <= 4.9e-146)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * ((x - y) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.9e-54) or not (a <= 4.9e-146): tmp = a * 120.0 else: tmp = -60.0 * ((x - y) / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.9e-54) || !(a <= 4.9e-146)) tmp = Float64(a * 120.0); else tmp = 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 ((a <= -1.9e-54) || ~((a <= 4.9e-146))) tmp = a * 120.0; else tmp = -60.0 * ((x - y) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.9e-54], N[Not[LessEqual[a, 4.9e-146]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.9 \cdot 10^{-54} \lor \neg \left(a \leq 4.9 \cdot 10^{-146}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\
\end{array}
\end{array}
if a < -1.9000000000000001e-54 or 4.9000000000000004e-146 < a Initial program 99.9%
Taylor expanded in z around inf 67.7%
if -1.9000000000000001e-54 < a < 4.9000000000000004e-146Initial program 98.5%
associate-/l*99.6%
clear-num99.6%
un-div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 86.5%
Taylor expanded in z around 0 45.3%
Final simplification60.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -4.7e+183) (not (<= x 6e+211))) (* (/ x t) (- 60.0)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -4.7e+183) || !(x <= 6e+211)) {
tmp = (x / t) * -60.0;
} 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 <= (-4.7d+183)) .or. (.not. (x <= 6d+211))) then
tmp = (x / t) * -60.0d0
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 <= -4.7e+183) || !(x <= 6e+211)) {
tmp = (x / t) * -60.0;
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -4.7e+183) or not (x <= 6e+211): tmp = (x / t) * -60.0 else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -4.7e+183) || !(x <= 6e+211)) tmp = Float64(Float64(x / t) * Float64(-60.0)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -4.7e+183) || ~((x <= 6e+211))) tmp = (x / t) * -60.0; else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -4.7e+183], N[Not[LessEqual[x, 6e+211]], $MachinePrecision]], N[(N[(x / t), $MachinePrecision] * (-60.0)), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.7 \cdot 10^{+183} \lor \neg \left(x \leq 6 \cdot 10^{+211}\right):\\
\;\;\;\;\frac{x}{t} \cdot \left(-60\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if x < -4.6999999999999999e183 or 6e211 < x Initial program 99.7%
associate-/l*99.7%
clear-num99.7%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in a around 0 78.3%
Taylor expanded in x around inf 65.5%
*-commutative65.5%
Simplified65.5%
Taylor expanded in z around 0 42.8%
associate-*r/42.8%
neg-mul-142.8%
Simplified42.8%
if -4.6999999999999999e183 < x < 6e211Initial program 99.4%
Taylor expanded in z around inf 58.3%
Final simplification55.3%
(FPCore (x y z t a) :precision binary64 (+ (* a 120.0) (* (- x y) (/ 60.0 (- z t)))))
double code(double x, double y, double z, double t, double a) {
return (a * 120.0) + ((x - y) * (60.0 / (z - t)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (a * 120.0d0) + ((x - y) * (60.0d0 / (z - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return (a * 120.0) + ((x - y) * (60.0 / (z - t)));
}
def code(x, y, z, t, a): return (a * 120.0) + ((x - y) * (60.0 / (z - t)))
function code(x, y, z, t, a) return Float64(Float64(a * 120.0) + Float64(Float64(x - y) * Float64(60.0 / Float64(z - t)))) end
function tmp = code(x, y, z, t, a) tmp = (a * 120.0) + ((x - y) * (60.0 / (z - t))); end
code[x_, y_, z_, t_, a_] := N[(N[(a * 120.0), $MachinePrecision] + N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
a \cdot 120 + \left(x - y\right) \cdot \frac{60}{z - t}
\end{array}
Initial program 99.4%
*-commutative99.4%
associate-/l*99.8%
Applied egg-rr99.8%
Final simplification99.8%
(FPCore (x y z t a) :precision binary64 (if (<= x -1.22e+179) (/ (* 60.0 x) z) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -1.22e+179) {
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 <= (-1.22d+179)) 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 <= -1.22e+179) {
tmp = (60.0 * x) / z;
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -1.22e+179: tmp = (60.0 * x) / z else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -1.22e+179) tmp = Float64(Float64(60.0 * 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 <= -1.22e+179) tmp = (60.0 * x) / z; else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -1.22e+179], N[(N[(60.0 * x), $MachinePrecision] / z), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.22 \cdot 10^{+179}:\\
\;\;\;\;\frac{60 \cdot x}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if x < -1.22e179Initial program 99.9%
Taylor expanded in x around inf 88.1%
Taylor expanded in z around inf 46.3%
Taylor expanded in x around inf 38.4%
*-commutative38.4%
associate-*l/38.5%
Simplified38.5%
if -1.22e179 < x Initial program 99.4%
Taylor expanded in z around inf 54.9%
Final simplification53.3%
(FPCore (x y z t a) :precision binary64 (if (<= x -6.2e+178) (* 60.0 (/ x z)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -6.2e+178) {
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 <= (-6.2d+178)) 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 <= -6.2e+178) {
tmp = 60.0 * (x / z);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -6.2e+178: tmp = 60.0 * (x / z) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -6.2e+178) 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 <= -6.2e+178) tmp = 60.0 * (x / z); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -6.2e+178], N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.2 \cdot 10^{+178}:\\
\;\;\;\;60 \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if x < -6.19999999999999982e178Initial program 99.9%
Taylor expanded in x around inf 88.1%
Taylor expanded in z around inf 46.3%
Taylor expanded in x around inf 38.4%
if -6.19999999999999982e178 < x Initial program 99.4%
Taylor expanded in z around inf 54.9%
Final simplification53.3%
(FPCore (x y z t a) :precision binary64 (* a 120.0))
double code(double x, double y, double z, double t, double a) {
return a * 120.0;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = a * 120.0d0
end function
public static double code(double x, double y, double z, double t, double a) {
return a * 120.0;
}
def code(x, y, z, t, a): return a * 120.0
function code(x, y, z, t, a) return Float64(a * 120.0) end
function tmp = code(x, y, z, t, a) tmp = a * 120.0; end
code[x_, y_, z_, t_, a_] := N[(a * 120.0), $MachinePrecision]
\begin{array}{l}
\\
a \cdot 120
\end{array}
Initial program 99.4%
Taylor expanded in z around inf 51.3%
Final simplification51.3%
(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 2024096
(FPCore (x y z t a)
:name "Data.Colour.RGB:hslsv from colour-2.3.3, B"
:precision binary64
:alt
(+ (/ 60.0 (/ (- z t) (- x y))) (* a 120.0))
(+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))