
(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 17 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.5%
associate-/l*99.9%
Simplified99.9%
Final simplification99.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= (* a 120.0) -1e-85) (not (<= (* a 120.0) 1e-81))) (+ (/ -60.0 (/ (- z t) y)) (* a 120.0)) (* (- x y) (/ 60.0 (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((a * 120.0) <= -1e-85) || !((a * 120.0) <= 1e-81)) {
tmp = (-60.0 / ((z - t) / y)) + (a * 120.0);
} else {
tmp = (x - 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 * 120.0d0) <= (-1d-85)) .or. (.not. ((a * 120.0d0) <= 1d-81))) then
tmp = ((-60.0d0) / ((z - t) / y)) + (a * 120.0d0)
else
tmp = (x - 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 * 120.0) <= -1e-85) || !((a * 120.0) <= 1e-81)) {
tmp = (-60.0 / ((z - t) / y)) + (a * 120.0);
} else {
tmp = (x - y) * (60.0 / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if ((a * 120.0) <= -1e-85) or not ((a * 120.0) <= 1e-81): tmp = (-60.0 / ((z - t) / y)) + (a * 120.0) else: tmp = (x - y) * (60.0 / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((Float64(a * 120.0) <= -1e-85) || !(Float64(a * 120.0) <= 1e-81)) tmp = Float64(Float64(-60.0 / Float64(Float64(z - t) / y)) + Float64(a * 120.0)); else tmp = Float64(Float64(x - y) * Float64(60.0 / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (((a * 120.0) <= -1e-85) || ~(((a * 120.0) <= 1e-81))) tmp = (-60.0 / ((z - t) / y)) + (a * 120.0); else tmp = (x - y) * (60.0 / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[N[(a * 120.0), $MachinePrecision], -1e-85], N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 1e-81]], $MachinePrecision]], N[(N[(-60.0 / N[(N[(z - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -1 \cdot 10^{-85} \lor \neg \left(a \cdot 120 \leq 10^{-81}\right):\\
\;\;\;\;\frac{-60}{\frac{z - t}{y}} + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{60}{z - t}\\
\end{array}
\end{array}
if (*.f64 a 120) < -9.9999999999999998e-86 or 9.9999999999999996e-82 < (*.f64 a 120) Initial program 99.4%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around 0 91.2%
associate-*r/91.2%
associate-/l*91.2%
Simplified91.2%
if -9.9999999999999998e-86 < (*.f64 a 120) < 9.9999999999999996e-82Initial program 99.7%
associate-/l*99.9%
Simplified99.9%
associate-/r/99.8%
Applied egg-rr99.8%
Taylor expanded in a around 0 84.1%
associate-*r/84.0%
associate-*l/84.1%
*-commutative84.1%
Simplified84.1%
Final simplification88.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (/ -60.0 (/ z y)) (* a 120.0))))
(if (<= z -1.6e+43)
t_1
(if (<= z -4.4e-48)
(* (- x y) (/ 60.0 (- z t)))
(if (<= z 1.38e-17) (+ (* 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 = (-60.0 / (z / y)) + (a * 120.0);
double tmp;
if (z <= -1.6e+43) {
tmp = t_1;
} else if (z <= -4.4e-48) {
tmp = (x - y) * (60.0 / (z - t));
} else if (z <= 1.38e-17) {
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 = ((-60.0d0) / (z / y)) + (a * 120.0d0)
if (z <= (-1.6d+43)) then
tmp = t_1
else if (z <= (-4.4d-48)) then
tmp = (x - y) * (60.0d0 / (z - t))
else if (z <= 1.38d-17) 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 = (-60.0 / (z / y)) + (a * 120.0);
double tmp;
if (z <= -1.6e+43) {
tmp = t_1;
} else if (z <= -4.4e-48) {
tmp = (x - y) * (60.0 / (z - t));
} else if (z <= 1.38e-17) {
tmp = (a * 120.0) + (-60.0 * ((x - y) / t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (-60.0 / (z / y)) + (a * 120.0) tmp = 0 if z <= -1.6e+43: tmp = t_1 elif z <= -4.4e-48: tmp = (x - y) * (60.0 / (z - t)) elif z <= 1.38e-17: 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(-60.0 / Float64(z / y)) + Float64(a * 120.0)) tmp = 0.0 if (z <= -1.6e+43) tmp = t_1; elseif (z <= -4.4e-48) tmp = Float64(Float64(x - y) * Float64(60.0 / Float64(z - t))); elseif (z <= 1.38e-17) 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 = (-60.0 / (z / y)) + (a * 120.0); tmp = 0.0; if (z <= -1.6e+43) tmp = t_1; elseif (z <= -4.4e-48) tmp = (x - y) * (60.0 / (z - t)); elseif (z <= 1.38e-17) 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[(-60.0 / N[(z / y), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.6e+43], t$95$1, If[LessEqual[z, -4.4e-48], N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.38e-17], 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 := \frac{-60}{\frac{z}{y}} + a \cdot 120\\
\mathbf{if}\;z \leq -1.6 \cdot 10^{+43}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -4.4 \cdot 10^{-48}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{60}{z - t}\\
\mathbf{elif}\;z \leq 1.38 \cdot 10^{-17}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{x - y}{t}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -1.60000000000000007e43 or 1.3800000000000001e-17 < z Initial program 99.2%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around 0 88.6%
associate-*r/88.6%
associate-/l*88.6%
Simplified88.6%
Taylor expanded in z around inf 84.7%
if -1.60000000000000007e43 < z < -4.40000000000000025e-48Initial program 99.7%
associate-/l*99.9%
Simplified99.9%
associate-/r/100.0%
Applied egg-rr100.0%
Taylor expanded in a around 0 86.5%
associate-*r/86.7%
associate-*l/87.0%
*-commutative87.0%
Simplified87.0%
if -4.40000000000000025e-48 < z < 1.3800000000000001e-17Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around 0 86.3%
Final simplification85.6%
(FPCore (x y z t a) :precision binary64 (if (<= (* a 120.0) -5e-66) (+ (* a 120.0) (* 60.0 (/ y t))) (if (<= (* a 120.0) 2e-25) (* 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) <= -5e-66) {
tmp = (a * 120.0) + (60.0 * (y / t));
} else if ((a * 120.0) <= 2e-25) {
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) <= (-5d-66)) then
tmp = (a * 120.0d0) + (60.0d0 * (y / t))
else if ((a * 120.0d0) <= 2d-25) 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) <= -5e-66) {
tmp = (a * 120.0) + (60.0 * (y / t));
} else if ((a * 120.0) <= 2e-25) {
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) <= -5e-66: tmp = (a * 120.0) + (60.0 * (y / t)) elif (a * 120.0) <= 2e-25: 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) <= -5e-66) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(y / t))); elseif (Float64(a * 120.0) <= 2e-25) 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) <= -5e-66) tmp = (a * 120.0) + (60.0 * (y / t)); elseif ((a * 120.0) <= 2e-25) 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], -5e-66], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 2e-25], 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 -5 \cdot 10^{-66}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t}\\
\mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{-25}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a 120) < -4.99999999999999962e-66Initial program 98.7%
associate-/l*99.8%
Simplified99.8%
frac-2neg99.8%
div-inv99.9%
metadata-eval99.9%
distribute-neg-frac99.9%
Applied egg-rr99.9%
Taylor expanded in z around 0 79.3%
Taylor expanded in x around 0 80.6%
*-commutative80.6%
Simplified80.6%
if -4.99999999999999962e-66 < (*.f64 a 120) < 2.00000000000000008e-25Initial program 99.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in a around 0 80.7%
if 2.00000000000000008e-25 < (*.f64 a 120) Initial program 99.9%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in z around inf 80.7%
Final simplification80.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -4.4e+107) (not (<= y 1.02e-32))) (+ (/ -60.0 (/ (- z t) y)) (* a 120.0)) (+ (/ 60.0 (/ (- z t) x)) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -4.4e+107) || !(y <= 1.02e-32)) {
tmp = (-60.0 / ((z - t) / y)) + (a * 120.0);
} else {
tmp = (60.0 / ((z - t) / x)) + (a * 120.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((y <= (-4.4d+107)) .or. (.not. (y <= 1.02d-32))) then
tmp = ((-60.0d0) / ((z - t) / y)) + (a * 120.0d0)
else
tmp = (60.0d0 / ((z - t) / x)) + (a * 120.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -4.4e+107) || !(y <= 1.02e-32)) {
tmp = (-60.0 / ((z - t) / y)) + (a * 120.0);
} else {
tmp = (60.0 / ((z - t) / x)) + (a * 120.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -4.4e+107) or not (y <= 1.02e-32): tmp = (-60.0 / ((z - t) / y)) + (a * 120.0) else: tmp = (60.0 / ((z - t) / x)) + (a * 120.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -4.4e+107) || !(y <= 1.02e-32)) tmp = Float64(Float64(-60.0 / Float64(Float64(z - t) / y)) + Float64(a * 120.0)); else tmp = Float64(Float64(60.0 / Float64(Float64(z - t) / x)) + Float64(a * 120.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -4.4e+107) || ~((y <= 1.02e-32))) tmp = (-60.0 / ((z - t) / y)) + (a * 120.0); else tmp = (60.0 / ((z - t) / x)) + (a * 120.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -4.4e+107], N[Not[LessEqual[y, 1.02e-32]], $MachinePrecision]], N[(N[(-60.0 / N[(N[(z - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(N[(60.0 / N[(N[(z - t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.4 \cdot 10^{+107} \lor \neg \left(y \leq 1.02 \cdot 10^{-32}\right):\\
\;\;\;\;\frac{-60}{\frac{z - t}{y}} + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{60}{\frac{z - t}{x}} + a \cdot 120\\
\end{array}
\end{array}
if y < -4.4e107 or 1.02000000000000002e-32 < y Initial program 98.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 92.3%
associate-*r/92.3%
associate-/l*92.3%
Simplified92.3%
if -4.4e107 < y < 1.02000000000000002e-32Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 94.7%
Final simplification93.7%
(FPCore (x y z t a)
:precision binary64
(if (<= y -9.6e+108)
(+ (/ (* y -60.0) (- z t)) (* a 120.0))
(if (<= y 1.9e-32)
(+ (/ 60.0 (/ (- z t) x)) (* a 120.0))
(+ (/ -60.0 (/ (- z t) y)) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -9.6e+108) {
tmp = ((y * -60.0) / (z - t)) + (a * 120.0);
} else if (y <= 1.9e-32) {
tmp = (60.0 / ((z - t) / x)) + (a * 120.0);
} else {
tmp = (-60.0 / ((z - t) / y)) + (a * 120.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (y <= (-9.6d+108)) then
tmp = ((y * (-60.0d0)) / (z - t)) + (a * 120.0d0)
else if (y <= 1.9d-32) then
tmp = (60.0d0 / ((z - t) / x)) + (a * 120.0d0)
else
tmp = ((-60.0d0) / ((z - t) / y)) + (a * 120.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -9.6e+108) {
tmp = ((y * -60.0) / (z - t)) + (a * 120.0);
} else if (y <= 1.9e-32) {
tmp = (60.0 / ((z - t) / x)) + (a * 120.0);
} else {
tmp = (-60.0 / ((z - t) / y)) + (a * 120.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -9.6e+108: tmp = ((y * -60.0) / (z - t)) + (a * 120.0) elif y <= 1.9e-32: tmp = (60.0 / ((z - t) / x)) + (a * 120.0) else: tmp = (-60.0 / ((z - t) / y)) + (a * 120.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -9.6e+108) tmp = Float64(Float64(Float64(y * -60.0) / Float64(z - t)) + Float64(a * 120.0)); elseif (y <= 1.9e-32) tmp = Float64(Float64(60.0 / Float64(Float64(z - t) / x)) + Float64(a * 120.0)); else tmp = Float64(Float64(-60.0 / Float64(Float64(z - t) / y)) + Float64(a * 120.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -9.6e+108) tmp = ((y * -60.0) / (z - t)) + (a * 120.0); elseif (y <= 1.9e-32) tmp = (60.0 / ((z - t) / x)) + (a * 120.0); else tmp = (-60.0 / ((z - t) / y)) + (a * 120.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -9.6e+108], N[(N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.9e-32], N[(N[(60.0 / N[(N[(z - t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(N[(-60.0 / N[(N[(z - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.6 \cdot 10^{+108}:\\
\;\;\;\;\frac{y \cdot -60}{z - t} + a \cdot 120\\
\mathbf{elif}\;y \leq 1.9 \cdot 10^{-32}:\\
\;\;\;\;\frac{60}{\frac{z - t}{x}} + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{-60}{\frac{z - t}{y}} + a \cdot 120\\
\end{array}
\end{array}
if y < -9.60000000000000074e108Initial program 97.7%
Taylor expanded in x around 0 97.5%
if -9.60000000000000074e108 < y < 1.90000000000000004e-32Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 94.7%
if 1.90000000000000004e-32 < y Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 89.0%
associate-*r/89.0%
associate-/l*89.0%
Simplified89.0%
Final simplification93.8%
(FPCore (x y z t a)
:precision binary64
(if (<= a -4.5e-73)
(* a 120.0)
(if (<= a -6.8e-149)
(/ -60.0 (/ t x))
(if (<= a 5e-33) (* -60.0 (/ y (- z t))) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -4.5e-73) {
tmp = a * 120.0;
} else if (a <= -6.8e-149) {
tmp = -60.0 / (t / x);
} else if (a <= 5e-33) {
tmp = -60.0 * (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 <= (-4.5d-73)) then
tmp = a * 120.0d0
else if (a <= (-6.8d-149)) then
tmp = (-60.0d0) / (t / x)
else if (a <= 5d-33) then
tmp = (-60.0d0) * (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 <= -4.5e-73) {
tmp = a * 120.0;
} else if (a <= -6.8e-149) {
tmp = -60.0 / (t / x);
} else if (a <= 5e-33) {
tmp = -60.0 * (y / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -4.5e-73: tmp = a * 120.0 elif a <= -6.8e-149: tmp = -60.0 / (t / x) elif a <= 5e-33: tmp = -60.0 * (y / (z - t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -4.5e-73) tmp = Float64(a * 120.0); elseif (a <= -6.8e-149) tmp = Float64(-60.0 / Float64(t / x)); elseif (a <= 5e-33) tmp = Float64(-60.0 * Float64(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 <= -4.5e-73) tmp = a * 120.0; elseif (a <= -6.8e-149) tmp = -60.0 / (t / x); elseif (a <= 5e-33) tmp = -60.0 * (y / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -4.5e-73], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -6.8e-149], N[(-60.0 / N[(t / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 5e-33], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.5 \cdot 10^{-73}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -6.8 \cdot 10^{-149}:\\
\;\;\;\;\frac{-60}{\frac{t}{x}}\\
\mathbf{elif}\;a \leq 5 \cdot 10^{-33}:\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -4.5e-73 or 5.00000000000000028e-33 < a Initial program 99.3%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 79.2%
if -4.5e-73 < a < -6.7999999999999998e-149Initial program 99.9%
associate-/l*100.0%
Simplified100.0%
associate-/r/99.6%
Applied egg-rr99.6%
Taylor expanded in x around inf 77.2%
associate-*r/77.3%
associate-*l/77.1%
*-commutative77.1%
Simplified77.1%
Taylor expanded in z around 0 56.9%
clear-num57.0%
un-div-inv57.1%
Applied egg-rr57.1%
if -6.7999999999999998e-149 < a < 5.00000000000000028e-33Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 50.8%
Final simplification68.4%
(FPCore (x y z t a)
:precision binary64
(if (<= a -4.7e-89)
(* a 120.0)
(if (<= a -8e-255)
(* -60.0 (/ (- x y) t))
(if (<= a 1.1e-34) (* -60.0 (/ y (- z t))) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -4.7e-89) {
tmp = a * 120.0;
} else if (a <= -8e-255) {
tmp = -60.0 * ((x - y) / t);
} else if (a <= 1.1e-34) {
tmp = -60.0 * (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 <= (-4.7d-89)) then
tmp = a * 120.0d0
else if (a <= (-8d-255)) then
tmp = (-60.0d0) * ((x - y) / t)
else if (a <= 1.1d-34) then
tmp = (-60.0d0) * (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 <= -4.7e-89) {
tmp = a * 120.0;
} else if (a <= -8e-255) {
tmp = -60.0 * ((x - y) / t);
} else if (a <= 1.1e-34) {
tmp = -60.0 * (y / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -4.7e-89: tmp = a * 120.0 elif a <= -8e-255: tmp = -60.0 * ((x - y) / t) elif a <= 1.1e-34: tmp = -60.0 * (y / (z - t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -4.7e-89) tmp = Float64(a * 120.0); elseif (a <= -8e-255) tmp = Float64(-60.0 * Float64(Float64(x - y) / t)); elseif (a <= 1.1e-34) tmp = Float64(-60.0 * Float64(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 <= -4.7e-89) tmp = a * 120.0; elseif (a <= -8e-255) tmp = -60.0 * ((x - y) / t); elseif (a <= 1.1e-34) tmp = -60.0 * (y / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -4.7e-89], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -8e-255], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.1e-34], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.7 \cdot 10^{-89}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -8 \cdot 10^{-255}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\
\mathbf{elif}\;a \leq 1.1 \cdot 10^{-34}:\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -4.69999999999999995e-89 or 1.0999999999999999e-34 < a Initial program 99.3%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 78.9%
if -4.69999999999999995e-89 < a < -8.0000000000000001e-255Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around 0 56.6%
Taylor expanded in a around 0 56.6%
if -8.0000000000000001e-255 < a < 1.0999999999999999e-34Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
associate-/r/99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 51.3%
Final simplification68.9%
(FPCore (x y z t a)
:precision binary64
(if (<= a -2.2e-68)
(* a 120.0)
(if (<= a -3.2e-240)
(* 60.0 (/ x (- z t)))
(if (<= a 1.65e-34) (* -60.0 (/ y (- z t))) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.2e-68) {
tmp = a * 120.0;
} else if (a <= -3.2e-240) {
tmp = 60.0 * (x / (z - t));
} else if (a <= 1.65e-34) {
tmp = -60.0 * (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 <= (-2.2d-68)) then
tmp = a * 120.0d0
else if (a <= (-3.2d-240)) then
tmp = 60.0d0 * (x / (z - t))
else if (a <= 1.65d-34) then
tmp = (-60.0d0) * (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 <= -2.2e-68) {
tmp = a * 120.0;
} else if (a <= -3.2e-240) {
tmp = 60.0 * (x / (z - t));
} else if (a <= 1.65e-34) {
tmp = -60.0 * (y / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -2.2e-68: tmp = a * 120.0 elif a <= -3.2e-240: tmp = 60.0 * (x / (z - t)) elif a <= 1.65e-34: tmp = -60.0 * (y / (z - t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2.2e-68) tmp = Float64(a * 120.0); elseif (a <= -3.2e-240) tmp = Float64(60.0 * Float64(x / Float64(z - t))); elseif (a <= 1.65e-34) tmp = Float64(-60.0 * Float64(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 <= -2.2e-68) tmp = a * 120.0; elseif (a <= -3.2e-240) tmp = 60.0 * (x / (z - t)); elseif (a <= 1.65e-34) tmp = -60.0 * (y / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.2e-68], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -3.2e-240], N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.65e-34], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.2 \cdot 10^{-68}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -3.2 \cdot 10^{-240}:\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\
\mathbf{elif}\;a \leq 1.65 \cdot 10^{-34}:\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -2.20000000000000002e-68 or 1.64999999999999991e-34 < a Initial program 99.3%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 79.2%
if -2.20000000000000002e-68 < a < -3.1999999999999999e-240Initial program 99.8%
associate-/l*99.9%
Simplified99.9%
associate-/r/99.6%
Applied egg-rr99.6%
Taylor expanded in x around inf 62.0%
if -3.1999999999999999e-240 < a < 1.64999999999999991e-34Initial program 99.7%
associate-/l*99.9%
Simplified99.9%
associate-/r/99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 51.9%
Final simplification69.5%
(FPCore (x y z t a)
:precision binary64
(if (<= a -4.4e-71)
(* a 120.0)
(if (<= a -1.8e-145)
(* 60.0 (/ x (- z t)))
(if (<= a 1e-34) (/ (* y -60.0) (- z t)) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -4.4e-71) {
tmp = a * 120.0;
} else if (a <= -1.8e-145) {
tmp = 60.0 * (x / (z - t));
} else if (a <= 1e-34) {
tmp = (y * -60.0) / (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 <= (-4.4d-71)) then
tmp = a * 120.0d0
else if (a <= (-1.8d-145)) then
tmp = 60.0d0 * (x / (z - t))
else if (a <= 1d-34) then
tmp = (y * (-60.0d0)) / (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 <= -4.4e-71) {
tmp = a * 120.0;
} else if (a <= -1.8e-145) {
tmp = 60.0 * (x / (z - t));
} else if (a <= 1e-34) {
tmp = (y * -60.0) / (z - t);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -4.4e-71: tmp = a * 120.0 elif a <= -1.8e-145: tmp = 60.0 * (x / (z - t)) elif a <= 1e-34: tmp = (y * -60.0) / (z - t) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -4.4e-71) tmp = Float64(a * 120.0); elseif (a <= -1.8e-145) tmp = Float64(60.0 * Float64(x / Float64(z - t))); elseif (a <= 1e-34) tmp = Float64(Float64(y * -60.0) / 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 <= -4.4e-71) tmp = a * 120.0; elseif (a <= -1.8e-145) tmp = 60.0 * (x / (z - t)); elseif (a <= 1e-34) tmp = (y * -60.0) / (z - t); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -4.4e-71], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -1.8e-145], N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1e-34], N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.4 \cdot 10^{-71}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -1.8 \cdot 10^{-145}:\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\
\mathbf{elif}\;a \leq 10^{-34}:\\
\;\;\;\;\frac{y \cdot -60}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -4.39999999999999995e-71 or 9.99999999999999928e-35 < a Initial program 99.3%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 79.2%
if -4.39999999999999995e-71 < a < -1.8e-145Initial program 99.9%
associate-/l*100.0%
Simplified100.0%
associate-/r/99.6%
Applied egg-rr99.6%
Taylor expanded in x around inf 77.2%
if -1.8e-145 < a < 9.99999999999999928e-35Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 50.8%
associate-*r/50.8%
Simplified50.8%
Final simplification69.5%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.5e-87) (* a 120.0) (if (<= a 6.4e-26) (* 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 <= -1.5e-87) {
tmp = a * 120.0;
} else if (a <= 6.4e-26) {
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 <= (-1.5d-87)) then
tmp = a * 120.0d0
else if (a <= 6.4d-26) 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 <= -1.5e-87) {
tmp = a * 120.0;
} else if (a <= 6.4e-26) {
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 <= -1.5e-87: tmp = a * 120.0 elif a <= 6.4e-26: 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 (a <= -1.5e-87) tmp = Float64(a * 120.0); elseif (a <= 6.4e-26) 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 <= -1.5e-87) tmp = a * 120.0; elseif (a <= 6.4e-26) 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[a, -1.5e-87], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 6.4e-26], 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 \leq -1.5 \cdot 10^{-87}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq 6.4 \cdot 10^{-26}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -1.50000000000000008e-87 or 6.4000000000000002e-26 < a Initial program 99.3%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 79.2%
if -1.50000000000000008e-87 < a < 6.4000000000000002e-26Initial program 99.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in a around 0 81.3%
Final simplification80.0%
(FPCore (x y z t a) :precision binary64 (if (<= a -5.2e-69) (+ (* a 120.0) (/ (* 60.0 y) t)) (if (<= a 1.86e-22) (* 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 <= -5.2e-69) {
tmp = (a * 120.0) + ((60.0 * y) / t);
} else if (a <= 1.86e-22) {
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 <= (-5.2d-69)) then
tmp = (a * 120.0d0) + ((60.0d0 * y) / t)
else if (a <= 1.86d-22) 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 <= -5.2e-69) {
tmp = (a * 120.0) + ((60.0 * y) / t);
} else if (a <= 1.86e-22) {
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 <= -5.2e-69: tmp = (a * 120.0) + ((60.0 * y) / t) elif a <= 1.86e-22: 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 (a <= -5.2e-69) tmp = Float64(Float64(a * 120.0) + Float64(Float64(60.0 * y) / t)); elseif (a <= 1.86e-22) 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 <= -5.2e-69) tmp = (a * 120.0) + ((60.0 * y) / t); elseif (a <= 1.86e-22) 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[a, -5.2e-69], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(60.0 * y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.86e-22], 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 \leq -5.2 \cdot 10^{-69}:\\
\;\;\;\;a \cdot 120 + \frac{60 \cdot y}{t}\\
\mathbf{elif}\;a \leq 1.86 \cdot 10^{-22}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -5.2000000000000004e-69Initial program 98.7%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around 0 79.3%
Taylor expanded in x around 0 80.6%
*-commutative80.6%
associate-*l/80.6%
Simplified80.6%
if -5.2000000000000004e-69 < a < 1.85999999999999994e-22Initial program 99.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in a around 0 80.7%
if 1.85999999999999994e-22 < a Initial program 99.9%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in z around inf 80.7%
Final simplification80.7%
(FPCore (x y z t a) :precision binary64 (+ (* (- x y) (/ 60.0 (- z t))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return ((x - y) * (60.0 / (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 = ((x - y) * (60.0d0 / (z - t))) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return ((x - y) * (60.0 / (z - t))) + (a * 120.0);
}
def code(x, y, z, t, a): return ((x - y) * (60.0 / (z - t))) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(Float64(x - y) * Float64(60.0 / Float64(z - t))) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = ((x - y) * (60.0 / (z - t))) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x - y\right) \cdot \frac{60}{z - t} + a \cdot 120
\end{array}
Initial program 99.5%
associate-/l*99.9%
Simplified99.9%
associate-/r/99.8%
Applied egg-rr99.8%
Final simplification99.8%
(FPCore (x y z t a)
:precision binary64
(if (<= a -2e-72)
(* a 120.0)
(if (<= a -6.2e-256)
(* -60.0 (/ x t))
(if (<= a 1.05e-119) (* -60.0 (/ y z)) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2e-72) {
tmp = a * 120.0;
} else if (a <= -6.2e-256) {
tmp = -60.0 * (x / t);
} else if (a <= 1.05e-119) {
tmp = -60.0 * (y / z);
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-2d-72)) then
tmp = a * 120.0d0
else if (a <= (-6.2d-256)) then
tmp = (-60.0d0) * (x / t)
else if (a <= 1.05d-119) then
tmp = (-60.0d0) * (y / z)
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2e-72) {
tmp = a * 120.0;
} else if (a <= -6.2e-256) {
tmp = -60.0 * (x / t);
} else if (a <= 1.05e-119) {
tmp = -60.0 * (y / z);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -2e-72: tmp = a * 120.0 elif a <= -6.2e-256: tmp = -60.0 * (x / t) elif a <= 1.05e-119: tmp = -60.0 * (y / z) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2e-72) tmp = Float64(a * 120.0); elseif (a <= -6.2e-256) tmp = Float64(-60.0 * Float64(x / t)); elseif (a <= 1.05e-119) tmp = Float64(-60.0 * Float64(y / z)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -2e-72) tmp = a * 120.0; elseif (a <= -6.2e-256) tmp = -60.0 * (x / t); elseif (a <= 1.05e-119) tmp = -60.0 * (y / z); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2e-72], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -6.2e-256], N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.05e-119], N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2 \cdot 10^{-72}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -6.2 \cdot 10^{-256}:\\
\;\;\;\;-60 \cdot \frac{x}{t}\\
\mathbf{elif}\;a \leq 1.05 \cdot 10^{-119}:\\
\;\;\;\;-60 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -1.9999999999999999e-72 or 1.05e-119 < a Initial program 99.4%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 73.8%
if -1.9999999999999999e-72 < a < -6.19999999999999971e-256Initial program 99.8%
associate-/l*99.9%
Simplified99.9%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in x around inf 58.3%
associate-*r/58.3%
associate-*l/58.1%
*-commutative58.1%
Simplified58.1%
Taylor expanded in z around 0 34.9%
if -6.19999999999999971e-256 < a < 1.05e-119Initial program 99.6%
associate-/l*99.8%
Simplified99.8%
associate-/r/99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 55.8%
Taylor expanded in z around inf 37.2%
Final simplification62.1%
(FPCore (x y z t a)
:precision binary64
(if (<= a -4.5e-73)
(* a 120.0)
(if (<= a -4.55e-256)
(/ -60.0 (/ t x))
(if (<= a 3.1e-119) (* -60.0 (/ y z)) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -4.5e-73) {
tmp = a * 120.0;
} else if (a <= -4.55e-256) {
tmp = -60.0 / (t / x);
} else if (a <= 3.1e-119) {
tmp = -60.0 * (y / z);
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-4.5d-73)) then
tmp = a * 120.0d0
else if (a <= (-4.55d-256)) then
tmp = (-60.0d0) / (t / x)
else if (a <= 3.1d-119) then
tmp = (-60.0d0) * (y / z)
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -4.5e-73) {
tmp = a * 120.0;
} else if (a <= -4.55e-256) {
tmp = -60.0 / (t / x);
} else if (a <= 3.1e-119) {
tmp = -60.0 * (y / z);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -4.5e-73: tmp = a * 120.0 elif a <= -4.55e-256: tmp = -60.0 / (t / x) elif a <= 3.1e-119: tmp = -60.0 * (y / z) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -4.5e-73) tmp = Float64(a * 120.0); elseif (a <= -4.55e-256) tmp = Float64(-60.0 / Float64(t / x)); elseif (a <= 3.1e-119) tmp = Float64(-60.0 * Float64(y / z)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -4.5e-73) tmp = a * 120.0; elseif (a <= -4.55e-256) tmp = -60.0 / (t / x); elseif (a <= 3.1e-119) tmp = -60.0 * (y / z); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -4.5e-73], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -4.55e-256], N[(-60.0 / N[(t / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.1e-119], N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.5 \cdot 10^{-73}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -4.55 \cdot 10^{-256}:\\
\;\;\;\;\frac{-60}{\frac{t}{x}}\\
\mathbf{elif}\;a \leq 3.1 \cdot 10^{-119}:\\
\;\;\;\;-60 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -4.5e-73 or 3.09999999999999978e-119 < a Initial program 99.4%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 73.8%
if -4.5e-73 < a < -4.55e-256Initial program 99.8%
associate-/l*99.9%
Simplified99.9%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in x around inf 58.3%
associate-*r/58.3%
associate-*l/58.1%
*-commutative58.1%
Simplified58.1%
Taylor expanded in z around 0 34.9%
clear-num35.0%
un-div-inv35.0%
Applied egg-rr35.0%
if -4.55e-256 < a < 3.09999999999999978e-119Initial program 99.6%
associate-/l*99.8%
Simplified99.8%
associate-/r/99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 55.8%
Taylor expanded in z around inf 37.2%
Final simplification62.1%
(FPCore (x y z t a) :precision binary64 (if (<= y 2.5e+215) (* a 120.0) (* -60.0 (/ (- y) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= 2.5e+215) {
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 (y <= 2.5d+215) 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 (y <= 2.5e+215) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (-y / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= 2.5e+215: tmp = a * 120.0 else: tmp = -60.0 * (-y / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= 2.5e+215) tmp = Float64(a * 120.0); else tmp = Float64(-60.0 * Float64(Float64(-y) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= 2.5e+215) tmp = a * 120.0; else tmp = -60.0 * (-y / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, 2.5e+215], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[((-y) / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.5 \cdot 10^{+215}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{-y}{t}\\
\end{array}
\end{array}
if y < 2.5000000000000001e215Initial program 99.4%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 60.4%
if 2.5000000000000001e215 < y Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 78.3%
Taylor expanded in z around 0 56.3%
associate-*r/56.3%
neg-mul-156.3%
Simplified56.3%
Final simplification60.1%
(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.5%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 56.6%
Final simplification56.6%
(FPCore (x y z t a) :precision binary64 (+ (/ 60.0 (/ (- z t) (- x y))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (60.0d0 / ((z - t) / (x - y))) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
def code(x, y, z, t, a): return (60.0 / ((z - t) / (x - y))) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = (60.0 / ((z - t) / (x - y))) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60}{\frac{z - t}{x - y}} + a \cdot 120
\end{array}
herbie shell --seed 2023217
(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)))