
(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 18 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 (fma a 120.0 (* (/ 60.0 (- z t)) (- x y))))
double code(double x, double y, double z, double t, double a) {
return fma(a, 120.0, ((60.0 / (z - t)) * (x - y)));
}
function code(x, y, z, t, a) return fma(a, 120.0, Float64(Float64(60.0 / Float64(z - t)) * Float64(x - y))) end
code[x_, y_, z_, t_, a_] := N[(a * 120.0 + N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(a, 120, \frac{60}{z - t} \cdot \left(x - y\right)\right)
\end{array}
Initial program 99.4%
+-commutative99.4%
fma-def99.4%
associate-*l/99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* 60.0 (/ (- x y) (- z t)))))
(if (<= (* a 120.0) -1e+102)
(* a 120.0)
(if (<= (* a 120.0) -2e+33)
t_1
(if (<= (* a 120.0) -4e+14)
(* a 120.0)
(if (<= (* a 120.0) -5e-31)
(+ (* a 120.0) (* 60.0 (/ x z)))
(if (<= (* a 120.0) 2e-98)
t_1
(if (or (<= (* a 120.0) 5e-17) (not (<= (* a 120.0) 5e+24)))
(* a 120.0)
(* (/ 60.0 (- z t)) (- x y))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * ((x - y) / (z - t));
double tmp;
if ((a * 120.0) <= -1e+102) {
tmp = a * 120.0;
} else if ((a * 120.0) <= -2e+33) {
tmp = t_1;
} else if ((a * 120.0) <= -4e+14) {
tmp = a * 120.0;
} else if ((a * 120.0) <= -5e-31) {
tmp = (a * 120.0) + (60.0 * (x / z));
} else if ((a * 120.0) <= 2e-98) {
tmp = t_1;
} else if (((a * 120.0) <= 5e-17) || !((a * 120.0) <= 5e+24)) {
tmp = a * 120.0;
} else {
tmp = (60.0 / (z - t)) * (x - y);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = 60.0d0 * ((x - y) / (z - t))
if ((a * 120.0d0) <= (-1d+102)) then
tmp = a * 120.0d0
else if ((a * 120.0d0) <= (-2d+33)) then
tmp = t_1
else if ((a * 120.0d0) <= (-4d+14)) then
tmp = a * 120.0d0
else if ((a * 120.0d0) <= (-5d-31)) then
tmp = (a * 120.0d0) + (60.0d0 * (x / z))
else if ((a * 120.0d0) <= 2d-98) then
tmp = t_1
else if (((a * 120.0d0) <= 5d-17) .or. (.not. ((a * 120.0d0) <= 5d+24))) then
tmp = a * 120.0d0
else
tmp = (60.0d0 / (z - t)) * (x - y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * ((x - y) / (z - t));
double tmp;
if ((a * 120.0) <= -1e+102) {
tmp = a * 120.0;
} else if ((a * 120.0) <= -2e+33) {
tmp = t_1;
} else if ((a * 120.0) <= -4e+14) {
tmp = a * 120.0;
} else if ((a * 120.0) <= -5e-31) {
tmp = (a * 120.0) + (60.0 * (x / z));
} else if ((a * 120.0) <= 2e-98) {
tmp = t_1;
} else if (((a * 120.0) <= 5e-17) || !((a * 120.0) <= 5e+24)) {
tmp = a * 120.0;
} else {
tmp = (60.0 / (z - t)) * (x - y);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = 60.0 * ((x - y) / (z - t)) tmp = 0 if (a * 120.0) <= -1e+102: tmp = a * 120.0 elif (a * 120.0) <= -2e+33: tmp = t_1 elif (a * 120.0) <= -4e+14: tmp = a * 120.0 elif (a * 120.0) <= -5e-31: tmp = (a * 120.0) + (60.0 * (x / z)) elif (a * 120.0) <= 2e-98: tmp = t_1 elif ((a * 120.0) <= 5e-17) or not ((a * 120.0) <= 5e+24): tmp = a * 120.0 else: tmp = (60.0 / (z - t)) * (x - y) return tmp
function code(x, y, z, t, a) t_1 = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))) tmp = 0.0 if (Float64(a * 120.0) <= -1e+102) tmp = Float64(a * 120.0); elseif (Float64(a * 120.0) <= -2e+33) tmp = t_1; elseif (Float64(a * 120.0) <= -4e+14) tmp = Float64(a * 120.0); elseif (Float64(a * 120.0) <= -5e-31) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(x / z))); elseif (Float64(a * 120.0) <= 2e-98) tmp = t_1; elseif ((Float64(a * 120.0) <= 5e-17) || !(Float64(a * 120.0) <= 5e+24)) tmp = Float64(a * 120.0); else tmp = Float64(Float64(60.0 / Float64(z - t)) * Float64(x - y)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = 60.0 * ((x - y) / (z - t)); tmp = 0.0; if ((a * 120.0) <= -1e+102) tmp = a * 120.0; elseif ((a * 120.0) <= -2e+33) tmp = t_1; elseif ((a * 120.0) <= -4e+14) tmp = a * 120.0; elseif ((a * 120.0) <= -5e-31) tmp = (a * 120.0) + (60.0 * (x / z)); elseif ((a * 120.0) <= 2e-98) tmp = t_1; elseif (((a * 120.0) <= 5e-17) || ~(((a * 120.0) <= 5e+24))) tmp = a * 120.0; else tmp = (60.0 / (z - t)) * (x - y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * 120.0), $MachinePrecision], -1e+102], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], -2e+33], t$95$1, If[LessEqual[N[(a * 120.0), $MachinePrecision], -4e+14], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], -5e-31], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 2e-98], t$95$1, If[Or[LessEqual[N[(a * 120.0), $MachinePrecision], 5e-17], N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 5e+24]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 60 \cdot \frac{x - y}{z - t}\\
\mathbf{if}\;a \cdot 120 \leq -1 \cdot 10^{+102}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq -2 \cdot 10^{+33}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \cdot 120 \leq -4 \cdot 10^{+14}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq -5 \cdot 10^{-31}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{x}{z}\\
\mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{-98}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-17} \lor \neg \left(a \cdot 120 \leq 5 \cdot 10^{+24}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{60}{z - t} \cdot \left(x - y\right)\\
\end{array}
\end{array}
if (*.f64 a 120) < -9.99999999999999977e101 or -1.9999999999999999e33 < (*.f64 a 120) < -4e14 or 1.99999999999999988e-98 < (*.f64 a 120) < 4.9999999999999999e-17 or 5.00000000000000045e24 < (*.f64 a 120) Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 85.2%
if -9.99999999999999977e101 < (*.f64 a 120) < -1.9999999999999999e33 or -5e-31 < (*.f64 a 120) < 1.99999999999999988e-98Initial program 98.9%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 82.2%
if -4e14 < (*.f64 a 120) < -5e-31Initial program 99.7%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in x around inf 74.1%
associate-*r/74.1%
associate-*l/74.3%
*-commutative74.3%
Simplified74.3%
Taylor expanded in z around inf 75.0%
if 4.9999999999999999e-17 < (*.f64 a 120) < 5.00000000000000045e24Initial program 100.0%
associate-/l*99.7%
Simplified99.7%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 74.7%
associate-*r/75.0%
associate-*l/74.9%
*-commutative74.9%
Simplified74.9%
Final simplification83.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* 60.0 (/ (- x y) (- z t)))))
(if (<= (* a 120.0) -1e+102)
(* a 120.0)
(if (<= (* a 120.0) -2e+33)
t_1
(if (<= (* a 120.0) -4e+14)
(* a 120.0)
(if (<= (* a 120.0) -5e-31)
(+ (* a 120.0) (* 60.0 (/ x z)))
(if (<= (* a 120.0) 2e-98)
t_1
(if (<= (* a 120.0) 5e-17)
(+ (* a 120.0) (* x (/ -60.0 t)))
(if (<= (* a 120.0) 5e+24)
(* (/ 60.0 (- z t)) (- x y))
(* a 120.0))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * ((x - y) / (z - t));
double tmp;
if ((a * 120.0) <= -1e+102) {
tmp = a * 120.0;
} else if ((a * 120.0) <= -2e+33) {
tmp = t_1;
} else if ((a * 120.0) <= -4e+14) {
tmp = a * 120.0;
} else if ((a * 120.0) <= -5e-31) {
tmp = (a * 120.0) + (60.0 * (x / z));
} else if ((a * 120.0) <= 2e-98) {
tmp = t_1;
} else if ((a * 120.0) <= 5e-17) {
tmp = (a * 120.0) + (x * (-60.0 / t));
} else if ((a * 120.0) <= 5e+24) {
tmp = (60.0 / (z - t)) * (x - y);
} 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 * ((x - y) / (z - t))
if ((a * 120.0d0) <= (-1d+102)) then
tmp = a * 120.0d0
else if ((a * 120.0d0) <= (-2d+33)) then
tmp = t_1
else if ((a * 120.0d0) <= (-4d+14)) then
tmp = a * 120.0d0
else if ((a * 120.0d0) <= (-5d-31)) then
tmp = (a * 120.0d0) + (60.0d0 * (x / z))
else if ((a * 120.0d0) <= 2d-98) then
tmp = t_1
else if ((a * 120.0d0) <= 5d-17) then
tmp = (a * 120.0d0) + (x * ((-60.0d0) / t))
else if ((a * 120.0d0) <= 5d+24) then
tmp = (60.0d0 / (z - t)) * (x - y)
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 * ((x - y) / (z - t));
double tmp;
if ((a * 120.0) <= -1e+102) {
tmp = a * 120.0;
} else if ((a * 120.0) <= -2e+33) {
tmp = t_1;
} else if ((a * 120.0) <= -4e+14) {
tmp = a * 120.0;
} else if ((a * 120.0) <= -5e-31) {
tmp = (a * 120.0) + (60.0 * (x / z));
} else if ((a * 120.0) <= 2e-98) {
tmp = t_1;
} else if ((a * 120.0) <= 5e-17) {
tmp = (a * 120.0) + (x * (-60.0 / t));
} else if ((a * 120.0) <= 5e+24) {
tmp = (60.0 / (z - t)) * (x - y);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = 60.0 * ((x - y) / (z - t)) tmp = 0 if (a * 120.0) <= -1e+102: tmp = a * 120.0 elif (a * 120.0) <= -2e+33: tmp = t_1 elif (a * 120.0) <= -4e+14: tmp = a * 120.0 elif (a * 120.0) <= -5e-31: tmp = (a * 120.0) + (60.0 * (x / z)) elif (a * 120.0) <= 2e-98: tmp = t_1 elif (a * 120.0) <= 5e-17: tmp = (a * 120.0) + (x * (-60.0 / t)) elif (a * 120.0) <= 5e+24: tmp = (60.0 / (z - t)) * (x - y) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) t_1 = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))) tmp = 0.0 if (Float64(a * 120.0) <= -1e+102) tmp = Float64(a * 120.0); elseif (Float64(a * 120.0) <= -2e+33) tmp = t_1; elseif (Float64(a * 120.0) <= -4e+14) tmp = Float64(a * 120.0); elseif (Float64(a * 120.0) <= -5e-31) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(x / z))); elseif (Float64(a * 120.0) <= 2e-98) tmp = t_1; elseif (Float64(a * 120.0) <= 5e-17) tmp = Float64(Float64(a * 120.0) + Float64(x * Float64(-60.0 / t))); elseif (Float64(a * 120.0) <= 5e+24) tmp = Float64(Float64(60.0 / Float64(z - t)) * Float64(x - y)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = 60.0 * ((x - y) / (z - t)); tmp = 0.0; if ((a * 120.0) <= -1e+102) tmp = a * 120.0; elseif ((a * 120.0) <= -2e+33) tmp = t_1; elseif ((a * 120.0) <= -4e+14) tmp = a * 120.0; elseif ((a * 120.0) <= -5e-31) tmp = (a * 120.0) + (60.0 * (x / z)); elseif ((a * 120.0) <= 2e-98) tmp = t_1; elseif ((a * 120.0) <= 5e-17) tmp = (a * 120.0) + (x * (-60.0 / t)); elseif ((a * 120.0) <= 5e+24) tmp = (60.0 / (z - t)) * (x - y); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * 120.0), $MachinePrecision], -1e+102], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], -2e+33], t$95$1, If[LessEqual[N[(a * 120.0), $MachinePrecision], -4e+14], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], -5e-31], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 2e-98], t$95$1, If[LessEqual[N[(a * 120.0), $MachinePrecision], 5e-17], N[(N[(a * 120.0), $MachinePrecision] + N[(x * N[(-60.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 5e+24], N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 60 \cdot \frac{x - y}{z - t}\\
\mathbf{if}\;a \cdot 120 \leq -1 \cdot 10^{+102}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq -2 \cdot 10^{+33}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \cdot 120 \leq -4 \cdot 10^{+14}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq -5 \cdot 10^{-31}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{x}{z}\\
\mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{-98}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-17}:\\
\;\;\;\;a \cdot 120 + x \cdot \frac{-60}{t}\\
\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{+24}:\\
\;\;\;\;\frac{60}{z - t} \cdot \left(x - y\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a 120) < -9.99999999999999977e101 or -1.9999999999999999e33 < (*.f64 a 120) < -4e14 or 5.00000000000000045e24 < (*.f64 a 120) Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 87.6%
if -9.99999999999999977e101 < (*.f64 a 120) < -1.9999999999999999e33 or -5e-31 < (*.f64 a 120) < 1.99999999999999988e-98Initial program 98.9%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 82.2%
if -4e14 < (*.f64 a 120) < -5e-31Initial program 99.7%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in x around inf 74.1%
associate-*r/74.1%
associate-*l/74.3%
*-commutative74.3%
Simplified74.3%
Taylor expanded in z around inf 75.0%
if 1.99999999999999988e-98 < (*.f64 a 120) < 4.9999999999999999e-17Initial program 99.9%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in x around inf 88.5%
associate-*r/88.4%
associate-*l/88.4%
*-commutative88.4%
Simplified88.4%
Taylor expanded in z around 0 75.1%
if 4.9999999999999999e-17 < (*.f64 a 120) < 5.00000000000000045e24Initial program 100.0%
associate-/l*99.7%
Simplified99.7%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 74.7%
associate-*r/75.0%
associate-*l/74.9%
*-commutative74.9%
Simplified74.9%
Final simplification83.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* 60.0 (/ (- x y) (- z t)))))
(if (<= (* a 120.0) -1e+102)
(* a 120.0)
(if (<= (* a 120.0) -2e+33)
t_1
(if (<= (* a 120.0) -4e+14)
(* a 120.0)
(if (<= (* a 120.0) -5e-31)
(+ (* a 120.0) (* x (/ 60.0 z)))
(if (<= (* a 120.0) 2e-98)
t_1
(if (<= (* a 120.0) 5e-17)
(+ (* a 120.0) (* x (/ -60.0 t)))
(if (<= (* a 120.0) 5e+24)
(* (/ 60.0 (- z t)) (- x y))
(* a 120.0))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * ((x - y) / (z - t));
double tmp;
if ((a * 120.0) <= -1e+102) {
tmp = a * 120.0;
} else if ((a * 120.0) <= -2e+33) {
tmp = t_1;
} else if ((a * 120.0) <= -4e+14) {
tmp = a * 120.0;
} else if ((a * 120.0) <= -5e-31) {
tmp = (a * 120.0) + (x * (60.0 / z));
} else if ((a * 120.0) <= 2e-98) {
tmp = t_1;
} else if ((a * 120.0) <= 5e-17) {
tmp = (a * 120.0) + (x * (-60.0 / t));
} else if ((a * 120.0) <= 5e+24) {
tmp = (60.0 / (z - t)) * (x - y);
} 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 * ((x - y) / (z - t))
if ((a * 120.0d0) <= (-1d+102)) then
tmp = a * 120.0d0
else if ((a * 120.0d0) <= (-2d+33)) then
tmp = t_1
else if ((a * 120.0d0) <= (-4d+14)) then
tmp = a * 120.0d0
else if ((a * 120.0d0) <= (-5d-31)) then
tmp = (a * 120.0d0) + (x * (60.0d0 / z))
else if ((a * 120.0d0) <= 2d-98) then
tmp = t_1
else if ((a * 120.0d0) <= 5d-17) then
tmp = (a * 120.0d0) + (x * ((-60.0d0) / t))
else if ((a * 120.0d0) <= 5d+24) then
tmp = (60.0d0 / (z - t)) * (x - y)
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 * ((x - y) / (z - t));
double tmp;
if ((a * 120.0) <= -1e+102) {
tmp = a * 120.0;
} else if ((a * 120.0) <= -2e+33) {
tmp = t_1;
} else if ((a * 120.0) <= -4e+14) {
tmp = a * 120.0;
} else if ((a * 120.0) <= -5e-31) {
tmp = (a * 120.0) + (x * (60.0 / z));
} else if ((a * 120.0) <= 2e-98) {
tmp = t_1;
} else if ((a * 120.0) <= 5e-17) {
tmp = (a * 120.0) + (x * (-60.0 / t));
} else if ((a * 120.0) <= 5e+24) {
tmp = (60.0 / (z - t)) * (x - y);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = 60.0 * ((x - y) / (z - t)) tmp = 0 if (a * 120.0) <= -1e+102: tmp = a * 120.0 elif (a * 120.0) <= -2e+33: tmp = t_1 elif (a * 120.0) <= -4e+14: tmp = a * 120.0 elif (a * 120.0) <= -5e-31: tmp = (a * 120.0) + (x * (60.0 / z)) elif (a * 120.0) <= 2e-98: tmp = t_1 elif (a * 120.0) <= 5e-17: tmp = (a * 120.0) + (x * (-60.0 / t)) elif (a * 120.0) <= 5e+24: tmp = (60.0 / (z - t)) * (x - y) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) t_1 = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))) tmp = 0.0 if (Float64(a * 120.0) <= -1e+102) tmp = Float64(a * 120.0); elseif (Float64(a * 120.0) <= -2e+33) tmp = t_1; elseif (Float64(a * 120.0) <= -4e+14) tmp = Float64(a * 120.0); elseif (Float64(a * 120.0) <= -5e-31) tmp = Float64(Float64(a * 120.0) + Float64(x * Float64(60.0 / z))); elseif (Float64(a * 120.0) <= 2e-98) tmp = t_1; elseif (Float64(a * 120.0) <= 5e-17) tmp = Float64(Float64(a * 120.0) + Float64(x * Float64(-60.0 / t))); elseif (Float64(a * 120.0) <= 5e+24) tmp = Float64(Float64(60.0 / Float64(z - t)) * Float64(x - y)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = 60.0 * ((x - y) / (z - t)); tmp = 0.0; if ((a * 120.0) <= -1e+102) tmp = a * 120.0; elseif ((a * 120.0) <= -2e+33) tmp = t_1; elseif ((a * 120.0) <= -4e+14) tmp = a * 120.0; elseif ((a * 120.0) <= -5e-31) tmp = (a * 120.0) + (x * (60.0 / z)); elseif ((a * 120.0) <= 2e-98) tmp = t_1; elseif ((a * 120.0) <= 5e-17) tmp = (a * 120.0) + (x * (-60.0 / t)); elseif ((a * 120.0) <= 5e+24) tmp = (60.0 / (z - t)) * (x - y); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * 120.0), $MachinePrecision], -1e+102], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], -2e+33], t$95$1, If[LessEqual[N[(a * 120.0), $MachinePrecision], -4e+14], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], -5e-31], N[(N[(a * 120.0), $MachinePrecision] + N[(x * N[(60.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 2e-98], t$95$1, If[LessEqual[N[(a * 120.0), $MachinePrecision], 5e-17], N[(N[(a * 120.0), $MachinePrecision] + N[(x * N[(-60.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 5e+24], N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 60 \cdot \frac{x - y}{z - t}\\
\mathbf{if}\;a \cdot 120 \leq -1 \cdot 10^{+102}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq -2 \cdot 10^{+33}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \cdot 120 \leq -4 \cdot 10^{+14}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq -5 \cdot 10^{-31}:\\
\;\;\;\;a \cdot 120 + x \cdot \frac{60}{z}\\
\mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{-98}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-17}:\\
\;\;\;\;a \cdot 120 + x \cdot \frac{-60}{t}\\
\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{+24}:\\
\;\;\;\;\frac{60}{z - t} \cdot \left(x - y\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a 120) < -9.99999999999999977e101 or -1.9999999999999999e33 < (*.f64 a 120) < -4e14 or 5.00000000000000045e24 < (*.f64 a 120) Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 87.6%
if -9.99999999999999977e101 < (*.f64 a 120) < -1.9999999999999999e33 or -5e-31 < (*.f64 a 120) < 1.99999999999999988e-98Initial program 98.9%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 82.2%
if -4e14 < (*.f64 a 120) < -5e-31Initial program 99.7%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in x around inf 74.1%
associate-*r/74.1%
associate-*l/74.3%
*-commutative74.3%
Simplified74.3%
Taylor expanded in z around inf 75.1%
if 1.99999999999999988e-98 < (*.f64 a 120) < 4.9999999999999999e-17Initial program 99.9%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in x around inf 88.5%
associate-*r/88.4%
associate-*l/88.4%
*-commutative88.4%
Simplified88.4%
Taylor expanded in z around 0 75.1%
if 4.9999999999999999e-17 < (*.f64 a 120) < 5.00000000000000045e24Initial program 100.0%
associate-/l*99.7%
Simplified99.7%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 74.7%
associate-*r/75.0%
associate-*l/74.9%
*-commutative74.9%
Simplified74.9%
Final simplification83.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* 60.0 (/ (- x y) (- z t)))))
(if (<= (* a 120.0) -1e+102)
(* a 120.0)
(if (<= (* a 120.0) -2e+33)
t_1
(if (<= (* a 120.0) -5e-31)
(+ (* a 120.0) (* -60.0 (/ y z)))
(if (<= (* a 120.0) 2e-98)
t_1
(if (or (<= (* a 120.0) 5e-17) (not (<= (* a 120.0) 5e+24)))
(* a 120.0)
(* (/ 60.0 (- z t)) (- x y)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * ((x - y) / (z - t));
double tmp;
if ((a * 120.0) <= -1e+102) {
tmp = a * 120.0;
} else if ((a * 120.0) <= -2e+33) {
tmp = t_1;
} else if ((a * 120.0) <= -5e-31) {
tmp = (a * 120.0) + (-60.0 * (y / z));
} else if ((a * 120.0) <= 2e-98) {
tmp = t_1;
} else if (((a * 120.0) <= 5e-17) || !((a * 120.0) <= 5e+24)) {
tmp = a * 120.0;
} else {
tmp = (60.0 / (z - t)) * (x - y);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = 60.0d0 * ((x - y) / (z - t))
if ((a * 120.0d0) <= (-1d+102)) then
tmp = a * 120.0d0
else if ((a * 120.0d0) <= (-2d+33)) then
tmp = t_1
else if ((a * 120.0d0) <= (-5d-31)) then
tmp = (a * 120.0d0) + ((-60.0d0) * (y / z))
else if ((a * 120.0d0) <= 2d-98) then
tmp = t_1
else if (((a * 120.0d0) <= 5d-17) .or. (.not. ((a * 120.0d0) <= 5d+24))) then
tmp = a * 120.0d0
else
tmp = (60.0d0 / (z - t)) * (x - y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * ((x - y) / (z - t));
double tmp;
if ((a * 120.0) <= -1e+102) {
tmp = a * 120.0;
} else if ((a * 120.0) <= -2e+33) {
tmp = t_1;
} else if ((a * 120.0) <= -5e-31) {
tmp = (a * 120.0) + (-60.0 * (y / z));
} else if ((a * 120.0) <= 2e-98) {
tmp = t_1;
} else if (((a * 120.0) <= 5e-17) || !((a * 120.0) <= 5e+24)) {
tmp = a * 120.0;
} else {
tmp = (60.0 / (z - t)) * (x - y);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = 60.0 * ((x - y) / (z - t)) tmp = 0 if (a * 120.0) <= -1e+102: tmp = a * 120.0 elif (a * 120.0) <= -2e+33: tmp = t_1 elif (a * 120.0) <= -5e-31: tmp = (a * 120.0) + (-60.0 * (y / z)) elif (a * 120.0) <= 2e-98: tmp = t_1 elif ((a * 120.0) <= 5e-17) or not ((a * 120.0) <= 5e+24): tmp = a * 120.0 else: tmp = (60.0 / (z - t)) * (x - y) return tmp
function code(x, y, z, t, a) t_1 = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))) tmp = 0.0 if (Float64(a * 120.0) <= -1e+102) tmp = Float64(a * 120.0); elseif (Float64(a * 120.0) <= -2e+33) tmp = t_1; elseif (Float64(a * 120.0) <= -5e-31) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / z))); elseif (Float64(a * 120.0) <= 2e-98) tmp = t_1; elseif ((Float64(a * 120.0) <= 5e-17) || !(Float64(a * 120.0) <= 5e+24)) tmp = Float64(a * 120.0); else tmp = Float64(Float64(60.0 / Float64(z - t)) * Float64(x - y)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = 60.0 * ((x - y) / (z - t)); tmp = 0.0; if ((a * 120.0) <= -1e+102) tmp = a * 120.0; elseif ((a * 120.0) <= -2e+33) tmp = t_1; elseif ((a * 120.0) <= -5e-31) tmp = (a * 120.0) + (-60.0 * (y / z)); elseif ((a * 120.0) <= 2e-98) tmp = t_1; elseif (((a * 120.0) <= 5e-17) || ~(((a * 120.0) <= 5e+24))) tmp = a * 120.0; else tmp = (60.0 / (z - t)) * (x - y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * 120.0), $MachinePrecision], -1e+102], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], -2e+33], t$95$1, If[LessEqual[N[(a * 120.0), $MachinePrecision], -5e-31], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 2e-98], t$95$1, If[Or[LessEqual[N[(a * 120.0), $MachinePrecision], 5e-17], N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 5e+24]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 60 \cdot \frac{x - y}{z - t}\\
\mathbf{if}\;a \cdot 120 \leq -1 \cdot 10^{+102}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq -2 \cdot 10^{+33}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \cdot 120 \leq -5 \cdot 10^{-31}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\
\mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{-98}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-17} \lor \neg \left(a \cdot 120 \leq 5 \cdot 10^{+24}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{60}{z - t} \cdot \left(x - y\right)\\
\end{array}
\end{array}
if (*.f64 a 120) < -9.99999999999999977e101 or 1.99999999999999988e-98 < (*.f64 a 120) < 4.9999999999999999e-17 or 5.00000000000000045e24 < (*.f64 a 120) Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 84.8%
if -9.99999999999999977e101 < (*.f64 a 120) < -1.9999999999999999e33 or -5e-31 < (*.f64 a 120) < 1.99999999999999988e-98Initial program 98.9%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 82.2%
if -1.9999999999999999e33 < (*.f64 a 120) < -5e-31Initial program 99.8%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in x around 0 86.1%
associate-*r/86.0%
Simplified86.0%
Taylor expanded in z around inf 66.3%
if 4.9999999999999999e-17 < (*.f64 a 120) < 5.00000000000000045e24Initial program 100.0%
associate-/l*99.7%
Simplified99.7%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 74.7%
associate-*r/75.0%
associate-*l/74.9%
*-commutative74.9%
Simplified74.9%
Final simplification82.2%
(FPCore (x y z t a)
:precision binary64
(if (or (<= a -1.65e+96)
(and (not (<= a -3.7e+30))
(or (<= a -6.8e-33)
(and (not (<= a 4.6e-98))
(or (<= a 3.3e-18) (not (<= a 5e+23)))))))
(* 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 <= -1.65e+96) || (!(a <= -3.7e+30) && ((a <= -6.8e-33) || (!(a <= 4.6e-98) && ((a <= 3.3e-18) || !(a <= 5e+23)))))) {
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 <= (-1.65d+96)) .or. (.not. (a <= (-3.7d+30))) .and. (a <= (-6.8d-33)) .or. (.not. (a <= 4.6d-98)) .and. (a <= 3.3d-18) .or. (.not. (a <= 5d+23))) 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 <= -1.65e+96) || (!(a <= -3.7e+30) && ((a <= -6.8e-33) || (!(a <= 4.6e-98) && ((a <= 3.3e-18) || !(a <= 5e+23)))))) {
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 <= -1.65e+96) or (not (a <= -3.7e+30) and ((a <= -6.8e-33) or (not (a <= 4.6e-98) and ((a <= 3.3e-18) or not (a <= 5e+23))))): tmp = a * 120.0 else: tmp = 60.0 * ((x - y) / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.65e+96) || (!(a <= -3.7e+30) && ((a <= -6.8e-33) || (!(a <= 4.6e-98) && ((a <= 3.3e-18) || !(a <= 5e+23)))))) 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 <= -1.65e+96) || (~((a <= -3.7e+30)) && ((a <= -6.8e-33) || (~((a <= 4.6e-98)) && ((a <= 3.3e-18) || ~((a <= 5e+23))))))) tmp = a * 120.0; else tmp = 60.0 * ((x - y) / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.65e+96], And[N[Not[LessEqual[a, -3.7e+30]], $MachinePrecision], Or[LessEqual[a, -6.8e-33], And[N[Not[LessEqual[a, 4.6e-98]], $MachinePrecision], Or[LessEqual[a, 3.3e-18], N[Not[LessEqual[a, 5e+23]], $MachinePrecision]]]]]], N[(a * 120.0), $MachinePrecision], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.65 \cdot 10^{+96} \lor \neg \left(a \leq -3.7 \cdot 10^{+30}\right) \land \left(a \leq -6.8 \cdot 10^{-33} \lor \neg \left(a \leq 4.6 \cdot 10^{-98}\right) \land \left(a \leq 3.3 \cdot 10^{-18} \lor \neg \left(a \leq 5 \cdot 10^{+23}\right)\right)\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\end{array}
\end{array}
if a < -1.64999999999999992e96 or -3.70000000000000016e30 < a < -6.8000000000000001e-33 or 4.60000000000000001e-98 < a < 3.3000000000000002e-18 or 4.9999999999999999e23 < a Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 82.7%
if -1.64999999999999992e96 < a < -3.70000000000000016e30 or -6.8000000000000001e-33 < a < 4.60000000000000001e-98 or 3.3000000000000002e-18 < a < 4.9999999999999999e23Initial program 98.9%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 81.7%
Final simplification82.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* 60.0 (/ (- x y) (- z t)))))
(if (<= a -1.5e+92)
(* a 120.0)
(if (<= a -8.2e+30)
t_1
(if (<= a -6e-34)
(* a 120.0)
(if (<= a 4.6e-98)
t_1
(if (or (<= a 1.6e-14) (not (<= a 4.2e+23)))
(* a 120.0)
(* (/ 60.0 (- z t)) (- x y)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * ((x - y) / (z - t));
double tmp;
if (a <= -1.5e+92) {
tmp = a * 120.0;
} else if (a <= -8.2e+30) {
tmp = t_1;
} else if (a <= -6e-34) {
tmp = a * 120.0;
} else if (a <= 4.6e-98) {
tmp = t_1;
} else if ((a <= 1.6e-14) || !(a <= 4.2e+23)) {
tmp = a * 120.0;
} else {
tmp = (60.0 / (z - t)) * (x - y);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = 60.0d0 * ((x - y) / (z - t))
if (a <= (-1.5d+92)) then
tmp = a * 120.0d0
else if (a <= (-8.2d+30)) then
tmp = t_1
else if (a <= (-6d-34)) then
tmp = a * 120.0d0
else if (a <= 4.6d-98) then
tmp = t_1
else if ((a <= 1.6d-14) .or. (.not. (a <= 4.2d+23))) then
tmp = a * 120.0d0
else
tmp = (60.0d0 / (z - t)) * (x - y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * ((x - y) / (z - t));
double tmp;
if (a <= -1.5e+92) {
tmp = a * 120.0;
} else if (a <= -8.2e+30) {
tmp = t_1;
} else if (a <= -6e-34) {
tmp = a * 120.0;
} else if (a <= 4.6e-98) {
tmp = t_1;
} else if ((a <= 1.6e-14) || !(a <= 4.2e+23)) {
tmp = a * 120.0;
} else {
tmp = (60.0 / (z - t)) * (x - y);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = 60.0 * ((x - y) / (z - t)) tmp = 0 if a <= -1.5e+92: tmp = a * 120.0 elif a <= -8.2e+30: tmp = t_1 elif a <= -6e-34: tmp = a * 120.0 elif a <= 4.6e-98: tmp = t_1 elif (a <= 1.6e-14) or not (a <= 4.2e+23): tmp = a * 120.0 else: tmp = (60.0 / (z - t)) * (x - y) return tmp
function code(x, y, z, t, a) t_1 = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))) tmp = 0.0 if (a <= -1.5e+92) tmp = Float64(a * 120.0); elseif (a <= -8.2e+30) tmp = t_1; elseif (a <= -6e-34) tmp = Float64(a * 120.0); elseif (a <= 4.6e-98) tmp = t_1; elseif ((a <= 1.6e-14) || !(a <= 4.2e+23)) tmp = Float64(a * 120.0); else tmp = Float64(Float64(60.0 / Float64(z - t)) * Float64(x - y)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = 60.0 * ((x - y) / (z - t)); tmp = 0.0; if (a <= -1.5e+92) tmp = a * 120.0; elseif (a <= -8.2e+30) tmp = t_1; elseif (a <= -6e-34) tmp = a * 120.0; elseif (a <= 4.6e-98) tmp = t_1; elseif ((a <= 1.6e-14) || ~((a <= 4.2e+23))) tmp = a * 120.0; else tmp = (60.0 / (z - t)) * (x - y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.5e+92], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -8.2e+30], t$95$1, If[LessEqual[a, -6e-34], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 4.6e-98], t$95$1, If[Or[LessEqual[a, 1.6e-14], N[Not[LessEqual[a, 4.2e+23]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 60 \cdot \frac{x - y}{z - t}\\
\mathbf{if}\;a \leq -1.5 \cdot 10^{+92}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -8.2 \cdot 10^{+30}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq -6 \cdot 10^{-34}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq 4.6 \cdot 10^{-98}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 1.6 \cdot 10^{-14} \lor \neg \left(a \leq 4.2 \cdot 10^{+23}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{60}{z - t} \cdot \left(x - y\right)\\
\end{array}
\end{array}
if a < -1.50000000000000007e92 or -8.20000000000000011e30 < a < -6e-34 or 4.60000000000000001e-98 < a < 1.6000000000000001e-14 or 4.2000000000000003e23 < a Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 82.7%
if -1.50000000000000007e92 < a < -8.20000000000000011e30 or -6e-34 < a < 4.60000000000000001e-98Initial program 98.9%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 82.2%
if 1.6000000000000001e-14 < a < 4.2000000000000003e23Initial program 100.0%
associate-/l*99.7%
Simplified99.7%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 74.7%
associate-*r/75.0%
associate-*l/74.9%
*-commutative74.9%
Simplified74.9%
Final simplification82.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (* (/ 60.0 (- z t)) x) (* a 120.0))))
(if (<= t -5.6e-49)
t_1
(if (<= t 7.5e-66)
(+ (/ 60.0 (/ z (- x y))) (* a 120.0))
(if (<= t 5e+23) (* 60.0 (/ (- x y) (- z t))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = ((60.0 / (z - t)) * x) + (a * 120.0);
double tmp;
if (t <= -5.6e-49) {
tmp = t_1;
} else if (t <= 7.5e-66) {
tmp = (60.0 / (z / (x - y))) + (a * 120.0);
} else if (t <= 5e+23) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = ((60.0d0 / (z - t)) * x) + (a * 120.0d0)
if (t <= (-5.6d-49)) then
tmp = t_1
else if (t <= 7.5d-66) then
tmp = (60.0d0 / (z / (x - y))) + (a * 120.0d0)
else if (t <= 5d+23) then
tmp = 60.0d0 * ((x - y) / (z - t))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = ((60.0 / (z - t)) * x) + (a * 120.0);
double tmp;
if (t <= -5.6e-49) {
tmp = t_1;
} else if (t <= 7.5e-66) {
tmp = (60.0 / (z / (x - y))) + (a * 120.0);
} else if (t <= 5e+23) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = ((60.0 / (z - t)) * x) + (a * 120.0) tmp = 0 if t <= -5.6e-49: tmp = t_1 elif t <= 7.5e-66: tmp = (60.0 / (z / (x - y))) + (a * 120.0) elif t <= 5e+23: tmp = 60.0 * ((x - y) / (z - t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(Float64(60.0 / Float64(z - t)) * x) + Float64(a * 120.0)) tmp = 0.0 if (t <= -5.6e-49) tmp = t_1; elseif (t <= 7.5e-66) tmp = Float64(Float64(60.0 / Float64(z / Float64(x - y))) + Float64(a * 120.0)); elseif (t <= 5e+23) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = ((60.0 / (z - t)) * x) + (a * 120.0); tmp = 0.0; if (t <= -5.6e-49) tmp = t_1; elseif (t <= 7.5e-66) tmp = (60.0 / (z / (x - y))) + (a * 120.0); elseif (t <= 5e+23) tmp = 60.0 * ((x - y) / (z - t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.6e-49], t$95$1, If[LessEqual[t, 7.5e-66], N[(N[(60.0 / N[(z / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5e+23], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{60}{z - t} \cdot x + a \cdot 120\\
\mathbf{if}\;t \leq -5.6 \cdot 10^{-49}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 7.5 \cdot 10^{-66}:\\
\;\;\;\;\frac{60}{\frac{z}{x - y}} + a \cdot 120\\
\mathbf{elif}\;t \leq 5 \cdot 10^{+23}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -5.59999999999999995e-49 or 4.9999999999999999e23 < t Initial program 99.0%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 85.7%
associate-*r/85.7%
associate-*l/85.7%
*-commutative85.7%
Simplified85.7%
if -5.59999999999999995e-49 < t < 7.49999999999999995e-66Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 90.7%
if 7.49999999999999995e-66 < t < 4.9999999999999999e23Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 86.4%
Final simplification87.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* -60.0 (/ y (- z t)))))
(if (<= a -3.6e-73)
(* a 120.0)
(if (<= a -1e-117)
t_1
(if (<= a -2.32e-234)
(* 60.0 (- (/ x t)))
(if (<= a 2.35e-99) t_1 (* 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 <= -3.6e-73) {
tmp = a * 120.0;
} else if (a <= -1e-117) {
tmp = t_1;
} else if (a <= -2.32e-234) {
tmp = 60.0 * -(x / t);
} else if (a <= 2.35e-99) {
tmp = t_1;
} 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 <= (-3.6d-73)) then
tmp = a * 120.0d0
else if (a <= (-1d-117)) then
tmp = t_1
else if (a <= (-2.32d-234)) then
tmp = 60.0d0 * -(x / t)
else if (a <= 2.35d-99) then
tmp = t_1
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 <= -3.6e-73) {
tmp = a * 120.0;
} else if (a <= -1e-117) {
tmp = t_1;
} else if (a <= -2.32e-234) {
tmp = 60.0 * -(x / t);
} else if (a <= 2.35e-99) {
tmp = t_1;
} 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 <= -3.6e-73: tmp = a * 120.0 elif a <= -1e-117: tmp = t_1 elif a <= -2.32e-234: tmp = 60.0 * -(x / t) elif a <= 2.35e-99: tmp = t_1 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 <= -3.6e-73) tmp = Float64(a * 120.0); elseif (a <= -1e-117) tmp = t_1; elseif (a <= -2.32e-234) tmp = Float64(60.0 * Float64(-Float64(x / t))); elseif (a <= 2.35e-99) tmp = t_1; 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 <= -3.6e-73) tmp = a * 120.0; elseif (a <= -1e-117) tmp = t_1; elseif (a <= -2.32e-234) tmp = 60.0 * -(x / t); elseif (a <= 2.35e-99) tmp = t_1; 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, -3.6e-73], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -1e-117], t$95$1, If[LessEqual[a, -2.32e-234], N[(60.0 * (-N[(x / t), $MachinePrecision])), $MachinePrecision], If[LessEqual[a, 2.35e-99], t$95$1, N[(a * 120.0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -60 \cdot \frac{y}{z - t}\\
\mathbf{if}\;a \leq -3.6 \cdot 10^{-73}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -1 \cdot 10^{-117}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq -2.32 \cdot 10^{-234}:\\
\;\;\;\;60 \cdot \left(-\frac{x}{t}\right)\\
\mathbf{elif}\;a \leq 2.35 \cdot 10^{-99}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -3.5999999999999999e-73 or 2.34999999999999995e-99 < a Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 70.8%
if -3.5999999999999999e-73 < a < -1.00000000000000003e-117 or -2.32000000000000007e-234 < a < 2.34999999999999995e-99Initial program 98.3%
associate-/l*99.7%
Simplified99.7%
associate-/r/99.6%
Applied egg-rr99.6%
Taylor expanded in y around inf 46.2%
if -1.00000000000000003e-117 < a < -2.32000000000000007e-234Initial program 99.8%
associate-/l*99.6%
Simplified99.6%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in x around inf 64.4%
Taylor expanded in z around 0 41.1%
associate-*r/41.1%
neg-mul-141.1%
Simplified41.1%
Final simplification61.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -4.5e+201) (not (<= y 3.9e+77))) (+ (/ (* y -60.0) (- z t)) (* 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.5e+201) || !(y <= 3.9e+77)) {
tmp = ((y * -60.0) / (z - t)) + (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.5d+201)) .or. (.not. (y <= 3.9d+77))) then
tmp = ((y * (-60.0d0)) / (z - t)) + (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.5e+201) || !(y <= 3.9e+77)) {
tmp = ((y * -60.0) / (z - t)) + (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.5e+201) or not (y <= 3.9e+77): tmp = ((y * -60.0) / (z - t)) + (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.5e+201) || !(y <= 3.9e+77)) tmp = Float64(Float64(Float64(y * -60.0) / Float64(z - t)) + Float64(a * 120.0)); else tmp = Float64(Float64(Float64(60.0 / 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.5e+201) || ~((y <= 3.9e+77))) tmp = ((y * -60.0) / (z - t)) + (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.5e+201], N[Not[LessEqual[y, 3.9e+77]], $MachinePrecision]], N[(N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.5 \cdot 10^{+201} \lor \neg \left(y \leq 3.9 \cdot 10^{+77}\right):\\
\;\;\;\;\frac{y \cdot -60}{z - t} + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{60}{z - t} \cdot x + a \cdot 120\\
\end{array}
\end{array}
if y < -4.5000000000000001e201 or 3.8999999999999998e77 < y Initial program 98.3%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 96.4%
associate-*r/95.0%
Simplified95.0%
if -4.5000000000000001e201 < y < 3.8999999999999998e77Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 90.9%
associate-*r/90.8%
associate-*l/90.8%
*-commutative90.8%
Simplified90.8%
Final simplification91.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ 60.0 (- z t))))
(if (<= y -4.9e+201)
(* 60.0 (/ (- x y) (- z t)))
(if (<= y 8.5e+247) (+ (* t_1 x) (* a 120.0)) (* t_1 (- x y))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 / (z - t);
double tmp;
if (y <= -4.9e+201) {
tmp = 60.0 * ((x - y) / (z - t));
} else if (y <= 8.5e+247) {
tmp = (t_1 * x) + (a * 120.0);
} else {
tmp = t_1 * (x - y);
}
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 - t)
if (y <= (-4.9d+201)) then
tmp = 60.0d0 * ((x - y) / (z - t))
else if (y <= 8.5d+247) then
tmp = (t_1 * x) + (a * 120.0d0)
else
tmp = t_1 * (x - y)
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 - t);
double tmp;
if (y <= -4.9e+201) {
tmp = 60.0 * ((x - y) / (z - t));
} else if (y <= 8.5e+247) {
tmp = (t_1 * x) + (a * 120.0);
} else {
tmp = t_1 * (x - y);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = 60.0 / (z - t) tmp = 0 if y <= -4.9e+201: tmp = 60.0 * ((x - y) / (z - t)) elif y <= 8.5e+247: tmp = (t_1 * x) + (a * 120.0) else: tmp = t_1 * (x - y) return tmp
function code(x, y, z, t, a) t_1 = Float64(60.0 / Float64(z - t)) tmp = 0.0 if (y <= -4.9e+201) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); elseif (y <= 8.5e+247) tmp = Float64(Float64(t_1 * x) + Float64(a * 120.0)); else tmp = Float64(t_1 * Float64(x - y)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = 60.0 / (z - t); tmp = 0.0; if (y <= -4.9e+201) tmp = 60.0 * ((x - y) / (z - t)); elseif (y <= 8.5e+247) tmp = (t_1 * x) + (a * 120.0); else tmp = t_1 * (x - y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.9e+201], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8.5e+247], N[(N[(t$95$1 * x), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[(x - y), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{60}{z - t}\\
\mathbf{if}\;y \leq -4.9 \cdot 10^{+201}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{elif}\;y \leq 8.5 \cdot 10^{+247}:\\
\;\;\;\;t_1 \cdot x + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot \left(x - y\right)\\
\end{array}
\end{array}
if y < -4.89999999999999995e201Initial program 95.2%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 73.5%
if -4.89999999999999995e201 < y < 8.4999999999999998e247Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 87.3%
associate-*r/87.2%
associate-*l/87.2%
*-commutative87.2%
Simplified87.2%
if 8.4999999999999998e247 < y Initial program 99.7%
associate-/l*100.0%
Simplified100.0%
associate-/r/100.0%
Applied egg-rr100.0%
Taylor expanded in a around 0 84.8%
associate-*r/84.7%
associate-*l/85.0%
*-commutative85.0%
Simplified85.0%
Final simplification85.9%
(FPCore (x y z t a)
:precision binary64
(if (<= a -1.05e-40)
(* a 120.0)
(if (<= a 8.2e-167)
(* 60.0 (/ x (- z t)))
(if (<= a 2.2e-99) (* -60.0 (/ y (- z t))) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.05e-40) {
tmp = a * 120.0;
} else if (a <= 8.2e-167) {
tmp = 60.0 * (x / (z - t));
} else if (a <= 2.2e-99) {
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 <= (-1.05d-40)) then
tmp = a * 120.0d0
else if (a <= 8.2d-167) then
tmp = 60.0d0 * (x / (z - t))
else if (a <= 2.2d-99) 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 <= -1.05e-40) {
tmp = a * 120.0;
} else if (a <= 8.2e-167) {
tmp = 60.0 * (x / (z - t));
} else if (a <= 2.2e-99) {
tmp = -60.0 * (y / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.05e-40: tmp = a * 120.0 elif a <= 8.2e-167: tmp = 60.0 * (x / (z - t)) elif a <= 2.2e-99: 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 <= -1.05e-40) tmp = Float64(a * 120.0); elseif (a <= 8.2e-167) tmp = Float64(60.0 * Float64(x / Float64(z - t))); elseif (a <= 2.2e-99) 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 <= -1.05e-40) tmp = a * 120.0; elseif (a <= 8.2e-167) tmp = 60.0 * (x / (z - t)); elseif (a <= 2.2e-99) 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, -1.05e-40], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 8.2e-167], N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.2e-99], 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 -1.05 \cdot 10^{-40}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq 8.2 \cdot 10^{-167}:\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\
\mathbf{elif}\;a \leq 2.2 \cdot 10^{-99}:\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -1.05000000000000009e-40 or 2.20000000000000004e-99 < a Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 72.8%
if -1.05000000000000009e-40 < a < 8.20000000000000036e-167Initial program 99.6%
associate-/l*99.7%
Simplified99.7%
associate-/r/99.6%
Applied egg-rr99.6%
Taylor expanded in x around inf 52.5%
if 8.20000000000000036e-167 < a < 2.20000000000000004e-99Initial program 91.4%
associate-/l*99.5%
Simplified99.5%
associate-/r/99.5%
Applied egg-rr99.5%
Taylor expanded in y around inf 67.0%
Final simplification65.2%
(FPCore (x y z t a)
:precision binary64
(if (<= a -5e-40)
(* a 120.0)
(if (<= a 3.7e-166)
(* 60.0 (/ x (- z t)))
(if (<= a 5.4e-100) (* y (/ -60.0 (- z t))) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -5e-40) {
tmp = a * 120.0;
} else if (a <= 3.7e-166) {
tmp = 60.0 * (x / (z - t));
} else if (a <= 5.4e-100) {
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 <= (-5d-40)) then
tmp = a * 120.0d0
else if (a <= 3.7d-166) then
tmp = 60.0d0 * (x / (z - t))
else if (a <= 5.4d-100) 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 <= -5e-40) {
tmp = a * 120.0;
} else if (a <= 3.7e-166) {
tmp = 60.0 * (x / (z - t));
} else if (a <= 5.4e-100) {
tmp = y * (-60.0 / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -5e-40: tmp = a * 120.0 elif a <= 3.7e-166: tmp = 60.0 * (x / (z - t)) elif a <= 5.4e-100: 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 <= -5e-40) tmp = Float64(a * 120.0); elseif (a <= 3.7e-166) tmp = Float64(60.0 * Float64(x / Float64(z - t))); elseif (a <= 5.4e-100) tmp = Float64(y * Float64(-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 <= -5e-40) tmp = a * 120.0; elseif (a <= 3.7e-166) tmp = 60.0 * (x / (z - t)); elseif (a <= 5.4e-100) 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, -5e-40], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 3.7e-166], N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 5.4e-100], N[(y * N[(-60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5 \cdot 10^{-40}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq 3.7 \cdot 10^{-166}:\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\
\mathbf{elif}\;a \leq 5.4 \cdot 10^{-100}:\\
\;\;\;\;y \cdot \frac{-60}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -4.99999999999999965e-40 or 5.40000000000000031e-100 < a Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 72.8%
if -4.99999999999999965e-40 < a < 3.7000000000000003e-166Initial program 99.6%
associate-/l*99.7%
Simplified99.7%
associate-/r/99.6%
Applied egg-rr99.6%
Taylor expanded in x around inf 52.5%
if 3.7000000000000003e-166 < a < 5.40000000000000031e-100Initial program 91.4%
associate-/l*99.5%
Simplified99.5%
associate-/r/99.5%
Applied egg-rr99.5%
Taylor expanded in y around inf 67.0%
associate-*r/59.1%
associate-*l/67.2%
*-commutative67.2%
Simplified67.2%
Final simplification65.2%
(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(Float64(60.0 / 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[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60}{z - t} \cdot \left(x - y\right) + a \cdot 120
\end{array}
Initial program 99.4%
associate-/l*99.8%
Simplified99.8%
associate-/r/99.8%
Applied egg-rr99.8%
Final simplification99.8%
(FPCore (x y z t a) :precision binary64 (+ (/ 60.0 (/ (- z t) (- x y))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (60.0d0 / ((z - t) / (x - y))) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
def code(x, y, z, t, a): return (60.0 / ((z - t) / (x - y))) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = (60.0 / ((z - t) / (x - y))) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60}{\frac{z - t}{x - y}} + a \cdot 120
\end{array}
Initial program 99.4%
associate-/l*99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -4.6e+201) (not (<= y 3.3e+232))) (* -60.0 (/ y z)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -4.6e+201) || !(y <= 3.3e+232)) {
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 ((y <= (-4.6d+201)) .or. (.not. (y <= 3.3d+232))) 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 ((y <= -4.6e+201) || !(y <= 3.3e+232)) {
tmp = -60.0 * (y / z);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -4.6e+201) or not (y <= 3.3e+232): tmp = -60.0 * (y / z) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -4.6e+201) || !(y <= 3.3e+232)) 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 ((y <= -4.6e+201) || ~((y <= 3.3e+232))) tmp = -60.0 * (y / z); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -4.6e+201], N[Not[LessEqual[y, 3.3e+232]], $MachinePrecision]], N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.6 \cdot 10^{+201} \lor \neg \left(y \leq 3.3 \cdot 10^{+232}\right):\\
\;\;\;\;-60 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if y < -4.6000000000000002e201 or 3.3e232 < y Initial program 97.3%
associate-/l*99.8%
Simplified99.8%
associate-/r/99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 72.8%
Taylor expanded in z around inf 53.4%
if -4.6000000000000002e201 < y < 3.3e232Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 55.2%
Final simplification54.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.22e-174) (not (<= a 1.9e-150))) (* a 120.0) (* 60.0 (/ x z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.22e-174) || !(a <= 1.9e-150)) {
tmp = a * 120.0;
} else {
tmp = 60.0 * (x / z);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-1.22d-174)) .or. (.not. (a <= 1.9d-150))) then
tmp = a * 120.0d0
else
tmp = 60.0d0 * (x / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.22e-174) || !(a <= 1.9e-150)) {
tmp = a * 120.0;
} else {
tmp = 60.0 * (x / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.22e-174) or not (a <= 1.9e-150): tmp = a * 120.0 else: tmp = 60.0 * (x / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.22e-174) || !(a <= 1.9e-150)) tmp = Float64(a * 120.0); else tmp = Float64(60.0 * Float64(x / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1.22e-174) || ~((a <= 1.9e-150))) tmp = a * 120.0; else tmp = 60.0 * (x / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.22e-174], N[Not[LessEqual[a, 1.9e-150]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.22 \cdot 10^{-174} \lor \neg \left(a \leq 1.9 \cdot 10^{-150}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x}{z}\\
\end{array}
\end{array}
if a < -1.2200000000000001e-174 or 1.8999999999999999e-150 < a Initial program 99.4%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 63.6%
if -1.2200000000000001e-174 < a < 1.8999999999999999e-150Initial program 99.5%
associate-/l*99.6%
Simplified99.6%
associate-/r/99.6%
Applied egg-rr99.6%
Taylor expanded in x around inf 54.2%
Taylor expanded in z around inf 34.4%
Final simplification56.4%
(FPCore (x y z t a) :precision binary64 (* a 120.0))
double code(double x, double y, double z, double t, double a) {
return a * 120.0;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = a * 120.0d0
end function
public static double code(double x, double y, double z, double t, double a) {
return a * 120.0;
}
def code(x, y, z, t, a): return a * 120.0
function code(x, y, z, t, a) return Float64(a * 120.0) end
function tmp = code(x, y, z, t, a) tmp = a * 120.0; end
code[x_, y_, z_, t_, a_] := N[(a * 120.0), $MachinePrecision]
\begin{array}{l}
\\
a \cdot 120
\end{array}
Initial program 99.4%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 50.2%
Final simplification50.2%
(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 2024010
(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)))