
(FPCore (x y z t a) :precision binary64 (+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((60.0d0 * (x - y)) / (z - t)) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
def code(x, y, z, t, a): return ((60.0 * (x - y)) / (z - t)) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = ((60.0 * (x - y)) / (z - t)) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((60.0d0 * (x - y)) / (z - t)) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
def code(x, y, z, t, a): return ((60.0 * (x - y)) / (z - t)) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = ((60.0 * (x - y)) / (z - t)) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120
\end{array}
(FPCore (x y z t a) :precision binary64 (+ (/ 60.0 (/ (- z t) (- x y))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (60.0d0 / ((z - t) / (x - y))) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
def code(x, y, z, t, a): return (60.0 / ((z - t) / (x - y))) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = (60.0 / ((z - t) / (x - y))) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60}{\frac{z - t}{x - y}} + a \cdot 120
\end{array}
Initial program 99.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)))) (t_2 (/ (* 60.0 (- x y)) (- z t))))
(if (<= t_2 -5e+191)
t_1
(if (<= t_2 -5e+170)
(+ (* a 120.0) (/ -60.0 (/ t x)))
(if (<= t_2 -2e+37)
t_1
(if (<= t_2 5e-87)
(* a 120.0)
(if (or (<= t_2 1e-43) (not (<= t_2 2e+21)))
t_1
(+ (* a 120.0) (* x (/ -60.0 t))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * ((x - y) / (z - t));
double t_2 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_2 <= -5e+191) {
tmp = t_1;
} else if (t_2 <= -5e+170) {
tmp = (a * 120.0) + (-60.0 / (t / x));
} else if (t_2 <= -2e+37) {
tmp = t_1;
} else if (t_2 <= 5e-87) {
tmp = a * 120.0;
} else if ((t_2 <= 1e-43) || !(t_2 <= 2e+21)) {
tmp = t_1;
} else {
tmp = (a * 120.0) + (x * (-60.0 / t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 60.0d0 * ((x - y) / (z - t))
t_2 = (60.0d0 * (x - y)) / (z - t)
if (t_2 <= (-5d+191)) then
tmp = t_1
else if (t_2 <= (-5d+170)) then
tmp = (a * 120.0d0) + ((-60.0d0) / (t / x))
else if (t_2 <= (-2d+37)) then
tmp = t_1
else if (t_2 <= 5d-87) then
tmp = a * 120.0d0
else if ((t_2 <= 1d-43) .or. (.not. (t_2 <= 2d+21))) then
tmp = t_1
else
tmp = (a * 120.0d0) + (x * ((-60.0d0) / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * ((x - y) / (z - t));
double t_2 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_2 <= -5e+191) {
tmp = t_1;
} else if (t_2 <= -5e+170) {
tmp = (a * 120.0) + (-60.0 / (t / x));
} else if (t_2 <= -2e+37) {
tmp = t_1;
} else if (t_2 <= 5e-87) {
tmp = a * 120.0;
} else if ((t_2 <= 1e-43) || !(t_2 <= 2e+21)) {
tmp = t_1;
} else {
tmp = (a * 120.0) + (x * (-60.0 / t));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = 60.0 * ((x - y) / (z - t)) t_2 = (60.0 * (x - y)) / (z - t) tmp = 0 if t_2 <= -5e+191: tmp = t_1 elif t_2 <= -5e+170: tmp = (a * 120.0) + (-60.0 / (t / x)) elif t_2 <= -2e+37: tmp = t_1 elif t_2 <= 5e-87: tmp = a * 120.0 elif (t_2 <= 1e-43) or not (t_2 <= 2e+21): tmp = t_1 else: tmp = (a * 120.0) + (x * (-60.0 / t)) return tmp
function code(x, y, z, t, a) t_1 = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))) t_2 = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) tmp = 0.0 if (t_2 <= -5e+191) tmp = t_1; elseif (t_2 <= -5e+170) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 / Float64(t / x))); elseif (t_2 <= -2e+37) tmp = t_1; elseif (t_2 <= 5e-87) tmp = Float64(a * 120.0); elseif ((t_2 <= 1e-43) || !(t_2 <= 2e+21)) tmp = t_1; else tmp = Float64(Float64(a * 120.0) + Float64(x * Float64(-60.0 / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = 60.0 * ((x - y) / (z - t)); t_2 = (60.0 * (x - y)) / (z - t); tmp = 0.0; if (t_2 <= -5e+191) tmp = t_1; elseif (t_2 <= -5e+170) tmp = (a * 120.0) + (-60.0 / (t / x)); elseif (t_2 <= -2e+37) tmp = t_1; elseif (t_2 <= 5e-87) tmp = a * 120.0; elseif ((t_2 <= 1e-43) || ~((t_2 <= 2e+21))) tmp = t_1; else tmp = (a * 120.0) + (x * (-60.0 / t)); 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]}, Block[{t$95$2 = N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+191], t$95$1, If[LessEqual[t$95$2, -5e+170], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 / N[(t / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, -2e+37], t$95$1, If[LessEqual[t$95$2, 5e-87], N[(a * 120.0), $MachinePrecision], If[Or[LessEqual[t$95$2, 1e-43], N[Not[LessEqual[t$95$2, 2e+21]], $MachinePrecision]], t$95$1, N[(N[(a * 120.0), $MachinePrecision] + N[(x * N[(-60.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 60 \cdot \frac{x - y}{z - t}\\
t_2 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t_2 \leq -5 \cdot 10^{+191}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_2 \leq -5 \cdot 10^{+170}:\\
\;\;\;\;a \cdot 120 + \frac{-60}{\frac{t}{x}}\\
\mathbf{elif}\;t_2 \leq -2 \cdot 10^{+37}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_2 \leq 5 \cdot 10^{-87}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;t_2 \leq 10^{-43} \lor \neg \left(t_2 \leq 2 \cdot 10^{+21}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + x \cdot \frac{-60}{t}\\
\end{array}
\end{array}
if (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < -5.0000000000000002e191 or -4.99999999999999977e170 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < -1.99999999999999991e37 or 5.00000000000000042e-87 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < 1.00000000000000008e-43 or 2e21 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) Initial program 98.9%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 84.4%
if -5.0000000000000002e191 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < -4.99999999999999977e170Initial program 100.0%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in x around inf 99.8%
associate-*r/100.0%
associate-*l/99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in z around 0 99.8%
associate-*r/100.0%
associate-/l*100.0%
Simplified100.0%
if -1.99999999999999991e37 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < 5.00000000000000042e-87Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 78.1%
if 1.00000000000000008e-43 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < 2e21Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around inf 88.9%
associate-*r/88.9%
associate-*l/89.0%
*-commutative89.0%
Simplified89.0%
Taylor expanded in z around 0 69.7%
Final simplification80.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* 60.0 (- x y)) (- z t))))
(if (or (<= t_1 -5e+301)
(and (not (<= t_1 -5e+153))
(or (<= t_1 -1e+76) (not (<= t_1 2e+70)))))
(* 60.0 (/ (- x y) (- z t)))
(+ (* a 120.0) (* x (/ 60.0 (- z t)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (60.0 * (x - y)) / (z - t);
double tmp;
if ((t_1 <= -5e+301) || (!(t_1 <= -5e+153) && ((t_1 <= -1e+76) || !(t_1 <= 2e+70)))) {
tmp = 60.0 * ((x - 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) :: t_1
real(8) :: tmp
t_1 = (60.0d0 * (x - y)) / (z - t)
if ((t_1 <= (-5d+301)) .or. (.not. (t_1 <= (-5d+153))) .and. (t_1 <= (-1d+76)) .or. (.not. (t_1 <= 2d+70))) then
tmp = 60.0d0 * ((x - 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 t_1 = (60.0 * (x - y)) / (z - t);
double tmp;
if ((t_1 <= -5e+301) || (!(t_1 <= -5e+153) && ((t_1 <= -1e+76) || !(t_1 <= 2e+70)))) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = (a * 120.0) + (x * (60.0 / (z - t)));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (60.0 * (x - y)) / (z - t) tmp = 0 if (t_1 <= -5e+301) or (not (t_1 <= -5e+153) and ((t_1 <= -1e+76) or not (t_1 <= 2e+70))): tmp = 60.0 * ((x - y) / (z - t)) else: tmp = (a * 120.0) + (x * (60.0 / (z - t))) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) tmp = 0.0 if ((t_1 <= -5e+301) || (!(t_1 <= -5e+153) && ((t_1 <= -1e+76) || !(t_1 <= 2e+70)))) tmp = Float64(60.0 * Float64(Float64(x - 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) t_1 = (60.0 * (x - y)) / (z - t); tmp = 0.0; if ((t_1 <= -5e+301) || (~((t_1 <= -5e+153)) && ((t_1 <= -1e+76) || ~((t_1 <= 2e+70))))) tmp = 60.0 * ((x - y) / (z - t)); else tmp = (a * 120.0) + (x * (60.0 / (z - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -5e+301], And[N[Not[LessEqual[t$95$1, -5e+153]], $MachinePrecision], Or[LessEqual[t$95$1, -1e+76], N[Not[LessEqual[t$95$1, 2e+70]], $MachinePrecision]]]], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(x * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t_1 \leq -5 \cdot 10^{+301} \lor \neg \left(t_1 \leq -5 \cdot 10^{+153}\right) \land \left(t_1 \leq -1 \cdot 10^{+76} \lor \neg \left(t_1 \leq 2 \cdot 10^{+70}\right)\right):\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + x \cdot \frac{60}{z - t}\\
\end{array}
\end{array}
if (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < -5.0000000000000004e301 or -5.00000000000000018e153 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < -1e76 or 2.00000000000000015e70 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) Initial program 98.5%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 89.6%
if -5.0000000000000004e301 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < -5.00000000000000018e153 or -1e76 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < 2.00000000000000015e70Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 84.9%
associate-*r/84.9%
associate-*l/84.9%
*-commutative84.9%
Simplified84.9%
Final simplification86.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* 60.0 (/ (- x y) (- z t))))
(t_2 (+ (* a 120.0) (* -60.0 (/ y z)))))
(if (<= (* a 120.0) -2e+55)
t_2
(if (<= (* a 120.0) -0.001)
t_1
(if (<= (* a 120.0) -5e-86)
(* a 120.0)
(if (<= (* a 120.0) 5e-60)
t_1
(if (<= (* a 120.0) 1e-26)
(+ (* a 120.0) (* 60.0 (/ y t)))
(if (<= (* a 120.0) 2000.0) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * ((x - y) / (z - t));
double t_2 = (a * 120.0) + (-60.0 * (y / z));
double tmp;
if ((a * 120.0) <= -2e+55) {
tmp = t_2;
} else if ((a * 120.0) <= -0.001) {
tmp = t_1;
} else if ((a * 120.0) <= -5e-86) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 5e-60) {
tmp = t_1;
} else if ((a * 120.0) <= 1e-26) {
tmp = (a * 120.0) + (60.0 * (y / t));
} else if ((a * 120.0) <= 2000.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 60.0d0 * ((x - y) / (z - t))
t_2 = (a * 120.0d0) + ((-60.0d0) * (y / z))
if ((a * 120.0d0) <= (-2d+55)) then
tmp = t_2
else if ((a * 120.0d0) <= (-0.001d0)) then
tmp = t_1
else if ((a * 120.0d0) <= (-5d-86)) then
tmp = a * 120.0d0
else if ((a * 120.0d0) <= 5d-60) then
tmp = t_1
else if ((a * 120.0d0) <= 1d-26) then
tmp = (a * 120.0d0) + (60.0d0 * (y / t))
else if ((a * 120.0d0) <= 2000.0d0) then
tmp = t_1
else
tmp = t_2
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 t_2 = (a * 120.0) + (-60.0 * (y / z));
double tmp;
if ((a * 120.0) <= -2e+55) {
tmp = t_2;
} else if ((a * 120.0) <= -0.001) {
tmp = t_1;
} else if ((a * 120.0) <= -5e-86) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 5e-60) {
tmp = t_1;
} else if ((a * 120.0) <= 1e-26) {
tmp = (a * 120.0) + (60.0 * (y / t));
} else if ((a * 120.0) <= 2000.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = 60.0 * ((x - y) / (z - t)) t_2 = (a * 120.0) + (-60.0 * (y / z)) tmp = 0 if (a * 120.0) <= -2e+55: tmp = t_2 elif (a * 120.0) <= -0.001: tmp = t_1 elif (a * 120.0) <= -5e-86: tmp = a * 120.0 elif (a * 120.0) <= 5e-60: tmp = t_1 elif (a * 120.0) <= 1e-26: tmp = (a * 120.0) + (60.0 * (y / t)) elif (a * 120.0) <= 2000.0: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))) t_2 = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / z))) tmp = 0.0 if (Float64(a * 120.0) <= -2e+55) tmp = t_2; elseif (Float64(a * 120.0) <= -0.001) tmp = t_1; elseif (Float64(a * 120.0) <= -5e-86) tmp = Float64(a * 120.0); elseif (Float64(a * 120.0) <= 5e-60) tmp = t_1; elseif (Float64(a * 120.0) <= 1e-26) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(y / t))); elseif (Float64(a * 120.0) <= 2000.0) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = 60.0 * ((x - y) / (z - t)); t_2 = (a * 120.0) + (-60.0 * (y / z)); tmp = 0.0; if ((a * 120.0) <= -2e+55) tmp = t_2; elseif ((a * 120.0) <= -0.001) tmp = t_1; elseif ((a * 120.0) <= -5e-86) tmp = a * 120.0; elseif ((a * 120.0) <= 5e-60) tmp = t_1; elseif ((a * 120.0) <= 1e-26) tmp = (a * 120.0) + (60.0 * (y / t)); elseif ((a * 120.0) <= 2000.0) tmp = t_1; else tmp = t_2; 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]}, Block[{t$95$2 = N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * 120.0), $MachinePrecision], -2e+55], t$95$2, If[LessEqual[N[(a * 120.0), $MachinePrecision], -0.001], t$95$1, If[LessEqual[N[(a * 120.0), $MachinePrecision], -5e-86], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 5e-60], t$95$1, If[LessEqual[N[(a * 120.0), $MachinePrecision], 1e-26], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 2000.0], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 60 \cdot \frac{x - y}{z - t}\\
t_2 := a \cdot 120 + -60 \cdot \frac{y}{z}\\
\mathbf{if}\;a \cdot 120 \leq -2 \cdot 10^{+55}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \cdot 120 \leq -0.001:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \cdot 120 \leq -5 \cdot 10^{-86}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-60}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \cdot 120 \leq 10^{-26}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t}\\
\mathbf{elif}\;a \cdot 120 \leq 2000:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if (*.f64 a 120) < -2.00000000000000002e55 or 2e3 < (*.f64 a 120) Initial program 99.9%
Taylor expanded in x around 0 90.3%
Taylor expanded in t around 0 78.9%
if -2.00000000000000002e55 < (*.f64 a 120) < -1e-3 or -4.9999999999999999e-86 < (*.f64 a 120) < 5.0000000000000001e-60 or 1e-26 < (*.f64 a 120) < 2e3Initial program 98.9%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 80.7%
if -1e-3 < (*.f64 a 120) < -4.9999999999999999e-86Initial program 100.0%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in z around inf 70.7%
if 5.0000000000000001e-60 < (*.f64 a 120) < 1e-26Initial program 99.8%
Taylor expanded in x around 0 99.8%
Taylor expanded in z around 0 100.0%
Final simplification79.9%
(FPCore (x y z t a)
:precision binary64
(if (or (<= a -1.8e+48)
(and (not (<= a -1.1e-6))
(or (<= a -3.8e-88)
(and (not (<= a 44.0))
(or (<= a 9e+40) (not (<= a 1.25e+63)))))))
(* 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.8e+48) || (!(a <= -1.1e-6) && ((a <= -3.8e-88) || (!(a <= 44.0) && ((a <= 9e+40) || !(a <= 1.25e+63)))))) {
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.8d+48)) .or. (.not. (a <= (-1.1d-6))) .and. (a <= (-3.8d-88)) .or. (.not. (a <= 44.0d0)) .and. (a <= 9d+40) .or. (.not. (a <= 1.25d+63))) 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.8e+48) || (!(a <= -1.1e-6) && ((a <= -3.8e-88) || (!(a <= 44.0) && ((a <= 9e+40) || !(a <= 1.25e+63)))))) {
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.8e+48) or (not (a <= -1.1e-6) and ((a <= -3.8e-88) or (not (a <= 44.0) and ((a <= 9e+40) or not (a <= 1.25e+63))))): 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.8e+48) || (!(a <= -1.1e-6) && ((a <= -3.8e-88) || (!(a <= 44.0) && ((a <= 9e+40) || !(a <= 1.25e+63)))))) 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.8e+48) || (~((a <= -1.1e-6)) && ((a <= -3.8e-88) || (~((a <= 44.0)) && ((a <= 9e+40) || ~((a <= 1.25e+63))))))) 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.8e+48], And[N[Not[LessEqual[a, -1.1e-6]], $MachinePrecision], Or[LessEqual[a, -3.8e-88], And[N[Not[LessEqual[a, 44.0]], $MachinePrecision], Or[LessEqual[a, 9e+40], N[Not[LessEqual[a, 1.25e+63]], $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.8 \cdot 10^{+48} \lor \neg \left(a \leq -1.1 \cdot 10^{-6}\right) \land \left(a \leq -3.8 \cdot 10^{-88} \lor \neg \left(a \leq 44\right) \land \left(a \leq 9 \cdot 10^{+40} \lor \neg \left(a \leq 1.25 \cdot 10^{+63}\right)\right)\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\end{array}
\end{array}
if a < -1.79999999999999992e48 or -1.1000000000000001e-6 < a < -3.80000000000000011e-88 or 44 < a < 9.00000000000000064e40 or 1.25000000000000003e63 < a Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 76.6%
if -1.79999999999999992e48 < a < -1.1000000000000001e-6 or -3.80000000000000011e-88 < a < 44 or 9.00000000000000064e40 < a < 1.25000000000000003e63Initial program 99.0%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 79.5%
Final simplification78.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (* a 120.0) (* -60.0 (/ y z))))
(t_2 (+ (* a 120.0) (* x (/ -60.0 t)))))
(if (<= z -2.8e+51)
t_1
(if (<= z -2.9e-83)
(+ (* a 120.0) (* 60.0 (/ y t)))
(if (<= z -2e-236)
t_2
(if (<= z 5.2e-138)
(* 60.0 (/ (- x y) (- z t)))
(if (<= z 8.6e-14) t_2 t_1)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (a * 120.0) + (-60.0 * (y / z));
double t_2 = (a * 120.0) + (x * (-60.0 / t));
double tmp;
if (z <= -2.8e+51) {
tmp = t_1;
} else if (z <= -2.9e-83) {
tmp = (a * 120.0) + (60.0 * (y / t));
} else if (z <= -2e-236) {
tmp = t_2;
} else if (z <= 5.2e-138) {
tmp = 60.0 * ((x - y) / (z - t));
} else if (z <= 8.6e-14) {
tmp = t_2;
} 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) :: t_2
real(8) :: tmp
t_1 = (a * 120.0d0) + ((-60.0d0) * (y / z))
t_2 = (a * 120.0d0) + (x * ((-60.0d0) / t))
if (z <= (-2.8d+51)) then
tmp = t_1
else if (z <= (-2.9d-83)) then
tmp = (a * 120.0d0) + (60.0d0 * (y / t))
else if (z <= (-2d-236)) then
tmp = t_2
else if (z <= 5.2d-138) then
tmp = 60.0d0 * ((x - y) / (z - t))
else if (z <= 8.6d-14) then
tmp = t_2
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 = (a * 120.0) + (-60.0 * (y / z));
double t_2 = (a * 120.0) + (x * (-60.0 / t));
double tmp;
if (z <= -2.8e+51) {
tmp = t_1;
} else if (z <= -2.9e-83) {
tmp = (a * 120.0) + (60.0 * (y / t));
} else if (z <= -2e-236) {
tmp = t_2;
} else if (z <= 5.2e-138) {
tmp = 60.0 * ((x - y) / (z - t));
} else if (z <= 8.6e-14) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (a * 120.0) + (-60.0 * (y / z)) t_2 = (a * 120.0) + (x * (-60.0 / t)) tmp = 0 if z <= -2.8e+51: tmp = t_1 elif z <= -2.9e-83: tmp = (a * 120.0) + (60.0 * (y / t)) elif z <= -2e-236: tmp = t_2 elif z <= 5.2e-138: tmp = 60.0 * ((x - y) / (z - t)) elif z <= 8.6e-14: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / z))) t_2 = Float64(Float64(a * 120.0) + Float64(x * Float64(-60.0 / t))) tmp = 0.0 if (z <= -2.8e+51) tmp = t_1; elseif (z <= -2.9e-83) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(y / t))); elseif (z <= -2e-236) tmp = t_2; elseif (z <= 5.2e-138) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); elseif (z <= 8.6e-14) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (a * 120.0) + (-60.0 * (y / z)); t_2 = (a * 120.0) + (x * (-60.0 / t)); tmp = 0.0; if (z <= -2.8e+51) tmp = t_1; elseif (z <= -2.9e-83) tmp = (a * 120.0) + (60.0 * (y / t)); elseif (z <= -2e-236) tmp = t_2; elseif (z <= 5.2e-138) tmp = 60.0 * ((x - y) / (z - t)); elseif (z <= 8.6e-14) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(a * 120.0), $MachinePrecision] + N[(x * N[(-60.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.8e+51], t$95$1, If[LessEqual[z, -2.9e-83], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2e-236], t$95$2, If[LessEqual[z, 5.2e-138], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.6e-14], t$95$2, t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot 120 + -60 \cdot \frac{y}{z}\\
t_2 := a \cdot 120 + x \cdot \frac{-60}{t}\\
\mathbf{if}\;z \leq -2.8 \cdot 10^{+51}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -2.9 \cdot 10^{-83}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t}\\
\mathbf{elif}\;z \leq -2 \cdot 10^{-236}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{-138}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{elif}\;z \leq 8.6 \cdot 10^{-14}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -2.80000000000000005e51 or 8.59999999999999996e-14 < z Initial program 99.8%
Taylor expanded in x around 0 86.2%
Taylor expanded in t around 0 78.8%
if -2.80000000000000005e51 < z < -2.8999999999999999e-83Initial program 96.0%
Taylor expanded in x around 0 84.1%
Taylor expanded in z around 0 76.6%
if -2.8999999999999999e-83 < z < -2.0000000000000001e-236 or 5.2e-138 < z < 8.59999999999999996e-14Initial program 99.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 86.3%
associate-*r/86.3%
associate-*l/86.2%
*-commutative86.2%
Simplified86.2%
Taylor expanded in z around 0 73.4%
if -2.0000000000000001e-236 < z < 5.2e-138Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 88.2%
Final simplification78.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (* a 120.0) (* x (/ -60.0 t)))))
(if (<= z -1.02e+52)
(+ (* a 120.0) (* y (/ -60.0 z)))
(if (<= z -7.8e-84)
(+ (* a 120.0) (* 60.0 (/ y t)))
(if (<= z -2.6e-236)
t_1
(if (<= z 7e-143)
(* 60.0 (/ (- x y) (- z t)))
(if (<= z 1.7e-13) t_1 (+ (* a 120.0) (* -60.0 (/ y z))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (a * 120.0) + (x * (-60.0 / t));
double tmp;
if (z <= -1.02e+52) {
tmp = (a * 120.0) + (y * (-60.0 / z));
} else if (z <= -7.8e-84) {
tmp = (a * 120.0) + (60.0 * (y / t));
} else if (z <= -2.6e-236) {
tmp = t_1;
} else if (z <= 7e-143) {
tmp = 60.0 * ((x - y) / (z - t));
} else if (z <= 1.7e-13) {
tmp = t_1;
} else {
tmp = (a * 120.0) + (-60.0 * (y / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (a * 120.0d0) + (x * ((-60.0d0) / t))
if (z <= (-1.02d+52)) then
tmp = (a * 120.0d0) + (y * ((-60.0d0) / z))
else if (z <= (-7.8d-84)) then
tmp = (a * 120.0d0) + (60.0d0 * (y / t))
else if (z <= (-2.6d-236)) then
tmp = t_1
else if (z <= 7d-143) then
tmp = 60.0d0 * ((x - y) / (z - t))
else if (z <= 1.7d-13) then
tmp = t_1
else
tmp = (a * 120.0d0) + ((-60.0d0) * (y / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (a * 120.0) + (x * (-60.0 / t));
double tmp;
if (z <= -1.02e+52) {
tmp = (a * 120.0) + (y * (-60.0 / z));
} else if (z <= -7.8e-84) {
tmp = (a * 120.0) + (60.0 * (y / t));
} else if (z <= -2.6e-236) {
tmp = t_1;
} else if (z <= 7e-143) {
tmp = 60.0 * ((x - y) / (z - t));
} else if (z <= 1.7e-13) {
tmp = t_1;
} else {
tmp = (a * 120.0) + (-60.0 * (y / z));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (a * 120.0) + (x * (-60.0 / t)) tmp = 0 if z <= -1.02e+52: tmp = (a * 120.0) + (y * (-60.0 / z)) elif z <= -7.8e-84: tmp = (a * 120.0) + (60.0 * (y / t)) elif z <= -2.6e-236: tmp = t_1 elif z <= 7e-143: tmp = 60.0 * ((x - y) / (z - t)) elif z <= 1.7e-13: tmp = t_1 else: tmp = (a * 120.0) + (-60.0 * (y / z)) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(a * 120.0) + Float64(x * Float64(-60.0 / t))) tmp = 0.0 if (z <= -1.02e+52) tmp = Float64(Float64(a * 120.0) + Float64(y * Float64(-60.0 / z))); elseif (z <= -7.8e-84) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(y / t))); elseif (z <= -2.6e-236) tmp = t_1; elseif (z <= 7e-143) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); elseif (z <= 1.7e-13) tmp = t_1; else tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (a * 120.0) + (x * (-60.0 / t)); tmp = 0.0; if (z <= -1.02e+52) tmp = (a * 120.0) + (y * (-60.0 / z)); elseif (z <= -7.8e-84) tmp = (a * 120.0) + (60.0 * (y / t)); elseif (z <= -2.6e-236) tmp = t_1; elseif (z <= 7e-143) tmp = 60.0 * ((x - y) / (z - t)); elseif (z <= 1.7e-13) tmp = t_1; else tmp = (a * 120.0) + (-60.0 * (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(a * 120.0), $MachinePrecision] + N[(x * N[(-60.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.02e+52], N[(N[(a * 120.0), $MachinePrecision] + N[(y * N[(-60.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -7.8e-84], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.6e-236], t$95$1, If[LessEqual[z, 7e-143], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.7e-13], t$95$1, N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot 120 + x \cdot \frac{-60}{t}\\
\mathbf{if}\;z \leq -1.02 \cdot 10^{+52}:\\
\;\;\;\;a \cdot 120 + y \cdot \frac{-60}{z}\\
\mathbf{elif}\;z \leq -7.8 \cdot 10^{-84}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t}\\
\mathbf{elif}\;z \leq -2.6 \cdot 10^{-236}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 7 \cdot 10^{-143}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{elif}\;z \leq 1.7 \cdot 10^{-13}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if z < -1.02000000000000002e52Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
associate-/r/99.9%
Applied egg-rr99.9%
Taylor expanded in x around 0 90.9%
associate-*r/90.8%
associate-/l*90.8%
Simplified90.8%
Taylor expanded in z around inf 80.5%
associate-*r/80.5%
associate-*l/80.5%
*-commutative80.5%
Simplified80.5%
if -1.02000000000000002e52 < z < -7.80000000000000045e-84Initial program 96.0%
Taylor expanded in x around 0 84.1%
Taylor expanded in z around 0 76.6%
if -7.80000000000000045e-84 < z < -2.6e-236 or 7.00000000000000011e-143 < z < 1.70000000000000008e-13Initial program 99.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 86.3%
associate-*r/86.3%
associate-*l/86.2%
*-commutative86.2%
Simplified86.2%
Taylor expanded in z around 0 73.4%
if -2.6e-236 < z < 7.00000000000000011e-143Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 88.2%
if 1.70000000000000008e-13 < z Initial program 99.8%
Taylor expanded in x around 0 83.3%
Taylor expanded in t around 0 77.7%
Final simplification78.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* 60.0 (/ (- x y) (- z t))))
(t_2 (+ (* a 120.0) (* -60.0 (/ y z)))))
(if (<= a -9.6e+51)
t_2
(if (<= a -3.3e-14)
t_1
(if (<= a -4.1e-88) (* a 120.0) (if (<= a 45.0) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * ((x - y) / (z - t));
double t_2 = (a * 120.0) + (-60.0 * (y / z));
double tmp;
if (a <= -9.6e+51) {
tmp = t_2;
} else if (a <= -3.3e-14) {
tmp = t_1;
} else if (a <= -4.1e-88) {
tmp = a * 120.0;
} else if (a <= 45.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 60.0d0 * ((x - y) / (z - t))
t_2 = (a * 120.0d0) + ((-60.0d0) * (y / z))
if (a <= (-9.6d+51)) then
tmp = t_2
else if (a <= (-3.3d-14)) then
tmp = t_1
else if (a <= (-4.1d-88)) then
tmp = a * 120.0d0
else if (a <= 45.0d0) then
tmp = t_1
else
tmp = t_2
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 t_2 = (a * 120.0) + (-60.0 * (y / z));
double tmp;
if (a <= -9.6e+51) {
tmp = t_2;
} else if (a <= -3.3e-14) {
tmp = t_1;
} else if (a <= -4.1e-88) {
tmp = a * 120.0;
} else if (a <= 45.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = 60.0 * ((x - y) / (z - t)) t_2 = (a * 120.0) + (-60.0 * (y / z)) tmp = 0 if a <= -9.6e+51: tmp = t_2 elif a <= -3.3e-14: tmp = t_1 elif a <= -4.1e-88: tmp = a * 120.0 elif a <= 45.0: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))) t_2 = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / z))) tmp = 0.0 if (a <= -9.6e+51) tmp = t_2; elseif (a <= -3.3e-14) tmp = t_1; elseif (a <= -4.1e-88) tmp = Float64(a * 120.0); elseif (a <= 45.0) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = 60.0 * ((x - y) / (z - t)); t_2 = (a * 120.0) + (-60.0 * (y / z)); tmp = 0.0; if (a <= -9.6e+51) tmp = t_2; elseif (a <= -3.3e-14) tmp = t_1; elseif (a <= -4.1e-88) tmp = a * 120.0; elseif (a <= 45.0) tmp = t_1; else tmp = t_2; 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]}, Block[{t$95$2 = N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -9.6e+51], t$95$2, If[LessEqual[a, -3.3e-14], t$95$1, If[LessEqual[a, -4.1e-88], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 45.0], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 60 \cdot \frac{x - y}{z - t}\\
t_2 := a \cdot 120 + -60 \cdot \frac{y}{z}\\
\mathbf{if}\;a \leq -9.6 \cdot 10^{+51}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq -3.3 \cdot 10^{-14}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq -4.1 \cdot 10^{-88}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq 45:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if a < -9.5999999999999994e51 or 45 < a Initial program 99.9%
Taylor expanded in x around 0 90.3%
Taylor expanded in t around 0 78.9%
if -9.5999999999999994e51 < a < -3.2999999999999998e-14 or -4.1000000000000001e-88 < a < 45Initial program 99.0%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 78.1%
if -3.2999999999999998e-14 < a < -4.1000000000000001e-88Initial program 100.0%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in z around inf 70.7%
Final simplification78.0%
(FPCore (x y z t a)
:precision binary64
(if (<= t -1.52e-77)
(+ (* a 120.0) (* x (/ 60.0 (- z t))))
(if (<= t 1.1e-104)
(+ (* a 120.0) (* (- x y) (/ 60.0 z)))
(if (<= t 0.00185)
(* 60.0 (/ (- x y) (- z t)))
(+ (* a 120.0) (* 60.0 (/ y t)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.52e-77) {
tmp = (a * 120.0) + (x * (60.0 / (z - t)));
} else if (t <= 1.1e-104) {
tmp = (a * 120.0) + ((x - y) * (60.0 / z));
} else if (t <= 0.00185) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = (a * 120.0) + (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 (t <= (-1.52d-77)) then
tmp = (a * 120.0d0) + (x * (60.0d0 / (z - t)))
else if (t <= 1.1d-104) then
tmp = (a * 120.0d0) + ((x - y) * (60.0d0 / z))
else if (t <= 0.00185d0) then
tmp = 60.0d0 * ((x - y) / (z - t))
else
tmp = (a * 120.0d0) + (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 (t <= -1.52e-77) {
tmp = (a * 120.0) + (x * (60.0 / (z - t)));
} else if (t <= 1.1e-104) {
tmp = (a * 120.0) + ((x - y) * (60.0 / z));
} else if (t <= 0.00185) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = (a * 120.0) + (60.0 * (y / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.52e-77: tmp = (a * 120.0) + (x * (60.0 / (z - t))) elif t <= 1.1e-104: tmp = (a * 120.0) + ((x - y) * (60.0 / z)) elif t <= 0.00185: tmp = 60.0 * ((x - y) / (z - t)) else: tmp = (a * 120.0) + (60.0 * (y / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.52e-77) tmp = Float64(Float64(a * 120.0) + Float64(x * Float64(60.0 / Float64(z - t)))); elseif (t <= 1.1e-104) tmp = Float64(Float64(a * 120.0) + Float64(Float64(x - y) * Float64(60.0 / z))); elseif (t <= 0.00185) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); else tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(y / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -1.52e-77) tmp = (a * 120.0) + (x * (60.0 / (z - t))); elseif (t <= 1.1e-104) tmp = (a * 120.0) + ((x - y) * (60.0 / z)); elseif (t <= 0.00185) tmp = 60.0 * ((x - y) / (z - t)); else tmp = (a * 120.0) + (60.0 * (y / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.52e-77], N[(N[(a * 120.0), $MachinePrecision] + N[(x * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.1e-104], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(x - y), $MachinePrecision] * N[(60.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 0.00185], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.52 \cdot 10^{-77}:\\
\;\;\;\;a \cdot 120 + x \cdot \frac{60}{z - t}\\
\mathbf{elif}\;t \leq 1.1 \cdot 10^{-104}:\\
\;\;\;\;a \cdot 120 + \left(x - y\right) \cdot \frac{60}{z}\\
\mathbf{elif}\;t \leq 0.00185:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t}\\
\end{array}
\end{array}
if t < -1.52e-77Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 83.8%
associate-*r/83.8%
associate-*l/83.8%
*-commutative83.8%
Simplified83.8%
if -1.52e-77 < t < 1.10000000000000006e-104Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
associate-/r/99.8%
Applied egg-rr99.8%
Taylor expanded in z around inf 90.1%
if 1.10000000000000006e-104 < t < 0.0018500000000000001Initial program 95.4%
associate-/l*99.5%
Simplified99.5%
Taylor expanded in a around 0 82.2%
if 0.0018500000000000001 < t Initial program 99.8%
Taylor expanded in x around 0 87.4%
Taylor expanded in z around 0 80.2%
Final simplification85.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -2.9e-25) (not (<= x 5.2e+51))) (+ (* a 120.0) (* x (/ 60.0 (- z t)))) (+ (* a 120.0) (/ -60.0 (/ (- z t) y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -2.9e-25) || !(x <= 5.2e+51)) {
tmp = (a * 120.0) + (x * (60.0 / (z - t)));
} else {
tmp = (a * 120.0) + (-60.0 / ((z - t) / 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) :: tmp
if ((x <= (-2.9d-25)) .or. (.not. (x <= 5.2d+51))) then
tmp = (a * 120.0d0) + (x * (60.0d0 / (z - t)))
else
tmp = (a * 120.0d0) + ((-60.0d0) / ((z - t) / y))
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.9e-25) || !(x <= 5.2e+51)) {
tmp = (a * 120.0) + (x * (60.0 / (z - t)));
} else {
tmp = (a * 120.0) + (-60.0 / ((z - t) / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -2.9e-25) or not (x <= 5.2e+51): tmp = (a * 120.0) + (x * (60.0 / (z - t))) else: tmp = (a * 120.0) + (-60.0 / ((z - t) / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -2.9e-25) || !(x <= 5.2e+51)) tmp = Float64(Float64(a * 120.0) + Float64(x * Float64(60.0 / Float64(z - t)))); else tmp = Float64(Float64(a * 120.0) + Float64(-60.0 / Float64(Float64(z - t) / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -2.9e-25) || ~((x <= 5.2e+51))) tmp = (a * 120.0) + (x * (60.0 / (z - t))); else tmp = (a * 120.0) + (-60.0 / ((z - t) / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -2.9e-25], N[Not[LessEqual[x, 5.2e+51]], $MachinePrecision]], 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[(-60.0 / N[(N[(z - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.9 \cdot 10^{-25} \lor \neg \left(x \leq 5.2 \cdot 10^{+51}\right):\\
\;\;\;\;a \cdot 120 + x \cdot \frac{60}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{-60}{\frac{z - t}{y}}\\
\end{array}
\end{array}
if x < -2.9000000000000001e-25 or 5.2000000000000002e51 < x Initial program 99.1%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 89.8%
associate-*r/89.0%
associate-*l/89.7%
*-commutative89.7%
Simplified89.7%
if -2.9000000000000001e-25 < x < 5.2000000000000002e51Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
associate-/r/99.8%
Applied egg-rr99.8%
Taylor expanded in x around 0 95.5%
associate-*r/95.4%
associate-/l*95.4%
Simplified95.4%
Final simplification92.6%
(FPCore (x y z t a) :precision binary64 (+ (* a 120.0) (* (- x y) (/ 60.0 (- z t)))))
double code(double x, double y, double z, double t, double a) {
return (a * 120.0) + ((x - y) * (60.0 / (z - t)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (a * 120.0d0) + ((x - y) * (60.0d0 / (z - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return (a * 120.0) + ((x - y) * (60.0 / (z - t)));
}
def code(x, y, z, t, a): return (a * 120.0) + ((x - y) * (60.0 / (z - t)))
function code(x, y, z, t, a) return Float64(Float64(a * 120.0) + Float64(Float64(x - y) * Float64(60.0 / Float64(z - t)))) end
function tmp = code(x, y, z, t, a) tmp = (a * 120.0) + ((x - y) * (60.0 / (z - t))); end
code[x_, y_, z_, t_, a_] := N[(N[(a * 120.0), $MachinePrecision] + N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
a \cdot 120 + \left(x - y\right) \cdot \frac{60}{z - t}
\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 (if (or (<= y -9.8e+145) (not (<= y 2.26e+232))) (* -60.0 (/ y (- z t))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -9.8e+145) || !(y <= 2.26e+232)) {
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 ((y <= (-9.8d+145)) .or. (.not. (y <= 2.26d+232))) 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 ((y <= -9.8e+145) || !(y <= 2.26e+232)) {
tmp = -60.0 * (y / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -9.8e+145) or not (y <= 2.26e+232): tmp = -60.0 * (y / (z - t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -9.8e+145) || !(y <= 2.26e+232)) 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 ((y <= -9.8e+145) || ~((y <= 2.26e+232))) tmp = -60.0 * (y / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -9.8e+145], N[Not[LessEqual[y, 2.26e+232]], $MachinePrecision]], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.8 \cdot 10^{+145} \lor \neg \left(y \leq 2.26 \cdot 10^{+232}\right):\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if y < -9.80000000000000006e145 or 2.26000000000000003e232 < y Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 76.8%
Taylor expanded in x around 0 75.1%
if -9.80000000000000006e145 < y < 2.26000000000000003e232Initial program 99.4%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 55.3%
Final simplification58.9%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.4e-91) (* a 120.0) (if (<= a 1.56e-61) (* 60.0 (/ x (- z t))) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.4e-91) {
tmp = a * 120.0;
} else if (a <= 1.56e-61) {
tmp = 60.0 * (x / (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.4d-91)) then
tmp = a * 120.0d0
else if (a <= 1.56d-61) then
tmp = 60.0d0 * (x / (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.4e-91) {
tmp = a * 120.0;
} else if (a <= 1.56e-61) {
tmp = 60.0 * (x / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.4e-91: tmp = a * 120.0 elif a <= 1.56e-61: tmp = 60.0 * (x / (z - t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.4e-91) tmp = Float64(a * 120.0); elseif (a <= 1.56e-61) tmp = Float64(60.0 * Float64(x / 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.4e-91) tmp = a * 120.0; elseif (a <= 1.56e-61) tmp = 60.0 * (x / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.4e-91], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 1.56e-61], N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.4 \cdot 10^{-91}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq 1.56 \cdot 10^{-61}:\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -1.4e-91 or 1.5600000000000001e-61 < a Initial program 99.3%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 68.2%
if -1.4e-91 < a < 1.5600000000000001e-61Initial program 99.6%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 81.1%
Taylor expanded in x around inf 48.5%
Final simplification60.4%
(FPCore (x y z t a) :precision binary64 (if (<= a -3e-113) (* a 120.0) (if (<= a 210.0) (/ (- x y) (/ t -60.0)) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3e-113) {
tmp = a * 120.0;
} else if (a <= 210.0) {
tmp = (x - y) / (t / -60.0);
} 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 <= (-3d-113)) then
tmp = a * 120.0d0
else if (a <= 210.0d0) then
tmp = (x - y) / (t / (-60.0d0))
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 <= -3e-113) {
tmp = a * 120.0;
} else if (a <= 210.0) {
tmp = (x - y) / (t / -60.0);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -3e-113: tmp = a * 120.0 elif a <= 210.0: tmp = (x - y) / (t / -60.0) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -3e-113) tmp = Float64(a * 120.0); elseif (a <= 210.0) tmp = Float64(Float64(x - y) / Float64(t / -60.0)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -3e-113) tmp = a * 120.0; elseif (a <= 210.0) tmp = (x - y) / (t / -60.0); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3e-113], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 210.0], N[(N[(x - y), $MachinePrecision] / N[(t / -60.0), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3 \cdot 10^{-113}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq 210:\\
\;\;\;\;\frac{x - y}{\frac{t}{-60}}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -3.0000000000000001e-113 or 210 < a Initial program 99.3%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 70.0%
if -3.0000000000000001e-113 < a < 210Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 79.4%
expm1-log1p-u54.6%
expm1-udef27.9%
Applied egg-rr27.9%
expm1-def54.6%
expm1-log1p79.4%
associate-*r/79.2%
Simplified79.2%
Taylor expanded in z around 0 52.0%
associate-*r/51.9%
*-commutative51.9%
associate-/l*51.8%
Simplified51.8%
Final simplification62.1%
(FPCore (x y z t a) :precision binary64 (if (<= y 5e+245) (* a 120.0) (* -60.0 (/ (- y) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= 5e+245) {
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 <= 5d+245) 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 <= 5e+245) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (-y / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= 5e+245: tmp = a * 120.0 else: tmp = -60.0 * (-y / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= 5e+245) tmp = Float64(a * 120.0); else tmp = Float64(-60.0 * Float64(Float64(-y) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= 5e+245) tmp = a * 120.0; else tmp = -60.0 * (-y / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, 5e+245], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[((-y) / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 5 \cdot 10^{+245}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{-y}{t}\\
\end{array}
\end{array}
if y < 5.00000000000000034e245Initial program 99.4%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 52.4%
if 5.00000000000000034e245 < y Initial program 99.7%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in a around 0 86.1%
Taylor expanded in x around 0 84.6%
Taylor expanded in z around 0 62.2%
associate-*r/62.2%
neg-mul-162.2%
Simplified62.2%
Final simplification53.2%
(FPCore (x y z t a) :precision binary64 (if (<= y 4e+270) (* a 120.0) (* -60.0 (/ y z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= 4e+270) {
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 (y <= 4d+270) 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 (y <= 4e+270) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (y / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= 4e+270: tmp = a * 120.0 else: tmp = -60.0 * (y / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= 4e+270) 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 (y <= 4e+270) tmp = a * 120.0; else tmp = -60.0 * (y / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, 4e+270], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 4 \cdot 10^{+270}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if y < 4.0000000000000002e270Initial program 99.4%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 51.5%
if 4.0000000000000002e270 < y Initial program 99.6%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in a around 0 100.0%
Taylor expanded in x around 0 97.2%
Taylor expanded in z around inf 50.5%
Final simplification51.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 49.4%
Final simplification49.4%
(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 2023268
(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)))