
(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 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((60.0d0 * (x - y)) / (z - t)) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
def code(x, y, z, t, a): return ((60.0 * (x - y)) / (z - t)) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = ((60.0 * (x - y)) / (z - t)) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120
\end{array}
(FPCore (x y z t a) :precision binary64 (+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((60.0d0 * (x - y)) / (z - t)) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
def code(x, y, z, t, a): return ((60.0 * (x - y)) / (z - t)) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(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}
Initial program 99.8%
Final simplification99.8%
(FPCore (x y z t a)
:precision binary64
(if (or (<= (* a 120.0) -1e+71)
(not
(or (<= (* a 120.0) -4e+38)
(and (not (<= (* a 120.0) -5e-29))
(<= (* a 120.0) 100000000000.0)))))
(* a 120.0)
(* 60.0 (/ (- x y) (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((a * 120.0) <= -1e+71) || !(((a * 120.0) <= -4e+38) || (!((a * 120.0) <= -5e-29) && ((a * 120.0) <= 100000000000.0)))) {
tmp = a * 120.0;
} else {
tmp = 60.0 * ((x - y) / (z - t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (((a * 120.0d0) <= (-1d+71)) .or. (.not. ((a * 120.0d0) <= (-4d+38)) .or. (.not. ((a * 120.0d0) <= (-5d-29))) .and. ((a * 120.0d0) <= 100000000000.0d0))) then
tmp = a * 120.0d0
else
tmp = 60.0d0 * ((x - y) / (z - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (((a * 120.0) <= -1e+71) || !(((a * 120.0) <= -4e+38) || (!((a * 120.0) <= -5e-29) && ((a * 120.0) <= 100000000000.0)))) {
tmp = a * 120.0;
} else {
tmp = 60.0 * ((x - y) / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if ((a * 120.0) <= -1e+71) or not (((a * 120.0) <= -4e+38) or (not ((a * 120.0) <= -5e-29) and ((a * 120.0) <= 100000000000.0))): tmp = a * 120.0 else: tmp = 60.0 * ((x - y) / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((Float64(a * 120.0) <= -1e+71) || !((Float64(a * 120.0) <= -4e+38) || (!(Float64(a * 120.0) <= -5e-29) && (Float64(a * 120.0) <= 100000000000.0)))) tmp = Float64(a * 120.0); else tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (((a * 120.0) <= -1e+71) || ~((((a * 120.0) <= -4e+38) || (~(((a * 120.0) <= -5e-29)) && ((a * 120.0) <= 100000000000.0))))) tmp = a * 120.0; else tmp = 60.0 * ((x - y) / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[N[(a * 120.0), $MachinePrecision], -1e+71], N[Not[Or[LessEqual[N[(a * 120.0), $MachinePrecision], -4e+38], And[N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], -5e-29]], $MachinePrecision], LessEqual[N[(a * 120.0), $MachinePrecision], 100000000000.0]]]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -1 \cdot 10^{+71} \lor \neg \left(a \cdot 120 \leq -4 \cdot 10^{+38} \lor \neg \left(a \cdot 120 \leq -5 \cdot 10^{-29}\right) \land a \cdot 120 \leq 100000000000\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\end{array}
\end{array}
if (*.f64 a 120) < -1e71 or -3.99999999999999991e38 < (*.f64 a 120) < -4.99999999999999986e-29 or 1e11 < (*.f64 a 120) Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 82.5%
if -1e71 < (*.f64 a 120) < -3.99999999999999991e38 or -4.99999999999999986e-29 < (*.f64 a 120) < 1e11Initial program 99.8%
*-commutative99.8%
associate-/l*99.6%
Applied egg-rr99.6%
Taylor expanded in a around 0 81.9%
Final simplification82.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* 60.0 (/ (- x y) (- z t)))))
(if (<= (* a 120.0) -1e+71)
(* a 120.0)
(if (<= (* a 120.0) -4e+38)
t_1
(if (<= (* a 120.0) -4e-7)
(+ (* a 120.0) (* 60.0 (/ x z)))
(if (<= (* a 120.0) 100000000000.0) 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 - t));
double tmp;
if ((a * 120.0) <= -1e+71) {
tmp = a * 120.0;
} else if ((a * 120.0) <= -4e+38) {
tmp = t_1;
} else if ((a * 120.0) <= -4e-7) {
tmp = (a * 120.0) + (60.0 * (x / z));
} else if ((a * 120.0) <= 100000000000.0) {
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 - t))
if ((a * 120.0d0) <= (-1d+71)) then
tmp = a * 120.0d0
else if ((a * 120.0d0) <= (-4d+38)) then
tmp = t_1
else if ((a * 120.0d0) <= (-4d-7)) then
tmp = (a * 120.0d0) + (60.0d0 * (x / z))
else if ((a * 120.0d0) <= 100000000000.0d0) 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 - t));
double tmp;
if ((a * 120.0) <= -1e+71) {
tmp = a * 120.0;
} else if ((a * 120.0) <= -4e+38) {
tmp = t_1;
} else if ((a * 120.0) <= -4e-7) {
tmp = (a * 120.0) + (60.0 * (x / z));
} else if ((a * 120.0) <= 100000000000.0) {
tmp = t_1;
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = 60.0 * ((x - y) / (z - t)) tmp = 0 if (a * 120.0) <= -1e+71: tmp = a * 120.0 elif (a * 120.0) <= -4e+38: tmp = t_1 elif (a * 120.0) <= -4e-7: tmp = (a * 120.0) + (60.0 * (x / z)) elif (a * 120.0) <= 100000000000.0: 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) / Float64(z - t))) tmp = 0.0 if (Float64(a * 120.0) <= -1e+71) tmp = Float64(a * 120.0); elseif (Float64(a * 120.0) <= -4e+38) tmp = t_1; elseif (Float64(a * 120.0) <= -4e-7) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(x / z))); elseif (Float64(a * 120.0) <= 100000000000.0) 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 - t)); tmp = 0.0; if ((a * 120.0) <= -1e+71) tmp = a * 120.0; elseif ((a * 120.0) <= -4e+38) tmp = t_1; elseif ((a * 120.0) <= -4e-7) tmp = (a * 120.0) + (60.0 * (x / z)); elseif ((a * 120.0) <= 100000000000.0) 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] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * 120.0), $MachinePrecision], -1e+71], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], -4e+38], t$95$1, If[LessEqual[N[(a * 120.0), $MachinePrecision], -4e-7], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 100000000000.0], t$95$1, N[(a * 120.0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 60 \cdot \frac{x - y}{z - t}\\
\mathbf{if}\;a \cdot 120 \leq -1 \cdot 10^{+71}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq -4 \cdot 10^{+38}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \cdot 120 \leq -4 \cdot 10^{-7}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{x}{z}\\
\mathbf{elif}\;a \cdot 120 \leq 100000000000:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a 120) < -1e71 or 1e11 < (*.f64 a 120) Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 83.5%
if -1e71 < (*.f64 a 120) < -3.99999999999999991e38 or -3.9999999999999998e-7 < (*.f64 a 120) < 1e11Initial program 99.8%
*-commutative99.8%
associate-/l*99.6%
Applied egg-rr99.6%
Taylor expanded in a around 0 80.9%
if -3.99999999999999991e38 < (*.f64 a 120) < -3.9999999999999998e-7Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 87.9%
Taylor expanded in z around inf 88.2%
Final simplification82.2%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -1e+71)
(* a 120.0)
(if (<= (* a 120.0) -4e+38)
(* 60.0 (/ (- x y) (- z t)))
(if (<= (* a 120.0) -4e-7)
(+ (* a 120.0) (* 60.0 (/ x z)))
(if (<= (* a 120.0) 100000000000.0)
(/ (* 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) <= -1e+71) {
tmp = a * 120.0;
} else if ((a * 120.0) <= -4e+38) {
tmp = 60.0 * ((x - y) / (z - t));
} else if ((a * 120.0) <= -4e-7) {
tmp = (a * 120.0) + (60.0 * (x / z));
} else if ((a * 120.0) <= 100000000000.0) {
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) <= (-1d+71)) then
tmp = a * 120.0d0
else if ((a * 120.0d0) <= (-4d+38)) then
tmp = 60.0d0 * ((x - y) / (z - t))
else if ((a * 120.0d0) <= (-4d-7)) then
tmp = (a * 120.0d0) + (60.0d0 * (x / z))
else if ((a * 120.0d0) <= 100000000000.0d0) 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) <= -1e+71) {
tmp = a * 120.0;
} else if ((a * 120.0) <= -4e+38) {
tmp = 60.0 * ((x - y) / (z - t));
} else if ((a * 120.0) <= -4e-7) {
tmp = (a * 120.0) + (60.0 * (x / z));
} else if ((a * 120.0) <= 100000000000.0) {
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) <= -1e+71: tmp = a * 120.0 elif (a * 120.0) <= -4e+38: tmp = 60.0 * ((x - y) / (z - t)) elif (a * 120.0) <= -4e-7: tmp = (a * 120.0) + (60.0 * (x / z)) elif (a * 120.0) <= 100000000000.0: 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) <= -1e+71) tmp = Float64(a * 120.0); elseif (Float64(a * 120.0) <= -4e+38) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); elseif (Float64(a * 120.0) <= -4e-7) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(x / z))); elseif (Float64(a * 120.0) <= 100000000000.0) 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) <= -1e+71) tmp = a * 120.0; elseif ((a * 120.0) <= -4e+38) tmp = 60.0 * ((x - y) / (z - t)); elseif ((a * 120.0) <= -4e-7) tmp = (a * 120.0) + (60.0 * (x / z)); elseif ((a * 120.0) <= 100000000000.0) 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], -1e+71], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], -4e+38], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], -4e-7], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 100000000000.0], 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 -1 \cdot 10^{+71}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq -4 \cdot 10^{+38}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{elif}\;a \cdot 120 \leq -4 \cdot 10^{-7}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{x}{z}\\
\mathbf{elif}\;a \cdot 120 \leq 100000000000:\\
\;\;\;\;\frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a 120) < -1e71 or 1e11 < (*.f64 a 120) Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 83.5%
if -1e71 < (*.f64 a 120) < -3.99999999999999991e38Initial program 100.0%
*-commutative100.0%
associate-/l*100.0%
Applied egg-rr100.0%
Taylor expanded in a around 0 100.0%
if -3.99999999999999991e38 < (*.f64 a 120) < -3.9999999999999998e-7Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 87.9%
Taylor expanded in z around inf 88.2%
if -3.9999999999999998e-7 < (*.f64 a 120) < 1e11Initial program 99.8%
*-commutative99.8%
associate-/l*99.6%
Applied egg-rr99.6%
Taylor expanded in a around 0 80.2%
associate-*r/80.3%
Simplified80.3%
Final simplification82.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -0.0072) (not (<= y 1.4e+53))) (+ (* 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 <= -0.0072) || !(y <= 1.4e+53)) {
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 <= (-0.0072d0)) .or. (.not. (y <= 1.4d+53))) 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 <= -0.0072) || !(y <= 1.4e+53)) {
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 <= -0.0072) or not (y <= 1.4e+53): 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 <= -0.0072) || !(y <= 1.4e+53)) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / Float64(z - t)))); else tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(x / Float64(z - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -0.0072) || ~((y <= 1.4e+53))) 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, -0.0072], N[Not[LessEqual[y, 1.4e+53]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -0.0072 \lor \neg \left(y \leq 1.4 \cdot 10^{+53}\right):\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{x}{z - t}\\
\end{array}
\end{array}
if y < -0.0071999999999999998 or 1.4e53 < y Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around 0 89.6%
if -0.0071999999999999998 < y < 1.4e53Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 97.8%
Final simplification94.1%
(FPCore (x y z t a)
:precision binary64
(if (<= x -5e+174)
(* 60.0 (/ (- x y) (- z t)))
(if (<= x 6e+108)
(+ (* a 120.0) (* -60.0 (/ y (- z t))))
(/ (* 60.0 (- x y)) (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -5e+174) {
tmp = 60.0 * ((x - y) / (z - t));
} else if (x <= 6e+108) {
tmp = (a * 120.0) + (-60.0 * (y / (z - t)));
} else {
tmp = (60.0 * (x - y)) / (z - t);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (x <= (-5d+174)) then
tmp = 60.0d0 * ((x - y) / (z - t))
else if (x <= 6d+108) then
tmp = (a * 120.0d0) + ((-60.0d0) * (y / (z - t)))
else
tmp = (60.0d0 * (x - y)) / (z - t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -5e+174) {
tmp = 60.0 * ((x - y) / (z - t));
} else if (x <= 6e+108) {
tmp = (a * 120.0) + (-60.0 * (y / (z - t)));
} else {
tmp = (60.0 * (x - y)) / (z - t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -5e+174: tmp = 60.0 * ((x - y) / (z - t)) elif x <= 6e+108: tmp = (a * 120.0) + (-60.0 * (y / (z - t))) else: tmp = (60.0 * (x - y)) / (z - t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -5e+174) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); elseif (x <= 6e+108) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / Float64(z - t)))); else tmp = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -5e+174) tmp = 60.0 * ((x - y) / (z - t)); elseif (x <= 6e+108) tmp = (a * 120.0) + (-60.0 * (y / (z - t))); else tmp = (60.0 * (x - y)) / (z - t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -5e+174], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 6e+108], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5 \cdot 10^{+174}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{elif}\;x \leq 6 \cdot 10^{+108}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;\frac{60 \cdot \left(x - y\right)}{z - t}\\
\end{array}
\end{array}
if x < -4.9999999999999997e174Initial program 99.7%
*-commutative99.7%
associate-/l*99.8%
Applied egg-rr99.8%
Taylor expanded in a around 0 75.6%
if -4.9999999999999997e174 < x < 5.99999999999999968e108Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 90.4%
if 5.99999999999999968e108 < x Initial program 99.8%
*-commutative99.8%
associate-/l*99.5%
Applied egg-rr99.5%
Taylor expanded in a around 0 73.1%
associate-*r/73.3%
Simplified73.3%
Final simplification85.7%
(FPCore (x y z t a)
:precision binary64
(if (<= y -0.012)
(+ (* a 120.0) (/ (* y -60.0) (- z t)))
(if (<= y 7.5e+60)
(+ (* a 120.0) (* 60.0 (/ x (- z t))))
(+ (* a 120.0) (* -60.0 (/ y (- z t)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -0.012) {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
} else if (y <= 7.5e+60) {
tmp = (a * 120.0) + (60.0 * (x / (z - t)));
} else {
tmp = (a * 120.0) + (-60.0 * (y / (z - t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (y <= (-0.012d0)) then
tmp = (a * 120.0d0) + ((y * (-60.0d0)) / (z - t))
else if (y <= 7.5d+60) then
tmp = (a * 120.0d0) + (60.0d0 * (x / (z - t)))
else
tmp = (a * 120.0d0) + ((-60.0d0) * (y / (z - t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -0.012) {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
} else if (y <= 7.5e+60) {
tmp = (a * 120.0) + (60.0 * (x / (z - t)));
} else {
tmp = (a * 120.0) + (-60.0 * (y / (z - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -0.012: tmp = (a * 120.0) + ((y * -60.0) / (z - t)) elif y <= 7.5e+60: tmp = (a * 120.0) + (60.0 * (x / (z - t))) else: tmp = (a * 120.0) + (-60.0 * (y / (z - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -0.012) tmp = Float64(Float64(a * 120.0) + Float64(Float64(y * -60.0) / Float64(z - t))); elseif (y <= 7.5e+60) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(x / Float64(z - t)))); else tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / Float64(z - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -0.012) tmp = (a * 120.0) + ((y * -60.0) / (z - t)); elseif (y <= 7.5e+60) tmp = (a * 120.0) + (60.0 * (x / (z - t))); else tmp = (a * 120.0) + (-60.0 * (y / (z - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -0.012], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7.5e+60], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -0.012:\\
\;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z - t}\\
\mathbf{elif}\;y \leq 7.5 \cdot 10^{+60}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{x}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z - t}\\
\end{array}
\end{array}
if y < -0.012Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around 0 87.7%
associate-*r/87.8%
Simplified87.8%
if -0.012 < y < 7.5e60Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 97.8%
if 7.5e60 < y Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 92.0%
Final simplification94.1%
(FPCore (x y z t a)
:precision binary64
(if (<= y -0.011)
(+ (* a 120.0) (/ (* y -60.0) (- z t)))
(if (<= y 3.7e+55)
(+ (* a 120.0) (/ (* 60.0 x) (- z t)))
(+ (* a 120.0) (* -60.0 (/ y (- z t)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -0.011) {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
} else if (y <= 3.7e+55) {
tmp = (a * 120.0) + ((60.0 * x) / (z - t));
} else {
tmp = (a * 120.0) + (-60.0 * (y / (z - t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (y <= (-0.011d0)) then
tmp = (a * 120.0d0) + ((y * (-60.0d0)) / (z - t))
else if (y <= 3.7d+55) then
tmp = (a * 120.0d0) + ((60.0d0 * x) / (z - t))
else
tmp = (a * 120.0d0) + ((-60.0d0) * (y / (z - t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -0.011) {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
} else if (y <= 3.7e+55) {
tmp = (a * 120.0) + ((60.0 * x) / (z - t));
} else {
tmp = (a * 120.0) + (-60.0 * (y / (z - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -0.011: tmp = (a * 120.0) + ((y * -60.0) / (z - t)) elif y <= 3.7e+55: tmp = (a * 120.0) + ((60.0 * x) / (z - t)) else: tmp = (a * 120.0) + (-60.0 * (y / (z - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -0.011) tmp = Float64(Float64(a * 120.0) + Float64(Float64(y * -60.0) / Float64(z - t))); elseif (y <= 3.7e+55) tmp = Float64(Float64(a * 120.0) + Float64(Float64(60.0 * x) / Float64(z - t))); else tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / Float64(z - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -0.011) tmp = (a * 120.0) + ((y * -60.0) / (z - t)); elseif (y <= 3.7e+55) tmp = (a * 120.0) + ((60.0 * x) / (z - t)); else tmp = (a * 120.0) + (-60.0 * (y / (z - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -0.011], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.7e+55], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(60.0 * x), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -0.011:\\
\;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z - t}\\
\mathbf{elif}\;y \leq 3.7 \cdot 10^{+55}:\\
\;\;\;\;a \cdot 120 + \frac{60 \cdot x}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z - t}\\
\end{array}
\end{array}
if y < -0.010999999999999999Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around 0 87.7%
associate-*r/87.8%
Simplified87.8%
if -0.010999999999999999 < y < 3.7000000000000002e55Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 97.8%
associate-*r/97.8%
Simplified97.8%
if 3.7000000000000002e55 < y Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 92.0%
Final simplification94.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.1e-31) (not (<= a 3.8e-92))) (* a 120.0) (* -60.0 (/ y (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.1e-31) || !(a <= 3.8e-92)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (y / (z - t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-1.1d-31)) .or. (.not. (a <= 3.8d-92))) then
tmp = a * 120.0d0
else
tmp = (-60.0d0) * (y / (z - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.1e-31) || !(a <= 3.8e-92)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (y / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.1e-31) or not (a <= 3.8e-92): tmp = a * 120.0 else: tmp = -60.0 * (y / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.1e-31) || !(a <= 3.8e-92)) tmp = Float64(a * 120.0); else tmp = Float64(-60.0 * Float64(y / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1.1e-31) || ~((a <= 3.8e-92))) tmp = a * 120.0; else tmp = -60.0 * (y / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.1e-31], N[Not[LessEqual[a, 3.8e-92]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.1 \cdot 10^{-31} \lor \neg \left(a \leq 3.8 \cdot 10^{-92}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\end{array}
\end{array}
if a < -1.10000000000000005e-31 or 3.8000000000000001e-92 < a Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 72.0%
if -1.10000000000000005e-31 < a < 3.8000000000000001e-92Initial program 99.7%
*-commutative99.7%
associate-/l*99.6%
Applied egg-rr99.6%
Taylor expanded in y around inf 49.6%
Final simplification62.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -1.4e+179) (not (<= x 6.4e+195))) (* -60.0 (/ x t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -1.4e+179) || !(x <= 6.4e+195)) {
tmp = -60.0 * (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 ((x <= (-1.4d+179)) .or. (.not. (x <= 6.4d+195))) then
tmp = (-60.0d0) * (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 ((x <= -1.4e+179) || !(x <= 6.4e+195)) {
tmp = -60.0 * (x / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -1.4e+179) or not (x <= 6.4e+195): tmp = -60.0 * (x / t) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -1.4e+179) || !(x <= 6.4e+195)) tmp = Float64(-60.0 * Float64(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 ((x <= -1.4e+179) || ~((x <= 6.4e+195))) tmp = -60.0 * (x / t); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -1.4e+179], N[Not[LessEqual[x, 6.4e+195]], $MachinePrecision]], N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.4 \cdot 10^{+179} \lor \neg \left(x \leq 6.4 \cdot 10^{+195}\right):\\
\;\;\;\;-60 \cdot \frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if x < -1.4e179 or 6.39999999999999965e195 < x Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around inf 94.9%
Taylor expanded in z around 0 65.2%
Taylor expanded in x around inf 51.4%
if -1.4e179 < x < 6.39999999999999965e195Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 55.5%
Final simplification54.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -5.5e+180) (not (<= x 2e+197))) (/ (* x -60.0) t) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -5.5e+180) || !(x <= 2e+197)) {
tmp = (x * -60.0) / 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 ((x <= (-5.5d+180)) .or. (.not. (x <= 2d+197))) then
tmp = (x * (-60.0d0)) / 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 ((x <= -5.5e+180) || !(x <= 2e+197)) {
tmp = (x * -60.0) / t;
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -5.5e+180) or not (x <= 2e+197): tmp = (x * -60.0) / t else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -5.5e+180) || !(x <= 2e+197)) tmp = Float64(Float64(x * -60.0) / t); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -5.5e+180) || ~((x <= 2e+197))) tmp = (x * -60.0) / t; else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -5.5e+180], N[Not[LessEqual[x, 2e+197]], $MachinePrecision]], N[(N[(x * -60.0), $MachinePrecision] / t), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.5 \cdot 10^{+180} \lor \neg \left(x \leq 2 \cdot 10^{+197}\right):\\
\;\;\;\;\frac{x \cdot -60}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if x < -5.5000000000000003e180 or 1.9999999999999999e197 < x Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around inf 94.9%
Taylor expanded in z around 0 65.2%
Taylor expanded in x around inf 51.4%
associate-*r/51.5%
Simplified51.5%
if -5.5000000000000003e180 < x < 1.9999999999999999e197Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 55.5%
Final simplification54.8%
(FPCore (x y z t a) :precision binary64 (if (<= x -5.8e+175) (* -60.0 (/ x t)) (if (<= x 4.3e+195) (* a 120.0) (/ -60.0 (/ t x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -5.8e+175) {
tmp = -60.0 * (x / t);
} else if (x <= 4.3e+195) {
tmp = a * 120.0;
} else {
tmp = -60.0 / (t / x);
}
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 <= (-5.8d+175)) then
tmp = (-60.0d0) * (x / t)
else if (x <= 4.3d+195) then
tmp = a * 120.0d0
else
tmp = (-60.0d0) / (t / x)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -5.8e+175) {
tmp = -60.0 * (x / t);
} else if (x <= 4.3e+195) {
tmp = a * 120.0;
} else {
tmp = -60.0 / (t / x);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -5.8e+175: tmp = -60.0 * (x / t) elif x <= 4.3e+195: tmp = a * 120.0 else: tmp = -60.0 / (t / x) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -5.8e+175) tmp = Float64(-60.0 * Float64(x / t)); elseif (x <= 4.3e+195) tmp = Float64(a * 120.0); else tmp = Float64(-60.0 / Float64(t / x)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -5.8e+175) tmp = -60.0 * (x / t); elseif (x <= 4.3e+195) tmp = a * 120.0; else tmp = -60.0 / (t / x); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -5.8e+175], N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.3e+195], N[(a * 120.0), $MachinePrecision], N[(-60.0 / N[(t / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.8 \cdot 10^{+175}:\\
\;\;\;\;-60 \cdot \frac{x}{t}\\
\mathbf{elif}\;x \leq 4.3 \cdot 10^{+195}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{-60}{\frac{t}{x}}\\
\end{array}
\end{array}
if x < -5.8e175Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 95.1%
Taylor expanded in z around 0 71.6%
Taylor expanded in x around inf 51.0%
if -5.8e175 < x < 4.29999999999999981e195Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 55.5%
if 4.29999999999999981e195 < x Initial program 99.7%
associate-/l*99.5%
Simplified99.5%
Taylor expanded in x around inf 94.6%
Taylor expanded in z around 0 56.6%
Taylor expanded in x around inf 51.9%
clear-num52.0%
un-div-inv52.0%
Applied egg-rr52.0%
Final simplification54.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(60.0 * Float64(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[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
a \cdot 120 + 60 \cdot \frac{x - y}{z - t}
\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))
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 49.2%
Final simplification49.2%
(FPCore (x y z t a) :precision binary64 (+ (/ 60.0 (/ (- z t) (- x y))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (60.0d0 / ((z - t) / (x - y))) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
def code(x, y, z, t, a): return (60.0 / ((z - t) / (x - y))) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = (60.0 / ((z - t) / (x - y))) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60}{\frac{z - t}{x - y}} + a \cdot 120
\end{array}
herbie shell --seed 2024045
(FPCore (x y z t a)
:name "Data.Colour.RGB:hslsv from colour-2.3.3, B"
:precision binary64
:alt
(+ (/ 60.0 (/ (- z t) (- x y))) (* a 120.0))
(+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))