
(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 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((60.0d0 * (x - y)) / (z - t)) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
def code(x, y, z, t, a): return ((60.0 * (x - y)) / (z - t)) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = ((60.0 * (x - y)) / (z - t)) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120
\end{array}
(FPCore (x y z t a) :precision binary64 (+ (* 60.0 (/ (- x y) (- z t))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return (60.0 * ((x - y) / (z - t))) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (60.0d0 * ((x - y) / (z - t))) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return (60.0 * ((x - y) / (z - t))) + (a * 120.0);
}
def code(x, y, z, t, a): return (60.0 * ((x - y) / (z - t))) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = (60.0 * ((x - y) / (z - t))) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
60 \cdot \frac{x - y}{z - t} + a \cdot 120
\end{array}
Initial program 99.0%
associate-/l*99.7%
Simplified99.7%
Final simplification99.7%
(FPCore (x y z t a)
:precision binary64
(if (or (<= (* a 120.0) -2000000.0)
(and (not (<= (* a 120.0) -1e-7))
(or (<= (* a 120.0) -2e-25) (not (<= (* a 120.0) 1e+49)))))
(* a 120.0)
(* 60.0 (/ (- x y) (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((a * 120.0) <= -2000000.0) || (!((a * 120.0) <= -1e-7) && (((a * 120.0) <= -2e-25) || !((a * 120.0) <= 1e+49)))) {
tmp = a * 120.0;
} else {
tmp = 60.0 * ((x - y) / (z - t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (((a * 120.0d0) <= (-2000000.0d0)) .or. (.not. ((a * 120.0d0) <= (-1d-7))) .and. ((a * 120.0d0) <= (-2d-25)) .or. (.not. ((a * 120.0d0) <= 1d+49))) then
tmp = a * 120.0d0
else
tmp = 60.0d0 * ((x - y) / (z - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (((a * 120.0) <= -2000000.0) || (!((a * 120.0) <= -1e-7) && (((a * 120.0) <= -2e-25) || !((a * 120.0) <= 1e+49)))) {
tmp = a * 120.0;
} else {
tmp = 60.0 * ((x - y) / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if ((a * 120.0) <= -2000000.0) or (not ((a * 120.0) <= -1e-7) and (((a * 120.0) <= -2e-25) or not ((a * 120.0) <= 1e+49))): tmp = a * 120.0 else: tmp = 60.0 * ((x - y) / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((Float64(a * 120.0) <= -2000000.0) || (!(Float64(a * 120.0) <= -1e-7) && ((Float64(a * 120.0) <= -2e-25) || !(Float64(a * 120.0) <= 1e+49)))) tmp = Float64(a * 120.0); else tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (((a * 120.0) <= -2000000.0) || (~(((a * 120.0) <= -1e-7)) && (((a * 120.0) <= -2e-25) || ~(((a * 120.0) <= 1e+49))))) tmp = a * 120.0; else tmp = 60.0 * ((x - y) / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[N[(a * 120.0), $MachinePrecision], -2000000.0], And[N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], -1e-7]], $MachinePrecision], Or[LessEqual[N[(a * 120.0), $MachinePrecision], -2e-25], N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 1e+49]], $MachinePrecision]]]], N[(a * 120.0), $MachinePrecision], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -2000000 \lor \neg \left(a \cdot 120 \leq -1 \cdot 10^{-7}\right) \land \left(a \cdot 120 \leq -2 \cdot 10^{-25} \lor \neg \left(a \cdot 120 \leq 10^{+49}\right)\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\end{array}
\end{array}
if (*.f64 a 120) < -2e6 or -9.9999999999999995e-8 < (*.f64 a 120) < -2.00000000000000008e-25 or 9.99999999999999946e48 < (*.f64 a 120) Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 81.7%
if -2e6 < (*.f64 a 120) < -9.9999999999999995e-8 or -2.00000000000000008e-25 < (*.f64 a 120) < 9.99999999999999946e48Initial program 98.2%
associate-/l*99.6%
Simplified99.6%
clear-num99.5%
un-div-inv99.6%
Applied egg-rr99.6%
Taylor expanded in a around 0 82.4%
Final simplification82.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* -60.0 (/ y (- z t)))))
(if (<= a -1.65e-28)
(* a 120.0)
(if (<= a -7.1e-228)
t_1
(if (<= a -2.8e-280)
(* x (/ 60.0 (- z t)))
(if (<= a 3.8e-306)
t_1
(if (<= a 150000.0) (* -60.0 (/ (- x y) t)) (* a 120.0))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -60.0 * (y / (z - t));
double tmp;
if (a <= -1.65e-28) {
tmp = a * 120.0;
} else if (a <= -7.1e-228) {
tmp = t_1;
} else if (a <= -2.8e-280) {
tmp = x * (60.0 / (z - t));
} else if (a <= 3.8e-306) {
tmp = t_1;
} else if (a <= 150000.0) {
tmp = -60.0 * ((x - y) / 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) :: t_1
real(8) :: tmp
t_1 = (-60.0d0) * (y / (z - t))
if (a <= (-1.65d-28)) then
tmp = a * 120.0d0
else if (a <= (-7.1d-228)) then
tmp = t_1
else if (a <= (-2.8d-280)) then
tmp = x * (60.0d0 / (z - t))
else if (a <= 3.8d-306) then
tmp = t_1
else if (a <= 150000.0d0) then
tmp = (-60.0d0) * ((x - y) / 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 t_1 = -60.0 * (y / (z - t));
double tmp;
if (a <= -1.65e-28) {
tmp = a * 120.0;
} else if (a <= -7.1e-228) {
tmp = t_1;
} else if (a <= -2.8e-280) {
tmp = x * (60.0 / (z - t));
} else if (a <= 3.8e-306) {
tmp = t_1;
} else if (a <= 150000.0) {
tmp = -60.0 * ((x - y) / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -60.0 * (y / (z - t)) tmp = 0 if a <= -1.65e-28: tmp = a * 120.0 elif a <= -7.1e-228: tmp = t_1 elif a <= -2.8e-280: tmp = x * (60.0 / (z - t)) elif a <= 3.8e-306: tmp = t_1 elif a <= 150000.0: tmp = -60.0 * ((x - y) / t) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) t_1 = Float64(-60.0 * Float64(y / Float64(z - t))) tmp = 0.0 if (a <= -1.65e-28) tmp = Float64(a * 120.0); elseif (a <= -7.1e-228) tmp = t_1; elseif (a <= -2.8e-280) tmp = Float64(x * Float64(60.0 / Float64(z - t))); elseif (a <= 3.8e-306) tmp = t_1; elseif (a <= 150000.0) tmp = Float64(-60.0 * Float64(Float64(x - y) / t)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = -60.0 * (y / (z - t)); tmp = 0.0; if (a <= -1.65e-28) tmp = a * 120.0; elseif (a <= -7.1e-228) tmp = t_1; elseif (a <= -2.8e-280) tmp = x * (60.0 / (z - t)); elseif (a <= 3.8e-306) tmp = t_1; elseif (a <= 150000.0) tmp = -60.0 * ((x - y) / t); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.65e-28], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -7.1e-228], t$95$1, If[LessEqual[a, -2.8e-280], N[(x * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.8e-306], t$95$1, If[LessEqual[a, 150000.0], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -60 \cdot \frac{y}{z - t}\\
\mathbf{if}\;a \leq -1.65 \cdot 10^{-28}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -7.1 \cdot 10^{-228}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -2.8 \cdot 10^{-280}:\\
\;\;\;\;x \cdot \frac{60}{z - t}\\
\mathbf{elif}\;a \leq 3.8 \cdot 10^{-306}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 150000:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -1.6500000000000001e-28 or 1.5e5 < a Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 76.4%
if -1.6500000000000001e-28 < a < -7.1000000000000005e-228 or -2.80000000000000017e-280 < a < 3.8e-306Initial program 97.9%
associate-/l*99.6%
Simplified99.6%
clear-num99.5%
un-div-inv99.5%
Applied egg-rr99.5%
Taylor expanded in a around 0 80.3%
Taylor expanded in x around 0 50.8%
if -7.1000000000000005e-228 < a < -2.80000000000000017e-280Initial program 99.4%
associate-/l*99.8%
Simplified99.8%
clear-num99.8%
un-div-inv99.6%
Applied egg-rr99.6%
Taylor expanded in a around 0 90.3%
Taylor expanded in x around inf 78.4%
associate-*r/78.4%
*-commutative78.4%
associate-/l*78.2%
Simplified78.2%
if 3.8e-306 < a < 1.5e5Initial program 98.1%
associate-/l*99.6%
Simplified99.6%
clear-num99.5%
un-div-inv99.6%
Applied egg-rr99.6%
Taylor expanded in a around 0 83.5%
Taylor expanded in z around 0 52.2%
Final simplification64.7%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -4e+111)
(* a 120.0)
(if (<= (* a 120.0) -4e-41)
(+ (* a 120.0) (* y (/ 60.0 t)))
(if (<= (* a 120.0) 1e+49) (* 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) <= -4e+111) {
tmp = a * 120.0;
} else if ((a * 120.0) <= -4e-41) {
tmp = (a * 120.0) + (y * (60.0 / t));
} else if ((a * 120.0) <= 1e+49) {
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) <= (-4d+111)) then
tmp = a * 120.0d0
else if ((a * 120.0d0) <= (-4d-41)) then
tmp = (a * 120.0d0) + (y * (60.0d0 / t))
else if ((a * 120.0d0) <= 1d+49) 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) <= -4e+111) {
tmp = a * 120.0;
} else if ((a * 120.0) <= -4e-41) {
tmp = (a * 120.0) + (y * (60.0 / t));
} else if ((a * 120.0) <= 1e+49) {
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) <= -4e+111: tmp = a * 120.0 elif (a * 120.0) <= -4e-41: tmp = (a * 120.0) + (y * (60.0 / t)) elif (a * 120.0) <= 1e+49: 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) <= -4e+111) tmp = Float64(a * 120.0); elseif (Float64(a * 120.0) <= -4e-41) tmp = Float64(Float64(a * 120.0) + Float64(y * Float64(60.0 / t))); elseif (Float64(a * 120.0) <= 1e+49) 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) <= -4e+111) tmp = a * 120.0; elseif ((a * 120.0) <= -4e-41) tmp = (a * 120.0) + (y * (60.0 / t)); elseif ((a * 120.0) <= 1e+49) 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], -4e+111], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], -4e-41], N[(N[(a * 120.0), $MachinePrecision] + N[(y * N[(60.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 1e+49], 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 -4 \cdot 10^{+111}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq -4 \cdot 10^{-41}:\\
\;\;\;\;a \cdot 120 + y \cdot \frac{60}{t}\\
\mathbf{elif}\;a \cdot 120 \leq 10^{+49}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a 120) < -3.99999999999999983e111 or 9.99999999999999946e48 < (*.f64 a 120) Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 83.5%
if -3.99999999999999983e111 < (*.f64 a 120) < -4.00000000000000002e-41Initial program 99.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around 0 87.8%
*-commutative87.8%
associate-*l/87.7%
associate-/l*87.7%
Simplified87.7%
Taylor expanded in z around 0 78.9%
if -4.00000000000000002e-41 < (*.f64 a 120) < 9.99999999999999946e48Initial program 98.1%
associate-/l*99.6%
Simplified99.6%
clear-num99.5%
un-div-inv99.6%
Applied egg-rr99.6%
Taylor expanded in a around 0 82.4%
Final simplification82.1%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -4e+111)
(* a 120.0)
(if (<= (* a 120.0) -4e-41)
(+ (* a 120.0) (/ y (* t 0.016666666666666666)))
(if (<= (* a 120.0) 1e+49) (* 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) <= -4e+111) {
tmp = a * 120.0;
} else if ((a * 120.0) <= -4e-41) {
tmp = (a * 120.0) + (y / (t * 0.016666666666666666));
} else if ((a * 120.0) <= 1e+49) {
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) <= (-4d+111)) then
tmp = a * 120.0d0
else if ((a * 120.0d0) <= (-4d-41)) then
tmp = (a * 120.0d0) + (y / (t * 0.016666666666666666d0))
else if ((a * 120.0d0) <= 1d+49) 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) <= -4e+111) {
tmp = a * 120.0;
} else if ((a * 120.0) <= -4e-41) {
tmp = (a * 120.0) + (y / (t * 0.016666666666666666));
} else if ((a * 120.0) <= 1e+49) {
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) <= -4e+111: tmp = a * 120.0 elif (a * 120.0) <= -4e-41: tmp = (a * 120.0) + (y / (t * 0.016666666666666666)) elif (a * 120.0) <= 1e+49: 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) <= -4e+111) tmp = Float64(a * 120.0); elseif (Float64(a * 120.0) <= -4e-41) tmp = Float64(Float64(a * 120.0) + Float64(y / Float64(t * 0.016666666666666666))); elseif (Float64(a * 120.0) <= 1e+49) 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) <= -4e+111) tmp = a * 120.0; elseif ((a * 120.0) <= -4e-41) tmp = (a * 120.0) + (y / (t * 0.016666666666666666)); elseif ((a * 120.0) <= 1e+49) 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], -4e+111], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], -4e-41], N[(N[(a * 120.0), $MachinePrecision] + N[(y / N[(t * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 1e+49], 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 -4 \cdot 10^{+111}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq -4 \cdot 10^{-41}:\\
\;\;\;\;a \cdot 120 + \frac{y}{t \cdot 0.016666666666666666}\\
\mathbf{elif}\;a \cdot 120 \leq 10^{+49}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a 120) < -3.99999999999999983e111 or 9.99999999999999946e48 < (*.f64 a 120) Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 83.5%
if -3.99999999999999983e111 < (*.f64 a 120) < -4.00000000000000002e-41Initial program 99.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around 0 87.8%
*-commutative87.8%
associate-*l/87.7%
associate-/l*87.7%
Simplified87.7%
clear-num87.7%
un-div-inv87.7%
div-inv87.7%
metadata-eval87.7%
Applied egg-rr87.7%
Taylor expanded in z around 0 78.9%
*-commutative78.9%
Simplified78.9%
if -4.00000000000000002e-41 < (*.f64 a 120) < 9.99999999999999946e48Initial program 98.1%
associate-/l*99.6%
Simplified99.6%
clear-num99.5%
un-div-inv99.6%
Applied egg-rr99.6%
Taylor expanded in a around 0 82.4%
Final simplification82.1%
(FPCore (x y z t a)
:precision binary64
(if (<= a -1.65e-28)
(* a 120.0)
(if (<= a -6.2e-228)
(* -60.0 (/ y (- z t)))
(if (<= a 106000.0) (* -60.0 (/ (- x y) t)) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.65e-28) {
tmp = a * 120.0;
} else if (a <= -6.2e-228) {
tmp = -60.0 * (y / (z - t));
} else if (a <= 106000.0) {
tmp = -60.0 * ((x - y) / 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.65d-28)) then
tmp = a * 120.0d0
else if (a <= (-6.2d-228)) then
tmp = (-60.0d0) * (y / (z - t))
else if (a <= 106000.0d0) then
tmp = (-60.0d0) * ((x - y) / 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.65e-28) {
tmp = a * 120.0;
} else if (a <= -6.2e-228) {
tmp = -60.0 * (y / (z - t));
} else if (a <= 106000.0) {
tmp = -60.0 * ((x - y) / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.65e-28: tmp = a * 120.0 elif a <= -6.2e-228: tmp = -60.0 * (y / (z - t)) elif a <= 106000.0: tmp = -60.0 * ((x - y) / t) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.65e-28) tmp = Float64(a * 120.0); elseif (a <= -6.2e-228) tmp = Float64(-60.0 * Float64(y / Float64(z - t))); elseif (a <= 106000.0) tmp = Float64(-60.0 * Float64(Float64(x - y) / 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.65e-28) tmp = a * 120.0; elseif (a <= -6.2e-228) tmp = -60.0 * (y / (z - t)); elseif (a <= 106000.0) tmp = -60.0 * ((x - y) / t); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.65e-28], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -6.2e-228], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 106000.0], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.65 \cdot 10^{-28}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -6.2 \cdot 10^{-228}:\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\mathbf{elif}\;a \leq 106000:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -1.6500000000000001e-28 or 106000 < a Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 76.4%
if -1.6500000000000001e-28 < a < -6.1999999999999996e-228Initial program 97.5%
associate-/l*99.6%
Simplified99.6%
clear-num99.4%
un-div-inv99.5%
Applied egg-rr99.5%
Taylor expanded in a around 0 75.1%
Taylor expanded in x around 0 45.5%
if -6.1999999999999996e-228 < a < 106000Initial program 98.4%
associate-/l*99.6%
Simplified99.6%
clear-num99.5%
un-div-inv99.6%
Applied egg-rr99.6%
Taylor expanded in a around 0 86.7%
Taylor expanded in z around 0 51.8%
Final simplification62.8%
(FPCore (x y z t a)
:precision binary64
(if (<= a -4.95e-54)
(* a 120.0)
(if (<= a -9.5e-283)
(* (- x y) (/ 60.0 z))
(if (<= a 460000.0) (* -60.0 (/ (- x y) t)) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -4.95e-54) {
tmp = a * 120.0;
} else if (a <= -9.5e-283) {
tmp = (x - y) * (60.0 / z);
} else if (a <= 460000.0) {
tmp = -60.0 * ((x - y) / 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.95d-54)) then
tmp = a * 120.0d0
else if (a <= (-9.5d-283)) then
tmp = (x - y) * (60.0d0 / z)
else if (a <= 460000.0d0) then
tmp = (-60.0d0) * ((x - y) / 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.95e-54) {
tmp = a * 120.0;
} else if (a <= -9.5e-283) {
tmp = (x - y) * (60.0 / z);
} else if (a <= 460000.0) {
tmp = -60.0 * ((x - y) / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -4.95e-54: tmp = a * 120.0 elif a <= -9.5e-283: tmp = (x - y) * (60.0 / z) elif a <= 460000.0: tmp = -60.0 * ((x - y) / t) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -4.95e-54) tmp = Float64(a * 120.0); elseif (a <= -9.5e-283) tmp = Float64(Float64(x - y) * Float64(60.0 / z)); elseif (a <= 460000.0) tmp = Float64(-60.0 * Float64(Float64(x - y) / 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.95e-54) tmp = a * 120.0; elseif (a <= -9.5e-283) tmp = (x - y) * (60.0 / z); elseif (a <= 460000.0) tmp = -60.0 * ((x - y) / t); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -4.95e-54], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -9.5e-283], N[(N[(x - y), $MachinePrecision] * N[(60.0 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 460000.0], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.95 \cdot 10^{-54}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -9.5 \cdot 10^{-283}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{60}{z}\\
\mathbf{elif}\;a \leq 460000:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -4.95000000000000018e-54 or 4.6e5 < a Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 74.5%
if -4.95000000000000018e-54 < a < -9.49999999999999979e-283Initial program 97.5%
associate-/l*99.6%
Simplified99.6%
clear-num99.5%
un-div-inv99.5%
Applied egg-rr99.5%
Taylor expanded in a around 0 78.8%
Taylor expanded in z around inf 51.5%
associate-*r/50.9%
*-commutative50.9%
associate-/l*51.5%
Simplified51.5%
if -9.49999999999999979e-283 < a < 4.6e5Initial program 98.3%
associate-/l*99.6%
Simplified99.6%
clear-num99.5%
un-div-inv99.6%
Applied egg-rr99.6%
Taylor expanded in a around 0 86.2%
Taylor expanded in z around 0 53.5%
Final simplification64.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -3.7e+34) (not (<= y 2200000000.0))) (+ (* 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 ((y <= -3.7e+34) || !(y <= 2200000000.0)) {
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 ((y <= (-3.7d+34)) .or. (.not. (y <= 2200000000.0d0))) 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 ((y <= -3.7e+34) || !(y <= 2200000000.0)) {
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 (y <= -3.7e+34) or not (y <= 2200000000.0): 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 ((y <= -3.7e+34) || !(y <= 2200000000.0)) 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 ((y <= -3.7e+34) || ~((y <= 2200000000.0))) 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[Or[LessEqual[y, -3.7e+34], N[Not[LessEqual[y, 2200000000.0]], $MachinePrecision]], 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}\;y \leq -3.7 \cdot 10^{+34} \lor \neg \left(y \leq 2200000000\right):\\
\;\;\;\;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 y < -3.70000000000000009e34 or 2.2e9 < y Initial program 98.2%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around 0 88.0%
if -3.70000000000000009e34 < y < 2.2e9Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around inf 94.4%
associate-*r/38.9%
*-commutative38.9%
associate-/l*38.9%
Simplified94.5%
Final simplification91.3%
(FPCore (x y z t a)
:precision binary64
(if (<= x -2.6e+130)
(/ 60.0 (/ (- z t) (- x y)))
(if (<= x 1.6e+104)
(+ (* a 120.0) (* -60.0 (/ y (- z t))))
(* 60.0 (/ (- x y) (- z t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -2.6e+130) {
tmp = 60.0 / ((z - t) / (x - y));
} else if (x <= 1.6e+104) {
tmp = (a * 120.0) + (-60.0 * (y / (z - t)));
} else {
tmp = 60.0 * ((x - y) / (z - t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (x <= (-2.6d+130)) then
tmp = 60.0d0 / ((z - t) / (x - y))
else if (x <= 1.6d+104) then
tmp = (a * 120.0d0) + ((-60.0d0) * (y / (z - t)))
else
tmp = 60.0d0 * ((x - y) / (z - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -2.6e+130) {
tmp = 60.0 / ((z - t) / (x - y));
} else if (x <= 1.6e+104) {
tmp = (a * 120.0) + (-60.0 * (y / (z - t)));
} else {
tmp = 60.0 * ((x - y) / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -2.6e+130: tmp = 60.0 / ((z - t) / (x - y)) elif x <= 1.6e+104: tmp = (a * 120.0) + (-60.0 * (y / (z - t))) else: tmp = 60.0 * ((x - y) / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -2.6e+130) tmp = Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))); elseif (x <= 1.6e+104) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / Float64(z - t)))); else tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -2.6e+130) tmp = 60.0 / ((z - t) / (x - y)); elseif (x <= 1.6e+104) tmp = (a * 120.0) + (-60.0 * (y / (z - t))); else tmp = 60.0 * ((x - y) / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -2.6e+130], N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.6e+104], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.6 \cdot 10^{+130}:\\
\;\;\;\;\frac{60}{\frac{z - t}{x - y}}\\
\mathbf{elif}\;x \leq 1.6 \cdot 10^{+104}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\end{array}
\end{array}
if x < -2.5999999999999998e130Initial program 96.7%
associate-/l*99.5%
Simplified99.5%
clear-num99.5%
un-div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 81.6%
clear-num99.5%
un-div-inv99.7%
Applied egg-rr81.8%
if -2.5999999999999998e130 < x < 1.6e104Initial program 99.2%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 89.9%
if 1.6e104 < x Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
clear-num99.4%
un-div-inv99.6%
Applied egg-rr99.6%
Taylor expanded in a around 0 87.0%
Final simplification88.4%
(FPCore (x y z t a)
:precision binary64
(if (<= y -9.2e+33)
(+ (* a 120.0) (* -60.0 (/ y (- z t))))
(if (<= y 250000000000.0)
(+ (* a 120.0) (* x (/ 60.0 (- z t))))
(+ (* a 120.0) (* y (/ -60.0 (- z t)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -9.2e+33) {
tmp = (a * 120.0) + (-60.0 * (y / (z - t)));
} else if (y <= 250000000000.0) {
tmp = (a * 120.0) + (x * (60.0 / (z - t)));
} else {
tmp = (a * 120.0) + (y * (-60.0 / (z - t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (y <= (-9.2d+33)) then
tmp = (a * 120.0d0) + ((-60.0d0) * (y / (z - t)))
else if (y <= 250000000000.0d0) then
tmp = (a * 120.0d0) + (x * (60.0d0 / (z - t)))
else
tmp = (a * 120.0d0) + (y * ((-60.0d0) / (z - t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -9.2e+33) {
tmp = (a * 120.0) + (-60.0 * (y / (z - t)));
} else if (y <= 250000000000.0) {
tmp = (a * 120.0) + (x * (60.0 / (z - t)));
} else {
tmp = (a * 120.0) + (y * (-60.0 / (z - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -9.2e+33: tmp = (a * 120.0) + (-60.0 * (y / (z - t))) elif y <= 250000000000.0: tmp = (a * 120.0) + (x * (60.0 / (z - t))) else: tmp = (a * 120.0) + (y * (-60.0 / (z - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -9.2e+33) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / Float64(z - t)))); elseif (y <= 250000000000.0) tmp = Float64(Float64(a * 120.0) + Float64(x * Float64(60.0 / Float64(z - t)))); else tmp = Float64(Float64(a * 120.0) + Float64(y * Float64(-60.0 / Float64(z - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -9.2e+33) tmp = (a * 120.0) + (-60.0 * (y / (z - t))); elseif (y <= 250000000000.0) tmp = (a * 120.0) + (x * (60.0 / (z - t))); else tmp = (a * 120.0) + (y * (-60.0 / (z - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -9.2e+33], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 250000000000.0], N[(N[(a * 120.0), $MachinePrecision] + N[(x * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(y * N[(-60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.2 \cdot 10^{+33}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z - t}\\
\mathbf{elif}\;y \leq 250000000000:\\
\;\;\;\;a \cdot 120 + x \cdot \frac{60}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + y \cdot \frac{-60}{z - t}\\
\end{array}
\end{array}
if y < -9.20000000000000042e33Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around 0 92.0%
if -9.20000000000000042e33 < y < 2.5e11Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around inf 94.4%
associate-*r/38.9%
*-commutative38.9%
associate-/l*38.9%
Simplified94.5%
if 2.5e11 < y Initial program 96.9%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around 0 84.5%
*-commutative84.5%
associate-*l/83.0%
associate-/l*84.6%
Simplified84.6%
Final simplification91.3%
(FPCore (x y z t a)
:precision binary64
(if (<= y -1.1e+34)
(+ (* a 120.0) (* -60.0 (/ y (- z t))))
(if (<= y 7.6e+41)
(+ (* a 120.0) (/ 60.0 (/ (- z t) x)))
(+ (* a 120.0) (* y (/ -60.0 (- z t)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.1e+34) {
tmp = (a * 120.0) + (-60.0 * (y / (z - t)));
} else if (y <= 7.6e+41) {
tmp = (a * 120.0) + (60.0 / ((z - t) / x));
} else {
tmp = (a * 120.0) + (y * (-60.0 / (z - t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (y <= (-1.1d+34)) then
tmp = (a * 120.0d0) + ((-60.0d0) * (y / (z - t)))
else if (y <= 7.6d+41) then
tmp = (a * 120.0d0) + (60.0d0 / ((z - t) / x))
else
tmp = (a * 120.0d0) + (y * ((-60.0d0) / (z - t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.1e+34) {
tmp = (a * 120.0) + (-60.0 * (y / (z - t)));
} else if (y <= 7.6e+41) {
tmp = (a * 120.0) + (60.0 / ((z - t) / x));
} else {
tmp = (a * 120.0) + (y * (-60.0 / (z - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -1.1e+34: tmp = (a * 120.0) + (-60.0 * (y / (z - t))) elif y <= 7.6e+41: tmp = (a * 120.0) + (60.0 / ((z - t) / x)) else: tmp = (a * 120.0) + (y * (-60.0 / (z - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -1.1e+34) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / Float64(z - t)))); elseif (y <= 7.6e+41) tmp = Float64(Float64(a * 120.0) + Float64(60.0 / Float64(Float64(z - t) / x))); else tmp = Float64(Float64(a * 120.0) + Float64(y * Float64(-60.0 / Float64(z - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -1.1e+34) tmp = (a * 120.0) + (-60.0 * (y / (z - t))); elseif (y <= 7.6e+41) tmp = (a * 120.0) + (60.0 / ((z - t) / x)); else tmp = (a * 120.0) + (y * (-60.0 / (z - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -1.1e+34], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7.6e+41], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 / N[(N[(z - t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(y * N[(-60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.1 \cdot 10^{+34}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z - t}\\
\mathbf{elif}\;y \leq 7.6 \cdot 10^{+41}:\\
\;\;\;\;a \cdot 120 + \frac{60}{\frac{z - t}{x}}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + y \cdot \frac{-60}{z - t}\\
\end{array}
\end{array}
if y < -1.1000000000000001e34Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around 0 92.0%
if -1.1000000000000001e34 < y < 7.6000000000000003e41Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
clear-num99.7%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in x around inf 94.0%
if 7.6000000000000003e41 < y Initial program 96.6%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around 0 84.5%
*-commutative84.5%
associate-*l/83.0%
associate-/l*84.6%
Simplified84.6%
Final simplification91.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.9e-29) (not (<= a 106000.0))) (* a 120.0) (* -60.0 (/ y (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.9e-29) || !(a <= 106000.0)) {
tmp = a * 120.0;
} else {
tmp = -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 ((a <= (-1.9d-29)) .or. (.not. (a <= 106000.0d0))) then
tmp = a * 120.0d0
else
tmp = (-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 ((a <= -1.9e-29) || !(a <= 106000.0)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (y / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.9e-29) or not (a <= 106000.0): tmp = a * 120.0 else: tmp = -60.0 * (y / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.9e-29) || !(a <= 106000.0)) tmp = Float64(a * 120.0); else tmp = 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 ((a <= -1.9e-29) || ~((a <= 106000.0))) tmp = a * 120.0; else tmp = -60.0 * (y / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.9e-29], N[Not[LessEqual[a, 106000.0]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.9 \cdot 10^{-29} \lor \neg \left(a \leq 106000\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\end{array}
\end{array}
if a < -1.89999999999999988e-29 or 106000 < a Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 76.4%
if -1.89999999999999988e-29 < a < 106000Initial program 98.1%
associate-/l*99.6%
Simplified99.6%
clear-num99.5%
un-div-inv99.6%
Applied egg-rr99.6%
Taylor expanded in a around 0 82.4%
Taylor expanded in x around 0 46.0%
Final simplification61.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -2.6e-86) (not (<= a 8.8e-224))) (* a 120.0) (* -60.0 (/ y z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.6e-86) || !(a <= 8.8e-224)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (y / z);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-2.6d-86)) .or. (.not. (a <= 8.8d-224))) then
tmp = a * 120.0d0
else
tmp = (-60.0d0) * (y / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.6e-86) || !(a <= 8.8e-224)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (y / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -2.6e-86) or not (a <= 8.8e-224): tmp = a * 120.0 else: tmp = -60.0 * (y / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -2.6e-86) || !(a <= 8.8e-224)) tmp = Float64(a * 120.0); else tmp = Float64(-60.0 * Float64(y / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -2.6e-86) || ~((a <= 8.8e-224))) tmp = a * 120.0; else tmp = -60.0 * (y / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -2.6e-86], N[Not[LessEqual[a, 8.8e-224]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.6 \cdot 10^{-86} \lor \neg \left(a \leq 8.8 \cdot 10^{-224}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if a < -2.6000000000000001e-86 or 8.8000000000000004e-224 < a Initial program 99.3%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 58.8%
if -2.6000000000000001e-86 < a < 8.8000000000000004e-224Initial program 98.0%
associate-/l*99.7%
Simplified99.7%
clear-num99.6%
un-div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 89.1%
Taylor expanded in x around 0 50.8%
Taylor expanded in z around inf 33.1%
Final simplification52.3%
(FPCore (x y z t a) :precision binary64 (if (<= y -1.45e+163) (* -60.0 (/ y z)) (if (<= y 5e+190) (* a 120.0) (* 60.0 (/ y t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.45e+163) {
tmp = -60.0 * (y / z);
} else if (y <= 5e+190) {
tmp = a * 120.0;
} else {
tmp = 60.0 * (y / t);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (y <= (-1.45d+163)) then
tmp = (-60.0d0) * (y / z)
else if (y <= 5d+190) then
tmp = a * 120.0d0
else
tmp = 60.0d0 * (y / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.45e+163) {
tmp = -60.0 * (y / z);
} else if (y <= 5e+190) {
tmp = a * 120.0;
} else {
tmp = 60.0 * (y / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -1.45e+163: tmp = -60.0 * (y / z) elif y <= 5e+190: tmp = a * 120.0 else: tmp = 60.0 * (y / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -1.45e+163) tmp = Float64(-60.0 * Float64(y / z)); elseif (y <= 5e+190) tmp = Float64(a * 120.0); else tmp = Float64(60.0 * Float64(y / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -1.45e+163) tmp = -60.0 * (y / z); elseif (y <= 5e+190) tmp = a * 120.0; else tmp = 60.0 * (y / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -1.45e+163], N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5e+190], N[(a * 120.0), $MachinePrecision], N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.45 \cdot 10^{+163}:\\
\;\;\;\;-60 \cdot \frac{y}{z}\\
\mathbf{elif}\;y \leq 5 \cdot 10^{+190}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{y}{t}\\
\end{array}
\end{array}
if y < -1.44999999999999999e163Initial program 99.8%
associate-/l*99.9%
Simplified99.9%
clear-num99.7%
un-div-inv99.6%
Applied egg-rr99.6%
Taylor expanded in a around 0 79.7%
Taylor expanded in x around 0 71.8%
Taylor expanded in z around inf 56.0%
if -1.44999999999999999e163 < y < 5.00000000000000036e190Initial program 99.2%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in z around inf 54.0%
if 5.00000000000000036e190 < y Initial program 95.7%
associate-/l*99.7%
Simplified99.7%
clear-num99.5%
un-div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 78.6%
Taylor expanded in x around 0 67.3%
Taylor expanded in z around 0 41.9%
Final simplification53.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.0%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in z around inf 46.9%
Final simplification46.9%
(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 2024039
(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)))