
(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 (* (/ 60.0 (- z t)) (- x y))))
double code(double x, double y, double z, double t, double a) {
return fma(a, 120.0, ((60.0 / (z - t)) * (x - y)));
}
function code(x, y, z, t, a) return fma(a, 120.0, Float64(Float64(60.0 / Float64(z - t)) * Float64(x - y))) end
code[x_, y_, z_, t_, a_] := N[(a * 120.0 + N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(a, 120, \frac{60}{z - t} \cdot \left(x - y\right)\right)
\end{array}
Initial program 99.4%
+-commutative99.4%
fma-def99.5%
associate-*l/99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ 60.0 (- z t))))
(if (or (<= (* a 120.0) -5e-192) (not (<= (* a 120.0) 1e-77)))
(+ (* t_1 x) (* a 120.0))
(* t_1 (- x y)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 / (z - t);
double tmp;
if (((a * 120.0) <= -5e-192) || !((a * 120.0) <= 1e-77)) {
tmp = (t_1 * x) + (a * 120.0);
} else {
tmp = t_1 * (x - y);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = 60.0d0 / (z - t)
if (((a * 120.0d0) <= (-5d-192)) .or. (.not. ((a * 120.0d0) <= 1d-77))) then
tmp = (t_1 * x) + (a * 120.0d0)
else
tmp = t_1 * (x - y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 / (z - t);
double tmp;
if (((a * 120.0) <= -5e-192) || !((a * 120.0) <= 1e-77)) {
tmp = (t_1 * x) + (a * 120.0);
} else {
tmp = t_1 * (x - y);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = 60.0 / (z - t) tmp = 0 if ((a * 120.0) <= -5e-192) or not ((a * 120.0) <= 1e-77): tmp = (t_1 * x) + (a * 120.0) else: tmp = t_1 * (x - y) return tmp
function code(x, y, z, t, a) t_1 = Float64(60.0 / Float64(z - t)) tmp = 0.0 if ((Float64(a * 120.0) <= -5e-192) || !(Float64(a * 120.0) <= 1e-77)) tmp = Float64(Float64(t_1 * x) + Float64(a * 120.0)); else tmp = Float64(t_1 * Float64(x - y)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = 60.0 / (z - t); tmp = 0.0; if (((a * 120.0) <= -5e-192) || ~(((a * 120.0) <= 1e-77))) tmp = (t_1 * x) + (a * 120.0); else tmp = t_1 * (x - y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[N[(a * 120.0), $MachinePrecision], -5e-192], N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 1e-77]], $MachinePrecision]], N[(N[(t$95$1 * x), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[(x - y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{60}{z - t}\\
\mathbf{if}\;a \cdot 120 \leq -5 \cdot 10^{-192} \lor \neg \left(a \cdot 120 \leq 10^{-77}\right):\\
\;\;\;\;t_1 \cdot x + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot \left(x - y\right)\\
\end{array}
\end{array}
if (*.f64 a 120) < -5.0000000000000001e-192 or 9.9999999999999993e-78 < (*.f64 a 120) Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 84.5%
associate-*r/84.5%
associate-*l/84.5%
*-commutative84.5%
Simplified84.5%
if -5.0000000000000001e-192 < (*.f64 a 120) < 9.9999999999999993e-78Initial program 98.4%
associate-/l*99.5%
Simplified99.5%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 89.2%
associate-*r/87.9%
*-commutative87.9%
associate-*r/89.3%
Simplified89.3%
Final simplification85.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ 60.0 (- z t))))
(if (<= (* a 120.0) -5e-192)
(+ (/ x (/ (- z t) 60.0)) (* a 120.0))
(if (<= (* a 120.0) 1e-77) (* t_1 (- x y)) (+ (* t_1 x) (* a 120.0))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 / (z - t);
double tmp;
if ((a * 120.0) <= -5e-192) {
tmp = (x / ((z - t) / 60.0)) + (a * 120.0);
} else if ((a * 120.0) <= 1e-77) {
tmp = t_1 * (x - y);
} else {
tmp = (t_1 * x) + (a * 120.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = 60.0d0 / (z - t)
if ((a * 120.0d0) <= (-5d-192)) then
tmp = (x / ((z - t) / 60.0d0)) + (a * 120.0d0)
else if ((a * 120.0d0) <= 1d-77) then
tmp = t_1 * (x - y)
else
tmp = (t_1 * x) + (a * 120.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 / (z - t);
double tmp;
if ((a * 120.0) <= -5e-192) {
tmp = (x / ((z - t) / 60.0)) + (a * 120.0);
} else if ((a * 120.0) <= 1e-77) {
tmp = t_1 * (x - y);
} else {
tmp = (t_1 * x) + (a * 120.0);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = 60.0 / (z - t) tmp = 0 if (a * 120.0) <= -5e-192: tmp = (x / ((z - t) / 60.0)) + (a * 120.0) elif (a * 120.0) <= 1e-77: tmp = t_1 * (x - y) else: tmp = (t_1 * x) + (a * 120.0) return tmp
function code(x, y, z, t, a) t_1 = Float64(60.0 / Float64(z - t)) tmp = 0.0 if (Float64(a * 120.0) <= -5e-192) tmp = Float64(Float64(x / Float64(Float64(z - t) / 60.0)) + Float64(a * 120.0)); elseif (Float64(a * 120.0) <= 1e-77) tmp = Float64(t_1 * Float64(x - y)); else tmp = Float64(Float64(t_1 * x) + Float64(a * 120.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = 60.0 / (z - t); tmp = 0.0; if ((a * 120.0) <= -5e-192) tmp = (x / ((z - t) / 60.0)) + (a * 120.0); elseif ((a * 120.0) <= 1e-77) tmp = t_1 * (x - y); else tmp = (t_1 * x) + (a * 120.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * 120.0), $MachinePrecision], -5e-192], N[(N[(x / N[(N[(z - t), $MachinePrecision] / 60.0), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 1e-77], N[(t$95$1 * N[(x - y), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$1 * x), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{60}{z - t}\\
\mathbf{if}\;a \cdot 120 \leq -5 \cdot 10^{-192}:\\
\;\;\;\;\frac{x}{\frac{z - t}{60}} + a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq 10^{-77}:\\
\;\;\;\;t_1 \cdot \left(x - y\right)\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot x + a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a 120) < -5.0000000000000001e-192Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 79.3%
associate-*r/79.4%
*-commutative79.4%
associate-/l*79.4%
Simplified79.4%
if -5.0000000000000001e-192 < (*.f64 a 120) < 9.9999999999999993e-78Initial program 98.4%
associate-/l*99.5%
Simplified99.5%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 89.2%
associate-*r/87.9%
*-commutative87.9%
associate-*r/89.3%
Simplified89.3%
if 9.9999999999999993e-78 < (*.f64 a 120) Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 91.2%
associate-*r/91.1%
associate-*l/91.1%
*-commutative91.1%
Simplified91.1%
Final simplification85.8%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -1e-8)
(+ (* a 120.0) (* -60.0 (/ y z)))
(if (<= (* a 120.0) 30000000000.0)
(* (/ 60.0 (- z t)) (- x y))
(* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -1e-8) {
tmp = (a * 120.0) + (-60.0 * (y / z));
} else if ((a * 120.0) <= 30000000000.0) {
tmp = (60.0 / (z - t)) * (x - y);
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a * 120.0d0) <= (-1d-8)) then
tmp = (a * 120.0d0) + ((-60.0d0) * (y / z))
else if ((a * 120.0d0) <= 30000000000.0d0) then
tmp = (60.0d0 / (z - t)) * (x - y)
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -1e-8) {
tmp = (a * 120.0) + (-60.0 * (y / z));
} else if ((a * 120.0) <= 30000000000.0) {
tmp = (60.0 / (z - t)) * (x - y);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -1e-8: tmp = (a * 120.0) + (-60.0 * (y / z)) elif (a * 120.0) <= 30000000000.0: tmp = (60.0 / (z - t)) * (x - y) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -1e-8) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / z))); elseif (Float64(a * 120.0) <= 30000000000.0) tmp = Float64(Float64(60.0 / Float64(z - t)) * Float64(x - y)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a * 120.0) <= -1e-8) tmp = (a * 120.0) + (-60.0 * (y / z)); elseif ((a * 120.0) <= 30000000000.0) tmp = (60.0 / (z - t)) * (x - y); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -1e-8], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 30000000000.0], N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -1 \cdot 10^{-8}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\
\mathbf{elif}\;a \cdot 120 \leq 30000000000:\\
\;\;\;\;\frac{60}{z - t} \cdot \left(x - y\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a 120) < -1e-8Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
associate-/r/99.8%
Applied egg-rr99.8%
Taylor expanded in x around 0 92.4%
fma-def92.4%
associate-*r/92.4%
Simplified92.4%
Taylor expanded in t around 0 77.5%
if -1e-8 < (*.f64 a 120) < 3e10Initial program 99.0%
associate-/l*99.6%
Simplified99.6%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 74.6%
associate-*r/73.9%
*-commutative73.9%
associate-*r/74.6%
Simplified74.6%
if 3e10 < (*.f64 a 120) Initial program 99.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 82.6%
Final simplification77.2%
(FPCore (x y z t a) :precision binary64 (if (<= (- z t) -5e-34) (* a 120.0) (if (<= (- z t) 5e-6) (* (- x y) (/ 60.0 z)) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z - t) <= -5e-34) {
tmp = a * 120.0;
} else if ((z - t) <= 5e-6) {
tmp = (x - y) * (60.0 / 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-34)) then
tmp = a * 120.0d0
else if ((z - t) <= 5d-6) then
tmp = (x - y) * (60.0d0 / 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-34) {
tmp = a * 120.0;
} else if ((z - t) <= 5e-6) {
tmp = (x - y) * (60.0 / z);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z - t) <= -5e-34: tmp = a * 120.0 elif (z - t) <= 5e-6: tmp = (x - y) * (60.0 / z) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(z - t) <= -5e-34) tmp = Float64(a * 120.0); elseif (Float64(z - t) <= 5e-6) tmp = Float64(Float64(x - y) * Float64(60.0 / 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-34) tmp = a * 120.0; elseif ((z - t) <= 5e-6) tmp = (x - y) * (60.0 / z); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(z - t), $MachinePrecision], -5e-34], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(z - t), $MachinePrecision], 5e-6], N[(N[(x - y), $MachinePrecision] * N[(60.0 / z), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z - t \leq -5 \cdot 10^{-34}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;z - t \leq 5 \cdot 10^{-6}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{60}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (-.f64 z t) < -5.0000000000000003e-34 or 5.00000000000000041e-6 < (-.f64 z t) Initial program 99.3%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in z around inf 65.6%
if -5.0000000000000003e-34 < (-.f64 z t) < 5.00000000000000041e-6Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 89.5%
associate-*r/89.6%
*-commutative89.6%
associate-*r/89.5%
Simplified89.5%
Taylor expanded in z around inf 62.8%
Final simplification64.9%
(FPCore (x y z t a)
:precision binary64
(if (<= x -4.5e+147)
(+ (/ x (/ (- z t) 60.0)) (* a 120.0))
(if (<= x 1.6e+47)
(+ (/ (* y -60.0) (- z t)) (* a 120.0))
(+ (* (/ 60.0 (- z t)) x) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -4.5e+147) {
tmp = (x / ((z - t) / 60.0)) + (a * 120.0);
} else if (x <= 1.6e+47) {
tmp = ((y * -60.0) / (z - t)) + (a * 120.0);
} else {
tmp = ((60.0 / (z - t)) * x) + (a * 120.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (x <= (-4.5d+147)) then
tmp = (x / ((z - t) / 60.0d0)) + (a * 120.0d0)
else if (x <= 1.6d+47) then
tmp = ((y * (-60.0d0)) / (z - t)) + (a * 120.0d0)
else
tmp = ((60.0d0 / (z - t)) * x) + (a * 120.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -4.5e+147) {
tmp = (x / ((z - t) / 60.0)) + (a * 120.0);
} else if (x <= 1.6e+47) {
tmp = ((y * -60.0) / (z - t)) + (a * 120.0);
} else {
tmp = ((60.0 / (z - t)) * x) + (a * 120.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -4.5e+147: tmp = (x / ((z - t) / 60.0)) + (a * 120.0) elif x <= 1.6e+47: tmp = ((y * -60.0) / (z - t)) + (a * 120.0) else: tmp = ((60.0 / (z - t)) * x) + (a * 120.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -4.5e+147) tmp = Float64(Float64(x / Float64(Float64(z - t) / 60.0)) + Float64(a * 120.0)); elseif (x <= 1.6e+47) tmp = Float64(Float64(Float64(y * -60.0) / Float64(z - t)) + Float64(a * 120.0)); else tmp = Float64(Float64(Float64(60.0 / Float64(z - t)) * x) + Float64(a * 120.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -4.5e+147) tmp = (x / ((z - t) / 60.0)) + (a * 120.0); elseif (x <= 1.6e+47) tmp = ((y * -60.0) / (z - t)) + (a * 120.0); else tmp = ((60.0 / (z - t)) * x) + (a * 120.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -4.5e+147], N[(N[(x / N[(N[(z - t), $MachinePrecision] / 60.0), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.6e+47], N[(N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.5 \cdot 10^{+147}:\\
\;\;\;\;\frac{x}{\frac{z - t}{60}} + a \cdot 120\\
\mathbf{elif}\;x \leq 1.6 \cdot 10^{+47}:\\
\;\;\;\;\frac{y \cdot -60}{z - t} + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{60}{z - t} \cdot x + a \cdot 120\\
\end{array}
\end{array}
if x < -4.50000000000000008e147Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 90.8%
associate-*r/90.9%
*-commutative90.9%
associate-/l*90.8%
Simplified90.8%
if -4.50000000000000008e147 < x < 1.6e47Initial program 99.3%
Taylor expanded in x around 0 94.3%
if 1.6e47 < x Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around inf 93.2%
associate-*r/93.2%
associate-*l/93.3%
*-commutative93.3%
Simplified93.3%
Final simplification93.6%
(FPCore (x y z t a)
:precision binary64
(if (<= x -4e+147)
(+ (/ (* 60.0 x) (- z t)) (* a 120.0))
(if (<= x 2.4e+47)
(+ (/ (* y -60.0) (- z t)) (* a 120.0))
(+ (* (/ 60.0 (- z t)) x) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -4e+147) {
tmp = ((60.0 * x) / (z - t)) + (a * 120.0);
} else if (x <= 2.4e+47) {
tmp = ((y * -60.0) / (z - t)) + (a * 120.0);
} else {
tmp = ((60.0 / (z - t)) * x) + (a * 120.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (x <= (-4d+147)) then
tmp = ((60.0d0 * x) / (z - t)) + (a * 120.0d0)
else if (x <= 2.4d+47) then
tmp = ((y * (-60.0d0)) / (z - t)) + (a * 120.0d0)
else
tmp = ((60.0d0 / (z - t)) * x) + (a * 120.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -4e+147) {
tmp = ((60.0 * x) / (z - t)) + (a * 120.0);
} else if (x <= 2.4e+47) {
tmp = ((y * -60.0) / (z - t)) + (a * 120.0);
} else {
tmp = ((60.0 / (z - t)) * x) + (a * 120.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -4e+147: tmp = ((60.0 * x) / (z - t)) + (a * 120.0) elif x <= 2.4e+47: tmp = ((y * -60.0) / (z - t)) + (a * 120.0) else: tmp = ((60.0 / (z - t)) * x) + (a * 120.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -4e+147) tmp = Float64(Float64(Float64(60.0 * x) / Float64(z - t)) + Float64(a * 120.0)); elseif (x <= 2.4e+47) tmp = Float64(Float64(Float64(y * -60.0) / Float64(z - t)) + Float64(a * 120.0)); else tmp = Float64(Float64(Float64(60.0 / Float64(z - t)) * x) + Float64(a * 120.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -4e+147) tmp = ((60.0 * x) / (z - t)) + (a * 120.0); elseif (x <= 2.4e+47) tmp = ((y * -60.0) / (z - t)) + (a * 120.0); else tmp = ((60.0 / (z - t)) * x) + (a * 120.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -4e+147], N[(N[(N[(60.0 * x), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.4e+47], N[(N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4 \cdot 10^{+147}:\\
\;\;\;\;\frac{60 \cdot x}{z - t} + a \cdot 120\\
\mathbf{elif}\;x \leq 2.4 \cdot 10^{+47}:\\
\;\;\;\;\frac{y \cdot -60}{z - t} + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{60}{z - t} \cdot x + a \cdot 120\\
\end{array}
\end{array}
if x < -3.9999999999999999e147Initial program 99.9%
Taylor expanded in x around inf 90.9%
*-commutative90.9%
Simplified90.9%
if -3.9999999999999999e147 < x < 2.40000000000000019e47Initial program 99.3%
Taylor expanded in x around 0 94.3%
if 2.40000000000000019e47 < x Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around inf 93.2%
associate-*r/93.2%
associate-*l/93.3%
*-commutative93.3%
Simplified93.3%
Final simplification93.6%
(FPCore (x y z t a)
:precision binary64
(if (<= a -1.25e-195)
(* a 120.0)
(if (<= a -9.5e-304)
(* (- x y) (/ -60.0 t))
(if (<= a 2.05e-78) (* -60.0 (/ y (- z t))) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.25e-195) {
tmp = a * 120.0;
} else if (a <= -9.5e-304) {
tmp = (x - y) * (-60.0 / t);
} else if (a <= 2.05e-78) {
tmp = -60.0 * (y / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-1.25d-195)) then
tmp = a * 120.0d0
else if (a <= (-9.5d-304)) then
tmp = (x - y) * ((-60.0d0) / t)
else if (a <= 2.05d-78) then
tmp = (-60.0d0) * (y / (z - t))
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.25e-195) {
tmp = a * 120.0;
} else if (a <= -9.5e-304) {
tmp = (x - y) * (-60.0 / t);
} else if (a <= 2.05e-78) {
tmp = -60.0 * (y / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.25e-195: tmp = a * 120.0 elif a <= -9.5e-304: tmp = (x - y) * (-60.0 / t) elif a <= 2.05e-78: tmp = -60.0 * (y / (z - t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.25e-195) tmp = Float64(a * 120.0); elseif (a <= -9.5e-304) tmp = Float64(Float64(x - y) * Float64(-60.0 / t)); elseif (a <= 2.05e-78) tmp = Float64(-60.0 * Float64(y / Float64(z - t))); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.25e-195) tmp = a * 120.0; elseif (a <= -9.5e-304) tmp = (x - y) * (-60.0 / t); elseif (a <= 2.05e-78) tmp = -60.0 * (y / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.25e-195], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -9.5e-304], N[(N[(x - y), $MachinePrecision] * N[(-60.0 / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.05e-78], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.25 \cdot 10^{-195}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -9.5 \cdot 10^{-304}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{-60}{t}\\
\mathbf{elif}\;a \leq 2.05 \cdot 10^{-78}:\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -1.25000000000000002e-195 or 2.0499999999999999e-78 < a Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 68.5%
if -1.25000000000000002e-195 < a < -9.50000000000000023e-304Initial program 99.7%
associate-/l*99.6%
Simplified99.6%
associate-/r/99.6%
Applied egg-rr99.6%
Taylor expanded in a around 0 83.9%
associate-*r/84.3%
*-commutative84.3%
associate-*r/84.2%
Simplified84.2%
Taylor expanded in z around 0 60.9%
if -9.50000000000000023e-304 < a < 2.0499999999999999e-78Initial program 97.7%
associate-/l*99.5%
Simplified99.5%
associate-/r/99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 51.8%
Final simplification64.7%
(FPCore (x y z t a) :precision binary64 (if (<= a -2.05e-19) (* a 120.0) (if (<= a 225000000.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 <= -2.05e-19) {
tmp = a * 120.0;
} else if (a <= 225000000.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 <= (-2.05d-19)) then
tmp = a * 120.0d0
else if (a <= 225000000.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 <= -2.05e-19) {
tmp = a * 120.0;
} else if (a <= 225000000.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 <= -2.05e-19: tmp = a * 120.0 elif a <= 225000000.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 (a <= -2.05e-19) tmp = Float64(a * 120.0); elseif (a <= 225000000.0) 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.05e-19) tmp = a * 120.0; elseif (a <= 225000000.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[a, -2.05e-19], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 225000000.0], 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.05 \cdot 10^{-19}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq 225000000:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -2.04999999999999993e-19 or 2.25e8 < a Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 77.8%
if -2.04999999999999993e-19 < a < 2.25e8Initial program 99.0%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 75.4%
Final simplification76.7%
(FPCore (x y z t a) :precision binary64 (if (<= a -8.8e-15) (* a 120.0) (if (<= a 225000000.0) (* (/ 60.0 (- z t)) (- x y)) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -8.8e-15) {
tmp = a * 120.0;
} else if (a <= 225000000.0) {
tmp = (60.0 / (z - t)) * (x - y);
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-8.8d-15)) then
tmp = a * 120.0d0
else if (a <= 225000000.0d0) then
tmp = (60.0d0 / (z - t)) * (x - y)
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -8.8e-15) {
tmp = a * 120.0;
} else if (a <= 225000000.0) {
tmp = (60.0 / (z - t)) * (x - y);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -8.8e-15: tmp = a * 120.0 elif a <= 225000000.0: tmp = (60.0 / (z - t)) * (x - y) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -8.8e-15) tmp = Float64(a * 120.0); elseif (a <= 225000000.0) tmp = Float64(Float64(60.0 / Float64(z - t)) * Float64(x - y)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -8.8e-15) tmp = a * 120.0; elseif (a <= 225000000.0) tmp = (60.0 / (z - t)) * (x - y); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -8.8e-15], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 225000000.0], N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -8.8 \cdot 10^{-15}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq 225000000:\\
\;\;\;\;\frac{60}{z - t} \cdot \left(x - y\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -8.79999999999999942e-15 or 2.25e8 < a Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 77.8%
if -8.79999999999999942e-15 < a < 2.25e8Initial program 99.0%
associate-/l*99.6%
Simplified99.6%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 75.4%
associate-*r/74.7%
*-commutative74.7%
associate-*r/75.4%
Simplified75.4%
Final simplification76.7%
(FPCore (x y z t a) :precision binary64 (+ (* (/ 60.0 (- z t)) (- x y)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return ((60.0 / (z - t)) * (x - y)) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((60.0d0 / (z - t)) * (x - y)) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return ((60.0 / (z - t)) * (x - y)) + (a * 120.0);
}
def code(x, y, z, t, a): return ((60.0 / (z - t)) * (x - y)) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(Float64(60.0 / Float64(z - t)) * Float64(x - y)) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = ((60.0 / (z - t)) * (x - y)) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60}{z - t} \cdot \left(x - y\right) + a \cdot 120
\end{array}
Initial program 99.4%
associate-/l*99.7%
Simplified99.7%
associate-/r/99.8%
Applied egg-rr99.8%
Final simplification99.8%
(FPCore (x y z t a)
:precision binary64
(if (<= y 6.5e+196)
(* a 120.0)
(if (or (<= y 4.3e+260) (not (<= y 1.35e+303)))
(* -60.0 (/ y z))
(* 60.0 (/ y t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= 6.5e+196) {
tmp = a * 120.0;
} else if ((y <= 4.3e+260) || !(y <= 1.35e+303)) {
tmp = -60.0 * (y / z);
} else {
tmp = 60.0 * (y / t);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (y <= 6.5d+196) then
tmp = a * 120.0d0
else if ((y <= 4.3d+260) .or. (.not. (y <= 1.35d+303))) then
tmp = (-60.0d0) * (y / z)
else
tmp = 60.0d0 * (y / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= 6.5e+196) {
tmp = a * 120.0;
} else if ((y <= 4.3e+260) || !(y <= 1.35e+303)) {
tmp = -60.0 * (y / z);
} else {
tmp = 60.0 * (y / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= 6.5e+196: tmp = a * 120.0 elif (y <= 4.3e+260) or not (y <= 1.35e+303): tmp = -60.0 * (y / z) else: tmp = 60.0 * (y / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= 6.5e+196) tmp = Float64(a * 120.0); elseif ((y <= 4.3e+260) || !(y <= 1.35e+303)) tmp = Float64(-60.0 * Float64(y / z)); else tmp = Float64(60.0 * Float64(y / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= 6.5e+196) tmp = a * 120.0; elseif ((y <= 4.3e+260) || ~((y <= 1.35e+303))) tmp = -60.0 * (y / z); else tmp = 60.0 * (y / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, 6.5e+196], N[(a * 120.0), $MachinePrecision], If[Or[LessEqual[y, 4.3e+260], N[Not[LessEqual[y, 1.35e+303]], $MachinePrecision]], N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision], N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 6.5 \cdot 10^{+196}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;y \leq 4.3 \cdot 10^{+260} \lor \neg \left(y \leq 1.35 \cdot 10^{+303}\right):\\
\;\;\;\;-60 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{y}{t}\\
\end{array}
\end{array}
if y < 6.49999999999999968e196Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 57.9%
if 6.49999999999999968e196 < y < 4.30000000000000024e260 or 1.35000000000000005e303 < y Initial program 94.8%
associate-/l*99.5%
Simplified99.5%
associate-/r/99.6%
Applied egg-rr99.6%
Taylor expanded in y around inf 75.7%
associate-*r/71.0%
Simplified71.0%
Taylor expanded in z around inf 70.7%
if 4.30000000000000024e260 < y < 1.35000000000000005e303Initial program 99.9%
associate-/l*99.6%
Simplified99.6%
associate-/r/100.0%
Applied egg-rr100.0%
Taylor expanded in y around inf 82.6%
associate-*r/82.6%
Simplified82.6%
Taylor expanded in z around 0 83.3%
Final simplification60.0%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.8e-156) (* a 120.0) (if (<= a 1.85e-78) (* -60.0 (/ y (- z t))) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.8e-156) {
tmp = a * 120.0;
} else if (a <= 1.85e-78) {
tmp = -60.0 * (y / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-1.8d-156)) then
tmp = a * 120.0d0
else if (a <= 1.85d-78) then
tmp = (-60.0d0) * (y / (z - t))
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.8e-156) {
tmp = a * 120.0;
} else if (a <= 1.85e-78) {
tmp = -60.0 * (y / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.8e-156: tmp = a * 120.0 elif a <= 1.85e-78: tmp = -60.0 * (y / (z - t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.8e-156) tmp = Float64(a * 120.0); elseif (a <= 1.85e-78) tmp = Float64(-60.0 * Float64(y / Float64(z - t))); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.8e-156) tmp = a * 120.0; elseif (a <= 1.85e-78) tmp = -60.0 * (y / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.8e-156], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 1.85e-78], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.8 \cdot 10^{-156}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq 1.85 \cdot 10^{-78}:\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -1.79999999999999999e-156 or 1.85000000000000003e-78 < a Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 69.3%
if -1.79999999999999999e-156 < a < 1.85000000000000003e-78Initial program 98.4%
associate-/l*99.5%
Simplified99.5%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 48.0%
Final simplification62.9%
(FPCore (x y z t a)
:precision binary64
(if (<= x 2.8e+182)
(* a 120.0)
(if (<= x 1.9e+225)
(/ x (* t -0.016666666666666666))
(/ x (* z 0.016666666666666666)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= 2.8e+182) {
tmp = a * 120.0;
} else if (x <= 1.9e+225) {
tmp = x / (t * -0.016666666666666666);
} else {
tmp = x / (z * 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) :: tmp
if (x <= 2.8d+182) then
tmp = a * 120.0d0
else if (x <= 1.9d+225) then
tmp = x / (t * (-0.016666666666666666d0))
else
tmp = x / (z * 0.016666666666666666d0)
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+182) {
tmp = a * 120.0;
} else if (x <= 1.9e+225) {
tmp = x / (t * -0.016666666666666666);
} else {
tmp = x / (z * 0.016666666666666666);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= 2.8e+182: tmp = a * 120.0 elif x <= 1.9e+225: tmp = x / (t * -0.016666666666666666) else: tmp = x / (z * 0.016666666666666666) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= 2.8e+182) tmp = Float64(a * 120.0); elseif (x <= 1.9e+225) tmp = Float64(x / Float64(t * -0.016666666666666666)); else tmp = Float64(x / Float64(z * 0.016666666666666666)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= 2.8e+182) tmp = a * 120.0; elseif (x <= 1.9e+225) tmp = x / (t * -0.016666666666666666); else tmp = x / (z * 0.016666666666666666); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, 2.8e+182], N[(a * 120.0), $MachinePrecision], If[LessEqual[x, 1.9e+225], N[(x / N[(t * -0.016666666666666666), $MachinePrecision]), $MachinePrecision], N[(x / N[(z * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 2.8 \cdot 10^{+182}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;x \leq 1.9 \cdot 10^{+225}:\\
\;\;\;\;\frac{x}{t \cdot -0.016666666666666666}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z \cdot 0.016666666666666666}\\
\end{array}
\end{array}
if x < 2.80000000000000006e182Initial program 99.4%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 57.9%
if 2.80000000000000006e182 < x < 1.9e225Initial program 100.0%
associate-/l*99.6%
Simplified99.6%
associate-/r/99.8%
Applied egg-rr99.8%
Taylor expanded in x around inf 77.1%
*-commutative77.1%
associate-*l/77.3%
associate-/l*77.1%
Simplified77.1%
Taylor expanded in z around 0 70.1%
*-commutative70.1%
Simplified70.1%
if 1.9e225 < x Initial program 99.3%
associate-/l*99.5%
Simplified99.5%
associate-/r/99.6%
Applied egg-rr99.6%
Taylor expanded in x around inf 84.6%
*-commutative84.6%
associate-*l/84.2%
associate-/l*84.5%
Simplified84.5%
Taylor expanded in z around inf 69.8%
*-commutative69.8%
Simplified69.8%
Final simplification59.4%
(FPCore (x y z t a) :precision binary64 (if (<= x 3.8e+182) (* a 120.0) (if (<= x 2.7e+225) (/ (* x -60.0) t) (/ x (* z 0.016666666666666666)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= 3.8e+182) {
tmp = a * 120.0;
} else if (x <= 2.7e+225) {
tmp = (x * -60.0) / t;
} else {
tmp = x / (z * 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) :: tmp
if (x <= 3.8d+182) then
tmp = a * 120.0d0
else if (x <= 2.7d+225) then
tmp = (x * (-60.0d0)) / t
else
tmp = x / (z * 0.016666666666666666d0)
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.8e+182) {
tmp = a * 120.0;
} else if (x <= 2.7e+225) {
tmp = (x * -60.0) / t;
} else {
tmp = x / (z * 0.016666666666666666);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= 3.8e+182: tmp = a * 120.0 elif x <= 2.7e+225: tmp = (x * -60.0) / t else: tmp = x / (z * 0.016666666666666666) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= 3.8e+182) tmp = Float64(a * 120.0); elseif (x <= 2.7e+225) tmp = Float64(Float64(x * -60.0) / t); else tmp = Float64(x / Float64(z * 0.016666666666666666)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= 3.8e+182) tmp = a * 120.0; elseif (x <= 2.7e+225) tmp = (x * -60.0) / t; else tmp = x / (z * 0.016666666666666666); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, 3.8e+182], N[(a * 120.0), $MachinePrecision], If[LessEqual[x, 2.7e+225], N[(N[(x * -60.0), $MachinePrecision] / t), $MachinePrecision], N[(x / N[(z * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 3.8 \cdot 10^{+182}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;x \leq 2.7 \cdot 10^{+225}:\\
\;\;\;\;\frac{x \cdot -60}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z \cdot 0.016666666666666666}\\
\end{array}
\end{array}
if x < 3.80000000000000013e182Initial program 99.4%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 57.9%
if 3.80000000000000013e182 < x < 2.6999999999999999e225Initial program 100.0%
associate-/l*99.6%
Simplified99.6%
associate-/r/99.8%
Applied egg-rr99.8%
Taylor expanded in a around 0 77.1%
associate-*r/77.3%
*-commutative77.3%
associate-*r/77.1%
Simplified77.1%
Taylor expanded in z around 0 70.1%
Taylor expanded in x around inf 70.0%
associate-*r/70.2%
Simplified70.2%
if 2.6999999999999999e225 < x Initial program 99.3%
associate-/l*99.5%
Simplified99.5%
associate-/r/99.6%
Applied egg-rr99.6%
Taylor expanded in x around inf 84.6%
*-commutative84.6%
associate-*l/84.2%
associate-/l*84.5%
Simplified84.5%
Taylor expanded in z around inf 69.8%
*-commutative69.8%
Simplified69.8%
Final simplification59.4%
(FPCore (x y z t a) :precision binary64 (if (<= y 7.5e+196) (* a 120.0) (* -60.0 (/ y z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= 7.5e+196) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (y / z);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (y <= 7.5d+196) then
tmp = a * 120.0d0
else
tmp = (-60.0d0) * (y / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= 7.5e+196) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (y / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= 7.5e+196: tmp = a * 120.0 else: tmp = -60.0 * (y / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= 7.5e+196) tmp = Float64(a * 120.0); else tmp = Float64(-60.0 * Float64(y / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= 7.5e+196) tmp = a * 120.0; else tmp = -60.0 * (y / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, 7.5e+196], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 7.5 \cdot 10^{+196}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if y < 7.5000000000000005e196Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 57.9%
if 7.5000000000000005e196 < y Initial program 96.6%
associate-/l*99.5%
Simplified99.5%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 78.2%
associate-*r/75.1%
Simplified75.1%
Taylor expanded in z around inf 56.3%
Final simplification57.7%
(FPCore (x y z t a) :precision binary64 (* a 120.0))
double code(double x, double y, double z, double t, double a) {
return a * 120.0;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = a * 120.0d0
end function
public static double code(double x, double y, double z, double t, double a) {
return a * 120.0;
}
def code(x, y, z, t, a): return a * 120.0
function code(x, y, z, t, a) return Float64(a * 120.0) end
function tmp = code(x, y, z, t, a) tmp = a * 120.0; end
code[x_, y_, z_, t_, a_] := N[(a * 120.0), $MachinePrecision]
\begin{array}{l}
\\
a \cdot 120
\end{array}
Initial program 99.4%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in z around inf 53.1%
Final simplification53.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 2023175
(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)))