
(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 (/ (- 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.0%
associate-/l*99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -5e-34)
(* a 120.0)
(if (or (<= (* a 120.0) 4e-57)
(and (not (<= (* a 120.0) 0.001)) (<= (* a 120.0) 1e+18)))
(* 60.0 (/ (- x y) (- z t)))
(+ (* a 120.0) (* 60.0 (/ x z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -5e-34) {
tmp = a * 120.0;
} else if (((a * 120.0) <= 4e-57) || (!((a * 120.0) <= 0.001) && ((a * 120.0) <= 1e+18))) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = (a * 120.0) + (60.0 * (x / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a * 120.0d0) <= (-5d-34)) then
tmp = a * 120.0d0
else if (((a * 120.0d0) <= 4d-57) .or. (.not. ((a * 120.0d0) <= 0.001d0)) .and. ((a * 120.0d0) <= 1d+18)) then
tmp = 60.0d0 * ((x - y) / (z - t))
else
tmp = (a * 120.0d0) + (60.0d0 * (x / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -5e-34) {
tmp = a * 120.0;
} else if (((a * 120.0) <= 4e-57) || (!((a * 120.0) <= 0.001) && ((a * 120.0) <= 1e+18))) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = (a * 120.0) + (60.0 * (x / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -5e-34: tmp = a * 120.0 elif ((a * 120.0) <= 4e-57) or (not ((a * 120.0) <= 0.001) and ((a * 120.0) <= 1e+18)): tmp = 60.0 * ((x - y) / (z - t)) else: tmp = (a * 120.0) + (60.0 * (x / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -5e-34) tmp = Float64(a * 120.0); elseif ((Float64(a * 120.0) <= 4e-57) || (!(Float64(a * 120.0) <= 0.001) && (Float64(a * 120.0) <= 1e+18))) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); else tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(x / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a * 120.0) <= -5e-34) tmp = a * 120.0; elseif (((a * 120.0) <= 4e-57) || (~(((a * 120.0) <= 0.001)) && ((a * 120.0) <= 1e+18))) tmp = 60.0 * ((x - y) / (z - t)); else tmp = (a * 120.0) + (60.0 * (x / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -5e-34], N[(a * 120.0), $MachinePrecision], If[Or[LessEqual[N[(a * 120.0), $MachinePrecision], 4e-57], And[N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 0.001]], $MachinePrecision], LessEqual[N[(a * 120.0), $MachinePrecision], 1e+18]]], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -5 \cdot 10^{-34}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq 4 \cdot 10^{-57} \lor \neg \left(a \cdot 120 \leq 0.001\right) \land a \cdot 120 \leq 10^{+18}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{x}{z}\\
\end{array}
\end{array}
if (*.f64 a 120) < -5.0000000000000003e-34Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 77.0%
if -5.0000000000000003e-34 < (*.f64 a 120) < 3.99999999999999982e-57 or 1e-3 < (*.f64 a 120) < 1e18Initial program 98.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 79.5%
if 3.99999999999999982e-57 < (*.f64 a 120) < 1e-3 or 1e18 < (*.f64 a 120) Initial program 98.6%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 88.5%
associate-*r/87.2%
Simplified87.2%
Taylor expanded in z around inf 82.8%
Final simplification79.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (* a 120.0) (* (- x y) (/ -60.0 t))))
(t_2 (+ (* a 120.0) (* 60.0 (/ x z)))))
(if (<= z -1.6e-93)
t_2
(if (<= z 2.4e-58)
t_1
(if (<= z 1.05e-24)
(* 60.0 (/ (- x y) z))
(if (<= z 1.6e+39)
t_1
(if (<= z 1.9e+170) t_2 (+ (* a 120.0) (/ (* y -60.0) z)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (a * 120.0) + ((x - y) * (-60.0 / t));
double t_2 = (a * 120.0) + (60.0 * (x / z));
double tmp;
if (z <= -1.6e-93) {
tmp = t_2;
} else if (z <= 2.4e-58) {
tmp = t_1;
} else if (z <= 1.05e-24) {
tmp = 60.0 * ((x - y) / z);
} else if (z <= 1.6e+39) {
tmp = t_1;
} else if (z <= 1.9e+170) {
tmp = t_2;
} else {
tmp = (a * 120.0) + ((y * -60.0) / z);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (a * 120.0d0) + ((x - y) * ((-60.0d0) / t))
t_2 = (a * 120.0d0) + (60.0d0 * (x / z))
if (z <= (-1.6d-93)) then
tmp = t_2
else if (z <= 2.4d-58) then
tmp = t_1
else if (z <= 1.05d-24) then
tmp = 60.0d0 * ((x - y) / z)
else if (z <= 1.6d+39) then
tmp = t_1
else if (z <= 1.9d+170) then
tmp = t_2
else
tmp = (a * 120.0d0) + ((y * (-60.0d0)) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (a * 120.0) + ((x - y) * (-60.0 / t));
double t_2 = (a * 120.0) + (60.0 * (x / z));
double tmp;
if (z <= -1.6e-93) {
tmp = t_2;
} else if (z <= 2.4e-58) {
tmp = t_1;
} else if (z <= 1.05e-24) {
tmp = 60.0 * ((x - y) / z);
} else if (z <= 1.6e+39) {
tmp = t_1;
} else if (z <= 1.9e+170) {
tmp = t_2;
} else {
tmp = (a * 120.0) + ((y * -60.0) / z);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (a * 120.0) + ((x - y) * (-60.0 / t)) t_2 = (a * 120.0) + (60.0 * (x / z)) tmp = 0 if z <= -1.6e-93: tmp = t_2 elif z <= 2.4e-58: tmp = t_1 elif z <= 1.05e-24: tmp = 60.0 * ((x - y) / z) elif z <= 1.6e+39: tmp = t_1 elif z <= 1.9e+170: tmp = t_2 else: tmp = (a * 120.0) + ((y * -60.0) / z) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(a * 120.0) + Float64(Float64(x - y) * Float64(-60.0 / t))) t_2 = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(x / z))) tmp = 0.0 if (z <= -1.6e-93) tmp = t_2; elseif (z <= 2.4e-58) tmp = t_1; elseif (z <= 1.05e-24) tmp = Float64(60.0 * Float64(Float64(x - y) / z)); elseif (z <= 1.6e+39) tmp = t_1; elseif (z <= 1.9e+170) tmp = t_2; else tmp = Float64(Float64(a * 120.0) + Float64(Float64(y * -60.0) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (a * 120.0) + ((x - y) * (-60.0 / t)); t_2 = (a * 120.0) + (60.0 * (x / z)); tmp = 0.0; if (z <= -1.6e-93) tmp = t_2; elseif (z <= 2.4e-58) tmp = t_1; elseif (z <= 1.05e-24) tmp = 60.0 * ((x - y) / z); elseif (z <= 1.6e+39) tmp = t_1; elseif (z <= 1.9e+170) tmp = t_2; else tmp = (a * 120.0) + ((y * -60.0) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(a * 120.0), $MachinePrecision] + N[(N[(x - y), $MachinePrecision] * N[(-60.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.6e-93], t$95$2, If[LessEqual[z, 2.4e-58], t$95$1, If[LessEqual[z, 1.05e-24], N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.6e+39], t$95$1, If[LessEqual[z, 1.9e+170], t$95$2, N[(N[(a * 120.0), $MachinePrecision] + N[(N[(y * -60.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot 120 + \left(x - y\right) \cdot \frac{-60}{t}\\
t_2 := a \cdot 120 + 60 \cdot \frac{x}{z}\\
\mathbf{if}\;z \leq -1.6 \cdot 10^{-93}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 2.4 \cdot 10^{-58}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{-24}:\\
\;\;\;\;60 \cdot \frac{x - y}{z}\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{+39}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{+170}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z}\\
\end{array}
\end{array}
if z < -1.5999999999999999e-93 or 1.59999999999999996e39 < z < 1.8999999999999999e170Initial program 99.0%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 85.2%
associate-*r/84.2%
Simplified84.2%
Taylor expanded in z around inf 80.9%
if -1.5999999999999999e-93 < z < 2.4000000000000001e-58 or 1.05e-24 < z < 1.59999999999999996e39Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around 0 88.5%
associate-*r/88.5%
*-commutative88.5%
associate-/l*88.6%
Simplified88.6%
if 2.4000000000000001e-58 < z < 1.05e-24Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 85.9%
Taylor expanded in z around inf 86.5%
if 1.8999999999999999e170 < z Initial program 97.1%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 89.8%
associate-*r/26.9%
Simplified89.9%
Taylor expanded in z around inf 87.4%
associate-*r/87.5%
Simplified87.5%
Final simplification85.1%
(FPCore (x y z t a)
:precision binary64
(if (or (<= z -8.3e-94)
(not (or (<= z 2.4e-58) (and (not (<= z 1060.0)) (<= z 1.14e+33)))))
(+ (* a 120.0) (* (- x y) (/ 60.0 z)))
(+ (* a 120.0) (* (- x y) (/ -60.0 t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -8.3e-94) || !((z <= 2.4e-58) || (!(z <= 1060.0) && (z <= 1.14e+33)))) {
tmp = (a * 120.0) + ((x - y) * (60.0 / z));
} else {
tmp = (a * 120.0) + ((x - y) * (-60.0 / t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-8.3d-94)) .or. (.not. (z <= 2.4d-58) .or. (.not. (z <= 1060.0d0)) .and. (z <= 1.14d+33))) then
tmp = (a * 120.0d0) + ((x - y) * (60.0d0 / z))
else
tmp = (a * 120.0d0) + ((x - y) * ((-60.0d0) / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -8.3e-94) || !((z <= 2.4e-58) || (!(z <= 1060.0) && (z <= 1.14e+33)))) {
tmp = (a * 120.0) + ((x - y) * (60.0 / z));
} else {
tmp = (a * 120.0) + ((x - y) * (-60.0 / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -8.3e-94) or not ((z <= 2.4e-58) or (not (z <= 1060.0) and (z <= 1.14e+33))): tmp = (a * 120.0) + ((x - y) * (60.0 / z)) else: tmp = (a * 120.0) + ((x - y) * (-60.0 / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -8.3e-94) || !((z <= 2.4e-58) || (!(z <= 1060.0) && (z <= 1.14e+33)))) tmp = Float64(Float64(a * 120.0) + Float64(Float64(x - y) * Float64(60.0 / z))); else tmp = Float64(Float64(a * 120.0) + Float64(Float64(x - y) * Float64(-60.0 / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -8.3e-94) || ~(((z <= 2.4e-58) || (~((z <= 1060.0)) && (z <= 1.14e+33))))) tmp = (a * 120.0) + ((x - y) * (60.0 / z)); else tmp = (a * 120.0) + ((x - y) * (-60.0 / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -8.3e-94], N[Not[Or[LessEqual[z, 2.4e-58], And[N[Not[LessEqual[z, 1060.0]], $MachinePrecision], LessEqual[z, 1.14e+33]]]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(x - y), $MachinePrecision] * N[(60.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(x - y), $MachinePrecision] * N[(-60.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.3 \cdot 10^{-94} \lor \neg \left(z \leq 2.4 \cdot 10^{-58} \lor \neg \left(z \leq 1060\right) \land z \leq 1.14 \cdot 10^{+33}\right):\\
\;\;\;\;a \cdot 120 + \left(x - y\right) \cdot \frac{60}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \left(x - y\right) \cdot \frac{-60}{t}\\
\end{array}
\end{array}
if z < -8.2999999999999997e-94 or 2.4000000000000001e-58 < z < 1060 or 1.14e33 < z Initial program 98.6%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 92.0%
associate-*r/32.8%
*-commutative32.8%
associate-/l*33.4%
Simplified92.0%
if -8.2999999999999997e-94 < z < 2.4000000000000001e-58 or 1060 < z < 1.14e33Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in z around 0 90.8%
associate-*r/90.8%
*-commutative90.8%
associate-/l*90.9%
Simplified90.9%
Final simplification91.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= (* a 120.0) -5e-34) (not (<= (* a 120.0) 5e-37))) (* 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) <= -5e-34) || !((a * 120.0) <= 5e-37)) {
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) <= (-5d-34)) .or. (.not. ((a * 120.0d0) <= 5d-37))) 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) <= -5e-34) || !((a * 120.0) <= 5e-37)) {
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) <= -5e-34) or not ((a * 120.0) <= 5e-37): 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) <= -5e-34) || !(Float64(a * 120.0) <= 5e-37)) 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) <= -5e-34) || ~(((a * 120.0) <= 5e-37))) 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], -5e-34], N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 5e-37]], $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 -5 \cdot 10^{-34} \lor \neg \left(a \cdot 120 \leq 5 \cdot 10^{-37}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\end{array}
\end{array}
if (*.f64 a 120) < -5.0000000000000003e-34 or 4.9999999999999997e-37 < (*.f64 a 120) Initial program 99.2%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 74.8%
if -5.0000000000000003e-34 < (*.f64 a 120) < 4.9999999999999997e-37Initial program 98.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 80.4%
Final simplification77.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= (- x y) -5e+82) (not (<= (- x y) 1e+103))) (* 60.0 (/ (- x y) (- z t))) (+ (* a 120.0) (/ (* y -60.0) z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((x - y) <= -5e+82) || !((x - y) <= 1e+103)) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = (a * 120.0) + ((y * -60.0) / z);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (((x - y) <= (-5d+82)) .or. (.not. ((x - y) <= 1d+103))) then
tmp = 60.0d0 * ((x - y) / (z - t))
else
tmp = (a * 120.0d0) + ((y * (-60.0d0)) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (((x - y) <= -5e+82) || !((x - y) <= 1e+103)) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = (a * 120.0) + ((y * -60.0) / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if ((x - y) <= -5e+82) or not ((x - y) <= 1e+103): tmp = 60.0 * ((x - y) / (z - t)) else: tmp = (a * 120.0) + ((y * -60.0) / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((Float64(x - y) <= -5e+82) || !(Float64(x - y) <= 1e+103)) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); else tmp = Float64(Float64(a * 120.0) + Float64(Float64(y * -60.0) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (((x - y) <= -5e+82) || ~(((x - y) <= 1e+103))) tmp = 60.0 * ((x - y) / (z - t)); else tmp = (a * 120.0) + ((y * -60.0) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[N[(x - y), $MachinePrecision], -5e+82], N[Not[LessEqual[N[(x - y), $MachinePrecision], 1e+103]], $MachinePrecision]], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(y * -60.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x - y \leq -5 \cdot 10^{+82} \lor \neg \left(x - y \leq 10^{+103}\right):\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z}\\
\end{array}
\end{array}
if (-.f64 x y) < -5.00000000000000015e82 or 1e103 < (-.f64 x y) Initial program 98.3%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 70.9%
if -5.00000000000000015e82 < (-.f64 x y) < 1e103Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around 0 93.6%
associate-*r/15.9%
Simplified93.6%
Taylor expanded in z around inf 83.2%
associate-*r/83.2%
Simplified83.2%
Final simplification76.8%
(FPCore (x y z t a)
:precision binary64
(if (<= (- x y) -5e+82)
(/ 60.0 (/ (- z t) (- x y)))
(if (<= (- x y) 1e+103)
(+ (* a 120.0) (/ (* y -60.0) z))
(* 60.0 (/ (- x y) (- z t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x - y) <= -5e+82) {
tmp = 60.0 / ((z - t) / (x - y));
} else if ((x - y) <= 1e+103) {
tmp = (a * 120.0) + ((y * -60.0) / z);
} else {
tmp = 60.0 * ((x - y) / (z - t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((x - y) <= (-5d+82)) then
tmp = 60.0d0 / ((z - t) / (x - y))
else if ((x - y) <= 1d+103) then
tmp = (a * 120.0d0) + ((y * (-60.0d0)) / z)
else
tmp = 60.0d0 * ((x - y) / (z - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x - y) <= -5e+82) {
tmp = 60.0 / ((z - t) / (x - y));
} else if ((x - y) <= 1e+103) {
tmp = (a * 120.0) + ((y * -60.0) / z);
} else {
tmp = 60.0 * ((x - y) / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x - y) <= -5e+82: tmp = 60.0 / ((z - t) / (x - y)) elif (x - y) <= 1e+103: tmp = (a * 120.0) + ((y * -60.0) / z) else: tmp = 60.0 * ((x - y) / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(x - y) <= -5e+82) tmp = Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))); elseif (Float64(x - y) <= 1e+103) tmp = Float64(Float64(a * 120.0) + Float64(Float64(y * -60.0) / z)); else tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x - y) <= -5e+82) tmp = 60.0 / ((z - t) / (x - y)); elseif ((x - y) <= 1e+103) tmp = (a * 120.0) + ((y * -60.0) / z); else tmp = 60.0 * ((x - y) / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(x - y), $MachinePrecision], -5e+82], N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x - y), $MachinePrecision], 1e+103], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(y * -60.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x - y \leq -5 \cdot 10^{+82}:\\
\;\;\;\;\frac{60}{\frac{z - t}{x - y}}\\
\mathbf{elif}\;x - y \leq 10^{+103}:\\
\;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z}\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\end{array}
\end{array}
if (-.f64 x y) < -5.00000000000000015e82Initial program 98.2%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 71.9%
clear-num71.8%
un-div-inv71.9%
Applied egg-rr71.9%
if -5.00000000000000015e82 < (-.f64 x y) < 1e103Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around 0 93.6%
associate-*r/15.9%
Simplified93.6%
Taylor expanded in z around inf 83.2%
associate-*r/83.2%
Simplified83.2%
if 1e103 < (-.f64 x y) Initial program 98.3%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 69.9%
Final simplification76.8%
(FPCore (x y z t a)
:precision binary64
(if (<= a -4.2e-37)
(* a 120.0)
(if (<= a 4.2e-281)
(* -60.0 (/ (- x y) t))
(if (<= a 1.55e-135) (* 60.0 (/ (- x y) z)) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -4.2e-37) {
tmp = a * 120.0;
} else if (a <= 4.2e-281) {
tmp = -60.0 * ((x - y) / t);
} else if (a <= 1.55e-135) {
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 <= (-4.2d-37)) then
tmp = a * 120.0d0
else if (a <= 4.2d-281) then
tmp = (-60.0d0) * ((x - y) / t)
else if (a <= 1.55d-135) 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 <= -4.2e-37) {
tmp = a * 120.0;
} else if (a <= 4.2e-281) {
tmp = -60.0 * ((x - y) / t);
} else if (a <= 1.55e-135) {
tmp = 60.0 * ((x - y) / z);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -4.2e-37: tmp = a * 120.0 elif a <= 4.2e-281: tmp = -60.0 * ((x - y) / t) elif a <= 1.55e-135: 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 <= -4.2e-37) tmp = Float64(a * 120.0); elseif (a <= 4.2e-281) tmp = Float64(-60.0 * Float64(Float64(x - y) / t)); elseif (a <= 1.55e-135) 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 <= -4.2e-37) tmp = a * 120.0; elseif (a <= 4.2e-281) tmp = -60.0 * ((x - y) / t); elseif (a <= 1.55e-135) 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, -4.2e-37], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 4.2e-281], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.55e-135], 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 -4.2 \cdot 10^{-37}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq 4.2 \cdot 10^{-281}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\
\mathbf{elif}\;a \leq 1.55 \cdot 10^{-135}:\\
\;\;\;\;60 \cdot \frac{x - y}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -4.2000000000000002e-37 or 1.55e-135 < a Initial program 99.3%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 70.9%
if -4.2000000000000002e-37 < a < 4.1999999999999998e-281Initial program 98.0%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 85.1%
Taylor expanded in z around 0 53.1%
if 4.1999999999999998e-281 < a < 1.55e-135Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 85.8%
Taylor expanded in z around inf 57.7%
Final simplification65.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -5.5e+42) (not (<= x 3.2e+63))) (+ (* 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 <= -5.5e+42) || !(x <= 3.2e+63)) {
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 <= (-5.5d+42)) .or. (.not. (x <= 3.2d+63))) 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 <= -5.5e+42) || !(x <= 3.2e+63)) {
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 <= -5.5e+42) or not (x <= 3.2e+63): 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 <= -5.5e+42) || !(x <= 3.2e+63)) 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 <= -5.5e+42) || ~((x <= 3.2e+63))) 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, -5.5e+42], N[Not[LessEqual[x, 3.2e+63]], $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 -5.5 \cdot 10^{+42} \lor \neg \left(x \leq 3.2 \cdot 10^{+63}\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 < -5.50000000000000001e42 or 3.20000000000000011e63 < x Initial program 97.7%
associate-/l*99.8%
Simplified99.8%
clear-num63.3%
un-div-inv63.5%
Applied egg-rr99.8%
Taylor expanded in x around inf 90.3%
if -5.50000000000000001e42 < x < 3.20000000000000011e63Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around 0 97.5%
associate-*r/35.8%
Simplified97.5%
Final simplification94.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -5.5e-37) (not (<= a 6e-189))) (* a 120.0) (* -60.0 (/ (- x y) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -5.5e-37) || !(a <= 6e-189)) {
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 <= (-5.5d-37)) .or. (.not. (a <= 6d-189))) 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 <= -5.5e-37) || !(a <= 6e-189)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * ((x - y) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -5.5e-37) or not (a <= 6e-189): 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 <= -5.5e-37) || !(a <= 6e-189)) 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 <= -5.5e-37) || ~((a <= 6e-189))) 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, -5.5e-37], N[Not[LessEqual[a, 6e-189]], $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 -5.5 \cdot 10^{-37} \lor \neg \left(a \leq 6 \cdot 10^{-189}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\
\end{array}
\end{array}
if a < -5.4999999999999998e-37 or 6e-189 < a Initial program 99.3%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 69.0%
if -5.4999999999999998e-37 < a < 6e-189Initial program 98.4%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 86.3%
Taylor expanded in z around 0 50.2%
Final simplification63.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -5.8e-42) (not (<= a 3.5e-167))) (* a 120.0) (/ (* y -60.0) (- z t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -5.8e-42) || !(a <= 3.5e-167)) {
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 <= (-5.8d-42)) .or. (.not. (a <= 3.5d-167))) 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 <= -5.8e-42) || !(a <= 3.5e-167)) {
tmp = a * 120.0;
} else {
tmp = (y * -60.0) / (z - t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -5.8e-42) or not (a <= 3.5e-167): 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 <= -5.8e-42) || !(a <= 3.5e-167)) 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 <= -5.8e-42) || ~((a <= 3.5e-167))) 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, -5.8e-42], N[Not[LessEqual[a, 3.5e-167]], $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 -5.8 \cdot 10^{-42} \lor \neg \left(a \leq 3.5 \cdot 10^{-167}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot -60}{z - t}\\
\end{array}
\end{array}
if a < -5.8000000000000006e-42 or 3.4999999999999999e-167 < a Initial program 99.3%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 69.2%
if -5.8000000000000006e-42 < a < 3.4999999999999999e-167Initial program 98.4%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 85.5%
Taylor expanded in x around 0 54.4%
associate-*r/54.4%
Simplified54.4%
Final simplification64.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -2.55e-86) (not (<= a 7.5e-225))) (* a 120.0) (* -60.0 (/ y z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.55e-86) || !(a <= 7.5e-225)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (y / z);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-2.55d-86)) .or. (.not. (a <= 7.5d-225))) then
tmp = a * 120.0d0
else
tmp = (-60.0d0) * (y / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.55e-86) || !(a <= 7.5e-225)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (y / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -2.55e-86) or not (a <= 7.5e-225): tmp = a * 120.0 else: tmp = -60.0 * (y / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -2.55e-86) || !(a <= 7.5e-225)) tmp = Float64(a * 120.0); else tmp = Float64(-60.0 * Float64(y / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -2.55e-86) || ~((a <= 7.5e-225))) tmp = a * 120.0; else tmp = -60.0 * (y / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -2.55e-86], N[Not[LessEqual[a, 7.5e-225]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.55 \cdot 10^{-86} \lor \neg \left(a \leq 7.5 \cdot 10^{-225}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if a < -2.55000000000000003e-86 or 7.49999999999999954e-225 < a Initial program 99.3%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 65.6%
if -2.55000000000000003e-86 < a < 7.49999999999999954e-225Initial program 98.0%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 89.1%
Taylor expanded in z around inf 48.2%
associate-*r/46.6%
*-commutative46.6%
associate-/l*48.1%
Simplified48.1%
Taylor expanded in x around 0 30.4%
Final simplification57.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.46e-43) (not (<= a 4.8e-190))) (* a 120.0) (* 60.0 (/ y t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.46e-43) || !(a <= 4.8e-190)) {
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 <= (-1.46d-43)) .or. (.not. (a <= 4.8d-190))) 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 <= -1.46e-43) || !(a <= 4.8e-190)) {
tmp = a * 120.0;
} else {
tmp = 60.0 * (y / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.46e-43) or not (a <= 4.8e-190): tmp = a * 120.0 else: tmp = 60.0 * (y / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.46e-43) || !(a <= 4.8e-190)) 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 <= -1.46e-43) || ~((a <= 4.8e-190))) 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, -1.46e-43], N[Not[LessEqual[a, 4.8e-190]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.46 \cdot 10^{-43} \lor \neg \left(a \leq 4.8 \cdot 10^{-190}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{y}{t}\\
\end{array}
\end{array}
if a < -1.45999999999999997e-43 or 4.8000000000000001e-190 < a Initial program 99.3%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 68.7%
if -1.45999999999999997e-43 < a < 4.8000000000000001e-190Initial program 98.4%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 86.1%
Taylor expanded in z around 0 49.5%
Taylor expanded in x around 0 33.0%
Final simplification58.4%
(FPCore (x y z t a) :precision binary64 (* a 120.0))
double code(double x, double y, double z, double t, double a) {
return a * 120.0;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = a * 120.0d0
end function
public static double code(double x, double y, double z, double t, double a) {
return a * 120.0;
}
def code(x, y, z, t, a): return a * 120.0
function code(x, y, z, t, a) return Float64(a * 120.0) end
function tmp = code(x, y, z, t, a) tmp = a * 120.0; end
code[x_, y_, z_, t_, a_] := N[(a * 120.0), $MachinePrecision]
\begin{array}{l}
\\
a \cdot 120
\end{array}
Initial program 99.0%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 53.5%
Final simplification53.5%
(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 2024040
(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)))