
(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 y) (* 60.0 x)) (- z t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return (((-60.0 * y) + (60.0 * x)) / (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) * y) + (60.0d0 * x)) / (z - t)) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return (((-60.0 * y) + (60.0 * x)) / (z - t)) + (a * 120.0);
}
def code(x, y, z, t, a): return (((-60.0 * y) + (60.0 * x)) / (z - t)) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(Float64(Float64(-60.0 * y) + Float64(60.0 * x)) / Float64(z - t)) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = (((-60.0 * y) + (60.0 * x)) / (z - t)) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(N[(-60.0 * y), $MachinePrecision] + N[(60.0 * x), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{-60 \cdot y + 60 \cdot x}{z - t} + a \cdot 120
\end{array}
Initial program 99.8%
Taylor expanded in x around 0 99.8%
Final simplification99.8%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -2e-52)
(* a 120.0)
(if (or (<= (* a 120.0) 5e-121)
(and (not (<= (* a 120.0) 1e-89)) (<= (* a 120.0) 1e-15)))
(* 60.0 (/ (- x y) (- z t)))
(* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -2e-52) {
tmp = a * 120.0;
} else if (((a * 120.0) <= 5e-121) || (!((a * 120.0) <= 1e-89) && ((a * 120.0) <= 1e-15))) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a * 120.0d0) <= (-2d-52)) then
tmp = a * 120.0d0
else if (((a * 120.0d0) <= 5d-121) .or. (.not. ((a * 120.0d0) <= 1d-89)) .and. ((a * 120.0d0) <= 1d-15)) then
tmp = 60.0d0 * ((x - y) / (z - t))
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -2e-52) {
tmp = a * 120.0;
} else if (((a * 120.0) <= 5e-121) || (!((a * 120.0) <= 1e-89) && ((a * 120.0) <= 1e-15))) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -2e-52: tmp = a * 120.0 elif ((a * 120.0) <= 5e-121) or (not ((a * 120.0) <= 1e-89) and ((a * 120.0) <= 1e-15)): tmp = 60.0 * ((x - y) / (z - t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -2e-52) tmp = Float64(a * 120.0); elseif ((Float64(a * 120.0) <= 5e-121) || (!(Float64(a * 120.0) <= 1e-89) && (Float64(a * 120.0) <= 1e-15))) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a * 120.0) <= -2e-52) tmp = a * 120.0; elseif (((a * 120.0) <= 5e-121) || (~(((a * 120.0) <= 1e-89)) && ((a * 120.0) <= 1e-15))) tmp = 60.0 * ((x - y) / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -2e-52], N[(a * 120.0), $MachinePrecision], If[Or[LessEqual[N[(a * 120.0), $MachinePrecision], 5e-121], And[N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 1e-89]], $MachinePrecision], LessEqual[N[(a * 120.0), $MachinePrecision], 1e-15]]], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -2 \cdot 10^{-52}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-121} \lor \neg \left(a \cdot 120 \leq 10^{-89}\right) \land a \cdot 120 \leq 10^{-15}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a 120) < -2e-52 or 4.99999999999999989e-121 < (*.f64 a 120) < 1.00000000000000004e-89 or 1.0000000000000001e-15 < (*.f64 a 120) Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 73.4%
if -2e-52 < (*.f64 a 120) < 4.99999999999999989e-121 or 1.00000000000000004e-89 < (*.f64 a 120) < 1.0000000000000001e-15Initial program 99.7%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 88.2%
Final simplification79.1%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -2e-52)
(+ (* a 120.0) (* 60.0 (/ y t)))
(if (or (<= (* a 120.0) 5e-121)
(and (not (<= (* a 120.0) 1e-89)) (<= (* a 120.0) 1e-15)))
(* 60.0 (/ (- x y) (- z t)))
(* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -2e-52) {
tmp = (a * 120.0) + (60.0 * (y / t));
} else if (((a * 120.0) <= 5e-121) || (!((a * 120.0) <= 1e-89) && ((a * 120.0) <= 1e-15))) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a * 120.0d0) <= (-2d-52)) then
tmp = (a * 120.0d0) + (60.0d0 * (y / t))
else if (((a * 120.0d0) <= 5d-121) .or. (.not. ((a * 120.0d0) <= 1d-89)) .and. ((a * 120.0d0) <= 1d-15)) then
tmp = 60.0d0 * ((x - y) / (z - t))
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -2e-52) {
tmp = (a * 120.0) + (60.0 * (y / t));
} else if (((a * 120.0) <= 5e-121) || (!((a * 120.0) <= 1e-89) && ((a * 120.0) <= 1e-15))) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -2e-52: tmp = (a * 120.0) + (60.0 * (y / t)) elif ((a * 120.0) <= 5e-121) or (not ((a * 120.0) <= 1e-89) and ((a * 120.0) <= 1e-15)): tmp = 60.0 * ((x - y) / (z - t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -2e-52) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(y / t))); elseif ((Float64(a * 120.0) <= 5e-121) || (!(Float64(a * 120.0) <= 1e-89) && (Float64(a * 120.0) <= 1e-15))) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a * 120.0) <= -2e-52) tmp = (a * 120.0) + (60.0 * (y / t)); elseif (((a * 120.0) <= 5e-121) || (~(((a * 120.0) <= 1e-89)) && ((a * 120.0) <= 1e-15))) tmp = 60.0 * ((x - y) / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -2e-52], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[N[(a * 120.0), $MachinePrecision], 5e-121], And[N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 1e-89]], $MachinePrecision], LessEqual[N[(a * 120.0), $MachinePrecision], 1e-15]]], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -2 \cdot 10^{-52}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t}\\
\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-121} \lor \neg \left(a \cdot 120 \leq 10^{-89}\right) \land a \cdot 120 \leq 10^{-15}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a 120) < -2e-52Initial program 99.8%
Taylor expanded in x around 0 84.7%
Taylor expanded in z around 0 70.0%
if -2e-52 < (*.f64 a 120) < 4.99999999999999989e-121 or 1.00000000000000004e-89 < (*.f64 a 120) < 1.0000000000000001e-15Initial program 99.7%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 88.2%
if 4.99999999999999989e-121 < (*.f64 a 120) < 1.00000000000000004e-89 or 1.0000000000000001e-15 < (*.f64 a 120) Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 77.8%
Final simplification79.4%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -2e-52)
(+ (* a 120.0) (/ 60.0 (/ t y)))
(if (or (<= (* a 120.0) 5e-121)
(and (not (<= (* a 120.0) 1e-89)) (<= (* a 120.0) 1e-15)))
(* 60.0 (/ (- x y) (- z t)))
(* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -2e-52) {
tmp = (a * 120.0) + (60.0 / (t / y));
} else if (((a * 120.0) <= 5e-121) || (!((a * 120.0) <= 1e-89) && ((a * 120.0) <= 1e-15))) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a * 120.0d0) <= (-2d-52)) then
tmp = (a * 120.0d0) + (60.0d0 / (t / y))
else if (((a * 120.0d0) <= 5d-121) .or. (.not. ((a * 120.0d0) <= 1d-89)) .and. ((a * 120.0d0) <= 1d-15)) then
tmp = 60.0d0 * ((x - y) / (z - t))
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -2e-52) {
tmp = (a * 120.0) + (60.0 / (t / y));
} else if (((a * 120.0) <= 5e-121) || (!((a * 120.0) <= 1e-89) && ((a * 120.0) <= 1e-15))) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -2e-52: tmp = (a * 120.0) + (60.0 / (t / y)) elif ((a * 120.0) <= 5e-121) or (not ((a * 120.0) <= 1e-89) and ((a * 120.0) <= 1e-15)): tmp = 60.0 * ((x - y) / (z - t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -2e-52) tmp = Float64(Float64(a * 120.0) + Float64(60.0 / Float64(t / y))); elseif ((Float64(a * 120.0) <= 5e-121) || (!(Float64(a * 120.0) <= 1e-89) && (Float64(a * 120.0) <= 1e-15))) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a * 120.0) <= -2e-52) tmp = (a * 120.0) + (60.0 / (t / y)); elseif (((a * 120.0) <= 5e-121) || (~(((a * 120.0) <= 1e-89)) && ((a * 120.0) <= 1e-15))) tmp = 60.0 * ((x - y) / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -2e-52], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[N[(a * 120.0), $MachinePrecision], 5e-121], And[N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 1e-89]], $MachinePrecision], LessEqual[N[(a * 120.0), $MachinePrecision], 1e-15]]], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -2 \cdot 10^{-52}:\\
\;\;\;\;a \cdot 120 + \frac{60}{\frac{t}{y}}\\
\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-121} \lor \neg \left(a \cdot 120 \leq 10^{-89}\right) \land a \cdot 120 \leq 10^{-15}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a 120) < -2e-52Initial program 99.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around 0 69.7%
neg-mul-169.7%
distribute-neg-frac69.7%
Simplified69.7%
Taylor expanded in x around 0 70.0%
if -2e-52 < (*.f64 a 120) < 4.99999999999999989e-121 or 1.00000000000000004e-89 < (*.f64 a 120) < 1.0000000000000001e-15Initial program 99.7%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 88.2%
if 4.99999999999999989e-121 < (*.f64 a 120) < 1.00000000000000004e-89 or 1.0000000000000001e-15 < (*.f64 a 120) Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 77.8%
Final simplification79.4%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -2e-52)
(+ (* a 120.0) (/ 60.0 (/ t y)))
(if (or (<= (* a 120.0) 5e-121)
(and (not (<= (* a 120.0) 1e-89)) (<= (* a 120.0) 1e-15)))
(/ (* 60.0 (- x y)) (- z t))
(* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -2e-52) {
tmp = (a * 120.0) + (60.0 / (t / y));
} else if (((a * 120.0) <= 5e-121) || (!((a * 120.0) <= 1e-89) && ((a * 120.0) <= 1e-15))) {
tmp = (60.0 * (x - y)) / (z - t);
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a * 120.0d0) <= (-2d-52)) then
tmp = (a * 120.0d0) + (60.0d0 / (t / y))
else if (((a * 120.0d0) <= 5d-121) .or. (.not. ((a * 120.0d0) <= 1d-89)) .and. ((a * 120.0d0) <= 1d-15)) then
tmp = (60.0d0 * (x - y)) / (z - t)
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -2e-52) {
tmp = (a * 120.0) + (60.0 / (t / y));
} else if (((a * 120.0) <= 5e-121) || (!((a * 120.0) <= 1e-89) && ((a * 120.0) <= 1e-15))) {
tmp = (60.0 * (x - y)) / (z - t);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -2e-52: tmp = (a * 120.0) + (60.0 / (t / y)) elif ((a * 120.0) <= 5e-121) or (not ((a * 120.0) <= 1e-89) and ((a * 120.0) <= 1e-15)): tmp = (60.0 * (x - y)) / (z - t) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -2e-52) tmp = Float64(Float64(a * 120.0) + Float64(60.0 / Float64(t / y))); elseif ((Float64(a * 120.0) <= 5e-121) || (!(Float64(a * 120.0) <= 1e-89) && (Float64(a * 120.0) <= 1e-15))) tmp = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a * 120.0) <= -2e-52) tmp = (a * 120.0) + (60.0 / (t / y)); elseif (((a * 120.0) <= 5e-121) || (~(((a * 120.0) <= 1e-89)) && ((a * 120.0) <= 1e-15))) tmp = (60.0 * (x - y)) / (z - t); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -2e-52], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[N[(a * 120.0), $MachinePrecision], 5e-121], And[N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 1e-89]], $MachinePrecision], LessEqual[N[(a * 120.0), $MachinePrecision], 1e-15]]], N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -2 \cdot 10^{-52}:\\
\;\;\;\;a \cdot 120 + \frac{60}{\frac{t}{y}}\\
\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-121} \lor \neg \left(a \cdot 120 \leq 10^{-89}\right) \land a \cdot 120 \leq 10^{-15}:\\
\;\;\;\;\frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a 120) < -2e-52Initial program 99.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around 0 69.7%
neg-mul-169.7%
distribute-neg-frac69.7%
Simplified69.7%
Taylor expanded in x around 0 70.0%
if -2e-52 < (*.f64 a 120) < 4.99999999999999989e-121 or 1.00000000000000004e-89 < (*.f64 a 120) < 1.0000000000000001e-15Initial program 99.7%
associate-/l*99.6%
Simplified99.6%
associate-/l*99.7%
clear-num99.6%
associate-/r/99.5%
Applied egg-rr99.5%
Taylor expanded in a around 0 88.2%
associate-*r/88.3%
Simplified88.3%
if 4.99999999999999989e-121 < (*.f64 a 120) < 1.00000000000000004e-89 or 1.0000000000000001e-15 < (*.f64 a 120) Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 77.8%
Final simplification79.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* 60.0 (/ (- x y) z))))
(if (<= a -2.7e-61)
(* a 120.0)
(if (<= a -9.5e-84)
t_1
(if (<= a -1.08e-95)
(* a 120.0)
(if (<= a -6.8e-191)
(/ (* -60.0 y) (- z t))
(if (<= a -3.3e-232)
t_1
(if (<= a -1.18e-297)
(* 60.0 (/ (- y x) t))
(if (<= a 4.2e-180)
(* 60.0 (/ x (- z t)))
(if (<= a 7.5e-18) t_1 (* a 120.0)))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * ((x - y) / z);
double tmp;
if (a <= -2.7e-61) {
tmp = a * 120.0;
} else if (a <= -9.5e-84) {
tmp = t_1;
} else if (a <= -1.08e-95) {
tmp = a * 120.0;
} else if (a <= -6.8e-191) {
tmp = (-60.0 * y) / (z - t);
} else if (a <= -3.3e-232) {
tmp = t_1;
} else if (a <= -1.18e-297) {
tmp = 60.0 * ((y - x) / t);
} else if (a <= 4.2e-180) {
tmp = 60.0 * (x / (z - t));
} else if (a <= 7.5e-18) {
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 * ((x - y) / z)
if (a <= (-2.7d-61)) then
tmp = a * 120.0d0
else if (a <= (-9.5d-84)) then
tmp = t_1
else if (a <= (-1.08d-95)) then
tmp = a * 120.0d0
else if (a <= (-6.8d-191)) then
tmp = ((-60.0d0) * y) / (z - t)
else if (a <= (-3.3d-232)) then
tmp = t_1
else if (a <= (-1.18d-297)) then
tmp = 60.0d0 * ((y - x) / t)
else if (a <= 4.2d-180) then
tmp = 60.0d0 * (x / (z - t))
else if (a <= 7.5d-18) 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 * ((x - y) / z);
double tmp;
if (a <= -2.7e-61) {
tmp = a * 120.0;
} else if (a <= -9.5e-84) {
tmp = t_1;
} else if (a <= -1.08e-95) {
tmp = a * 120.0;
} else if (a <= -6.8e-191) {
tmp = (-60.0 * y) / (z - t);
} else if (a <= -3.3e-232) {
tmp = t_1;
} else if (a <= -1.18e-297) {
tmp = 60.0 * ((y - x) / t);
} else if (a <= 4.2e-180) {
tmp = 60.0 * (x / (z - t));
} else if (a <= 7.5e-18) {
tmp = t_1;
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = 60.0 * ((x - y) / z) tmp = 0 if a <= -2.7e-61: tmp = a * 120.0 elif a <= -9.5e-84: tmp = t_1 elif a <= -1.08e-95: tmp = a * 120.0 elif a <= -6.8e-191: tmp = (-60.0 * y) / (z - t) elif a <= -3.3e-232: tmp = t_1 elif a <= -1.18e-297: tmp = 60.0 * ((y - x) / t) elif a <= 4.2e-180: tmp = 60.0 * (x / (z - t)) elif a <= 7.5e-18: tmp = t_1 else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) t_1 = Float64(60.0 * Float64(Float64(x - y) / z)) tmp = 0.0 if (a <= -2.7e-61) tmp = Float64(a * 120.0); elseif (a <= -9.5e-84) tmp = t_1; elseif (a <= -1.08e-95) tmp = Float64(a * 120.0); elseif (a <= -6.8e-191) tmp = Float64(Float64(-60.0 * y) / Float64(z - t)); elseif (a <= -3.3e-232) tmp = t_1; elseif (a <= -1.18e-297) tmp = Float64(60.0 * Float64(Float64(y - x) / t)); elseif (a <= 4.2e-180) tmp = Float64(60.0 * Float64(x / Float64(z - t))); elseif (a <= 7.5e-18) 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 * ((x - y) / z); tmp = 0.0; if (a <= -2.7e-61) tmp = a * 120.0; elseif (a <= -9.5e-84) tmp = t_1; elseif (a <= -1.08e-95) tmp = a * 120.0; elseif (a <= -6.8e-191) tmp = (-60.0 * y) / (z - t); elseif (a <= -3.3e-232) tmp = t_1; elseif (a <= -1.18e-297) tmp = 60.0 * ((y - x) / t); elseif (a <= 4.2e-180) tmp = 60.0 * (x / (z - t)); elseif (a <= 7.5e-18) 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[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.7e-61], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -9.5e-84], t$95$1, If[LessEqual[a, -1.08e-95], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -6.8e-191], N[(N[(-60.0 * y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -3.3e-232], t$95$1, If[LessEqual[a, -1.18e-297], N[(60.0 * N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4.2e-180], N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 7.5e-18], t$95$1, N[(a * 120.0), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 60 \cdot \frac{x - y}{z}\\
\mathbf{if}\;a \leq -2.7 \cdot 10^{-61}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -9.5 \cdot 10^{-84}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq -1.08 \cdot 10^{-95}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -6.8 \cdot 10^{-191}:\\
\;\;\;\;\frac{-60 \cdot y}{z - t}\\
\mathbf{elif}\;a \leq -3.3 \cdot 10^{-232}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq -1.18 \cdot 10^{-297}:\\
\;\;\;\;60 \cdot \frac{y - x}{t}\\
\mathbf{elif}\;a \leq 4.2 \cdot 10^{-180}:\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\
\mathbf{elif}\;a \leq 7.5 \cdot 10^{-18}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -2.69999999999999993e-61 or -9.49999999999999941e-84 < a < -1.08e-95 or 7.50000000000000015e-18 < a Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 73.8%
if -2.69999999999999993e-61 < a < -9.49999999999999941e-84 or -6.79999999999999988e-191 < a < -3.29999999999999985e-232 or 4.1999999999999997e-180 < a < 7.50000000000000015e-18Initial program 99.8%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 74.9%
Taylor expanded in z around inf 59.3%
if -1.08e-95 < a < -6.79999999999999988e-191Initial program 99.6%
associate-/l*99.7%
Simplified99.7%
associate-/l*99.6%
clear-num99.3%
associate-/r/99.5%
Applied egg-rr99.5%
Taylor expanded in a around 0 88.0%
associate-*r/88.0%
Simplified88.0%
Taylor expanded in x around 0 58.0%
if -3.29999999999999985e-232 < a < -1.17999999999999993e-297Initial program 99.4%
associate-/l*99.2%
Simplified99.2%
Taylor expanded in a around 0 99.8%
Taylor expanded in z around 0 87.3%
associate-*r/87.3%
neg-mul-187.3%
Simplified87.3%
Taylor expanded in t around 0 87.3%
if -1.17999999999999993e-297 < a < 4.1999999999999997e-180Initial program 99.8%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 95.6%
Taylor expanded in x around inf 64.9%
Final simplification69.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* 60.0 (/ (- x y) z))))
(if (<= a -4.5e-57)
(* a 120.0)
(if (<= a -2.4e-85)
t_1
(if (<= a -1.16e-95)
(* a 120.0)
(if (<= a -2.4e-191)
(/ (* -60.0 y) (- z t))
(if (<= a -1.45e-232)
t_1
(if (<= a -1.72e-298)
(* 60.0 (/ (- y x) t))
(if (<= a 3.2e-180)
(/ (* 60.0 x) (- z t))
(if (<= a 1.16e-17) t_1 (* a 120.0)))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * ((x - y) / z);
double tmp;
if (a <= -4.5e-57) {
tmp = a * 120.0;
} else if (a <= -2.4e-85) {
tmp = t_1;
} else if (a <= -1.16e-95) {
tmp = a * 120.0;
} else if (a <= -2.4e-191) {
tmp = (-60.0 * y) / (z - t);
} else if (a <= -1.45e-232) {
tmp = t_1;
} else if (a <= -1.72e-298) {
tmp = 60.0 * ((y - x) / t);
} else if (a <= 3.2e-180) {
tmp = (60.0 * x) / (z - t);
} else if (a <= 1.16e-17) {
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 * ((x - y) / z)
if (a <= (-4.5d-57)) then
tmp = a * 120.0d0
else if (a <= (-2.4d-85)) then
tmp = t_1
else if (a <= (-1.16d-95)) then
tmp = a * 120.0d0
else if (a <= (-2.4d-191)) then
tmp = ((-60.0d0) * y) / (z - t)
else if (a <= (-1.45d-232)) then
tmp = t_1
else if (a <= (-1.72d-298)) then
tmp = 60.0d0 * ((y - x) / t)
else if (a <= 3.2d-180) then
tmp = (60.0d0 * x) / (z - t)
else if (a <= 1.16d-17) 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 * ((x - y) / z);
double tmp;
if (a <= -4.5e-57) {
tmp = a * 120.0;
} else if (a <= -2.4e-85) {
tmp = t_1;
} else if (a <= -1.16e-95) {
tmp = a * 120.0;
} else if (a <= -2.4e-191) {
tmp = (-60.0 * y) / (z - t);
} else if (a <= -1.45e-232) {
tmp = t_1;
} else if (a <= -1.72e-298) {
tmp = 60.0 * ((y - x) / t);
} else if (a <= 3.2e-180) {
tmp = (60.0 * x) / (z - t);
} else if (a <= 1.16e-17) {
tmp = t_1;
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = 60.0 * ((x - y) / z) tmp = 0 if a <= -4.5e-57: tmp = a * 120.0 elif a <= -2.4e-85: tmp = t_1 elif a <= -1.16e-95: tmp = a * 120.0 elif a <= -2.4e-191: tmp = (-60.0 * y) / (z - t) elif a <= -1.45e-232: tmp = t_1 elif a <= -1.72e-298: tmp = 60.0 * ((y - x) / t) elif a <= 3.2e-180: tmp = (60.0 * x) / (z - t) elif a <= 1.16e-17: tmp = t_1 else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) t_1 = Float64(60.0 * Float64(Float64(x - y) / z)) tmp = 0.0 if (a <= -4.5e-57) tmp = Float64(a * 120.0); elseif (a <= -2.4e-85) tmp = t_1; elseif (a <= -1.16e-95) tmp = Float64(a * 120.0); elseif (a <= -2.4e-191) tmp = Float64(Float64(-60.0 * y) / Float64(z - t)); elseif (a <= -1.45e-232) tmp = t_1; elseif (a <= -1.72e-298) tmp = Float64(60.0 * Float64(Float64(y - x) / t)); elseif (a <= 3.2e-180) tmp = Float64(Float64(60.0 * x) / Float64(z - t)); elseif (a <= 1.16e-17) 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 * ((x - y) / z); tmp = 0.0; if (a <= -4.5e-57) tmp = a * 120.0; elseif (a <= -2.4e-85) tmp = t_1; elseif (a <= -1.16e-95) tmp = a * 120.0; elseif (a <= -2.4e-191) tmp = (-60.0 * y) / (z - t); elseif (a <= -1.45e-232) tmp = t_1; elseif (a <= -1.72e-298) tmp = 60.0 * ((y - x) / t); elseif (a <= 3.2e-180) tmp = (60.0 * x) / (z - t); elseif (a <= 1.16e-17) 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[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -4.5e-57], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -2.4e-85], t$95$1, If[LessEqual[a, -1.16e-95], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -2.4e-191], N[(N[(-60.0 * y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -1.45e-232], t$95$1, If[LessEqual[a, -1.72e-298], N[(60.0 * N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.2e-180], N[(N[(60.0 * x), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.16e-17], t$95$1, N[(a * 120.0), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 60 \cdot \frac{x - y}{z}\\
\mathbf{if}\;a \leq -4.5 \cdot 10^{-57}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -2.4 \cdot 10^{-85}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq -1.16 \cdot 10^{-95}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -2.4 \cdot 10^{-191}:\\
\;\;\;\;\frac{-60 \cdot y}{z - t}\\
\mathbf{elif}\;a \leq -1.45 \cdot 10^{-232}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq -1.72 \cdot 10^{-298}:\\
\;\;\;\;60 \cdot \frac{y - x}{t}\\
\mathbf{elif}\;a \leq 3.2 \cdot 10^{-180}:\\
\;\;\;\;\frac{60 \cdot x}{z - t}\\
\mathbf{elif}\;a \leq 1.16 \cdot 10^{-17}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -4.49999999999999973e-57 or -2.4000000000000001e-85 < a < -1.15999999999999997e-95 or 1.16e-17 < a Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 73.8%
if -4.49999999999999973e-57 < a < -2.4000000000000001e-85 or -2.3999999999999999e-191 < a < -1.45e-232 or 3.20000000000000015e-180 < a < 1.16e-17Initial program 99.8%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 74.9%
Taylor expanded in z around inf 59.3%
if -1.15999999999999997e-95 < a < -2.3999999999999999e-191Initial program 99.6%
associate-/l*99.7%
Simplified99.7%
associate-/l*99.6%
clear-num99.3%
associate-/r/99.5%
Applied egg-rr99.5%
Taylor expanded in a around 0 88.0%
associate-*r/88.0%
Simplified88.0%
Taylor expanded in x around 0 58.0%
if -1.45e-232 < a < -1.71999999999999992e-298Initial program 99.4%
associate-/l*99.2%
Simplified99.2%
Taylor expanded in a around 0 99.8%
Taylor expanded in z around 0 87.3%
associate-*r/87.3%
neg-mul-187.3%
Simplified87.3%
Taylor expanded in t around 0 87.3%
if -1.71999999999999992e-298 < a < 3.20000000000000015e-180Initial program 99.8%
associate-/l*99.6%
Simplified99.6%
associate-/l*99.8%
clear-num99.8%
associate-/r/99.4%
Applied egg-rr99.4%
Taylor expanded in a around 0 95.6%
associate-*r/95.9%
Simplified95.9%
Taylor expanded in x around inf 65.2%
*-commutative65.2%
Simplified65.2%
Final simplification69.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (* a 120.0) (* 60.0 (/ x z)))))
(if (<= z -2.8e+179)
t_1
(if (<= z -1.42e+100)
(+ (* a 120.0) (* -60.0 (/ y z)))
(if (or (<= z -1.46e-25) (not (<= z 3e+19)))
t_1
(+ (* a 120.0) (* (- x y) (/ -60.0 t))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (a * 120.0) + (60.0 * (x / z));
double tmp;
if (z <= -2.8e+179) {
tmp = t_1;
} else if (z <= -1.42e+100) {
tmp = (a * 120.0) + (-60.0 * (y / z));
} else if ((z <= -1.46e-25) || !(z <= 3e+19)) {
tmp = t_1;
} else {
tmp = (a * 120.0) + ((x - y) * (-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) :: tmp
t_1 = (a * 120.0d0) + (60.0d0 * (x / z))
if (z <= (-2.8d+179)) then
tmp = t_1
else if (z <= (-1.42d+100)) then
tmp = (a * 120.0d0) + ((-60.0d0) * (y / z))
else if ((z <= (-1.46d-25)) .or. (.not. (z <= 3d+19))) then
tmp = t_1
else
tmp = (a * 120.0d0) + ((x - y) * ((-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 = (a * 120.0) + (60.0 * (x / z));
double tmp;
if (z <= -2.8e+179) {
tmp = t_1;
} else if (z <= -1.42e+100) {
tmp = (a * 120.0) + (-60.0 * (y / z));
} else if ((z <= -1.46e-25) || !(z <= 3e+19)) {
tmp = t_1;
} else {
tmp = (a * 120.0) + ((x - y) * (-60.0 / t));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (a * 120.0) + (60.0 * (x / z)) tmp = 0 if z <= -2.8e+179: tmp = t_1 elif z <= -1.42e+100: tmp = (a * 120.0) + (-60.0 * (y / z)) elif (z <= -1.46e-25) or not (z <= 3e+19): tmp = t_1 else: tmp = (a * 120.0) + ((x - y) * (-60.0 / t)) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(x / z))) tmp = 0.0 if (z <= -2.8e+179) tmp = t_1; elseif (z <= -1.42e+100) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / z))); elseif ((z <= -1.46e-25) || !(z <= 3e+19)) tmp = t_1; else tmp = Float64(Float64(a * 120.0) + Float64(Float64(x - y) * Float64(-60.0 / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (a * 120.0) + (60.0 * (x / z)); tmp = 0.0; if (z <= -2.8e+179) tmp = t_1; elseif (z <= -1.42e+100) tmp = (a * 120.0) + (-60.0 * (y / z)); elseif ((z <= -1.46e-25) || ~((z <= 3e+19))) tmp = t_1; else tmp = (a * 120.0) + ((x - y) * (-60.0 / t)); 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[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.8e+179], t$95$1, If[LessEqual[z, -1.42e+100], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -1.46e-25], N[Not[LessEqual[z, 3e+19]], $MachinePrecision]], t$95$1, N[(N[(a * 120.0), $MachinePrecision] + N[(N[(x - y), $MachinePrecision] * N[(-60.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot 120 + 60 \cdot \frac{x}{z}\\
\mathbf{if}\;z \leq -2.8 \cdot 10^{+179}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.42 \cdot 10^{+100}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\
\mathbf{elif}\;z \leq -1.46 \cdot 10^{-25} \lor \neg \left(z \leq 3 \cdot 10^{+19}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \left(x - y\right) \cdot \frac{-60}{t}\\
\end{array}
\end{array}
if z < -2.8e179 or -1.41999999999999999e100 < z < -1.46e-25 or 3e19 < z Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 80.6%
associate-*r/80.7%
*-commutative80.7%
Simplified80.7%
Taylor expanded in z around inf 79.7%
if -2.8e179 < z < -1.41999999999999999e100Initial program 99.7%
Taylor expanded in x around 0 98.1%
Taylor expanded in z around inf 86.2%
if -1.46e-25 < z < 3e19Initial program 99.8%
Taylor expanded in x around 0 99.8%
Taylor expanded in z around 0 83.3%
fma-def83.3%
associate-*r/83.3%
fma-def83.3%
+-commutative83.3%
distribute-lft-in83.3%
neg-mul-183.3%
distribute-lft-neg-in83.3%
metadata-eval83.3%
neg-mul-183.3%
distribute-rgt-neg-in83.3%
distribute-lft-in83.3%
sub-neg83.3%
*-commutative83.3%
associate-*r/83.2%
Simplified83.2%
Final simplification81.9%
(FPCore (x y z t a)
:precision binary64
(if (<= (- z t) -5e+17)
(* a 120.0)
(if (<= (- z t) -2e-170)
(* 60.0 (/ (- x y) z))
(if (<= (- z t) 5e-62) (* 60.0 (/ (- y x) t)) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z - t) <= -5e+17) {
tmp = a * 120.0;
} else if ((z - t) <= -2e-170) {
tmp = 60.0 * ((x - y) / z);
} else if ((z - t) <= 5e-62) {
tmp = 60.0 * ((y - x) / 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 ((z - t) <= (-5d+17)) then
tmp = a * 120.0d0
else if ((z - t) <= (-2d-170)) then
tmp = 60.0d0 * ((x - y) / z)
else if ((z - t) <= 5d-62) then
tmp = 60.0d0 * ((y - x) / 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 ((z - t) <= -5e+17) {
tmp = a * 120.0;
} else if ((z - t) <= -2e-170) {
tmp = 60.0 * ((x - y) / z);
} else if ((z - t) <= 5e-62) {
tmp = 60.0 * ((y - x) / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z - t) <= -5e+17: tmp = a * 120.0 elif (z - t) <= -2e-170: tmp = 60.0 * ((x - y) / z) elif (z - t) <= 5e-62: tmp = 60.0 * ((y - x) / t) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(z - t) <= -5e+17) tmp = Float64(a * 120.0); elseif (Float64(z - t) <= -2e-170) tmp = Float64(60.0 * Float64(Float64(x - y) / z)); elseif (Float64(z - t) <= 5e-62) tmp = Float64(60.0 * Float64(Float64(y - x) / t)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z - t) <= -5e+17) tmp = a * 120.0; elseif ((z - t) <= -2e-170) tmp = 60.0 * ((x - y) / z); elseif ((z - t) <= 5e-62) tmp = 60.0 * ((y - x) / t); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(z - t), $MachinePrecision], -5e+17], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(z - t), $MachinePrecision], -2e-170], N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z - t), $MachinePrecision], 5e-62], N[(60.0 * N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z - t \leq -5 \cdot 10^{+17}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;z - t \leq -2 \cdot 10^{-170}:\\
\;\;\;\;60 \cdot \frac{x - y}{z}\\
\mathbf{elif}\;z - t \leq 5 \cdot 10^{-62}:\\
\;\;\;\;60 \cdot \frac{y - x}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (-.f64 z t) < -5e17 or 5.0000000000000002e-62 < (-.f64 z t) Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 59.9%
if -5e17 < (-.f64 z t) < -1.99999999999999997e-170Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 80.7%
Taylor expanded in z around inf 60.0%
if -1.99999999999999997e-170 < (-.f64 z t) < 5.0000000000000002e-62Initial program 99.9%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 95.9%
Taylor expanded in z around 0 74.9%
associate-*r/74.9%
neg-mul-174.9%
Simplified74.9%
Taylor expanded in t around 0 74.9%
Final simplification61.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2.45e-26) (not (<= z 6200000000000.0))) (+ (* a 120.0) (/ 60.0 (/ z (- x y)))) (+ (* a 120.0) (* (- x y) (/ -60.0 t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.45e-26) || !(z <= 6200000000000.0)) {
tmp = (a * 120.0) + (60.0 / (z / (x - y)));
} else {
tmp = (a * 120.0) + ((x - y) * (-60.0 / t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-2.45d-26)) .or. (.not. (z <= 6200000000000.0d0))) then
tmp = (a * 120.0d0) + (60.0d0 / (z / (x - y)))
else
tmp = (a * 120.0d0) + ((x - y) * ((-60.0d0) / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.45e-26) || !(z <= 6200000000000.0)) {
tmp = (a * 120.0) + (60.0 / (z / (x - y)));
} else {
tmp = (a * 120.0) + ((x - y) * (-60.0 / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2.45e-26) or not (z <= 6200000000000.0): tmp = (a * 120.0) + (60.0 / (z / (x - y))) else: tmp = (a * 120.0) + ((x - y) * (-60.0 / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2.45e-26) || !(z <= 6200000000000.0)) tmp = Float64(Float64(a * 120.0) + Float64(60.0 / Float64(z / Float64(x - y)))); else tmp = Float64(Float64(a * 120.0) + Float64(Float64(x - y) * Float64(-60.0 / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -2.45e-26) || ~((z <= 6200000000000.0))) tmp = (a * 120.0) + (60.0 / (z / (x - y))); else tmp = (a * 120.0) + ((x - y) * (-60.0 / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.45e-26], N[Not[LessEqual[z, 6200000000000.0]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 / N[(z / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(x - y), $MachinePrecision] * N[(-60.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.45 \cdot 10^{-26} \lor \neg \left(z \leq 6200000000000\right):\\
\;\;\;\;a \cdot 120 + \frac{60}{\frac{z}{x - y}}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \left(x - y\right) \cdot \frac{-60}{t}\\
\end{array}
\end{array}
if z < -2.45e-26 or 6.2e12 < z Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 90.3%
if -2.45e-26 < z < 6.2e12Initial program 99.8%
Taylor expanded in x around 0 99.8%
Taylor expanded in z around 0 83.8%
fma-def83.8%
associate-*r/83.8%
fma-def83.8%
+-commutative83.8%
distribute-lft-in83.8%
neg-mul-183.8%
distribute-lft-neg-in83.8%
metadata-eval83.8%
neg-mul-183.8%
distribute-rgt-neg-in83.8%
distribute-lft-in83.8%
sub-neg83.8%
*-commutative83.8%
associate-*r/83.7%
Simplified83.7%
Final simplification87.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -19000000.0) (not (<= y 8e+54))) (+ (* a 120.0) (/ (* -60.0 y) (- z t))) (+ (* a 120.0) (/ (* 60.0 x) (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -19000000.0) || !(y <= 8e+54)) {
tmp = (a * 120.0) + ((-60.0 * y) / (z - t));
} else {
tmp = (a * 120.0) + ((60.0 * x) / (z - t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((y <= (-19000000.0d0)) .or. (.not. (y <= 8d+54))) then
tmp = (a * 120.0d0) + (((-60.0d0) * y) / (z - t))
else
tmp = (a * 120.0d0) + ((60.0d0 * x) / (z - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -19000000.0) || !(y <= 8e+54)) {
tmp = (a * 120.0) + ((-60.0 * y) / (z - t));
} else {
tmp = (a * 120.0) + ((60.0 * x) / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -19000000.0) or not (y <= 8e+54): tmp = (a * 120.0) + ((-60.0 * y) / (z - t)) else: tmp = (a * 120.0) + ((60.0 * x) / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -19000000.0) || !(y <= 8e+54)) tmp = Float64(Float64(a * 120.0) + Float64(Float64(-60.0 * y) / Float64(z - t))); else tmp = Float64(Float64(a * 120.0) + Float64(Float64(60.0 * x) / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -19000000.0) || ~((y <= 8e+54))) tmp = (a * 120.0) + ((-60.0 * y) / (z - t)); else tmp = (a * 120.0) + ((60.0 * x) / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -19000000.0], N[Not[LessEqual[y, 8e+54]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(-60.0 * y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(60.0 * x), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -19000000 \lor \neg \left(y \leq 8 \cdot 10^{+54}\right):\\
\;\;\;\;a \cdot 120 + \frac{-60 \cdot y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{60 \cdot x}{z - t}\\
\end{array}
\end{array}
if y < -1.9e7 or 8.0000000000000006e54 < y Initial program 99.8%
Taylor expanded in x around 0 86.1%
if -1.9e7 < y < 8.0000000000000006e54Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 94.4%
associate-*r/94.5%
*-commutative94.5%
Simplified94.5%
Final simplification90.8%
(FPCore (x y z t a) :precision binary64 (if (<= (- z t) -100000000.0) (* a 120.0) (if (<= (- z t) 2e+15) (* 60.0 (/ x (- z t))) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z - t) <= -100000000.0) {
tmp = a * 120.0;
} else if ((z - t) <= 2e+15) {
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 ((z - t) <= (-100000000.0d0)) then
tmp = a * 120.0d0
else if ((z - t) <= 2d+15) 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 ((z - t) <= -100000000.0) {
tmp = a * 120.0;
} else if ((z - t) <= 2e+15) {
tmp = 60.0 * (x / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z - t) <= -100000000.0: tmp = a * 120.0 elif (z - t) <= 2e+15: tmp = 60.0 * (x / (z - t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(z - t) <= -100000000.0) tmp = Float64(a * 120.0); elseif (Float64(z - t) <= 2e+15) 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 ((z - t) <= -100000000.0) tmp = a * 120.0; elseif ((z - t) <= 2e+15) tmp = 60.0 * (x / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(z - t), $MachinePrecision], -100000000.0], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(z - t), $MachinePrecision], 2e+15], N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z - t \leq -100000000:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;z - t \leq 2 \cdot 10^{+15}:\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (-.f64 z t) < -1e8 or 2e15 < (-.f64 z t) Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 61.6%
if -1e8 < (-.f64 z t) < 2e15Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 85.1%
Taylor expanded in x around inf 52.3%
Final simplification59.3%
(FPCore (x y z t a) :precision binary64 (if (<= (- z t) -5e+17) (* a 120.0) (if (<= (- z t) 2e-14) (* 60.0 (/ (- x y) z)) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z - t) <= -5e+17) {
tmp = a * 120.0;
} else if ((z - t) <= 2e-14) {
tmp = 60.0 * ((x - 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 ((z - t) <= (-5d+17)) then
tmp = a * 120.0d0
else if ((z - t) <= 2d-14) then
tmp = 60.0d0 * ((x - 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 ((z - t) <= -5e+17) {
tmp = a * 120.0;
} else if ((z - t) <= 2e-14) {
tmp = 60.0 * ((x - y) / z);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z - t) <= -5e+17: tmp = a * 120.0 elif (z - t) <= 2e-14: tmp = 60.0 * ((x - y) / z) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(z - t) <= -5e+17) tmp = Float64(a * 120.0); elseif (Float64(z - t) <= 2e-14) tmp = Float64(60.0 * Float64(Float64(x - 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 ((z - t) <= -5e+17) tmp = a * 120.0; elseif ((z - t) <= 2e-14) tmp = 60.0 * ((x - y) / z); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(z - t), $MachinePrecision], -5e+17], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(z - t), $MachinePrecision], 2e-14], N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z - t \leq -5 \cdot 10^{+17}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;z - t \leq 2 \cdot 10^{-14}:\\
\;\;\;\;60 \cdot \frac{x - y}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (-.f64 z t) < -5e17 or 2e-14 < (-.f64 z t) Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 61.2%
if -5e17 < (-.f64 z t) < 2e-14Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 86.0%
Taylor expanded in z around inf 54.0%
Final simplification59.5%
(FPCore (x y z t a) :precision binary64 (+ (* a 120.0) (/ 60.0 (/ (- z t) (- x y)))))
double code(double x, double y, double z, double t, double a) {
return (a * 120.0) + (60.0 / ((z - t) / (x - y)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (a * 120.0d0) + (60.0d0 / ((z - t) / (x - y)))
end function
public static double code(double x, double y, double z, double t, double a) {
return (a * 120.0) + (60.0 / ((z - t) / (x - y)));
}
def code(x, y, z, t, a): return (a * 120.0) + (60.0 / ((z - t) / (x - y)))
function code(x, y, z, t, a) return Float64(Float64(a * 120.0) + Float64(60.0 / Float64(Float64(z - t) / Float64(x - y)))) end
function tmp = code(x, y, z, t, a) tmp = (a * 120.0) + (60.0 / ((z - t) / (x - y))); end
code[x_, y_, z_, t_, a_] := N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
a \cdot 120 + \frac{60}{\frac{z - t}{x - y}}
\end{array}
Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t a) :precision binary64 (+ (* a 120.0) (/ (* 60.0 (- x y)) (- z t))))
double code(double x, double y, double z, double t, double a) {
return (a * 120.0) + ((60.0 * (x - y)) / (z - t));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (a * 120.0d0) + ((60.0d0 * (x - y)) / (z - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return (a * 120.0) + ((60.0 * (x - y)) / (z - t));
}
def code(x, y, z, t, a): return (a * 120.0) + ((60.0 * (x - y)) / (z - t))
function code(x, y, z, t, a) return Float64(Float64(a * 120.0) + Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t))) end
function tmp = code(x, y, z, t, a) tmp = (a * 120.0) + ((60.0 * (x - y)) / (z - t)); end
code[x_, y_, z_, t_, a_] := N[(N[(a * 120.0), $MachinePrecision] + N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
a \cdot 120 + \frac{60 \cdot \left(x - y\right)}{z - t}
\end{array}
Initial program 99.8%
Final simplification99.8%
(FPCore (x y z t a) :precision binary64 (if (<= a -4.6e-146) (* a 120.0) (if (<= a 5.6e-152) (* 60.0 (/ x z)) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -4.6e-146) {
tmp = a * 120.0;
} else if (a <= 5.6e-152) {
tmp = 60.0 * (x / z);
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-4.6d-146)) then
tmp = a * 120.0d0
else if (a <= 5.6d-152) then
tmp = 60.0d0 * (x / z)
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -4.6e-146) {
tmp = a * 120.0;
} else if (a <= 5.6e-152) {
tmp = 60.0 * (x / z);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -4.6e-146: tmp = a * 120.0 elif a <= 5.6e-152: tmp = 60.0 * (x / z) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -4.6e-146) tmp = Float64(a * 120.0); elseif (a <= 5.6e-152) tmp = Float64(60.0 * Float64(x / z)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -4.6e-146) tmp = a * 120.0; elseif (a <= 5.6e-152) tmp = 60.0 * (x / z); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -4.6e-146], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 5.6e-152], N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.6 \cdot 10^{-146}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq 5.6 \cdot 10^{-152}:\\
\;\;\;\;60 \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -4.6000000000000001e-146 or 5.59999999999999969e-152 < a Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 65.1%
if -4.6000000000000001e-146 < a < 5.59999999999999969e-152Initial program 99.7%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 93.6%
Taylor expanded in x around inf 54.1%
Taylor expanded in z around inf 39.6%
Final simplification58.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.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 50.1%
Final simplification50.1%
(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 2023290
(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)))