
(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 (fma a 120.0 (/ (- x y) (* (- z t) 0.016666666666666666))))
double code(double x, double y, double z, double t, double a) {
return fma(a, 120.0, ((x - y) / ((z - t) * 0.016666666666666666)));
}
function code(x, y, z, t, a) return fma(a, 120.0, Float64(Float64(x - y) / Float64(Float64(z - t) * 0.016666666666666666))) end
code[x_, y_, z_, t_, a_] := N[(a * 120.0 + N[(N[(x - y), $MachinePrecision] / N[(N[(z - t), $MachinePrecision] * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(a, 120, \frac{x - y}{\left(z - t\right) \cdot 0.016666666666666666}\right)
\end{array}
Initial program 99.1%
+-commutative99.1%
fma-def99.1%
associate-*l/99.8%
*-commutative99.8%
Simplified99.8%
clear-num99.7%
un-div-inv99.8%
div-inv99.8%
metadata-eval99.8%
Applied egg-rr99.8%
Final simplification99.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (* a 120.0) (* x (/ 60.0 (- z t))))))
(if (<= (* a 120.0) -1e-71)
t_1
(if (<= (* a 120.0) -1e-137)
(* 60.0 (/ (- x y) (- z t)))
(if (or (<= (* a 120.0) -1e-186) (not (<= (* a 120.0) 5e-62)))
t_1
(/ (- x y) (* (- z t) 0.016666666666666666)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (a * 120.0) + (x * (60.0 / (z - t)));
double tmp;
if ((a * 120.0) <= -1e-71) {
tmp = t_1;
} else if ((a * 120.0) <= -1e-137) {
tmp = 60.0 * ((x - y) / (z - t));
} else if (((a * 120.0) <= -1e-186) || !((a * 120.0) <= 5e-62)) {
tmp = t_1;
} else {
tmp = (x - y) / ((z - t) * 0.016666666666666666);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (a * 120.0d0) + (x * (60.0d0 / (z - t)))
if ((a * 120.0d0) <= (-1d-71)) then
tmp = t_1
else if ((a * 120.0d0) <= (-1d-137)) then
tmp = 60.0d0 * ((x - y) / (z - t))
else if (((a * 120.0d0) <= (-1d-186)) .or. (.not. ((a * 120.0d0) <= 5d-62))) then
tmp = t_1
else
tmp = (x - y) / ((z - t) * 0.016666666666666666d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (a * 120.0) + (x * (60.0 / (z - t)));
double tmp;
if ((a * 120.0) <= -1e-71) {
tmp = t_1;
} else if ((a * 120.0) <= -1e-137) {
tmp = 60.0 * ((x - y) / (z - t));
} else if (((a * 120.0) <= -1e-186) || !((a * 120.0) <= 5e-62)) {
tmp = t_1;
} else {
tmp = (x - y) / ((z - t) * 0.016666666666666666);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (a * 120.0) + (x * (60.0 / (z - t))) tmp = 0 if (a * 120.0) <= -1e-71: tmp = t_1 elif (a * 120.0) <= -1e-137: tmp = 60.0 * ((x - y) / (z - t)) elif ((a * 120.0) <= -1e-186) or not ((a * 120.0) <= 5e-62): tmp = t_1 else: tmp = (x - y) / ((z - t) * 0.016666666666666666) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(a * 120.0) + Float64(x * Float64(60.0 / Float64(z - t)))) tmp = 0.0 if (Float64(a * 120.0) <= -1e-71) tmp = t_1; elseif (Float64(a * 120.0) <= -1e-137) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); elseif ((Float64(a * 120.0) <= -1e-186) || !(Float64(a * 120.0) <= 5e-62)) tmp = t_1; else tmp = Float64(Float64(x - y) / Float64(Float64(z - t) * 0.016666666666666666)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (a * 120.0) + (x * (60.0 / (z - t))); tmp = 0.0; if ((a * 120.0) <= -1e-71) tmp = t_1; elseif ((a * 120.0) <= -1e-137) tmp = 60.0 * ((x - y) / (z - t)); elseif (((a * 120.0) <= -1e-186) || ~(((a * 120.0) <= 5e-62))) tmp = t_1; else tmp = (x - y) / ((z - t) * 0.016666666666666666); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(a * 120.0), $MachinePrecision] + N[(x * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * 120.0), $MachinePrecision], -1e-71], t$95$1, If[LessEqual[N[(a * 120.0), $MachinePrecision], -1e-137], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[N[(a * 120.0), $MachinePrecision], -1e-186], N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 5e-62]], $MachinePrecision]], t$95$1, N[(N[(x - y), $MachinePrecision] / N[(N[(z - t), $MachinePrecision] * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot 120 + x \cdot \frac{60}{z - t}\\
\mathbf{if}\;a \cdot 120 \leq -1 \cdot 10^{-71}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \cdot 120 \leq -1 \cdot 10^{-137}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{elif}\;a \cdot 120 \leq -1 \cdot 10^{-186} \lor \neg \left(a \cdot 120 \leq 5 \cdot 10^{-62}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x - y}{\left(z - t\right) \cdot 0.016666666666666666}\\
\end{array}
\end{array}
if (*.f64 a 120) < -9.9999999999999992e-72 or -9.99999999999999978e-138 < (*.f64 a 120) < -9.9999999999999991e-187 or 5.0000000000000002e-62 < (*.f64 a 120) Initial program 98.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 86.4%
associate-*r/86.4%
associate-*l/86.4%
*-commutative86.4%
Simplified86.4%
if -9.9999999999999992e-72 < (*.f64 a 120) < -9.99999999999999978e-138Initial program 99.7%
associate-/l*99.5%
Simplified99.5%
Taylor expanded in a around 0 77.1%
if -9.9999999999999991e-187 < (*.f64 a 120) < 5.0000000000000002e-62Initial program 99.7%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 85.1%
metadata-eval85.1%
times-frac85.2%
*-un-lft-identity85.2%
*-commutative85.2%
Applied egg-rr85.2%
Final simplification85.4%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -2e-39)
(* a 120.0)
(if (<= (* a 120.0) 2e-48)
(* 60.0 (/ (- x y) (- z t)))
(if (<= (* a 120.0) 1e+92)
(+ (* a 120.0) (* -60.0 (/ y z)))
(* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -2e-39) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 2e-48) {
tmp = 60.0 * ((x - y) / (z - t));
} else if ((a * 120.0) <= 1e+92) {
tmp = (a * 120.0) + (-60.0 * (y / z));
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a * 120.0d0) <= (-2d-39)) then
tmp = a * 120.0d0
else if ((a * 120.0d0) <= 2d-48) then
tmp = 60.0d0 * ((x - y) / (z - t))
else if ((a * 120.0d0) <= 1d+92) then
tmp = (a * 120.0d0) + ((-60.0d0) * (y / z))
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -2e-39) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 2e-48) {
tmp = 60.0 * ((x - y) / (z - t));
} else if ((a * 120.0) <= 1e+92) {
tmp = (a * 120.0) + (-60.0 * (y / z));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -2e-39: tmp = a * 120.0 elif (a * 120.0) <= 2e-48: tmp = 60.0 * ((x - y) / (z - t)) elif (a * 120.0) <= 1e+92: tmp = (a * 120.0) + (-60.0 * (y / z)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -2e-39) tmp = Float64(a * 120.0); elseif (Float64(a * 120.0) <= 2e-48) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); elseif (Float64(a * 120.0) <= 1e+92) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / z))); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a * 120.0) <= -2e-39) tmp = a * 120.0; elseif ((a * 120.0) <= 2e-48) tmp = 60.0 * ((x - y) / (z - t)); elseif ((a * 120.0) <= 1e+92) tmp = (a * 120.0) + (-60.0 * (y / z)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -2e-39], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 2e-48], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 1e+92], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -2 \cdot 10^{-39}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{-48}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{elif}\;a \cdot 120 \leq 10^{+92}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a 120) < -1.99999999999999986e-39 or 1e92 < (*.f64 a 120) Initial program 98.2%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 81.6%
if -1.99999999999999986e-39 < (*.f64 a 120) < 1.9999999999999999e-48Initial program 99.7%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 78.2%
if 1.9999999999999999e-48 < (*.f64 a 120) < 1e92Initial program 99.9%
Taylor expanded in x around 0 79.5%
Taylor expanded in z around inf 67.1%
Final simplification78.2%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -2e-39)
(* a 120.0)
(if (<= (* a 120.0) 2e-48)
(/ (- x y) (* (- z t) 0.016666666666666666))
(if (<= (* a 120.0) 1e+92)
(+ (* a 120.0) (* -60.0 (/ y z)))
(* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -2e-39) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 2e-48) {
tmp = (x - y) / ((z - t) * 0.016666666666666666);
} else if ((a * 120.0) <= 1e+92) {
tmp = (a * 120.0) + (-60.0 * (y / z));
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a * 120.0d0) <= (-2d-39)) then
tmp = a * 120.0d0
else if ((a * 120.0d0) <= 2d-48) then
tmp = (x - y) / ((z - t) * 0.016666666666666666d0)
else if ((a * 120.0d0) <= 1d+92) then
tmp = (a * 120.0d0) + ((-60.0d0) * (y / z))
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -2e-39) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 2e-48) {
tmp = (x - y) / ((z - t) * 0.016666666666666666);
} else if ((a * 120.0) <= 1e+92) {
tmp = (a * 120.0) + (-60.0 * (y / z));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -2e-39: tmp = a * 120.0 elif (a * 120.0) <= 2e-48: tmp = (x - y) / ((z - t) * 0.016666666666666666) elif (a * 120.0) <= 1e+92: tmp = (a * 120.0) + (-60.0 * (y / z)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -2e-39) tmp = Float64(a * 120.0); elseif (Float64(a * 120.0) <= 2e-48) tmp = Float64(Float64(x - y) / Float64(Float64(z - t) * 0.016666666666666666)); elseif (Float64(a * 120.0) <= 1e+92) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / z))); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a * 120.0) <= -2e-39) tmp = a * 120.0; elseif ((a * 120.0) <= 2e-48) tmp = (x - y) / ((z - t) * 0.016666666666666666); elseif ((a * 120.0) <= 1e+92) tmp = (a * 120.0) + (-60.0 * (y / z)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -2e-39], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 2e-48], N[(N[(x - y), $MachinePrecision] / N[(N[(z - t), $MachinePrecision] * 0.016666666666666666), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 1e+92], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -2 \cdot 10^{-39}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{-48}:\\
\;\;\;\;\frac{x - y}{\left(z - t\right) \cdot 0.016666666666666666}\\
\mathbf{elif}\;a \cdot 120 \leq 10^{+92}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a 120) < -1.99999999999999986e-39 or 1e92 < (*.f64 a 120) Initial program 98.2%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 81.6%
if -1.99999999999999986e-39 < (*.f64 a 120) < 1.9999999999999999e-48Initial program 99.7%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 78.2%
metadata-eval78.2%
times-frac78.2%
*-un-lft-identity78.2%
*-commutative78.2%
Applied egg-rr78.2%
if 1.9999999999999999e-48 < (*.f64 a 120) < 1e92Initial program 99.9%
Taylor expanded in x around 0 79.5%
Taylor expanded in z around inf 67.1%
Final simplification78.2%
(FPCore (x y z t a)
:precision binary64
(if (<= a -2.25e-44)
(* a 120.0)
(if (or (<= a 1.02e-50) (and (not (<= a 1.08e+55)) (<= a 4.8e+89)))
(* 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 <= -2.25e-44) {
tmp = a * 120.0;
} else if ((a <= 1.02e-50) || (!(a <= 1.08e+55) && (a <= 4.8e+89))) {
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 <= (-2.25d-44)) then
tmp = a * 120.0d0
else if ((a <= 1.02d-50) .or. (.not. (a <= 1.08d+55)) .and. (a <= 4.8d+89)) 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 <= -2.25e-44) {
tmp = a * 120.0;
} else if ((a <= 1.02e-50) || (!(a <= 1.08e+55) && (a <= 4.8e+89))) {
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 <= -2.25e-44: tmp = a * 120.0 elif (a <= 1.02e-50) or (not (a <= 1.08e+55) and (a <= 4.8e+89)): 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 (a <= -2.25e-44) tmp = Float64(a * 120.0); elseif ((a <= 1.02e-50) || (!(a <= 1.08e+55) && (a <= 4.8e+89))) 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 <= -2.25e-44) tmp = a * 120.0; elseif ((a <= 1.02e-50) || (~((a <= 1.08e+55)) && (a <= 4.8e+89))) 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[a, -2.25e-44], N[(a * 120.0), $MachinePrecision], If[Or[LessEqual[a, 1.02e-50], And[N[Not[LessEqual[a, 1.08e+55]], $MachinePrecision], LessEqual[a, 4.8e+89]]], 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 \leq -2.25 \cdot 10^{-44}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq 1.02 \cdot 10^{-50} \lor \neg \left(a \leq 1.08 \cdot 10^{+55}\right) \land a \leq 4.8 \cdot 10^{+89}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -2.2499999999999999e-44 or 1.0199999999999999e-50 < a < 1.08000000000000004e55 or 4.80000000000000009e89 < a Initial program 98.5%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 78.4%
if -2.2499999999999999e-44 < a < 1.0199999999999999e-50 or 1.08000000000000004e55 < a < 4.80000000000000009e89Initial program 99.7%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 78.9%
Final simplification78.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (* a 120.0) (* x (/ 60.0 (- z t))))))
(if (<= z -2.45e+171)
t_1
(if (<= z -3.1e-19)
(* 60.0 (/ (- x y) (- z t)))
(if (<= z 5.7e-242) (+ (* a 120.0) (* (- x y) (/ -60.0 t))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (a * 120.0) + (x * (60.0 / (z - t)));
double tmp;
if (z <= -2.45e+171) {
tmp = t_1;
} else if (z <= -3.1e-19) {
tmp = 60.0 * ((x - y) / (z - t));
} else if (z <= 5.7e-242) {
tmp = (a * 120.0) + ((x - y) * (-60.0 / t));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (a * 120.0d0) + (x * (60.0d0 / (z - t)))
if (z <= (-2.45d+171)) then
tmp = t_1
else if (z <= (-3.1d-19)) then
tmp = 60.0d0 * ((x - y) / (z - t))
else if (z <= 5.7d-242) then
tmp = (a * 120.0d0) + ((x - y) * ((-60.0d0) / t))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (a * 120.0) + (x * (60.0 / (z - t)));
double tmp;
if (z <= -2.45e+171) {
tmp = t_1;
} else if (z <= -3.1e-19) {
tmp = 60.0 * ((x - y) / (z - t));
} else if (z <= 5.7e-242) {
tmp = (a * 120.0) + ((x - y) * (-60.0 / t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (a * 120.0) + (x * (60.0 / (z - t))) tmp = 0 if z <= -2.45e+171: tmp = t_1 elif z <= -3.1e-19: tmp = 60.0 * ((x - y) / (z - t)) elif z <= 5.7e-242: tmp = (a * 120.0) + ((x - y) * (-60.0 / t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(a * 120.0) + Float64(x * Float64(60.0 / Float64(z - t)))) tmp = 0.0 if (z <= -2.45e+171) tmp = t_1; elseif (z <= -3.1e-19) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); elseif (z <= 5.7e-242) tmp = Float64(Float64(a * 120.0) + Float64(Float64(x - y) * Float64(-60.0 / t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (a * 120.0) + (x * (60.0 / (z - t))); tmp = 0.0; if (z <= -2.45e+171) tmp = t_1; elseif (z <= -3.1e-19) tmp = 60.0 * ((x - y) / (z - t)); elseif (z <= 5.7e-242) tmp = (a * 120.0) + ((x - y) * (-60.0 / t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(a * 120.0), $MachinePrecision] + N[(x * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.45e+171], t$95$1, If[LessEqual[z, -3.1e-19], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.7e-242], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(x - y), $MachinePrecision] * N[(-60.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot 120 + x \cdot \frac{60}{z - t}\\
\mathbf{if}\;z \leq -2.45 \cdot 10^{+171}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -3.1 \cdot 10^{-19}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{elif}\;z \leq 5.7 \cdot 10^{-242}:\\
\;\;\;\;a \cdot 120 + \left(x - y\right) \cdot \frac{-60}{t}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -2.4499999999999999e171 or 5.70000000000000032e-242 < z Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 88.5%
associate-*r/88.6%
associate-*l/88.5%
*-commutative88.5%
Simplified88.5%
if -2.4499999999999999e171 < z < -3.0999999999999999e-19Initial program 97.4%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 71.4%
if -3.0999999999999999e-19 < z < 5.70000000000000032e-242Initial program 98.5%
associate-/l*99.7%
Simplified99.7%
associate-/r/99.8%
Applied egg-rr99.8%
Taylor expanded in z around 0 87.4%
Final simplification85.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* -60.0 (/ y (- z t)))))
(if (<= y -1.4e+215)
t_1
(if (<= y 1.85e-12)
(* a 120.0)
(if (<= y 62000000000000.0)
(* 60.0 (/ x z))
(if (<= y 3.2e+163) (* a 120.0) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -60.0 * (y / (z - t));
double tmp;
if (y <= -1.4e+215) {
tmp = t_1;
} else if (y <= 1.85e-12) {
tmp = a * 120.0;
} else if (y <= 62000000000000.0) {
tmp = 60.0 * (x / z);
} else if (y <= 3.2e+163) {
tmp = a * 120.0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (-60.0d0) * (y / (z - t))
if (y <= (-1.4d+215)) then
tmp = t_1
else if (y <= 1.85d-12) then
tmp = a * 120.0d0
else if (y <= 62000000000000.0d0) then
tmp = 60.0d0 * (x / z)
else if (y <= 3.2d+163) then
tmp = a * 120.0d0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = -60.0 * (y / (z - t));
double tmp;
if (y <= -1.4e+215) {
tmp = t_1;
} else if (y <= 1.85e-12) {
tmp = a * 120.0;
} else if (y <= 62000000000000.0) {
tmp = 60.0 * (x / z);
} else if (y <= 3.2e+163) {
tmp = a * 120.0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -60.0 * (y / (z - t)) tmp = 0 if y <= -1.4e+215: tmp = t_1 elif y <= 1.85e-12: tmp = a * 120.0 elif y <= 62000000000000.0: tmp = 60.0 * (x / z) elif y <= 3.2e+163: tmp = a * 120.0 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(-60.0 * Float64(y / Float64(z - t))) tmp = 0.0 if (y <= -1.4e+215) tmp = t_1; elseif (y <= 1.85e-12) tmp = Float64(a * 120.0); elseif (y <= 62000000000000.0) tmp = Float64(60.0 * Float64(x / z)); elseif (y <= 3.2e+163) tmp = Float64(a * 120.0); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = -60.0 * (y / (z - t)); tmp = 0.0; if (y <= -1.4e+215) tmp = t_1; elseif (y <= 1.85e-12) tmp = a * 120.0; elseif (y <= 62000000000000.0) tmp = 60.0 * (x / z); elseif (y <= 3.2e+163) tmp = a * 120.0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.4e+215], t$95$1, If[LessEqual[y, 1.85e-12], N[(a * 120.0), $MachinePrecision], If[LessEqual[y, 62000000000000.0], N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.2e+163], N[(a * 120.0), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -60 \cdot \frac{y}{z - t}\\
\mathbf{if}\;y \leq -1.4 \cdot 10^{+215}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.85 \cdot 10^{-12}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;y \leq 62000000000000:\\
\;\;\;\;60 \cdot \frac{x}{z}\\
\mathbf{elif}\;y \leq 3.2 \cdot 10^{+163}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -1.4e215 or 3.1999999999999998e163 < y Initial program 96.6%
associate-/l*99.6%
Simplified99.6%
associate-/r/99.7%
Applied egg-rr99.7%
associate-*l/96.6%
*-un-lft-identity96.6%
times-frac99.7%
metadata-eval99.7%
metadata-eval99.7%
times-frac99.8%
*-un-lft-identity99.8%
*-commutative99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 66.8%
if -1.4e215 < y < 1.84999999999999999e-12 or 6.2e13 < y < 3.1999999999999998e163Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 62.1%
if 1.84999999999999999e-12 < y < 6.2e13Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
associate-/r/99.8%
Applied egg-rr99.8%
associate-*l/99.8%
*-un-lft-identity99.8%
times-frac99.6%
metadata-eval99.6%
metadata-eval99.6%
times-frac100.0%
*-un-lft-identity100.0%
*-commutative100.0%
Applied egg-rr100.0%
Taylor expanded in x around inf 99.6%
Taylor expanded in z around inf 72.3%
Final simplification63.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* -60.0 (/ y (- z t)))))
(if (<= a -1e-74)
(* a 120.0)
(if (<= a -1.8e-139)
t_1
(if (<= a -1.32e-300)
(* 60.0 (/ x (- z t)))
(if (<= a 4.5e-60) t_1 (* a 120.0)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -60.0 * (y / (z - t));
double tmp;
if (a <= -1e-74) {
tmp = a * 120.0;
} else if (a <= -1.8e-139) {
tmp = t_1;
} else if (a <= -1.32e-300) {
tmp = 60.0 * (x / (z - t));
} else if (a <= 4.5e-60) {
tmp = t_1;
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (-60.0d0) * (y / (z - t))
if (a <= (-1d-74)) then
tmp = a * 120.0d0
else if (a <= (-1.8d-139)) then
tmp = t_1
else if (a <= (-1.32d-300)) then
tmp = 60.0d0 * (x / (z - t))
else if (a <= 4.5d-60) then
tmp = t_1
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = -60.0 * (y / (z - t));
double tmp;
if (a <= -1e-74) {
tmp = a * 120.0;
} else if (a <= -1.8e-139) {
tmp = t_1;
} else if (a <= -1.32e-300) {
tmp = 60.0 * (x / (z - t));
} else if (a <= 4.5e-60) {
tmp = t_1;
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -60.0 * (y / (z - t)) tmp = 0 if a <= -1e-74: tmp = a * 120.0 elif a <= -1.8e-139: tmp = t_1 elif a <= -1.32e-300: tmp = 60.0 * (x / (z - t)) elif a <= 4.5e-60: tmp = t_1 else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) t_1 = Float64(-60.0 * Float64(y / Float64(z - t))) tmp = 0.0 if (a <= -1e-74) tmp = Float64(a * 120.0); elseif (a <= -1.8e-139) tmp = t_1; elseif (a <= -1.32e-300) tmp = Float64(60.0 * Float64(x / Float64(z - t))); elseif (a <= 4.5e-60) tmp = t_1; else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = -60.0 * (y / (z - t)); tmp = 0.0; if (a <= -1e-74) tmp = a * 120.0; elseif (a <= -1.8e-139) tmp = t_1; elseif (a <= -1.32e-300) tmp = 60.0 * (x / (z - t)); elseif (a <= 4.5e-60) tmp = t_1; else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1e-74], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -1.8e-139], t$95$1, If[LessEqual[a, -1.32e-300], N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4.5e-60], t$95$1, N[(a * 120.0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -60 \cdot \frac{y}{z - t}\\
\mathbf{if}\;a \leq -1 \cdot 10^{-74}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -1.8 \cdot 10^{-139}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq -1.32 \cdot 10^{-300}:\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\
\mathbf{elif}\;a \leq 4.5 \cdot 10^{-60}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -9.99999999999999958e-75 or 4.50000000000000001e-60 < a Initial program 98.7%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 71.7%
if -9.99999999999999958e-75 < a < -1.80000000000000002e-139 or -1.32e-300 < a < 4.50000000000000001e-60Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
associate-/r/99.5%
Applied egg-rr99.5%
associate-*l/99.8%
*-un-lft-identity99.8%
times-frac99.6%
metadata-eval99.6%
metadata-eval99.6%
times-frac99.7%
*-un-lft-identity99.7%
*-commutative99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 59.0%
if -1.80000000000000002e-139 < a < -1.32e-300Initial program 99.7%
associate-/l*99.5%
Simplified99.5%
associate-/r/99.7%
Applied egg-rr99.7%
associate-*l/99.7%
*-un-lft-identity99.7%
times-frac99.8%
metadata-eval99.8%
metadata-eval99.8%
times-frac99.7%
*-un-lft-identity99.7%
*-commutative99.7%
Applied egg-rr99.7%
Taylor expanded in x around inf 62.3%
Final simplification67.2%
(FPCore (x y z t a)
:precision binary64
(if (<= x -3.25e+68)
(+ (* a 120.0) (/ 60.0 (/ (- z t) x)))
(if (<= x 1.4e-52)
(+ (* a 120.0) (/ (* y -60.0) (- z t)))
(+ (* a 120.0) (* x (/ 60.0 (- z t)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -3.25e+68) {
tmp = (a * 120.0) + (60.0 / ((z - t) / x));
} else if (x <= 1.4e-52) {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
} else {
tmp = (a * 120.0) + (x * (60.0 / (z - t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (x <= (-3.25d+68)) then
tmp = (a * 120.0d0) + (60.0d0 / ((z - t) / x))
else if (x <= 1.4d-52) then
tmp = (a * 120.0d0) + ((y * (-60.0d0)) / (z - t))
else
tmp = (a * 120.0d0) + (x * (60.0d0 / (z - t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -3.25e+68) {
tmp = (a * 120.0) + (60.0 / ((z - t) / x));
} else if (x <= 1.4e-52) {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
} else {
tmp = (a * 120.0) + (x * (60.0 / (z - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -3.25e+68: tmp = (a * 120.0) + (60.0 / ((z - t) / x)) elif x <= 1.4e-52: tmp = (a * 120.0) + ((y * -60.0) / (z - t)) else: tmp = (a * 120.0) + (x * (60.0 / (z - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -3.25e+68) tmp = Float64(Float64(a * 120.0) + Float64(60.0 / Float64(Float64(z - t) / x))); elseif (x <= 1.4e-52) tmp = Float64(Float64(a * 120.0) + Float64(Float64(y * -60.0) / Float64(z - t))); else tmp = Float64(Float64(a * 120.0) + Float64(x * Float64(60.0 / Float64(z - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -3.25e+68) tmp = (a * 120.0) + (60.0 / ((z - t) / x)); elseif (x <= 1.4e-52) tmp = (a * 120.0) + ((y * -60.0) / (z - t)); else tmp = (a * 120.0) + (x * (60.0 / (z - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -3.25e+68], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 / N[(N[(z - t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.4e-52], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(x * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.25 \cdot 10^{+68}:\\
\;\;\;\;a \cdot 120 + \frac{60}{\frac{z - t}{x}}\\
\mathbf{elif}\;x \leq 1.4 \cdot 10^{-52}:\\
\;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + x \cdot \frac{60}{z - t}\\
\end{array}
\end{array}
if x < -3.2500000000000002e68Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 92.6%
if -3.2500000000000002e68 < x < 1.39999999999999997e-52Initial program 98.6%
Taylor expanded in x around 0 95.6%
if 1.39999999999999997e-52 < x Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 85.9%
associate-*r/85.9%
associate-*l/85.9%
*-commutative85.9%
Simplified85.9%
Final simplification92.5%
(FPCore (x y z t a)
:precision binary64
(if (<= x -2.8e+66)
(+ (* a 120.0) (/ 60.0 (/ (- z t) x)))
(if (<= x 7600000000000.0)
(+ (* a 120.0) (/ (* y -60.0) (- z t)))
(+ (* a 120.0) (/ (* x 60.0) (- z t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -2.8e+66) {
tmp = (a * 120.0) + (60.0 / ((z - t) / x));
} else if (x <= 7600000000000.0) {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
} else {
tmp = (a * 120.0) + ((x * 60.0) / (z - t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (x <= (-2.8d+66)) then
tmp = (a * 120.0d0) + (60.0d0 / ((z - t) / x))
else if (x <= 7600000000000.0d0) then
tmp = (a * 120.0d0) + ((y * (-60.0d0)) / (z - t))
else
tmp = (a * 120.0d0) + ((x * 60.0d0) / (z - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -2.8e+66) {
tmp = (a * 120.0) + (60.0 / ((z - t) / x));
} else if (x <= 7600000000000.0) {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
} else {
tmp = (a * 120.0) + ((x * 60.0) / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -2.8e+66: tmp = (a * 120.0) + (60.0 / ((z - t) / x)) elif x <= 7600000000000.0: tmp = (a * 120.0) + ((y * -60.0) / (z - t)) else: tmp = (a * 120.0) + ((x * 60.0) / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -2.8e+66) tmp = Float64(Float64(a * 120.0) + Float64(60.0 / Float64(Float64(z - t) / x))); elseif (x <= 7600000000000.0) tmp = Float64(Float64(a * 120.0) + Float64(Float64(y * -60.0) / Float64(z - t))); else tmp = Float64(Float64(a * 120.0) + Float64(Float64(x * 60.0) / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -2.8e+66) tmp = (a * 120.0) + (60.0 / ((z - t) / x)); elseif (x <= 7600000000000.0) tmp = (a * 120.0) + ((y * -60.0) / (z - t)); else tmp = (a * 120.0) + ((x * 60.0) / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -2.8e+66], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 / N[(N[(z - t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 7600000000000.0], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(x * 60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.8 \cdot 10^{+66}:\\
\;\;\;\;a \cdot 120 + \frac{60}{\frac{z - t}{x}}\\
\mathbf{elif}\;x \leq 7600000000000:\\
\;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{x \cdot 60}{z - t}\\
\end{array}
\end{array}
if x < -2.8000000000000001e66Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 92.6%
if -2.8000000000000001e66 < x < 7.6e12Initial program 98.7%
Taylor expanded in x around 0 94.2%
if 7.6e12 < x Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 87.5%
associate-*r/87.5%
*-commutative87.5%
Simplified87.5%
Final simplification92.5%
(FPCore (x y z t a) :precision binary64 (+ (* a 120.0) (* (- x y) (/ 60.0 (- z t)))))
double code(double x, double y, double z, double t, double a) {
return (a * 120.0) + ((x - y) * (60.0 / (z - t)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (a * 120.0d0) + ((x - y) * (60.0d0 / (z - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return (a * 120.0) + ((x - y) * (60.0 / (z - t)));
}
def code(x, y, z, t, a): return (a * 120.0) + ((x - y) * (60.0 / (z - t)))
function code(x, y, z, t, a) return Float64(Float64(a * 120.0) + Float64(Float64(x - y) * Float64(60.0 / Float64(z - t)))) end
function tmp = code(x, y, z, t, a) tmp = (a * 120.0) + ((x - y) * (60.0 / (z - t))); end
code[x_, y_, z_, t_, a_] := N[(N[(a * 120.0), $MachinePrecision] + N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
a \cdot 120 + \left(x - y\right) \cdot \frac{60}{z - t}
\end{array}
Initial program 99.1%
associate-/l*99.8%
Simplified99.8%
associate-/r/99.8%
Applied egg-rr99.8%
Final simplification99.8%
(FPCore (x y z t a) :precision binary64 (+ (* 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.1%
associate-/l*99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t a) :precision binary64 (+ (/ (- x y) (* (- z t) 0.016666666666666666)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return ((x - y) / ((z - t) * 0.016666666666666666)) + (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 = ((x - y) / ((z - t) * 0.016666666666666666d0)) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return ((x - y) / ((z - t) * 0.016666666666666666)) + (a * 120.0);
}
def code(x, y, z, t, a): return ((x - y) / ((z - t) * 0.016666666666666666)) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(Float64(x - y) / Float64(Float64(z - t) * 0.016666666666666666)) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = ((x - y) / ((z - t) * 0.016666666666666666)) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(x - y), $MachinePrecision] / N[(N[(z - t), $MachinePrecision] * 0.016666666666666666), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x - y}{\left(z - t\right) \cdot 0.016666666666666666} + a \cdot 120
\end{array}
Initial program 99.1%
associate-/l*99.8%
Simplified99.8%
associate-/r/99.8%
Applied egg-rr99.8%
associate-*l/99.1%
*-un-lft-identity99.1%
times-frac99.8%
metadata-eval99.8%
metadata-eval99.8%
times-frac99.8%
*-un-lft-identity99.8%
*-commutative99.8%
Applied egg-rr99.8%
Final simplification99.8%
(FPCore (x y z t a)
:precision binary64
(if (<= a -1.2e-189)
(* a 120.0)
(if (<= a -2.52e-290)
(* 60.0 (/ x z))
(if (<= a 2.15e-64) (* 60.0 (/ y t)) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.2e-189) {
tmp = a * 120.0;
} else if (a <= -2.52e-290) {
tmp = 60.0 * (x / z);
} else if (a <= 2.15e-64) {
tmp = 60.0 * (y / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-1.2d-189)) then
tmp = a * 120.0d0
else if (a <= (-2.52d-290)) then
tmp = 60.0d0 * (x / z)
else if (a <= 2.15d-64) then
tmp = 60.0d0 * (y / t)
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.2e-189) {
tmp = a * 120.0;
} else if (a <= -2.52e-290) {
tmp = 60.0 * (x / z);
} else if (a <= 2.15e-64) {
tmp = 60.0 * (y / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.2e-189: tmp = a * 120.0 elif a <= -2.52e-290: tmp = 60.0 * (x / z) elif a <= 2.15e-64: tmp = 60.0 * (y / t) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.2e-189) tmp = Float64(a * 120.0); elseif (a <= -2.52e-290) tmp = Float64(60.0 * Float64(x / z)); elseif (a <= 2.15e-64) tmp = Float64(60.0 * Float64(y / t)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.2e-189) tmp = a * 120.0; elseif (a <= -2.52e-290) tmp = 60.0 * (x / z); elseif (a <= 2.15e-64) tmp = 60.0 * (y / t); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.2e-189], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -2.52e-290], N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.15e-64], N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.2 \cdot 10^{-189}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -2.52 \cdot 10^{-290}:\\
\;\;\;\;60 \cdot \frac{x}{z}\\
\mathbf{elif}\;a \leq 2.15 \cdot 10^{-64}:\\
\;\;\;\;60 \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -1.1999999999999999e-189 or 2.14999999999999987e-64 < a Initial program 98.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 65.2%
if -1.1999999999999999e-189 < a < -2.51999999999999997e-290Initial program 99.7%
associate-/l*99.3%
Simplified99.3%
associate-/r/99.7%
Applied egg-rr99.7%
associate-*l/99.7%
*-un-lft-identity99.7%
times-frac99.7%
metadata-eval99.7%
metadata-eval99.7%
times-frac99.6%
*-un-lft-identity99.6%
*-commutative99.6%
Applied egg-rr99.6%
Taylor expanded in x around inf 66.3%
Taylor expanded in z around inf 56.8%
if -2.51999999999999997e-290 < a < 2.14999999999999987e-64Initial program 99.8%
Taylor expanded in x around 0 73.2%
Taylor expanded in z around 0 54.1%
Taylor expanded in y around inf 39.1%
Final simplification59.4%
(FPCore (x y z t a)
:precision binary64
(if (<= a -9e-190)
(* a 120.0)
(if (<= a -1.8e-288)
(* 60.0 (/ x z))
(if (<= a 5.6e-64) (/ (* y 60.0) t) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -9e-190) {
tmp = a * 120.0;
} else if (a <= -1.8e-288) {
tmp = 60.0 * (x / z);
} else if (a <= 5.6e-64) {
tmp = (y * 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 (a <= (-9d-190)) then
tmp = a * 120.0d0
else if (a <= (-1.8d-288)) then
tmp = 60.0d0 * (x / z)
else if (a <= 5.6d-64) then
tmp = (y * 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 (a <= -9e-190) {
tmp = a * 120.0;
} else if (a <= -1.8e-288) {
tmp = 60.0 * (x / z);
} else if (a <= 5.6e-64) {
tmp = (y * 60.0) / t;
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -9e-190: tmp = a * 120.0 elif a <= -1.8e-288: tmp = 60.0 * (x / z) elif a <= 5.6e-64: tmp = (y * 60.0) / t else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -9e-190) tmp = Float64(a * 120.0); elseif (a <= -1.8e-288) tmp = Float64(60.0 * Float64(x / z)); elseif (a <= 5.6e-64) tmp = Float64(Float64(y * 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 (a <= -9e-190) tmp = a * 120.0; elseif (a <= -1.8e-288) tmp = 60.0 * (x / z); elseif (a <= 5.6e-64) tmp = (y * 60.0) / t; else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -9e-190], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -1.8e-288], N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 5.6e-64], N[(N[(y * 60.0), $MachinePrecision] / t), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -9 \cdot 10^{-190}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -1.8 \cdot 10^{-288}:\\
\;\;\;\;60 \cdot \frac{x}{z}\\
\mathbf{elif}\;a \leq 5.6 \cdot 10^{-64}:\\
\;\;\;\;\frac{y \cdot 60}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -9.00000000000000042e-190 or 5.60000000000000008e-64 < a Initial program 98.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 65.2%
if -9.00000000000000042e-190 < a < -1.8000000000000001e-288Initial program 99.7%
associate-/l*99.3%
Simplified99.3%
associate-/r/99.7%
Applied egg-rr99.7%
associate-*l/99.7%
*-un-lft-identity99.7%
times-frac99.7%
metadata-eval99.7%
metadata-eval99.7%
times-frac99.6%
*-un-lft-identity99.6%
*-commutative99.6%
Applied egg-rr99.6%
Taylor expanded in x around inf 66.3%
Taylor expanded in z around inf 56.8%
if -1.8000000000000001e-288 < a < 5.60000000000000008e-64Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 80.9%
Taylor expanded in z around 0 55.6%
associate-*r/55.7%
Simplified55.7%
Taylor expanded in x around 0 39.2%
*-commutative39.2%
Simplified39.2%
Final simplification59.4%
(FPCore (x y z t a) :precision binary64 (if (<= x 1.05e+177) (* a 120.0) (* 60.0 (/ x z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= 1.05e+177) {
tmp = a * 120.0;
} else {
tmp = 60.0 * (x / z);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (x <= 1.05d+177) then
tmp = a * 120.0d0
else
tmp = 60.0d0 * (x / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= 1.05e+177) {
tmp = a * 120.0;
} else {
tmp = 60.0 * (x / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= 1.05e+177: tmp = a * 120.0 else: tmp = 60.0 * (x / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= 1.05e+177) tmp = Float64(a * 120.0); else tmp = Float64(60.0 * Float64(x / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= 1.05e+177) tmp = a * 120.0; else tmp = 60.0 * (x / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, 1.05e+177], N[(a * 120.0), $MachinePrecision], N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.05 \cdot 10^{+177}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x}{z}\\
\end{array}
\end{array}
if x < 1.05000000000000006e177Initial program 99.0%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 55.1%
if 1.05000000000000006e177 < x Initial program 99.9%
associate-/l*99.6%
Simplified99.6%
associate-/r/99.6%
Applied egg-rr99.6%
associate-*l/99.9%
*-un-lft-identity99.9%
times-frac99.7%
metadata-eval99.7%
metadata-eval99.7%
times-frac99.8%
*-un-lft-identity99.8%
*-commutative99.8%
Applied egg-rr99.8%
Taylor expanded in x around inf 69.4%
Taylor expanded in z around inf 52.8%
Final simplification54.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.1%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 52.2%
Final simplification52.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 2023287
(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)))