
(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 (- 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}
Initial program 99.8%
Final simplification99.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -7.8e+129) (not (<= x 4.1e+189))) (+ (* a 120.0) (* x (/ -60.0 t))) (+ (* a 120.0) (* -60.0 (/ y (- z t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -7.8e+129) || !(x <= 4.1e+189)) {
tmp = (a * 120.0) + (x * (-60.0 / t));
} else {
tmp = (a * 120.0) + (-60.0 * (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 <= (-7.8d+129)) .or. (.not. (x <= 4.1d+189))) then
tmp = (a * 120.0d0) + (x * ((-60.0d0) / t))
else
tmp = (a * 120.0d0) + ((-60.0d0) * (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 <= -7.8e+129) || !(x <= 4.1e+189)) {
tmp = (a * 120.0) + (x * (-60.0 / t));
} else {
tmp = (a * 120.0) + (-60.0 * (y / (z - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -7.8e+129) or not (x <= 4.1e+189): tmp = (a * 120.0) + (x * (-60.0 / t)) else: tmp = (a * 120.0) + (-60.0 * (y / (z - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -7.8e+129) || !(x <= 4.1e+189)) tmp = Float64(Float64(a * 120.0) + Float64(x * Float64(-60.0 / t))); else tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / Float64(z - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -7.8e+129) || ~((x <= 4.1e+189))) tmp = (a * 120.0) + (x * (-60.0 / t)); else tmp = (a * 120.0) + (-60.0 * (y / (z - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -7.8e+129], N[Not[LessEqual[x, 4.1e+189]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(x * N[(-60.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.8 \cdot 10^{+129} \lor \neg \left(x \leq 4.1 \cdot 10^{+189}\right):\\
\;\;\;\;a \cdot 120 + x \cdot \frac{-60}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z - t}\\
\end{array}
\end{array}
if x < -7.7999999999999994e129 or 4.1000000000000002e189 < x Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around inf 93.4%
associate-*r/93.5%
*-commutative93.5%
associate-/l*93.5%
Simplified93.5%
Taylor expanded in z around 0 68.7%
if -7.7999999999999994e129 < x < 4.1000000000000002e189Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 88.0%
Final simplification83.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -1.02e+61) (not (<= x 2.75e+119))) (+ (* a 120.0) (* 60.0 (/ x (- z t)))) (+ (* a 120.0) (* -60.0 (/ y (- z t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -1.02e+61) || !(x <= 2.75e+119)) {
tmp = (a * 120.0) + (60.0 * (x / (z - t)));
} else {
tmp = (a * 120.0) + (-60.0 * (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 <= (-1.02d+61)) .or. (.not. (x <= 2.75d+119))) then
tmp = (a * 120.0d0) + (60.0d0 * (x / (z - t)))
else
tmp = (a * 120.0d0) + ((-60.0d0) * (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 <= -1.02e+61) || !(x <= 2.75e+119)) {
tmp = (a * 120.0) + (60.0 * (x / (z - t)));
} else {
tmp = (a * 120.0) + (-60.0 * (y / (z - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -1.02e+61) or not (x <= 2.75e+119): tmp = (a * 120.0) + (60.0 * (x / (z - t))) else: tmp = (a * 120.0) + (-60.0 * (y / (z - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -1.02e+61) || !(x <= 2.75e+119)) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(x / Float64(z - t)))); else tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / Float64(z - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -1.02e+61) || ~((x <= 2.75e+119))) tmp = (a * 120.0) + (60.0 * (x / (z - t))); else tmp = (a * 120.0) + (-60.0 * (y / (z - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -1.02e+61], N[Not[LessEqual[x, 2.75e+119]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.02 \cdot 10^{+61} \lor \neg \left(x \leq 2.75 \cdot 10^{+119}\right):\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{x}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z - t}\\
\end{array}
\end{array}
if x < -1.01999999999999999e61 or 2.7500000000000002e119 < x Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around inf 88.3%
if -1.01999999999999999e61 < x < 2.7500000000000002e119Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 93.4%
Final simplification91.6%
(FPCore (x y z t a)
:precision binary64
(if (<= x -6.5e+60)
(+ (* a 120.0) (* 60.0 (/ x (- z t))))
(if (<= x 3.2e+119)
(+ (* a 120.0) (* -60.0 (/ y (- 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 (x <= -6.5e+60) {
tmp = (a * 120.0) + (60.0 * (x / (z - t)));
} else if (x <= 3.2e+119) {
tmp = (a * 120.0) + (-60.0 * (y / (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 (x <= (-6.5d+60)) then
tmp = (a * 120.0d0) + (60.0d0 * (x / (z - t)))
else if (x <= 3.2d+119) then
tmp = (a * 120.0d0) + ((-60.0d0) * (y / (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 (x <= -6.5e+60) {
tmp = (a * 120.0) + (60.0 * (x / (z - t)));
} else if (x <= 3.2e+119) {
tmp = (a * 120.0) + (-60.0 * (y / (z - t)));
} else {
tmp = (a * 120.0) + (x * (60.0 / (z - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -6.5e+60: tmp = (a * 120.0) + (60.0 * (x / (z - t))) elif x <= 3.2e+119: tmp = (a * 120.0) + (-60.0 * (y / (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 (x <= -6.5e+60) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(x / Float64(z - t)))); elseif (x <= 3.2e+119) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / 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 (x <= -6.5e+60) tmp = (a * 120.0) + (60.0 * (x / (z - t))); elseif (x <= 3.2e+119) tmp = (a * 120.0) + (-60.0 * (y / (z - t))); else tmp = (a * 120.0) + (x * (60.0 / (z - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -6.5e+60], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.2e+119], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / 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}\;x \leq -6.5 \cdot 10^{+60}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{x}{z - t}\\
\mathbf{elif}\;x \leq 3.2 \cdot 10^{+119}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + x \cdot \frac{60}{z - t}\\
\end{array}
\end{array}
if x < -6.49999999999999931e60Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 90.2%
if -6.49999999999999931e60 < x < 3.19999999999999989e119Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 93.4%
if 3.19999999999999989e119 < x Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around inf 86.0%
associate-*r/86.1%
*-commutative86.1%
associate-/l*86.2%
Simplified86.2%
Final simplification91.6%
(FPCore (x y z t a)
:precision binary64
(if (<= x -1.3e+59)
(+ (* a 120.0) (* 60.0 (/ x (- z t))))
(if (<= x 3.15e+119)
(+ (* a 120.0) (/ -60.0 (/ (- z t) y)))
(+ (* a 120.0) (* x (/ 60.0 (- z t)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -1.3e+59) {
tmp = (a * 120.0) + (60.0 * (x / (z - t)));
} else if (x <= 3.15e+119) {
tmp = (a * 120.0) + (-60.0 / ((z - t) / y));
} 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 (x <= (-1.3d+59)) then
tmp = (a * 120.0d0) + (60.0d0 * (x / (z - t)))
else if (x <= 3.15d+119) then
tmp = (a * 120.0d0) + ((-60.0d0) / ((z - t) / y))
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 (x <= -1.3e+59) {
tmp = (a * 120.0) + (60.0 * (x / (z - t)));
} else if (x <= 3.15e+119) {
tmp = (a * 120.0) + (-60.0 / ((z - t) / y));
} else {
tmp = (a * 120.0) + (x * (60.0 / (z - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -1.3e+59: tmp = (a * 120.0) + (60.0 * (x / (z - t))) elif x <= 3.15e+119: tmp = (a * 120.0) + (-60.0 / ((z - t) / y)) else: tmp = (a * 120.0) + (x * (60.0 / (z - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -1.3e+59) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(x / Float64(z - t)))); elseif (x <= 3.15e+119) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 / Float64(Float64(z - t) / y))); 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 (x <= -1.3e+59) tmp = (a * 120.0) + (60.0 * (x / (z - t))); elseif (x <= 3.15e+119) tmp = (a * 120.0) + (-60.0 / ((z - t) / y)); else tmp = (a * 120.0) + (x * (60.0 / (z - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -1.3e+59], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.15e+119], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 / N[(N[(z - t), $MachinePrecision] / y), $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}\;x \leq -1.3 \cdot 10^{+59}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{x}{z - t}\\
\mathbf{elif}\;x \leq 3.15 \cdot 10^{+119}:\\
\;\;\;\;a \cdot 120 + \frac{-60}{\frac{z - t}{y}}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + x \cdot \frac{60}{z - t}\\
\end{array}
\end{array}
if x < -1.3e59Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 88.9%
if -1.3e59 < x < 3.1499999999999999e119Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 93.8%
clear-num93.8%
un-div-inv93.9%
Applied egg-rr93.9%
if 3.1499999999999999e119 < x Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around inf 86.0%
associate-*r/86.1%
*-commutative86.1%
associate-/l*86.2%
Simplified86.2%
Final simplification91.6%
(FPCore (x y z t a)
:precision binary64
(if (<= x -1.15e+61)
(+ (* a 120.0) (* 60.0 (/ x (- z t))))
(if (<= x 2.5e+119)
(+ (* 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 (x <= -1.15e+61) {
tmp = (a * 120.0) + (60.0 * (x / (z - t)));
} else if (x <= 2.5e+119) {
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 (x <= (-1.15d+61)) then
tmp = (a * 120.0d0) + (60.0d0 * (x / (z - t)))
else if (x <= 2.5d+119) 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 (x <= -1.15e+61) {
tmp = (a * 120.0) + (60.0 * (x / (z - t)));
} else if (x <= 2.5e+119) {
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 x <= -1.15e+61: tmp = (a * 120.0) + (60.0 * (x / (z - t))) elif x <= 2.5e+119: 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 (x <= -1.15e+61) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(x / Float64(z - t)))); elseif (x <= 2.5e+119) tmp = Float64(Float64(a * 120.0) + Float64(Float64(y * -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 (x <= -1.15e+61) tmp = (a * 120.0) + (60.0 * (x / (z - t))); elseif (x <= 2.5e+119) 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[LessEqual[x, -1.15e+61], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.5e+119], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $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}\;x \leq -1.15 \cdot 10^{+61}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{x}{z - t}\\
\mathbf{elif}\;x \leq 2.5 \cdot 10^{+119}:\\
\;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + x \cdot \frac{60}{z - t}\\
\end{array}
\end{array}
if x < -1.15e61Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 90.2%
if -1.15e61 < x < 2.5e119Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 93.4%
associate-*r/93.4%
Simplified93.4%
if 2.5e119 < x Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around inf 86.0%
associate-*r/86.1%
*-commutative86.1%
associate-/l*86.2%
Simplified86.2%
Final simplification91.6%
(FPCore (x y z t a)
:precision binary64
(if (<= x -1.35e+59)
(+ (* a 120.0) (/ (* 60.0 x) (- z t)))
(if (<= x 2.5e+119)
(+ (* 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 (x <= -1.35e+59) {
tmp = (a * 120.0) + ((60.0 * x) / (z - t));
} else if (x <= 2.5e+119) {
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 (x <= (-1.35d+59)) then
tmp = (a * 120.0d0) + ((60.0d0 * x) / (z - t))
else if (x <= 2.5d+119) 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 (x <= -1.35e+59) {
tmp = (a * 120.0) + ((60.0 * x) / (z - t));
} else if (x <= 2.5e+119) {
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 x <= -1.35e+59: tmp = (a * 120.0) + ((60.0 * x) / (z - t)) elif x <= 2.5e+119: 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 (x <= -1.35e+59) tmp = Float64(Float64(a * 120.0) + Float64(Float64(60.0 * x) / Float64(z - t))); elseif (x <= 2.5e+119) tmp = Float64(Float64(a * 120.0) + Float64(Float64(y * -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 (x <= -1.35e+59) tmp = (a * 120.0) + ((60.0 * x) / (z - t)); elseif (x <= 2.5e+119) 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[LessEqual[x, -1.35e+59], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(60.0 * x), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.5e+119], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $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}\;x \leq -1.35 \cdot 10^{+59}:\\
\;\;\;\;a \cdot 120 + \frac{60 \cdot x}{z - t}\\
\mathbf{elif}\;x \leq 2.5 \cdot 10^{+119}:\\
\;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + x \cdot \frac{60}{z - t}\\
\end{array}
\end{array}
if x < -1.3500000000000001e59Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 88.9%
associate-*r/88.9%
Simplified88.9%
if -1.3500000000000001e59 < x < 2.5e119Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 93.8%
associate-*r/93.9%
Simplified93.9%
if 2.5e119 < x Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around inf 86.0%
associate-*r/86.1%
*-commutative86.1%
associate-/l*86.2%
Simplified86.2%
Final simplification91.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.26e+31) (not (<= z 2.8e+117))) (* a 120.0) (+ (* a 120.0) (* -60.0 (/ x t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.26e+31) || !(z <= 2.8e+117)) {
tmp = a * 120.0;
} else {
tmp = (a * 120.0) + (-60.0 * (x / 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 <= (-1.26d+31)) .or. (.not. (z <= 2.8d+117))) then
tmp = a * 120.0d0
else
tmp = (a * 120.0d0) + ((-60.0d0) * (x / 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 <= -1.26e+31) || !(z <= 2.8e+117)) {
tmp = a * 120.0;
} else {
tmp = (a * 120.0) + (-60.0 * (x / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.26e+31) or not (z <= 2.8e+117): tmp = a * 120.0 else: tmp = (a * 120.0) + (-60.0 * (x / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.26e+31) || !(z <= 2.8e+117)) tmp = Float64(a * 120.0); else tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(x / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.26e+31) || ~((z <= 2.8e+117))) tmp = a * 120.0; else tmp = (a * 120.0) + (-60.0 * (x / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.26e+31], N[Not[LessEqual[z, 2.8e+117]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.26 \cdot 10^{+31} \lor \neg \left(z \leq 2.8 \cdot 10^{+117}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{x}{t}\\
\end{array}
\end{array}
if z < -1.26000000000000001e31 or 2.79999999999999997e117 < z Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around 0 86.7%
Taylor expanded in y around 0 68.1%
if -1.26000000000000001e31 < z < 2.79999999999999997e117Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around inf 69.9%
associate-*r/70.0%
*-commutative70.0%
associate-/l*70.0%
Simplified70.0%
Taylor expanded in z around 0 59.2%
Final simplification62.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -4.4e+58) (not (<= t 1.85e-39))) (+ (* a 120.0) (* -60.0 (/ x t))) (+ (* a 120.0) (* -60.0 (/ y z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -4.4e+58) || !(t <= 1.85e-39)) {
tmp = (a * 120.0) + (-60.0 * (x / t));
} else {
tmp = (a * 120.0) + (-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 ((t <= (-4.4d+58)) .or. (.not. (t <= 1.85d-39))) then
tmp = (a * 120.0d0) + ((-60.0d0) * (x / t))
else
tmp = (a * 120.0d0) + ((-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 ((t <= -4.4e+58) || !(t <= 1.85e-39)) {
tmp = (a * 120.0) + (-60.0 * (x / t));
} else {
tmp = (a * 120.0) + (-60.0 * (y / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -4.4e+58) or not (t <= 1.85e-39): tmp = (a * 120.0) + (-60.0 * (x / t)) else: tmp = (a * 120.0) + (-60.0 * (y / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -4.4e+58) || !(t <= 1.85e-39)) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(x / t))); else tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -4.4e+58) || ~((t <= 1.85e-39))) tmp = (a * 120.0) + (-60.0 * (x / t)); else tmp = (a * 120.0) + (-60.0 * (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -4.4e+58], N[Not[LessEqual[t, 1.85e-39]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.4 \cdot 10^{+58} \lor \neg \left(t \leq 1.85 \cdot 10^{-39}\right):\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if t < -4.4000000000000001e58 or 1.85000000000000007e-39 < t Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 81.1%
associate-*r/81.1%
*-commutative81.1%
associate-/l*81.1%
Simplified81.1%
Taylor expanded in z around 0 76.5%
if -4.4000000000000001e58 < t < 1.85000000000000007e-39Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around 0 73.3%
Taylor expanded in z around inf 64.0%
Final simplification70.8%
(FPCore (x y z t a)
:precision binary64
(if (<= t -7e+58)
(+ (* a 120.0) (* -60.0 (/ x t)))
(if (<= t 1.6e-39)
(+ (* a 120.0) (* -60.0 (/ y z)))
(+ (* a 120.0) (* x (/ -60.0 t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -7e+58) {
tmp = (a * 120.0) + (-60.0 * (x / t));
} else if (t <= 1.6e-39) {
tmp = (a * 120.0) + (-60.0 * (y / z));
} else {
tmp = (a * 120.0) + (x * (-60.0 / t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-7d+58)) then
tmp = (a * 120.0d0) + ((-60.0d0) * (x / t))
else if (t <= 1.6d-39) then
tmp = (a * 120.0d0) + ((-60.0d0) * (y / z))
else
tmp = (a * 120.0d0) + (x * ((-60.0d0) / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -7e+58) {
tmp = (a * 120.0) + (-60.0 * (x / t));
} else if (t <= 1.6e-39) {
tmp = (a * 120.0) + (-60.0 * (y / z));
} else {
tmp = (a * 120.0) + (x * (-60.0 / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -7e+58: tmp = (a * 120.0) + (-60.0 * (x / t)) elif t <= 1.6e-39: tmp = (a * 120.0) + (-60.0 * (y / z)) else: tmp = (a * 120.0) + (x * (-60.0 / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -7e+58) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(x / t))); elseif (t <= 1.6e-39) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / z))); else tmp = Float64(Float64(a * 120.0) + Float64(x * Float64(-60.0 / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -7e+58) tmp = (a * 120.0) + (-60.0 * (x / t)); elseif (t <= 1.6e-39) tmp = (a * 120.0) + (-60.0 * (y / z)); else tmp = (a * 120.0) + (x * (-60.0 / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -7e+58], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.6e-39], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(x * N[(-60.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7 \cdot 10^{+58}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{x}{t}\\
\mathbf{elif}\;t \leq 1.6 \cdot 10^{-39}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + x \cdot \frac{-60}{t}\\
\end{array}
\end{array}
if t < -6.9999999999999995e58Initial program 99.9%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around inf 81.2%
associate-*r/81.3%
*-commutative81.3%
associate-/l*81.2%
Simplified81.2%
Taylor expanded in z around 0 78.1%
if -6.9999999999999995e58 < t < 1.5999999999999999e-39Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around 0 73.3%
Taylor expanded in z around inf 64.0%
if 1.5999999999999999e-39 < t Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 80.9%
associate-*r/80.9%
*-commutative80.9%
associate-/l*80.9%
Simplified80.9%
Taylor expanded in z around 0 75.4%
Final simplification70.8%
(FPCore (x y z t a)
:precision binary64
(if (<= t -5.6e+58)
(+ (* a 120.0) (* -60.0 (/ x t)))
(if (<= t 1.7e-39)
(+ (* a 120.0) (* y (/ -60.0 z)))
(+ (* a 120.0) (* x (/ -60.0 t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -5.6e+58) {
tmp = (a * 120.0) + (-60.0 * (x / t));
} else if (t <= 1.7e-39) {
tmp = (a * 120.0) + (y * (-60.0 / z));
} else {
tmp = (a * 120.0) + (x * (-60.0 / t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-5.6d+58)) then
tmp = (a * 120.0d0) + ((-60.0d0) * (x / t))
else if (t <= 1.7d-39) then
tmp = (a * 120.0d0) + (y * ((-60.0d0) / z))
else
tmp = (a * 120.0d0) + (x * ((-60.0d0) / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -5.6e+58) {
tmp = (a * 120.0) + (-60.0 * (x / t));
} else if (t <= 1.7e-39) {
tmp = (a * 120.0) + (y * (-60.0 / z));
} else {
tmp = (a * 120.0) + (x * (-60.0 / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -5.6e+58: tmp = (a * 120.0) + (-60.0 * (x / t)) elif t <= 1.7e-39: tmp = (a * 120.0) + (y * (-60.0 / z)) else: tmp = (a * 120.0) + (x * (-60.0 / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -5.6e+58) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(x / t))); elseif (t <= 1.7e-39) tmp = Float64(Float64(a * 120.0) + Float64(y * Float64(-60.0 / z))); else tmp = Float64(Float64(a * 120.0) + Float64(x * Float64(-60.0 / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -5.6e+58) tmp = (a * 120.0) + (-60.0 * (x / t)); elseif (t <= 1.7e-39) tmp = (a * 120.0) + (y * (-60.0 / z)); else tmp = (a * 120.0) + (x * (-60.0 / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -5.6e+58], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.7e-39], N[(N[(a * 120.0), $MachinePrecision] + N[(y * N[(-60.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(x * N[(-60.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.6 \cdot 10^{+58}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{x}{t}\\
\mathbf{elif}\;t \leq 1.7 \cdot 10^{-39}:\\
\;\;\;\;a \cdot 120 + y \cdot \frac{-60}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + x \cdot \frac{-60}{t}\\
\end{array}
\end{array}
if t < -5.5999999999999996e58Initial program 99.9%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around inf 81.2%
associate-*r/81.3%
*-commutative81.3%
associate-/l*81.2%
Simplified81.2%
Taylor expanded in z around 0 78.1%
if -5.5999999999999996e58 < t < 1.7e-39Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around 0 73.3%
clear-num73.3%
un-div-inv73.3%
Applied egg-rr73.3%
Taylor expanded in z around inf 64.0%
associate-*r/64.0%
*-commutative64.0%
associate-/l*64.1%
Simplified64.1%
if 1.7e-39 < t Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 80.9%
associate-*r/80.9%
*-commutative80.9%
associate-/l*80.9%
Simplified80.9%
Taylor expanded in z around 0 75.4%
Final simplification70.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.05e-164) (not (<= a 1.45e-217))) (* a 120.0) (* 60.0 (/ x z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.05e-164) || !(a <= 1.45e-217)) {
tmp = a * 120.0;
} else {
tmp = 60.0 * (x / z);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-1.05d-164)) .or. (.not. (a <= 1.45d-217))) then
tmp = a * 120.0d0
else
tmp = 60.0d0 * (x / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.05e-164) || !(a <= 1.45e-217)) {
tmp = a * 120.0;
} else {
tmp = 60.0 * (x / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.05e-164) or not (a <= 1.45e-217): tmp = a * 120.0 else: tmp = 60.0 * (x / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.05e-164) || !(a <= 1.45e-217)) tmp = Float64(a * 120.0); else tmp = Float64(60.0 * Float64(x / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1.05e-164) || ~((a <= 1.45e-217))) tmp = a * 120.0; else tmp = 60.0 * (x / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.05e-164], N[Not[LessEqual[a, 1.45e-217]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.05 \cdot 10^{-164} \lor \neg \left(a \leq 1.45 \cdot 10^{-217}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x}{z}\\
\end{array}
\end{array}
if a < -1.04999999999999995e-164 or 1.44999999999999991e-217 < a Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 82.4%
Taylor expanded in y around 0 60.9%
if -1.04999999999999995e-164 < a < 1.44999999999999991e-217Initial program 99.7%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in x around inf 55.7%
associate-*r/55.7%
*-commutative55.7%
associate-/l*55.7%
Simplified55.7%
Taylor expanded in z around inf 28.8%
Taylor expanded in x around inf 27.0%
Final simplification54.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -2.5e-162) (not (<= a 7.2e-217))) (* a 120.0) (/ 60.0 (/ z x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.5e-162) || !(a <= 7.2e-217)) {
tmp = a * 120.0;
} else {
tmp = 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 <= (-2.5d-162)) .or. (.not. (a <= 7.2d-217))) then
tmp = a * 120.0d0
else
tmp = 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 <= -2.5e-162) || !(a <= 7.2e-217)) {
tmp = a * 120.0;
} else {
tmp = 60.0 / (z / x);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -2.5e-162) or not (a <= 7.2e-217): tmp = a * 120.0 else: tmp = 60.0 / (z / x) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -2.5e-162) || !(a <= 7.2e-217)) tmp = Float64(a * 120.0); else tmp = Float64(60.0 / Float64(z / x)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -2.5e-162) || ~((a <= 7.2e-217))) tmp = a * 120.0; else tmp = 60.0 / (z / x); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -2.5e-162], N[Not[LessEqual[a, 7.2e-217]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(60.0 / N[(z / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.5 \cdot 10^{-162} \lor \neg \left(a \leq 7.2 \cdot 10^{-217}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{60}{\frac{z}{x}}\\
\end{array}
\end{array}
if a < -2.50000000000000007e-162 or 7.19999999999999962e-217 < a Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 82.4%
Taylor expanded in y around 0 60.9%
if -2.50000000000000007e-162 < a < 7.19999999999999962e-217Initial program 99.7%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in x around inf 55.7%
associate-*r/55.7%
*-commutative55.7%
associate-/l*55.7%
Simplified55.7%
Taylor expanded in z around inf 28.8%
Taylor expanded in x around inf 27.0%
clear-num27.0%
un-div-inv27.0%
Applied egg-rr27.0%
Final simplification54.3%
(FPCore (x y z t a) :precision binary64 (+ (* a 120.0) (* 60.0 (/ (- x y) (- z t)))))
double code(double x, double y, double z, double t, double a) {
return (a * 120.0) + (60.0 * ((x - y) / (z - t)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (a * 120.0d0) + (60.0d0 * ((x - y) / (z - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return (a * 120.0) + (60.0 * ((x - y) / (z - t)));
}
def code(x, y, z, t, a): return (a * 120.0) + (60.0 * ((x - y) / (z - t)))
function code(x, y, z, t, a) return Float64(Float64(a * 120.0) + Float64(60.0 * Float64(Float64(x - y) / Float64(z - t)))) end
function tmp = code(x, y, z, t, a) tmp = (a * 120.0) + (60.0 * ((x - y) / (z - t))); end
code[x_, y_, z_, t_, a_] := N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
a \cdot 120 + 60 \cdot \frac{x - y}{z - t}
\end{array}
Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t a) :precision binary64 (+ (* a 120.0) (/ 60.0 (/ (- z t) (- x y)))))
double code(double x, double y, double z, double t, double a) {
return (a * 120.0) + (60.0 / ((z - t) / (x - y)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (a * 120.0d0) + (60.0d0 / ((z - t) / (x - y)))
end function
public static double code(double x, double y, double z, double t, double a) {
return (a * 120.0) + (60.0 / ((z - t) / (x - y)));
}
def code(x, y, z, t, a): return (a * 120.0) + (60.0 / ((z - t) / (x - y)))
function code(x, y, z, t, a) return Float64(Float64(a * 120.0) + Float64(60.0 / Float64(Float64(z - t) / Float64(x - y)))) end
function tmp = code(x, y, z, t, a) tmp = (a * 120.0) + (60.0 / ((z - t) / (x - y))); end
code[x_, y_, z_, t_, a_] := N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
a \cdot 120 + \frac{60}{\frac{z - t}{x - y}}
\end{array}
Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
clear-num99.7%
un-div-inv99.8%
Applied egg-rr99.8%
Final simplification99.8%
(FPCore (x y z t a) :precision binary64 (* a 120.0))
double code(double x, double y, double z, double t, double a) {
return a * 120.0;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = a * 120.0d0
end function
public static double code(double x, double y, double z, double t, double a) {
return a * 120.0;
}
def code(x, y, z, t, a): return a * 120.0
function code(x, y, z, t, a) return Float64(a * 120.0) end
function tmp = code(x, y, z, t, a) tmp = a * 120.0; end
code[x_, y_, z_, t_, a_] := N[(a * 120.0), $MachinePrecision]
\begin{array}{l}
\\
a \cdot 120
\end{array}
Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 76.5%
Taylor expanded in y around 0 50.5%
Final simplification50.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 2024059
(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)))